From a09314adc4a79960c7c5addd58255443f329133e Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Wed, 10 Jul 2019 13:19:53 +0800 Subject: [PATCH 001/951] Translating Continuous integration testing for the Linux kernel.md --- ... integration testing for the Linux kernel.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename {sources => translated}/tech/20190613 Continuous integration testing for the Linux kernel.md (92%) diff --git a/sources/tech/20190613 Continuous integration testing for the Linux kernel.md b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md similarity index 92% rename from sources/tech/20190613 Continuous integration testing for the Linux kernel.md rename to translated/tech/20190613 Continuous integration testing for the Linux kernel.md index d837cd9e67..2d8c58fcd4 100644 --- a/sources/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md @@ -7,29 +7,30 @@ [#]: via: (https://opensource.com/article/19/6/continuous-kernel-integration-linux) [#]: author: (Major Hayden https://opensource.com/users/mhayden) -Continuous integration testing for the Linux kernel +Linux 内核的持续集成测试 ====== -How this team works to prevent bugs from being merged into the Linux -kernel. + +> 团队如何防止 bug 被合并到 Linux 内核中。 + ![Linux kernel source code \(C\) in Visual Studio Code][1] -With 14,000 changesets per release from over 1,700 different developers, it's clear that the Linux kernel moves quickly, and brings plenty of complexity. Kernel bugs range from small annoyances to larger problems, such as system crashes and data loss. +每个版本包含了来自 1,700 个开发者产生的 14,000 个更改,很显然,这使得 Linux 内核在快速迭代同时产生了大量复杂性问题。内核 Bug 有小麻烦也有大问题,例如系统奔溃和数据丢失。 As the call for continuous integration (CI) grows for more and more projects, the [Continuous Kernel Integration (CKI)][2] team forges ahead with a single mission: prevent bugs from being merged into the kernel. -### Linux testing problems +### Linux 测试问题 Many Linux distributions test the Linux kernel when needed. This testing often occurs around release time, or when users find a bug. Unrelated issues sometimes appear, and maintainers scramble to find which patch in a changeset full of tens of thousands of patches caused the new, unrelated bug. Diagnosing the bug may require specialized hardware, a series of triggers, and specialized knowledge of that portion of the kernel. -#### CI and Linux +#### CI 和 Linux Most modern software repositories have some sort of automated CI testing that tests commits before they find their way into the repository. This automated testing allows the maintainers to find software quality issues, along with most bugs, by reviewing the CI report. Simpler projects, such as a Python library, come with tons of tools to make this process easier. Linux must be configured and compiled prior to any testing. Doing so takes time and compute resources. In addition, that kernel must boot in a virtual machine or on a bare metal machine for testing. Getting access to certain system architectures requires additional expense or very slow emulation. From there, someone must identify a set of tests which trigger the bug or verify the fix. -#### How the CKI team works +#### CKI 团队如何运作? The CKI team at Red Hat currently follows changes from several internal kernels, as well as upstream kernels such as the [stable kernel tree][3]. We watch for two critical events in each repository: @@ -54,7 +55,7 @@ Each kernel is booted on its native architecture, which includes: Multiple tests run on these kernels, including the [Linux Test Project (LTP)][16], which contains a myriad of tests using a common test harness. My CKI team open-sourced over 44 tests with more on the way. -### Get involved +### 参与其中 The upstream kernel testing effort grows day-by-day. Many companies provide test output for various kernels, including [Google][17], Intel, [Linaro][18], and [Sony][19]. Each effort is focused on bringing value to the upstream kernel as well as each company’s customer base. From 95f5df7760d39b057cf58c442170d46764647154 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Sun, 14 Jul 2019 14:48:16 +0800 Subject: [PATCH 002/951] Translating Continuous integration testing for the Linux kernel.md --- ...Continuous integration testing for the Linux kernel.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md index 2d8c58fcd4..556bf9b55c 100644 --- a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md @@ -14,15 +14,15 @@ Linux 内核的持续集成测试 ![Linux kernel source code \(C\) in Visual Studio Code][1] -每个版本包含了来自 1,700 个开发者产生的 14,000 个更改,很显然,这使得 Linux 内核在快速迭代同时产生了大量复杂性问题。内核 Bug 有小麻烦也有大问题,例如系统奔溃和数据丢失。 +Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14,000 个更改,很显然,这使得 Linux 内核快速迭代的同时也产生了大量复杂性问题。内核上 Bug 有小麻烦也有大问题,例如系统奔溃和数据丢失。 -As the call for continuous integration (CI) grows for more and more projects, the [Continuous Kernel Integration (CKI)][2] team forges ahead with a single mission: prevent bugs from being merged into the kernel. +随着越来越多的项目对于持续集成(CI)的呼声,[内核持续集成(CKI)][2]小组保持着一个任务目标:防止 Bug 被合并到内核当中。 ### Linux 测试问题 -Many Linux distributions test the Linux kernel when needed. This testing often occurs around release time, or when users find a bug. +许多 Linux 发行版只在需要的时候测试 Linux 内核。而这个测试往往只在版本发布时或者用户发现错误时进行。 -Unrelated issues sometimes appear, and maintainers scramble to find which patch in a changeset full of tens of thousands of patches caused the new, unrelated bug. Diagnosing the bug may require specialized hardware, a series of triggers, and specialized knowledge of that portion of the kernel. +有时会出现不相关的问题,维护人员会在包含了数万个补丁的变更中匆忙地寻找哪个补丁导致这个不相关的新 Bug。诊断 Bug 需要专业的硬件设备、一系列的触发器以及内核相关的专业知识。 #### CI 和 Linux From 2d33ef0ae4936d47c287fb78e00ecb759881caf2 Mon Sep 17 00:00:00 2001 From: ZhiW5217 <49193683+ZhiW5217@users.noreply.github.com> Date: Wed, 17 Jul 2019 13:03:21 +0800 Subject: [PATCH 003/951] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Microsoft Visio Alternatives for Linux.md | 243 ------------------ ... Microsoft Visio Alternatives for Linux.md | 240 +++++++++++++++++ 2 files changed, 240 insertions(+), 243 deletions(-) delete mode 100644 sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md create mode 100644 translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md diff --git a/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md deleted file mode 100644 index 02bbb95f37..0000000000 --- a/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md +++ /dev/null @@ -1,243 +0,0 @@ -ZhiW5217 is translating -Top 10 Microsoft Visio Alternatives for Linux -====== -**Brief: If you are looking for a good Visio viewer in Linux, here are some alternatives to Microsoft Visio that you can use in Linux.** - -[Microsoft Visio][1] is a great tool for creating or generating mission-critical diagrams and vector representations. While it may be a good tool for making floor plans or other kinds of diagrams - it is neither free nor open source. - -Moreover, Microsoft Visio is not a standalone product. It comes bundled with Microsoft Office. We have already seen [open source alternatives to MS Office][2] in the past. Today we'll see what tools you can use in place of Visio on Linux. - -## Best Microsoft Visio alternatives for Linux - -![Microsoft Visio Alternatives for Linux][4] - -Mandatory disclaimer here. The list is not a ranking. The product at number three is not better than the one at number six on the list. - -I have also mentioned a couple of non open source Visio software that you can use from the web interface. - -| Software | Type | License Type | -| LibreOffice Draw | Desktop Software | Free and Open Source | -| OpenOffice Draw | Desktop Software | Free and Open Source | -| Dia | Desktop Software | Free and Open Source | -| yED Graph Editor | Desktop and web-based | Freemium | -| Inkscape | Desktop Software | Free and Open Source | -| Pencil | Desktop and web-based | Free and Open Source | -| Graphviz | Desktop Software | Free and Open Source | -| darw.io | Desktop and web-based | Free and Open Source | -| Lucidchart | Web-based | Freemium | -| Calligra Flow | Desktop Software | Free and Open Source | - - -### 1. LibreOffice Draw - -![][5] - -LibreOffice Draw module is one of the best open source alternatives to Microsoft Visio. With the help of it, you can either choose to make a quick sketch of an idea or a complex professional floor plan for presentation. Flowcharts, organization charts, network diagrams, brochures, posters, and what not! All that without even requiring to spend a penny. - -Good thing is that it comes bundled with LibreOffice which is installed in most Linux distributions by default. - -#### Overview of Key Features: - - * Style & Formatting tools to make Brochures/Posters - * Calc Data Visualization - * PDF-File editing capability - * Create Photo Albums by manipulating the pictures from Gallery - * Flexible Diagramming tools similar to the ones with Microsoft Visio (Smart Connectors, Dimension lines, etc.,) - * Supports .VSD files (to open) - - - -[LibreOffice Draw][6] - -### 2. Apache OpenOffice Draw - -![][7] - -A lot of people do know about OpenOffice (on which LibreOffice project was initially based on) but they don't really mention Apache OpenOffice Draw as an alternative to Microsoft Visio. But, for a fact - it is yet another amazing open-source diagramming software tool. Unlike LibreOffice Draw, it does not support editing PDF files but it does offer drawing tools for any type of diagram creation. - -Just a caveat here. Use this tool only if you have OpenOffice already on your system. This is because [installing OpenOffice][8] is a pain and it is [not properly developed anymore][9]. - -#### Overview of Key Features: - - * 3D Controller to create shapes quickly - * Create (.swf) flash versions of your work - * Style & Formatting tools - * Flexible Diagramming tools similar to the ones with Microsoft Visio (Smart Connectors, Dimension lines, etc.,) - - - -[Apache OpenOffice Draw][10] - -### 3. Dia - -![][11] - -Dia is yet another interesting open source tool. It may not seem to be under active development like the other ones mentioned. But, if you were looking for a free and open source alternative to Microsoft Visio for simple and decent diagrams - Dia could be your choice. The only let down of this tool for you could be its user interface. Apart from that, it does let you utilize powerful tools for a complex diagram (but it may not look great - so we recommend it for simpler diagrams). - -#### Overview of Key Features: - - * It can be used via command-line - * Styling & Formatting tools - * Shape Repository for custom shapes - * Diagramming tools similar to the ones with Microsoft Visio (Special Objects, Grid Lines, Layers, etc.,) - * Cross-platform - - - -[Dia][12] - -### 4. yED Graph Editor - -yED Graph editor is one of the most loved free Microsoft Visio alternative. If you worry about it being a freeware but not an open source project, you can still utilize [yED's live editor][13] via your web browser for free. It is one of the best recommendations if you want to make diagrams quickly with a very easy-to-use interface. - -#### Overview of Key Features: - - * Drag and drop feature for easy diagram making - * Supports importing external data for linking - - - -[yED Graph Editor][14] - -### 5. Inkscape - -![][15] - -Inkscape is a free and open source vector graphics editor. You get the basic functionalities of creating a flowchart or a data flow diagram. It does not offer advanced diagramming tools but the basic ones to create simpler diagrams. So, Inkscape could be your Visio alternative only if you are looking to generate basic diagrams with the help of diagram connector tool by utilizing the available symbols from the library. - -#### Overview of Key Features: - - * Connector Tool - * Flexible drawing tools - * Broad file format compatibility - - - -[Inkscape][16] - -### 6. Pencil Project - -![][17] - -Pencil Project is an impressive open source initiative that is available for both Windows and Mac along with Linux. It features an easy-to-use GUI which makes diagramming easier and convenient. A good collection of inbuilt shapes and symbols to make your diagrams look great. It also comes baked in with Android and iOS UI stencils to let you start prototyping apps when needed. - -You can also have it installed as a Firefox extension - but the extension does not utilize the latest build of the project. - -#### Overview of Key Features: - - * Browse cliparts easily (utilizing openclipart.org) - * Export as an ODT file / PDF file - * Diagram connector tool - * Cross-platform - - - -[Pencil Project][18] - -### 7. Graphviz - - -![][19] - -Graphviz is slightly different. It is not a drawing tool but a dedicated graph visualization tool. You should definitely utilize this tool if you are into network diagrams which require several designs to represent a node. Well, of course, you can't make a floor plan with this tool (it won't be easy at least). So, it is best-suited for network diagrams, bioinformatics, database connections, and similar stuff. - -#### Overview of Key Features: - - * Supports command-line usage - * Supports custom shapes & tabular node layouts - * Basic stying and formatting tools - - - -[Graphviz][20] - -### 8. Draw.io - -Draw.io is primarily a free web-based diagramming tool with powerful tools to make almost any type of diagrams. You just need to drag n drop and then connect them to create a flowchart, an E-R diagram, or anything relevant. Also, if you like the tool, you can try the [offline desktop version][21]. - -**Overview of Key Features:** - - * Direct uploads to a cloud storage service - * Custom Shapes - * Styling & Formatting tools - * Cross-platform - - - -[Draw.io][22] - -### 9. Lucidchart - -![][23] - -Lucidchart is a premium web-based diagramming tool which offers a free subscription with limited features. You can utilize the free subscription to create several types of diagrams and export them as an image or a PDF. However, the free version does not support data linking and Visio import/export functionality. If you do not need data linking -Lucidchart could prove to be a very good tool while generating beautiful diagrams. - -#### Overview of Key Features: - - * Integrations to Slack, Jira Core, Confluence - * Ability to make product mockups - * Import Visio files - - - -[Lucidchart][24] - -### 10. Calligra Flow - -![calligra flow][25] - -Calligra Flow is a part of [Calligra Project][26] which aims to provide free and open source software tools. With Calligra flow, you can easily create network diagrams, entity-relation diagrams, flowcharts, and more. - -#### Overview of Key Features: - - * Wide range of stencil boxes - * Styling and formatting tools - - - -[Calligra Flow][27] - -### Wrapping Up - -Now that you know about the best free and open source Visio alternatives, what do you think about them? - -Are they better than Microsoft Visio in any aspect of your requirements? Also, let us know in the comments below if we missed any of your favorite diagramming tools as an Linux alternative to Microsoft Visio. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/visio-alternatives-linux/ - -作者:[Ankush Das][a] -译者:[译者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/ -[1]:https://products.office.com/en/visio/flowchart-software -[2]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ -[3]:data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs= -[4]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png -[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg -[6]:https://www.libreoffice.org/discover/draw/ -[7]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg -[8]:https://itsfoss.com/install-openoffice-ubuntu-linux/ -[9]:https://itsfoss.com/openoffice-shutdown/ -[10]:https://www.openoffice.org/product/draw.html -[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/dia-screenshot.jpg -[12]:http://dia-installer.de/ -[13]:https://www.yworks.com/products/yed-live -[14]:https://www.yworks.com/products/yed -[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg -[16]:https://inkscape.org/en/ -[17]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/pencil-project.jpg -[18]:http://pencil.evolus.vn/Downloads.html -[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/graphviz.jpg -[20]:http://graphviz.org/ -[21]:https://about.draw.io/integrations/#integrations_offline -[22]:https://about.draw.io/ -[23]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg -[24]:https://www.lucidchart.com/ -[25]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/calligra-flow.jpg -[26]:https://www.calligra.org/ -[27]:https://www.calligra.org/flow/ diff --git a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md new file mode 100644 index 0000000000..1abb0c0a35 --- /dev/null +++ b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md @@ -0,0 +1,240 @@ +用于 Linux 中代替 Microsoft Visio 的十个最佳备选方案 +====== +**简介:如果您正在 Linux 中寻找一个好的 Visio 查看器,这里有一些可以在 Linux 中使用的 Microsoft Visio 的替代方案。** + +Microsoft Visio 是创建或生成关键任务图和矢量表示的绝佳工具。虽然它可能是制作平面图或其他类型图表的好工具 - 但它既不是免费的,也不是开源的 + +此外,Microsoft Visio 不是一个独立的产品。它与 Microsoft Office 捆绑在一起。我们过去已经看过 MS Office 的开源替代品。今天我们将看到您可以使用哪些工具代替 Linux 上的 Visio。 + +## 适用于 Linux 的最佳 Microsoft Visio 备选方案 + +![用于 Linux 的 Microsoft Visio 备选方案][4] + +此处为强制性免责声明。该列表不是排名。排名第三的产品并不比排名第六的好。 + +我还提到了一些可以从 Web 界面使用的非开源 Visio 软件。 + +| 软件| 输入| 许可证类型| +| LibreOffice Draw | 桌面软件| 免费和开源| +| OpenOffice Draw | 桌面软件| 免费和开源| +| Dia | 桌面软件| 免费和开源| +| yED图形编辑器| 桌面和基于网络| 免费增值| +| Inkscape | 桌面软件| 免费和开源| +| 铅笔| 桌面和基于网络| 免费和开源| +| Graphviz | 桌面软件| 免费和开源| +| darw.io | 桌面和基于网络| 免费和开源| +| Lucidchart | 基于网络| 免费增值| +| Calligra Flow | 桌面软件| 免费和开源| + + +### 1. LibreOffice Draw + +![][5] + +LibreOffice Draw 模块是 Microsoft Visio 的最佳开源替代方案之一。在它的帮助下,你可以选择制作一个想法的速写或一个复杂的专业平面布置图来展示。流程图,组织结构图,网络图,小册子,海报等等!所有这些都不需要花一分钱。 + +好的是它与 LibreOffice 捆绑在一起,默认情况下安装在大多数 Linux 发行版中。 + +#### 主要功能概述: + + * 用于制作宣传册/海报的样式和格式工具 + * Calc 数据可视化 + * PDF 文件编辑功能 + * 通过操作图库中的图片来创建相册 + * 灵活的绘图工具类似于 Microsoft Visio (智能连接器,尺寸线等)的工具 + * 支持 .VSD 文件(打开) + + + +[LibreOffice Draw][6] + +### 2. Apache OpenOffice Draw + +![][7] + +很多人都知道 OpenOffice ( LibreOffice 项目最初基于它),但他们并没有真正提到 Apache OpenOffice Draw 作为 Microsoft Visio 的替代方案。但事实上,它是另一个令人惊奇的开源图表软件工具。与 LibreOffice Draw 不同,它不支持编辑 PDF 文件,但它为任何类型的图表创建提供了绘图工具。 + +这只是个警告。仅当您的系统中已经有 OpenOffic e时才使用此工具。这是因为[安装 OpenOffice ][8] 是一件痛苦的事情,而且[不适合再开发][9]。 + +#### 主要功能概述: + + * 快速创建 3D 形状控制器 + * 创建(.swf)工作的 flash 版本 + * 样式和格式工具 + * 与M icrosoft Visio 类似的灵活绘图工具(智能连接器,尺寸线等) + + + +[Apache OpenOffice Draw][10] + +### 3. Dia + +![][11] + +Dia 是另一个有趣的开源工具。它可能不像前面提到的那样处于积极发展之中。但是,如果您正在寻找一个免费的,开源的替代 Microsoft Visio 的简单而体面的图表,那么 Dia 可能是您的选择。这个工具唯一让你失望的地方就是它的用户界面。除此之外,它还允许您为复杂的图使用强大的工具(但它看起来可能不太好——所以我们建议您使用更简单的图)。 + +#### 主要功能概述: + + * 它可以通过命令行使用 + * 样式和格式工具 + * 用于自定义形状的形状存储库 + * 与 Microsoft Visio 类似的绘图工具(特殊对象,网格线,图层等) + * 跨平台 + + + +[Dia][12] + +### 4. yED Graph Editor + +是最受欢迎的免费 Microsoft Visio 替代方案之一。如果你担心它是一个免费软件而不是开源项目,您仍然可以通过 web 浏览器免费使用 yED 的实时编辑器。如果您想用一个非常易于使用的界面快速绘制图表,这是最好的建议之一。 + +#### 主要功能概述: + + * 拖放功能,方便图表制作 + * 支持导入外部数据进行链接 + + + +[yED Graph Editor][14] + +### 5. Inkscape + +![][15] + +Inkscape 是一个免费的开源矢量图形编辑器。您将了解创建流程图或数据流程图的基本功能。它不提供高级的图表绘制工具,而是提供创建更简单图表的基本工具。因此,Inkscape 可能是您的 Visio 替代品,只有当您希望通过使用图库中的可用符号,在图库连接器工具的帮助下生成基本图时,才可以使用它。 + +#### 主要功能概述: + + * 连接器工具 + * 灵活的绘图工具 + * 广泛的文件格式兼容性 + + + +[Inkscape][16] + +### 6. Pencil Project + +![][17] + +Pencil Project 是一个令人印象深刻的开源项目,适用于 Windows 和 Mac 以及 Linux。它具有易于使用的 GUI,使绘图更容易和方便。一个很好的内建形状和符号的集合,使您的图表看起来很棒。它还内置了 Android 和 iOS UI 模板,可以让你在需要时创建应用程序原型。 + +您也可以将其安装为 Firefox 扩展,但该扩展不能使用项目的最新版本。 + +#### 主要功能概述: + + * 轻松浏览剪贴画(使用 openclipart.org) + * 导出为 ODT 文件/PDF 文件 + * 图表连接工具 + * 跨平台 + + +[Pencil Project][18] + +### 7. Graphviz + + +![][19] + +Graphviz 略有不同。它不是绘图工具,而是专用的图形可视化工具。如果您在网络图中需要多个设计来表示一个节点,那么一定要使用这个工具。当然,你不能用这个工具做平面布置图(至少这不容易)。因此,它最适合于网络图,生物信息学,数据库连接和类似的东西。 + +#### 主要功能概述: + + * 支持命令行使用 + * 支持自定义形状和表格节点布局 + * 基本样式和格式设置工具 + + + +[Graphviz][20] + +### 8. Draw.io + +Draw.io 主要是一个免费的基于 Web 的图表工具,它有强大的工具几乎可以制作任何类型的图表。您只需要拖放然后连接它们以创建流程图,ER 图或任何相关的。此外,如果您喜欢该工具,则可以尝试脱机桌面版本[离线桌面版本][21]。 + +**主要功能概述:** + + * 直接上传到云存储服务 + * 自定义形状 + * 样式和格式工具 + * 跨平台 + + + +[Draw.io][22] + +### 9. Lucidchart + +![][23] + +Lucidchart 是一个高级的基于 Web 的图表工具,它提供了一个具有有限功能的免费订阅。您可以使用免费订阅创建几种类型的图表,并将其导出为图像或 PDF。但是,免费版本不支持数据链接和 Visio 导入/导出功能。如果您不需要数据链接 Lucidchart 可以说是一个非常好的工具,同时可以生成漂亮的图表。 + +####主要功能概述: + + * 集成到 Slack,Jira 核心,Confluence + * 能够制作产品模型 + * 导入 Visio 文件 + + + +[Lucidchart][24] + +### 10. Calligra Flow + +![calligra flow][25] + +Calligra Flow 是[Calligra Project][26]的一部分,宗旨市提供免费和开源的软件工具。使用 Calligra flow 您可以轻松地创建网络图,实体关系图,流程图等 + +#### 主要功能概述: + + * 各种模具盒 + * 样式和格式工具 + + + +[Calligra Flow][27] + +### Wrapping Up + +既然你已经知道了最好的免费和开源的 Visio 替代方案,你对它们有什么看法? + +在您任何方面的需求中,它们是否优于 Microsoft Visio?另外,如果我们错过了您最喜欢的基于 Linux 替代 Microsoft Visio 的绘图工具,请在下面的评论中告诉我们。 +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/visio-alternatives-linux/ + +作者:[Ankush Das][a] +译者:[ZhiW5217](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/ +[1]:https://products.office.com/en/visio/flowchart-software +[2]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[3]:data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs= +[4]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png +[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg +[6]:https://www.libreoffice.org/discover/draw/ +[7]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg +[8]:https://itsfoss.com/install-openoffice-ubuntu-linux/ +[9]:https://itsfoss.com/openoffice-shutdown/ +[10]:https://www.openoffice.org/product/draw.html +[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/dia-screenshot.jpg +[12]:http://dia-installer.de/ +[13]:https://www.yworks.com/products/yed-live +[14]:https://www.yworks.com/products/yed +[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg +[16]:https://inkscape.org/en/ +[17]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/pencil-project.jpg +[18]:http://pencil.evolus.vn/Downloads.html +[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/graphviz.jpg +[20]:http://graphviz.org/ +[21]:https://about.draw.io/integrations/#integrations_offline +[22]:https://about.draw.io/ +[23]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg +[24]:https://www.lucidchart.com/ +[25]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/calligra-flow.jpg +[26]:https://www.calligra.org/ +[27]:https://www.calligra.org/flow/ From 67b81bc4317a90790efebbeace2e0c2cf681601a Mon Sep 17 00:00:00 2001 From: ZhiW5217 <49193683+ZhiW5217@users.noreply.github.com> Date: Wed, 17 Jul 2019 13:07:33 +0800 Subject: [PATCH 004/951] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0171226 Top 10 Microsoft Visio Alternatives for Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md index 1abb0c0a35..cf4c4b3969 100644 --- a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md +++ b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md @@ -54,7 +54,7 @@ LibreOffice Draw 模块是 Microsoft Visio 的最佳开源替代方案之一。 很多人都知道 OpenOffice ( LibreOffice 项目最初基于它),但他们并没有真正提到 Apache OpenOffice Draw 作为 Microsoft Visio 的替代方案。但事实上,它是另一个令人惊奇的开源图表软件工具。与 LibreOffice Draw 不同,它不支持编辑 PDF 文件,但它为任何类型的图表创建提供了绘图工具。 -这只是个警告。仅当您的系统中已经有 OpenOffic e时才使用此工具。这是因为[安装 OpenOffice ][8] 是一件痛苦的事情,而且[不适合再开发][9]。 +这只是个警告。仅当您的系统中已经有 OpenOffice 时才使用此工具。这是因为[安装 OpenOffice ][8] 是一件痛苦的事情,而且[不再继续开发][9]。 #### 主要功能概述: @@ -195,11 +195,11 @@ Calligra Flow 是[Calligra Project][26]的一部分,宗旨市提供免费和 [Calligra Flow][27] -### Wrapping Up +### 总结 既然你已经知道了最好的免费和开源的 Visio 替代方案,你对它们有什么看法? -在您任何方面的需求中,它们是否优于 Microsoft Visio?另外,如果我们错过了您最喜欢的基于 Linux 替代 Microsoft Visio 的绘图工具,请在下面的评论中告诉我们。 +在您任何方面的需求中,它们是否优于 Microsoft Visio?另外,如果我们错过了您最喜欢的基于 Linux 替代 Microsoft Visio 的绘图工具,请在下面的评论中告诉我们。 -------------------------------------------------------------------------------- via: https://itsfoss.com/visio-alternatives-linux/ From c2db3fb36fad9766be8ace691b2ba055788eb6c8 Mon Sep 17 00:00:00 2001 From: cyanbird <2534930703@qq.com> Date: Tue, 16 Jul 2019 22:17:57 +0800 Subject: [PATCH 005/951] update --- ...sons in Vendor Lock-in- Google and Huawei.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md b/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md index fef21470c9..445075b49f 100644 --- a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md +++ b/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md @@ -1,11 +1,11 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Lessons in Vendor Lock-in: Google and Huawei) -[#]: via: (https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei) -[#]: author: (Kyle Rankin https://www.linuxjournal.com/users/kyle-rankin) +[#]: collector: "lujun9972" +[#]: translator: "acyanbird " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Lessons in Vendor Lock-in: Google and Huawei" +[#]: via: "https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei" +[#]: author: "Kyle Rankin https://www.linuxjournal.com/users/kyle-rankin" Lessons in Vendor Lock-in: Google and Huawei ====== @@ -43,7 +43,6 @@ What's more, the Google Apps suite isn't just a convenient way to load Gmail or Without access to these OS updates, Huawei now will have to decide whether to create its own LineageOS-style Android fork or a whole new phone OS of its own. In either case, it will have to abandon the Google Play Store ecosystem and use F-Droid-style app repositories, or if it goes 100% alone, it will need to create a completely new app ecosystem. If its engineers planned for this situation, then they likely are working on this plan right now; otherwise, they are all presumably scrambling to address an event that "should never happen". Here's hoping that if you find yourself in a similar case of vendor lock-in with an overseas company that's too big to fail, you never get caught in the middle of a trade war. - -------------------------------------------------------------------------------- via: https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei From 2a8b8e57d0b909654dc4e7fed78fa997b6caa6f8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 15:18:55 +0800 Subject: [PATCH 006/951] PRF @vizv --- ... Sysadmin vs SRE- What-s the difference.md | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md b/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md index a47e1d3bae..203b6ffb65 100644 --- a/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md +++ b/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md @@ -1,26 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (vizv) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Sysadmin vs SRE: What's the difference?) [#]: via: (https://opensource.com/article/19/7/sysadmins-vs-sres) [#]: author: (Vince Power https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish) -系统管理员与网站可靠性工程师对比:区别在那儿? +系统管理员与网站可靠性工程师(SRE)对比:区别在那儿? ====== -系统管理员和网站可靠性工程师(SRE,下同)对于任何组织来讲都很重要。本篇将介绍下两者的不同之处。 + +> 系统管理员和网站可靠性工程师(SRE,下同)对于任何组织来讲都很重要。本篇将介绍下两者的不同之处。 + ![People work on a computer server with devices][1] -在 IT 行业,成为多面手或是专家的争议一直存在。99% 的传统系统管理员都被归到了多面手这类。[网站可靠性工程师][2]的角色则更加专精,并且其需求在如 Google 般有着一定规模的公司中不断增加。但总的来说这两者对于跑着应用的基础设施有着同样的目标:为应用的消费者提供良好的体验。然而两者的出发点却截然不同。 +在 IT 行业,成为多面手或是专家的争议一直存在。99% 的传统系统管理员都被归到了多面手这类。[网站可靠性工程师][2]site reliability engineer(SRE)的角色则更加专精,并且在如 Google 般有着一定规模的头部公司中对其的需求不断增加。但总的来说这两者对于跑着应用的基础设施有着同样的目标:为应用的消费者提供良好的体验。然而两者的出发点却截然不同。 ### 系统管理员:中立善良的化身 -系统管理员一般都是从基础的桌面或网络支持成长过来的,并一路习得大多数系统管理员都会掌握的广泛的技能。此时这些系统管理员会对他们所负责的系统和应用了如指掌。他们会知道一号服务器上的应用每隔一个星期二就需要重启一次,或是九号服务器周三会静默的崩溃。他们会对服务器的监视作出微调以忽略无关紧要的信息,尽管那是个每月第三个周日都会显示的被标记为致命fatal的错误信息。 +系统管理员一般都是从基础的桌面或网络支持成长过来的,并一路习得大多数系统管理员都会掌握的广泛的技能。此时这些系统管理员会对他们所负责的系统和应用了如指掌。他们会知道一号服务器上的应用每隔一个星期二就需要重启一次,或是九号服务器周三会静默的崩溃。他们会对服务器的监视作出微调以忽略无关紧要的信息,尽管那个被标记为致命fatal的错误信息每个月第三个周日都会显示。 总的来讲,系统管理员了解如何照料那些跑着你核心业务的服务器。这些系统管理员已经成长到开始使用自动化工具去处理所有归他们管的服务器上的例行任务。他们虽然喜欢使用模板、黄金镜像golden images、以及标准,但同时也有着足够的灵活度去修改一个服务器上的参数以解决错误,并注释为什么那个服务器的配置与众不同。 -尽管系统管理员很伟大,但他们也有着一些怪癖。其中一项就是没有他们神圣的授权你永远也获取不了系统的 root 访问权限,另一项则是任何不是他们的主意都在文档被记录为应用的提供者的要求,并仍然需要再次核对。 +尽管系统管理员很伟大,但他们也有着一些怪癖。其中一项就是没有他们神圣的授权你永远也获取不了系统的 root 访问权限,另一项则是任何不是出于他们的主意的变更都要在文档中被记录为应用提供方的要求,并仍然需要再次核对。 他们所管理的服务器是他们的地盘,没有人可以随意干涉。 @@ -28,15 +30,15 @@ 与成为系统管理员的道路相反,从开发背景和从系统管理员背景成长为 SRE 的可能性相近。SRE 的职位出现的时长与应用开发环境的生命周期相近。 -随着一个组织的发展而引入的类似于[持续集成][4]和[持续发布][5] (CI/CD) 的 [DevOps][3] 概念,通常会带来如何让这些不可变immutable的应用部署到多个环境并随着业务需求进行扩展的技能空缺。着将是 SRE 的舞台。的确,一个系统管理员可以学习额外的工具,但大体上成为一个全职的职位更容易跟的上进度。在这里成为一个专家更说的通。 +随着一个组织的发展而引入的类似于[持续集成][4]和[持续发布][5] (CI/CD) 的 [DevOps][3] 概念,通常会出现技能空缺,以让这些不可变immutable的应用部署到多个环境并随着业务需求进行扩展。这将是 SRE 的舞台。的确,一个系统管理员可以学习额外的工具,但大体上成为一个全职的职位更容易跟的上发展。一个专精的专家更有意义。 -SRE 使用如[代码即基础设施][6]infrastructure-as-code的概念去制作模板,然后调用它们来部署用以运行应用的环境,并以使用一键将每个应用和它们的环境完整重现作为目标。因此测试环境中一号服务器里的一号应用的二进制文件与生产环境中十五号服务器的完全一致,仅环境相关的变量如密码和数据库链接字串有所不同。 +SRE 使用如[代码即基础设施][6]infrastructure-as-code的概念去制作模板,然后调用它们来部署用以运行应用的环境,并以使用一键完整重现每个应用和它们的环境作为目标。因此会出现这样的情况:测试环境中一号服务器里的一号应用的二进制文件与生产环境中十五号服务器的完全一致,仅环境相关的变量如密码和数据库链接字串有所不同。 -SRE 同时也在配置发生改变时完全摧毁一个环境并重新构建它。对于任何系统他们不带一点感情。每个系统只是个被打了标记和安排了生命周期的数字,甚至例行的服务器补丁也要重新部署整个应用栈application stack +SRE 也会在配置发生改变时完全销毁一个环境并重新构建它。对于任何系统他们都不带一点感情。每个系统只是个被打了标记和安排了生命周期的数字而已,甚至连例行的对服务器打补丁也要重新部署整个应用栈application stack ### 总结 -对于一些情况,尤其是运维一些大型的基于 DevOps 的环境时,一个 SRE 所能提供的用于处理各种规模业务的专业技能当然更具优势。但每次他们在运气不好走入死胡同时都会去寻求友人系统管理员,或是 [(BOFH)][7] 那身经百战的故障排除技能和那些系统管理员用于给组织提供价值的丰富经验的帮助。 +对于一些情况,尤其是运维一些大型的基于 DevOps 的环境时,一个 SRE 所能提供的用于处理各种规模的业务的专业技能当然更具优势。但每次他们在运气不好走入死胡同时都会去寻求他的系统管理员友人,或是 [(BOFH)][7] 那身经百战的故障排除技能,和那些用于给组织提供价值的丰富经验的系统管理员的帮助。 -------------------------------------------------------------------------------- @@ -45,7 +47,7 @@ via: https://opensource.com/article/19/7/sysadmins-vs-sres 作者:[Vince Power][a] 选题:[lujun9972][b] 译者:[vizv](https://github.com/vizv) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5355532e27bbe1d219e06e6a06630f4e0942b893 Mon Sep 17 00:00:00 2001 From: leemeans <1808577072@qq.com> Date: Wed, 17 Jul 2019 17:10:31 +0800 Subject: [PATCH 007/951] leemeans translating leemeans translating 7 deadly sins of documentation --- sources/tech/20171006 7 deadly sins of documentation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20171006 7 deadly sins of documentation.md b/sources/tech/20171006 7 deadly sins of documentation.md index 5f2005c764..2289481584 100644 --- a/sources/tech/20171006 7 deadly sins of documentation.md +++ b/sources/tech/20171006 7 deadly sins of documentation.md @@ -1,3 +1,4 @@ +leemeans translating 7 deadly sins of documentation ====== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-cat-writing-king-typewriter-doc.png?itok=afaEoOqc) From c05240c7523b4a5e1797d48773442a348c55a189 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 21:44:05 +0800 Subject: [PATCH 008/951] PRF @vizv --- .../tech/20190709 Sysadmin vs SRE- What-s the difference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md b/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md index 203b6ffb65..ea44dd56c6 100644 --- a/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md +++ b/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md @@ -12,7 +12,7 @@ > 系统管理员和网站可靠性工程师(SRE,下同)对于任何组织来讲都很重要。本篇将介绍下两者的不同之处。 -![People work on a computer server with devices][1] +![](https://img.linux.net.cn/data/attachment/album/201907/17/214505qgk19kjuvzb2m1m4.jpg) 在 IT 行业,成为多面手或是专家的争议一直存在。99% 的传统系统管理员都被归到了多面手这类。[网站可靠性工程师][2]site reliability engineer(SRE)的角色则更加专精,并且在如 Google 般有着一定规模的头部公司中对其的需求不断增加。但总的来说这两者对于跑着应用的基础设施有着同样的目标:为应用的消费者提供良好的体验。然而两者的出发点却截然不同。 @@ -38,7 +38,7 @@ SRE 也会在配置发生改变时完全销毁一个环境并重新构建它。 ### 总结 -对于一些情况,尤其是运维一些大型的基于 DevOps 的环境时,一个 SRE 所能提供的用于处理各种规模的业务的专业技能当然更具优势。但每次他们在运气不好走入死胡同时都会去寻求他的系统管理员友人,或是 [(BOFH)][7] 那身经百战的故障排除技能,和那些用于给组织提供价值的丰富经验的系统管理员的帮助。 +对于一些情况,尤其是运维一些大型的基于 DevOps 的环境时,一个 SRE 所能提供的用于处理各种规模的业务的专业技能当然更具优势。但每次他们在运气不好走入死胡同时都会去寻求他的系统管理员友人或是 [来自地狱的混蛋运维(BOFH)][7] ,得到他那身经百战的故障排除技能,和那些用于给组织提供价值的丰富经验的帮助。 -------------------------------------------------------------------------------- From 4152e0a7259d3afa2218e8d5ce50992f1c66f72a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 21:44:45 +0800 Subject: [PATCH 009/951] PUB @vizv https://linux.cn/article-11113-1.html --- .../20190709 Sysadmin vs SRE- What-s the difference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190709 Sysadmin vs SRE- What-s the difference.md (98%) diff --git a/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md b/published/20190709 Sysadmin vs SRE- What-s the difference.md similarity index 98% rename from translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md rename to published/20190709 Sysadmin vs SRE- What-s the difference.md index ea44dd56c6..8bbd02d67a 100644 --- a/translated/tech/20190709 Sysadmin vs SRE- What-s the difference.md +++ b/published/20190709 Sysadmin vs SRE- What-s the difference.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (vizv) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11113-1.html) [#]: subject: (Sysadmin vs SRE: What's the difference?) [#]: via: (https://opensource.com/article/19/7/sysadmins-vs-sres) [#]: author: (Vince Power https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish) From 93f7939abd13eda625fd1d2836e04ac8e5761287 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 22:30:59 +0800 Subject: [PATCH 010/951] PRF @geekpi --- ...lete A Repository And GPG Key In Ubuntu.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/translated/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md b/translated/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md index d9ef444bf4..ab054a6138 100644 --- a/translated/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md +++ b/translated/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md @@ -1,43 +1,42 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Delete A Repository And GPG Key In Ubuntu) [#]: via: (https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) - -如何在 Ubuntu 中删除仓库和 GPG 密钥 +如何在 Ubuntu 中删除仓库及其 GPG 密钥 ====== ![Delete A Repository And GPG Key In Ubuntu][1] -前几天我们讨论了如何在基于 RPM 和 DEB 的系统中[**列出已安装的仓库**][2]。今天,我们将学习如何在 Ubuntu 中删除仓库及其 GPG 密钥。对于想知道仓库的人,仓库(简称 **repo**)是开发人员存储软件包的地方。仓库的软件包经过全面测试,并由 Ubuntu 开发人员专门为每个版本构建。用户可以使用 **Apt** **包管理器**在他们的 Ubuntu 系统上下载和安装这些包。 Ubuntu 有四个官方仓库,即 **Main**、**Universe**、**Restricted** 和 **Multiverse**。 +前几天我们讨论了如何在基于 RPM 和 DEB 的系统中[列出已安装的仓库][2]。今天,我们将学习如何在 Ubuntu 中删除仓库及其 GPG 密钥。对于不知道仓库的人,仓库(简称 repo)是开发人员存储软件包的地方。仓库的软件包经过全面测试,并由 Ubuntu 开发人员专门为每个版本构建。用户可以使用 Apt 包管理器在他们的 Ubuntu 系统上下载和安装这些包。Ubuntu 有四个官方仓库,即 Main、Universe、Restricted 和 Multiverse。 -除了官方仓库外,还有许多由开发人员(或软件包维护人员)维护的非官方仓库。非官方仓库通常有官方仓库中不可用的包。所有包都由包维护者用一对密钥(公钥和私钥)签名。如你所知,公钥是发给用户的,私人必须保密。每当你在源列表中添加新的仓库时,如果 Apt 包管理器想要信任新添加的仓库,你还应该添加仓库密钥。使用仓库密钥,你可以确保从正确的人那里获得包。到这里希望你对软件仓库和仓库密钥有了一个基本的了解。现在让我们继续看看如果在 Ubuntu 系统中不再需要仓库及其密钥,那么该如何删除它。 +除了官方仓库外,还有许多由开发人员(或软件包维护人员)维护的非官方仓库。非官方仓库通常有官方仓库中不可用的包。所有包都由包维护者用一对密钥(公钥和私钥)签名。如你所知,公钥是发给用户的,私钥必须保密。每当你在源列表中添加新的仓库时,如果 Apt 包管理器想要信任新添加的仓库,你还应该添加仓库密钥(公钥)。使用仓库密钥,你可以确保从正确的人那里获得包。到这里希望你对软件仓库和仓库密钥有了一个基本的了解。现在让我们继续看看如果在 Ubuntu 系统中不再需要仓库及其密钥,那么该如何删除它。 ### 在 Ubuntu 中删除仓库 -每当使用 “add-apt-repository” 命令添加仓库时,它都将保存在 **/etc/apt/sources.list** 中。 +每当使用 `add-apt-repository` 命令添加仓库时,它都将保存在 `/etc/apt/sources.list` 中。 -要从 Ubuntu 及其衍生版中删除软件仓库,只需打开 /etc/apt/sources.list 文件并查找仓库名字并将其删除即可。 +要从 Ubuntu 及其衍生版中删除软件仓库,只需打开 `/etc/apt/sources.list` 文件并查找仓库名字并将其删除即可。 ``` $ sudo nano /etc/apt/sources.list ``` -正如你在下面的截图中看到的,我在我的 Ubuntu 系统中添加了 [**Oracle Virtualbox**][3] 仓库。 +正如你在下面的截图中看到的,我在我的 Ubuntu 系统中添加了 [Oracle Virtualbox][3] 仓库。 ![][4] -virtualbox 仓库 +*virtualbox 仓库* 要删除此仓库,只需删除该条目即可。保存并关闭文件。 -如果你已添加 PPA 仓库,请查看 **/etc/apt/sources.list.d/** 目录并删除相应的条目。 +如果你已添加 PPA 仓库,请查看 `/etc/apt/sources.list.d/` 目录并删除相应的条目。 -或者,你可以使用 “add-apt-repository” 命令删除仓库。例如,我要删除 [**Systemback**][5] 仓库,如下所示。 +或者,你可以使用 `add-apt-repository` 命令删除仓库。例如,我要删除 [Systemback][5] 仓库,如下所示。 ``` $ sudo add-apt-repository -r ppa:nemh/systemback @@ -51,7 +50,7 @@ $ sudo apt update ### 删除仓库密钥 -我们使用 “apt-key” 命令添加仓库密钥。首先,让我们使用命令列出添加的密钥: +我们使用 `apt-key` 命令添加仓库密钥。首先,让我们使用命令列出添加的密钥: ``` $ sudo apt-key list @@ -112,9 +111,9 @@ $ sudo apt-key del 73C62A1B $ sudo apt update ``` -**资源:** +资源: - * [**软件仓库 – Ubuntu 社区 Wiki**][6] + * [软件仓库 – Ubuntu 社区 Wiki][6] -------------------------------------------------------------------------------- @@ -123,7 +122,7 @@ via: https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/ 作者:[sk][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/) 荣誉推出 @@ -134,4 +133,4 @@ via: https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/ [3]: https://www.ostechnix.com/install-oracle-virtualbox-ubuntu-16-04-headless-server/ [4]: https://www.ostechnix.com/wp-content/uploads/2019/07/virtualbox-repository.png [5]: https://www.ostechnix.com/systemback-restore-ubuntu-desktop-and-server-to-previous-state/ -[6]: https://help.ubuntu.com/community/Repositories/Ubuntu \ No newline at end of file +[6]: https://help.ubuntu.com/community/Repositories/Ubuntu From 73f9b3c96ac97ff3176ef8a092377c080320545f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 22:31:24 +0800 Subject: [PATCH 011/951] PUB @geekpi https://linux.cn/article-11115-1.html --- ...190706 How To Delete A Repository And GPG Key In Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190706 How To Delete A Repository And GPG Key In Ubuntu.md (98%) diff --git a/translated/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md b/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md similarity index 98% rename from translated/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md rename to published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md index ab054a6138..896f70428d 100644 --- a/translated/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md +++ b/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11115-1.html) [#]: subject: (How To Delete A Repository And GPG Key In Ubuntu) [#]: via: (https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From 9bef59cefee48ee614e52583cd8c466362b457f3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 22:54:33 +0800 Subject: [PATCH 012/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @0x996 翻译的不错!恭喜你,完成了第一篇翻译! --- ... Unix Operating Systems Online For Free.md | 54 ++++++++----------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/translated/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md b/translated/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md index 351ca5b8a3..492bd087c1 100644 --- a/translated/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md +++ b/translated/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md @@ -1,28 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (0x996) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Test 200+ Linux And Unix Operating Systems Online For Free) [#]: via: (https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/) [#]: author: (sk https://www.ostechnix.com/author/sk/) -在线试用200多种Linux和Unix操作系统 +在线试用 200 多种 Linux 和 Unix 操作系统 ====== ![DistroTest——在线试用200多种Linux和Unix操作系统][1] -不久前我们介绍过[**OSBoxes**][2],该网站提供了一系列免费且开箱即用的Linux和Unix虚拟机。你可以在你的Linux系统中下载这些虚拟机并用VirtualBox或VMWare workstation试用。今天,我偶然发现一个名叫**“DistroTest”**的类似服务。与OSBoxes不同之处在于DistroTest让你免费试用现场版Linux和Unix操作系统。你可以在线试用200多种Linux和Unix操作系统而无需在本地安装它们。只要打开该网站,选择你需要的Linux/Unix发行版,然后开始试用! +不久前我们介绍过[OSBoxes][2],该网站提供了一系列免费且开箱即用的 Linux 和 Unix 虚拟机。你可以在你的 Linux 系统中下载这些虚拟机并用 VirtualBox 或 VMWare workstation 试用。今天,我偶然发现一个名叫 “DistroTest” 的类似服务。与 OSBoxes 不同之处在于 DistroTest 让你免费试用现场版 Linux 和 Unix 操作系统。你可以在线试用 200 多种 Linux 和 Unix 操作系统而无需在本地安装它们。只要打开该网站,选择你需要的 Linux/Unix 发行版,然后开始试用! -两个名为**Klemann Andy**和**Forster Tobias**的好心人用**Qemu**在**Debian**上运行这项网络服务。这里列出的公开发行版在使用上没有任何限制。你可以象使用本地系统一样使用系统的所有功能。你可以安装和卸载软件。你可以测试安装的程序,甚至删除或格式化硬盘,删除系统文件。简而言之,DistroTest让喜欢尝试不同发行版的的人自行决定: +两个名为 Klemann Andy 和 Forster Tobias 的好心人用 Qemu 在 Debian 上运行了这项网络服务。这里列出的公开发行版在使用上没有任何限制。你可以象使用本地系统一样使用系统的所有功能。你可以安装和卸载软件。你可以测试安装的程序,甚至删除或格式化硬盘,删除系统文件。简而言之,DistroTest让喜欢尝试不同发行版的的人自行决定: * 最适合他们的发行版 * 想要哪种图形界面 * 他们可以选择哪些配置 -本文撰写之时,DistroTest提供了**227种操作系统的711个版本**。我已经使用Linux很多年,但我从未听说过这里列出的一些发行版。说实话我甚至不知道Linux操作系统有如此之多的版本。 +本文撰写之时,DistroTest 提供了 227 种操作系统的 711 个版本。我已经使用 Linux 很多年,但我从未听说过这里列出的一些发行版。说实话我甚至不知道 Linux 操作系统有如此之多的版本。 -DistroTest网站提供的Linux发行版的列表如下。(译者注:其中也包括部分非Linux的操作系统如FreeBSD和FreeDOS,或是分区工具如Gparted) +DistroTest 网站提供的 Linux 发行版的列表如下。(LCTT 译注:其中也包括部分非 Linux 的操作系统如 FreeBSD 和 FreeDOS,或是分区工具如 Gparted) * 4mLinux * AbsoluteLinux @@ -186,60 +186,50 @@ DistroTest网站提供的Linux发行版的列表如下。(译者注:其中 * Zevenet * Zorin OS - - ### 如何使用? -要试用任何操作系统,点击下面的链接: - -![1][3] +要试用任何操作系统,点击下面的链接: https://distrotest.net/ 在这个网站,你会看到可用的操作系统列表。单击你想了解的发行版名称即可。 ![1][4] -用DistroTest试用100多种Linux和Unix操作系统 +用 DistroTest 试用 200 多种Linux和Unix操作系统 -本文中我会试用Arch Linux。 +本文中我会试用 Arch Linux。 -单击发行版链接后,在跳转到的页面单击**System start**按钮即可启动所选操作系统。 +单击发行版链接后,在跳转到的页面单击 “System start” 按钮即可启动所选操作系统。 ![1][5] -此现场版操作系统会在新浏览器窗口中启动。你可以通过内建的**noVNC viewer**访问它。请在浏览器中启用/允许DistroTest 网站的弹出窗口,否则无法看到弹出的noVNC窗口。 +此现场版操作系统会在新浏览器窗口中启动。你可以通过内建的 noVNC viewer 访问它。请在浏览器中启用/允许 DistroTest 网站的弹出窗口,否则无法看到弹出的 noVNC 窗口。 按回车启动现场版系统。 ![1][6] -这就是Arch Linux现场版系统: +这就是 Arch Linux 现场版系统: ![1][7] -你可以免费**使用这个系统1小时**。你可以试用该现场版操作系统,安装应用,卸载应用,删除或修改系统文件,测试配置或脚本。每次关机后,一切都会恢复成默认配置。 +你可以免费使用这个系统 1 小时。你可以试用该现场版操作系统、安装应用、卸载应用、删除或修改系统文件、测试配置或脚本。每次关机后,一切都会恢复成默认配置。 -一旦试用结束,回到DistroTest页面并停止你试用的系统。如果你不想启用DistroTest页面的弹出窗口,用你本地系统安装的任意VNC客户端也可以。VNC登录信息可在同一页面找到。 +一旦试用结束,回到 DistroTest 页面并停止你试用的系统。如果你不想启用 DistroTest 页面的弹出窗口,用你本地系统安装的任意 VNC 客户端也可以。VNC 登录信息可在同一页面找到。 ![1][8] -DistroTest服务对两类用户比较实用:想在线试用Linux/Unix系统,或是没有喜欢的操作系统现场版ISO镜像文件的人。我在4G 网络上测试的结果一切正常。 +DistroTest 服务对两类用户比较实用:想在线试用 Linux/Unix 系统,或是没有喜欢的操作系统现场版 ISO 镜像文件的人。我在 4G 网络上测试的结果一切正常。 -### 实际上,我没法在虚拟机里安装新软件 +### 实际上,我没法在这个虚拟机里安装新软件 -试用期间我注意到的**一个问题**是虚拟机没有联网。除了本地环回接口之外没有其他网络接口。没有联网也没有本地镜像源的情况下我没法下载和安装新软件。我不知道为何网站声称可以安装软件。也许在这点上我遗漏了什么。我在DistroTest上能做的只是**看看现成的系统,试用现场版而不能安装任何软件**。 +试用期间我注意到的一个问题是这个虚拟机没有联网。除了本地环回接口之外没有其他网络接口。没有联网也没有本地镜像源的情况下我没法下载和安装新软件。我不知道为何网站声称可以安装软件。也许在这点上我遗漏了什么。我在 DistroTest 上能做的只是看看现成的系统,试用现场版而不能安装任何软件。 -* * * +推荐阅读: -**推荐阅读:** + * [免费在线学习和练习 Linux命令!][9] + * [在浏览器中运行 Linux 和其他操作系统][10] - * [**免费在线学习和练习Linux命令!**][9] - * [**在浏览器中运行Linux和其他操作系统**][10] - - - -* * * - -暂时就这样了。我不知道DistroTest团队如何设法托管了这么多操作系统。我肯定这会花不少时间。这的确是件值得称赞的工作。我非常感激项目成员的无私行为。荣誉归于你们。加油! +暂时就这样了。我不知道 DistroTest 团队如何设法托管了这么多操作系统。我肯定这会花不少时间。这的确是件值得称赞的工作。我非常感激项目成员的无私行为。荣誉归于你们。加油! -------------------------------------------------------------------------------- @@ -248,7 +238,7 @@ via: https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online- 作者:[sk][a] 选题:[lujun9972][b] 译者:[0x996](https://github.com/0x996) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dca879cad80d9e52541541cb442853dfff85cf9a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 23:13:48 +0800 Subject: [PATCH 013/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @WangYueScream 这篇翻译的很好呀 --- ...s to computational thinking with Python.md | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/translated/talk/20190211 Introducing kids to computational thinking with Python.md b/translated/talk/20190211 Introducing kids to computational thinking with Python.md index f9f5406615..abbb58d1b7 100644 --- a/translated/talk/20190211 Introducing kids to computational thinking with Python.md +++ b/translated/talk/20190211 Introducing kids to computational thinking with Python.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (WangYueScream) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Introducing kids to computational thinking with Python) @@ -11,40 +11,37 @@ 利用 Python 引导孩子的计算机思维 ======================== -编程可以给低收入家庭的学生提供足够的技能,信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。 +> 编程可以给低收入家庭的学生提供足够的技能、信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。 -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_kid_education.png?itok=3lRp6gFa) +![](https://img.linux.net.cn/data/attachment/album/201907/17/231228k3t9skntnlst59h9.jpg) 尽管暑假期间底特律公共图书馆的[帕克曼分部][1]挤满了无聊的孩子并且占用了所有的电脑,图书馆工作人员并不觉得这会是个问题,反而更多是一个机会。他们成立一个名为 [Parkman Coders][2] 的编程社团,社团以 [Qumisha Goss][3] 为首,她是图书管理员,也负责利用 Python 的魔力引导弱势儿童的计算机思维。 -四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q” 并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和 Raspberry Pi 认证讲师。 +四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q”(代表她)并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和树莓派认证讲师。 社团最开始采用 [Scratch][4] 教学,但很快学生就对这种图形化的块编程感到乏味,他们觉得这就是个“婴儿玩具”。Q 坦言,“我们意识到是时候需要在课程内容这方面做些改变了,如果是为了维持课程内容对初学者的友好性继续选择 Scratch 教学,这无疑会影响孩子们后期继续保持对编程的关注。”因此,她开始教授孩子们 Python。 -Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 [Python Programming: An Introduction to Computer Science][6] 和 [Python for Kids][7] 这两本书学习 Python。她也推荐 [Automate the Boring Stuff with Python][8] 和 [Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9] 这两本书。 +Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 《[Python Programming: An Introduction to Computer Science][6]》 和 《[Python for Kids][7]》 这两本书学习的 Python。她也推荐 《[Automate the Boring Stuff with Python][8]》 和 《[Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9]》 这两本书。 +### 建立一个基于树莓派的创客空间 -### 建立一个基于 Raspberry Pi 的创客空间 +Q 决定使用[树莓派][10]电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[树莓派][10]的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。 +虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间,进而维持图书馆的平和,但社区发展的很快,很受大家欢迎,以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台[树莓派][10]来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft、4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。 -Q 决定使用 [Raspberry Pi][10] 电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[Raspberry Pi][10] 的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。 +目前,每节课程大概有 40 个孩子参加,而且图书馆也有了足够的[树莓派][10]让参与者人手一台设备甚至还可以送出去一些。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。 -虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间进而维持图书馆的平和,但社区发展的很快,很受大家欢迎以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台 [Raspberry Pi][10] 来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft,4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。 - -目前,大概有 40 个孩子参加了每节课程而且图书馆也有了足够的 [Raspberry Pi][10] 让参与者人手一台设备甚至还可以分发出去。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。 - -Q 说,“当孩子们的表现可以证明他们能够很好的使用 [Raspberry Pi][10] 或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器,键盘,鼠标等外设。” +Q 说,“当孩子们的表现可以证明他们能够很好的使用[树莓派][10]或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器、键盘、鼠标等外设。” ### 利用 Python 学习生存技能,打破束缚 - -Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。” +Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈、很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。” 她继续分享道,“在学习编程的过程中,你不得不对单词的拼写和大小写高度警惕。受限于孩子年龄,有时候阅读认知会是个大问题。为了确保课程受众的包容性,我们会在授课过程中大声拼读,同样我们也会极力鼓励孩子们大声说出他们不知道的或者不能正确拼写的单词,以便我们纠正。” -Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想到帮助到他们而不是让他们因为挫败而沮丧的不在参与进来。” +Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想帮助到他们而不是让他们因为挫败而沮丧的不再参与进来。” -最重要的是, [Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。” +最重要的是,[Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。” Q 和 [Parkman Coders][2] 计划所营造的环境氛围能够帮助到参与者摆脱低家庭收入带来的劣势。如果说社区能够发展壮大到今天的规模真有什么独特秘诀的话,那大概就是,Q 解释道,“确保你有一个令人舒适的空间,充满了理解与宽容,这样大家才会被吸引过来。让来的人不忘初心,做好传道受业解惑的准备;当大家参与进来并感觉到充实愉悦,自然而然会想要留下来。” @@ -56,7 +53,7 @@ via: https://opensource.com/article/19/2/break-down-stereotypes-python 作者:[Don Watkins][a] 选题:[lujun9972][b] 译者:[WangYueScream](https://github.com/WangYueScream) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1534110699f87bee6231bd97b2ac133e36e7b89a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Jul 2019 23:14:13 +0800 Subject: [PATCH 014/951] PUB @WangYueScream https://linux.cn/article-11116-1.html --- ... Introducing kids to computational thinking with Python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20190211 Introducing kids to computational thinking with Python.md (99%) diff --git a/translated/talk/20190211 Introducing kids to computational thinking with Python.md b/published/20190211 Introducing kids to computational thinking with Python.md similarity index 99% rename from translated/talk/20190211 Introducing kids to computational thinking with Python.md rename to published/20190211 Introducing kids to computational thinking with Python.md index abbb58d1b7..17c062ad8e 100644 --- a/translated/talk/20190211 Introducing kids to computational thinking with Python.md +++ b/published/20190211 Introducing kids to computational thinking with Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (WangYueScream) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11116-1.html) [#]: subject: (Introducing kids to computational thinking with Python) [#]: via: (https://opensource.com/article/19/2/break-down-stereotypes-python) [#]: author: (Don Watkins https://opensource.com/users/don-watkins) From e76a7c3672f367fa66b52cd3901a53e47d7d4e7d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:52:30 +0800 Subject: [PATCH 015/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20Bond?= =?UTF-8?q?=20WiFi=20and=20Ethernet=20for=20easier=20networking=20mobility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md --- ...Ethernet for easier networking mobility.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md diff --git a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md new file mode 100644 index 0000000000..4eeabbeeb6 --- /dev/null +++ b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md @@ -0,0 +1,126 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bond WiFi and Ethernet for easier networking mobility) +[#]: via: (https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/) +[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) + +Bond WiFi and Ethernet for easier networking mobility +====== + +![][1] + +Sometimes one network interface isn’t enough. Network bonding allows multiple network connections to act together with a single logical interface. You might do this because you want more bandwidth than a single connection can handle. Or maybe you want to switch back and forth between your wired and wireless networks without losing your network connection. + +The latter applies to me. One of the benefits to working from home is that when the weather is nice, it’s enjoyable to work from a sunny deck instead of inside. But every time I did that, I lost my network connections. IRC, SSH, VPN — everything goes away, at least for a moment while some clients reconnect. This article describes how I set up network bonding on my Fedora 30 laptop to seamlessly move from the wired connection my laptop dock to a WiFi connection. + +In Linux, interface bonding is handled by the bonding kernel module. Fedora does not ship with this enabled by default, but it is included in the kernel-core package. This means that enabling interface bonding is only a command away: + +``` +sudo modprobe bonding +``` + +Note that this will only have effect until you reboot. To permanently enable interface bonding, create a file called _bonding.conf_ in the _/etc/modules-load.d_ directory that contains only the word “bonding”. + +Now that you have bonding enabled, it’s time to create the bonded interface. First, you must get the names of the interfaces you want to bond. To list the available interfaces, run: + +``` +sudo nmcli device status +``` + +You will see output that looks like this: + +``` +DEVICE TYPE STATE CONNECTION +enp12s0u1 ethernet connected Wired connection 1 +tun0 tun connected tun0 +virbr0 bridge connected virbr0 +wlp2s0 wifi disconnected -- +p2p-dev-wlp2s0 wifi-p2p disconnected -- +enp0s31f6 ethernet unavailable -- +lo loopback unmanaged -- +virbr0-nic tun unmanaged -- +``` + +In this case, there are two (wired) Ethernet interfaces available. _enp12s0u1_ is on a laptop docking station, and you can tell that it’s connected from the _STATE_ column. The other, _enp0s31f6_, is the built-in port in the laptop. There is also a WiFi connection called _wlp2s0_. _enp12s0u1_ and _wlp2s0_ are the two interfaces we’re interested in here. (Note that it’s not necessary for this exercise to understand how network devices are named, but if you’re interested you can see the [systemd.net-naming-scheme man page][2].) + +The first step is to create the bonded interface: + +``` +sudo nmcli connection add type bond ifname bond0 con-name bond0 +``` + +In this example, the bonded interface is named _bond0_. The “_con-name bond0_” sets the connection name to _bond0_; leaving this off would result in a connection named _bond-bond0_. You can also set the connection name to something more human-friendly, like “Docking station bond” or “Ben” + +The next step is to add the interfaces to the bonded interface: + +``` +sudo nmcli connection add type ethernet ifname enp12s0u1 master bond0 con-name bond-ethernet +sudo nmcli connection add type wifi ifname wlp2s0 master bond0 ssid Cotton con-name bond-wifi +``` + +As above, the connection name is specified to be [more descriptive][3]. Be sure to replace _enp12s0u1_ and _wlp2s0_ with the appropriate interface names on your system. For the WiFi interface, use your own network name (SSID) where I use “Cotton”. If your WiFi connection has a password (and of course it does!), you’ll need to add that to the configuration, too. The following assumes you’re using [WPA2-PSK][4] authentication + +``` +sudo nmcli connection modify bond-wifi wifi-sec.key-mgmt wpa-psk +sudo nmcli connection edit bond-wif +``` + +The second command will bring you into the interactive editor where you can enter your password without it being logged in your shell history. Enter the following, replacing _password_ with your actual password + +``` +set wifi-sec.psk password +save +quit +``` + +Now you’re ready to start your bonded interface and the secondary interfaces you created + +``` +sudo nmcli connection up bond0 +sudo nmcli connection up bond-ethernet +sudo nmcli connection up bond-wifi +``` + +You should now be able to disconnect your wired or wireless connections without losing your network connections. + +### A caveat: using other WiFi networks + +This configuration works well when moving around on the specified WiFi network, but when away from this network, the SSID used in the bond is not available. Theoretically, one could add an interface to the bond for every WiFi connection used, but that doesn’t seem reasonable. Instead, you can disable the bonded interface: + +``` +sudo nmcli connection down bond0 +``` + +When back on the defined WiFi network, simply start the bonded interface as above. + +### Fine-tuning your bond + +By default, the bonded interface uses the “load balancing (round-robin)” mode. This spreads the load equally across the interfaces. But if you have a wired and a wireless connection, you may want to prefer the wired connection. The “active-backup” mode enables this. You can specify the mode and primary interface when you are creating the interface, or afterward using this command (the bonded interface should be down): + +``` +sudo nmcli connection modify bond0 +bond.options "mode=active-backup,primary=enp12s0u1" +``` + +The [kernel documentation][5] has much more information about bonding options. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/ + +作者:[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://fedoramagazine.org/author/bcotton/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/networkingmobility-816x345.jpg +[2]: https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html +[3]: https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns +[4]: https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#Target_users_(authentication_key_distribution) +[5]: https://www.kernel.org/doc/Documentation/networking/bonding.txt From 14e313600e13af2113c8f0e5aa56de3e1fc5fa1a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:53:04 +0800 Subject: [PATCH 016/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190718=20Epic?= =?UTF-8?q?=20Games=20Backs=20Blender=20Foundation=20with=20$1.2m=20Epic?= =?UTF-8?q?=20MegaGrants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md --- ...r Foundation with -1.2m Epic MegaGrants.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md diff --git a/sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md new file mode 100644 index 0000000000..56e0214837 --- /dev/null +++ b/sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants) +[#]: via: (https://itsfoss.com/epic-games-blender-grant/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants +====== + +[Epic MegaGrants][1] is a program by [Epic Games][2] to support game developers, enterprise professionals, content creators and tool developers doing amazing things with Unreal Engine or enhancing open-source capabilities for the 3D graphics community. + +As part of that, Epic Games granted [Blender Foundation][3] $1.2 million to help improve their development. If you didn’t know already, Blender is one of the [best open source video editors][4] and specifically famous for creating professional 3D computer graphics. + +**Tim Sweeney** (_Founder and CEO of Epic Games_) also commented on the grant: + +> “Open tools, libraries and platforms are critical to the future of the digital content ecosystem,. “Blender is an enduring resource within the artistic community, and we aim to ensure its advancement to the benefit of all creators.” + +Even if this is good news, there are people who are not happy with this. In this article, we shall take a look at the plans of Blender Foundation after the grant, and what people think about it. + +### Blender Foundation Plans for Improvement + +![Image Credit : BlenderNation][5] + +In the [press release][6], Blender Foundation has mentioned how the money will be utilized and for what purpose: + +> “_The Epic MegaGrant will be delivered incrementally over the next three years and will contribute to Blender’s Professionalizing Blender Development Initiative._“ + +So, yes, the financial help will be provided in cash – however, it will happen in the course of 3 years. This is a significant amount of time where we can expect major improvements to the Blender Foundation and its quality of software. + +Here’s what **Ton Roosendaal** (Founder of Blender Foundation) had to say about how it is going to be utilized; + +> “_Having Epic Games on board is a major milestone for Blender,” said Blender Foundation founder and chairman Ton Roosendaal. “Thanks to the grant we will make a significant investment in our project organization to improve on-boarding, coordination and best practices for code quality. As a result, we expect more contributors from the industry to join our projects.”_ + +### Why are some people not happy about this? + +Let me make this clear – personally, I do not like Epic Game’s marketplace or the client to play games. + +I would prefer [Steam][7] over Epic Games for a variety of reasons (features, privacy, and so on). + +However, Epic Games is known as the bad guy in the gaming community because it made several recent games exclusive to its platform – even though a lot of people warned users about the privacy issues on their platform. + +Not only this, the CEO of Epic Games tweeted this in the past: + +> Installing Linux is sort of the equivalent of moving to Canada when one doesn’t like US political trends. +> +> Nope, we’ve got to fight for the freedoms we have today, where we have them today. +> +> — Tim Sweeney (@TimSweeneyEpic) [February 15, 2018][8] + +Well, that does not directly imply that he hates Linux or does not actively promote game development for Linux – but there’s just a lot of history and people do not really trust Epic Games for its decisions. So, they do not appreciate the association with Blender Foundation (even it is a positive thing with the financial help). + +This has nothing to do with financial help. But, Epic Games does not have a good reputation (it is subjective – of course) – hence, the negativity. Take a look at some of the tweets after the grant announcement: + +> Hope you arent going exclusive now…. you might ruin your reputation. +> +> — Ray (@Epicshadow1994) [July 15, 2019][9] + +> I'm sceptical of what this turns into down the road. Too much epic has been doing nothing but hostile tactics lately. +> +> — acrid Heartwood (@acrid_heartwood) [July 15, 2019][10] + +**Wrapping Up** + +You can still [run Epic Games on Linux via Lutris][11] but that’s very feeble unofficial attempt. Epic Games has showed no interest to support officially. + +So, it is obvious that not everyone trusts Epic Games. Hence, all the negativity that comes along with this news. + +However, this grant will definitely help Blender Foundation improve its organization and the quality of software. + +What do you think about this? Let us know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/epic-games-blender-grant/ + +作者:[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.unrealengine.com/en-US/megagrants +[2]: https://www.epicgames.com/store/en-US/ +[3]: https://www.blender.org/ +[4]: https://itsfoss.com/open-source-video-editors/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/epic-games-blender-megagrant.jpg?resize=800%2C450&ssl=1 +[6]: https://www.blender.org/press/epic-games-supports-blender-foundation-with-1-2-million-epic-megagrant/ +[7]: https://itsfoss.com/install-steam-ubuntu-linux/ +[8]: https://twitter.com/TimSweeneyEpic/status/964284402741149698?ref_src=twsrc%5Etfw +[9]: https://twitter.com/Epicshadow1994/status/1150787326626263042?ref_src=twsrc%5Etfw +[10]: https://twitter.com/acrid_heartwood/status/1150789691979030528?ref_src=twsrc%5Etfw +[11]: https://itsfoss.com/epic-games-lutris-linux/ From 1f5d0f0e066e94cbbd2c9a64371f9d4c58be7eea Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:53:43 +0800 Subject: [PATCH 017/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20Start?= =?UTF-8?q?=20tinkering=20with=20the=20Circuit=20Playground=20Express?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190717 Start tinkering with the Circuit Playground Express.md --- ...ing with the Circuit Playground Express.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/tech/20190717 Start tinkering with the Circuit Playground Express.md diff --git a/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md b/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md new file mode 100644 index 0000000000..718bc8fca3 --- /dev/null +++ b/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Start tinkering with the Circuit Playground Express) +[#]: via: (https://opensource.com/article/19/7/circuit-playground-express) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +Start tinkering with the Circuit Playground Express +====== +Learn what you can do with these tiny gadgets and a bit of Python code. +![Tools in a cloud][1] + +I've been a gadget person as long as I can remember, so I was delighted when I discovered an Adafruit [Circuit Playground Express][2] (CPX) in the swag bag I got at [PyConUS][3] in May. I became fascinated with these little devices last year, when Nina Zakharenko highlighted them in her All Things Open presentation, [Five Things You Didn't Know Python Could Do][4], with Python-powered earrings. + +After finding one in my PyCon bag, I set out to learn more about these mesmerizing little devices. First, I attended a "how-to" session at one of the Open Spaces meetups at PyCon. But learning always requires hands-on practice, and that's what I did when I got home. I connected the CPX device to my Linux laptop with a USB-to-MicroUSB cable. The unit mounts just like any standard USB drive, listed as CIRCUITPY. + +![Circuit Playground Express mounted as USB drive][5] + +The CPX works on MacOS, [Windows][6], and Linux (including [Chromebooks][7]). The device comes pre-loaded with code and some sound files. [Adafruit][8]'s extremely well-written documentation answered most of my questions. I discovered the unit can be programmed on Linux three different ways: [MakeCode][9], the [Arduino IDE][10], and the Python-based [CircuitPython][11], which I chose. + +Adafruit provides excellent documentation for [creating and editing CircuitPython code][12], which I found helpful. You can use a variety of editors (e.g., Emacs, Visual Studio Code, gedit), but Adafruit recommends the [Mu Python editor][13], which I [wrote about][14] last year. I [installed Mu][15] on my system with **pip3 install --user mu-editor**. Then I opened a terminal and entered **mu-editor**. It asked me how to run Mu, and I chose Adafruit Circuit Python. Then I was able to look at the code that powers the CPX. + +![Selecting CircuitPython mode to run Mu][16] + +To open a connection between Mu and the CPX connected to your computer, press the Serial button in Mu. Then you can see any serial data from the CPX and edit it using Python's REPL shell. + +Adafruit's programmers have written a library called **adafruit_circuitplayground.express** that enables CircuitPython to interact with the CPX board. To use it, add **import adafruit.circuitplayground.express** to your code. Or, to make it simpler, you can use the acronym **cpx**, shortening the code (as shown below) to **from adafruit_circuitplayground.express import cpx**. + +![Importing Adafruit's CPX library][17] + +The way you name your file is essential. The four options are code.txt, code.py, main.txt, and main.py. CircuitPython looks for the code files in that order and runs the first one it finds. Save the code to your CIRCUITPY drive each time you change it. + +The main.py code included with a new CPX offers an example of the device's capabilities. + +![CPX's default main.py][18] + +When you execute this code, the CPX displays beautiful, brightly colored LEDs whirling in a rainbow of colors. With my rudimentary knowledge, I could tweak a few settings, like increasing the brightness and turning on the TOUCH_PIANO capability, but other modifications were beyond my coding ability at this point. + +Eager to do more, I wanted to find code snippets I could use as building blocks to learn. First, I reached out to [Nina Zakharenko][19] on Twitter and asked for some help. She recommended I contact [Kattni Rembor][20], who pointed me to her GitHub repo and some [code examples][21] she wrote for the Chicago Linux User Group. + +Each of these simple building blocks left me more confident in my Python journey. In addition to making lights blink, the CPX can also function as a sensor, and I wanted to try that. Here is code for a simple light sensor: + +![CPX code for a blinking LED][22] + +And here is the CPX with the D13 LED blinking: + +![CPX with a blinking LED][23] + +I also discovered a way to create some fun for my grandson by making the CPX "come to life." I recorded a couple of .wav files with Audacity and saved them to the device. Then I wrote some simple code that utilized the A and B buttons on the device to make the CPX "talk" to him: + +![Code to play a sound when a button is pressed on CPX][24] + +I've really enjoyed tinkering with the code to explore the CPX's capabilities. I am always looking for ways to make Python code come alive for students I teach. The CPX is a great way to help new users learn and enjoy coding and digital making. Another excellent resource for new users is Mike Barela's book _[Getting Started with Adafruit Circuit Playground Express][25]_. I found its information and examples very helpful as I was learning. + +Get a [Circuit Playground Express][2] and start writing your own code. And then please share how you are using it in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/circuit-playground-express + +作者:[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/cloud_tools_hardware.png?itok=PGjJenqT (Tools in a cloud) +[2]: https://www.adafruit.com/product/3333 +[3]: https://us.pycon.org/2019/ +[4]: https://youtu.be/WlGkBqBRsik +[5]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_mounted.png (Circuit Playground Express mounted as USB drive) +[6]: https://learn.adafruit.com/adafruit-circuit-playground-express/adafruit2-windows-driver-installation +[7]: https://learn.adafruit.com/using-circuit-playground-express-makecode-circuitpython-on-a-chromebook/overview +[8]: https://learn.adafruit.com/adafruit-circuit-playground-express +[9]: https://makecode.adafruit.com/ +[10]: https://learn.adafruit.com/adafruit-circuit-playground-express/arduino +[11]: https://circuitpython.org/ +[12]: https://learn.adafruit.com/adafruit-circuit-playground-express/creating-and-editing-code +[13]: https://codewith.mu/en/ +[14]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners +[15]: https://codewith.mu/en/howto/1.0/install_with_python +[16]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_mu.png (Selecting CircuitPython mode to run Mu) +[17]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_import-cpx.png (Importing Adafruit's CPX library) +[18]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_main-py.png (CPX's default main.py) +[19]: https://twitter.com/nnja +[20]: https://learn.adafruit.com/users/kattni +[21]: https://github.com/kattni/ChiPy_2018 +[22]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_simpleblinkingled.png (CPX code for a blinking LED) +[23]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_d13blinking.jpg (CPX with a blinking LED) +[24]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_talking.png (Code to play a sound when a button is pressed on CPX) +[25]: https://www.adafruit.com/product/3944 From 467869cd0c37ebaa2ce1cd89ffeb1e27b58dd504 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:54:26 +0800 Subject: [PATCH 018/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20Get=20?= =?UTF-8?q?going=20with=20EtherCalc,=20a=20web-based=20alternative=20to=20?= =?UTF-8?q?Google=20Sheets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md --- ... web-based alternative to Google Sheets.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md diff --git a/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md b/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md new file mode 100644 index 0000000000..8836995311 --- /dev/null +++ b/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md @@ -0,0 +1,130 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get going with EtherCalc, a web-based alternative to Google Sheets) +[#]: via: (https://opensource.com/article/19/7/get-going-ethercalc) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-phttps://opensource.com/users/marcobravo) + +Get going with EtherCalc, a web-based alternative to Google Sheets +====== +EtherCalc is an open source spreadsheet that makes it easy to work +remotely and collaborate with others. +![Open data brain][1] + +Spreadsheets can be very useful—and not just for [managing your finances][2]. That said, desktop spreadsheets have their limitations. The biggest is that you need to be at your computer to use one. On top of that, collaborating on a spreadsheet can quickly become a messy affair. + +Enter [EtherCalc][3], an open source, web-based spreadsheet. While not as fully featured as a desktop spreadsheet, EtherCalc packs enough features for most people. + +Let's take a look at how to get started using it. + +### Getting EtherCalc + +If you're self-hosting, you can [download the code][4], get it through [Sandstorm.io][5], or use npm (the Node.js package manager) to install it on a server. + +But what if you don't have a server? You can use one of the many hosted instances of EtherCalc—for example, at [EtherCalc.org][6], the [instance hosted][7] by the folks at [Framasoft][8], or use it through [Sandstorm Oasis][9]. + +### What can you use EtherCalc for? + +Just about everything you'd use a desktop spreadsheet for. That could be to balance your budget, track your savings, record your income, schedule meetings, or take an inventory of your possessions. + +I've used EtherCalc to track time on freelance projects, to create invoices for those projects, and even to share article ideas with my fellow [Opensource.com community moderators][10]. How you use EtherCalc is up to your needs and your imagination. + +### Working with EtherCalc + +The first step is to create a spreadsheet. + +![Empty EtherCalc spreadsheet][11] + +If you've used a desktop or web-based spreadsheet before, EtherCalc will look somewhat familiar. As with any spreadsheet, you type what you need to type in the cells on the sheet. The includes column headings, labels, and functions (more on those in a moment). + +Before you do anything else, bookmark the URL to your spreadsheet. EtherCalc uses randomly generated URLs—for example, —which aren't easy to remember. + +### Formatting your spreadsheet + +To add formatting to your spreadsheet, highlight the cell or cells that you want to format and click the **Format** menu. + +![EtherCalc's Format menu][12] + +You can add borders and padding, change fonts and their attributes, align text, and change the format of numbers, for example to dates or currency formats. When you're done, click the **Save to:** button to apply the formatting. + +### Adding functions + +_Functions_ enable you to add data, manipulate data, and make calculations in a spreadsheet. They can do a lot more, too. + +To add a function to your spreadsheet, click a cell. Then, click the **Function** button on the toolbar. + +![EtherCalc Function button][13] + +That opens a list all of the functions EtherCalc supports, along with a short description of what each function does. + +![EtherCalc Functions list][14] + +Select the function you want to use, then click **Paste**. EtherCalc adds the function, along with an opening parenthesis, to the cell. Type what you need to after the parenthesis, then type a closing parenthesis. For example, if you want to total up all the numbers in column B in the spreadsheet using the _=SUM()_ function, type _B1:B21_ and close the parenthesis. + +![Entering a function in EtherCalc ][15] + +You can also add functions by double-clicking in a cell and typing them. There's no reference in the documentation for EtherCalc's functions. However, it does support [OpenFormula][16] (a standard for math formulas that spreadsheets support). If you're not familiar with spreadsheet functions, you can look up what you need in the [OpenFormula specification][17] or this handy dandy [reference to LibreOffice Calc's functions][18]. + +### Collaborating with others + +Earlier this year, I worked with two friends on a content strategy project. I'm in New Zealand, one friend is in British Columbia, and the other is in Toronto. Since we were working across time zones, each of us needed access to the spreadsheet we were using to track and coordinate our work. Emailing a LibreOffice Calc file wasn't an option. Instead, we turned to EtherCalc, and it worked very well. + +Collaborating with EtherCalc starts with sharing your spreadsheet's URL with your collaborators. You can tell when someone else is working on the spreadsheet by the blue border that appears around one or more cells. + +![Collaborating in EtherCalc][19] + +You and your collaborators can enter information into the spreadsheet simultaneously. All you need to remember is to respect the sanctity of those blue borders. + +The **Comment** tab comes in handy when you need to ask a question, include additional information, or make a note to follow up on something. To add a comment, click the tab, and type what you need to type. When you're finished, click **Save**. + +![Adding a comment in EtherCalc][20] + +You can tell when a cell has a comment by the small red triangle in the top-right corner of the cell. Hold your mouse pointer over it to view the comment. + +![Viewing a comment in EtherCalc][21] + +### Final thoughts + +EtherCalc doesn't do everything that, say, [LibreOffice Calc][22] or [Gnumeric][23] can do. And there's nothing wrong with that. In this case, the [80/20 rule][24] applies. + +If you need a simple spreadsheet and one that you can work on with others, EtherCalc is a great choice. It takes a bit of getting used to, but once you do, you'll have no problems using EtherCalc. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/get-going-ethercalc + +作者:[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/scottnesbitthttps://opensource.com/users/greg-phttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opendata_0613mm.png?itok=UIjD_jhK (Open data brain) +[2]: https://opensource.com/article/17/8/budget-libreoffice-calc +[3]: https://ethercalc.net/ +[4]: https://github.com/audreyt/ethercalc +[5]: https://sandstorm.io +[6]: https://ethercalc.org +[7]: https://accueil.framacalc.org/en/ +[8]: https://opensource.com/article/18/8/framasoft +[9]: https://oasis.sandstorm.io/ +[10]: https://opensource.com/community-moderator-program +[11]: https://opensource.com/sites/default/files/uploads/ethercalc-empty-spreadsheet.png (Empty EtherCalc spreadsheet) +[12]: https://opensource.com/sites/default/files/uploads/ethercalc-formatting.png (EtherCalc's Format menu) +[13]: https://opensource.com/sites/default/files/uploads/ethercalc-function.png (EtherCalc Function button) +[14]: https://opensource.com/sites/default/files/uploads/ethercalc-function-list.png (EtherCalc Functions list) +[15]: https://opensource.com/sites/default/files/uploads/ethercalc-function-example.png (Entering a function in EtherCalc ) +[16]: https://en.wikipedia.org/wiki/OpenFormula +[17]: https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html +[18]: https://help.libreoffice.org/Calc/Functions_by_Category +[19]: https://opensource.com/sites/default/files/uploads/ethercalc-collaborators.png (Collaborating in EtherCalc) +[20]: https://opensource.com/sites/default/files/uploads/ethercalc-add-comment.png (Adding a comment in EtherCalc) +[21]: https://opensource.com/sites/default/files/uploads/ethercalc-view-comment.png (Viewing a comment in EtherCalc) +[22]: https://www.libreoffice.org/discover/calc/ +[23]: http://www.gnumeric.org/ +[24]: https://en.wikipedia.org/wiki/Pareto_principle From 53c28af911154a229771cf1ac6d16c2f0b89dbc3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:54:57 +0800 Subject: [PATCH 019/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20How=20?= =?UTF-8?q?to=20install=20Kibana=20on=20MacOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190717 How to install Kibana on MacOS.md --- ...20190717 How to install Kibana on MacOS.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sources/tech/20190717 How to install Kibana on MacOS.md diff --git a/sources/tech/20190717 How to install Kibana on MacOS.md b/sources/tech/20190717 How to install Kibana on MacOS.md new file mode 100644 index 0000000000..cd930fcddc --- /dev/null +++ b/sources/tech/20190717 How to install Kibana on MacOS.md @@ -0,0 +1,120 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Kibana on MacOS) +[#]: via: (https://opensource.com/article/19/7/installing-kibana-macos) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) + +How to install Kibana on MacOS +====== +Once you have Elasticsearch installed, the Kibana plugin adds +visualization to this powerful search tool. +![Analytics: Charts and Graphs][1] + +In my previous post, I walked Mac users through the steps they’ll take to [install Elasticsearch][2], the world’s most popular enterprise search engine. (Here's a [separate article][3] for Linux users.) Its natural language processing power makes Elasticsearch excel at finding details within datasets. Once you’ve discovered the data you need, you can take it to the next level if you’ve installed [Kibana][4] as well. + +Kibana is an open source data visualization plugin for Elasticsearch. Once you’ve found data in Elasticsearch, Kibana helps you put it into line charts, [time series queries][5], geospatial maps, and more. This tool is ideal for data scientists who must present their research results, especially those working with open source data. + +### Installing Kibana + +You’ll need to install Kibana separately from Elasticsearch. Since I installed Elasticsearch 7.1.1, I’ll install Kibana 1.1. It’s important to match versions so Kibana runs against an Elasticsearch node of the same version. (Kibana runs on **node.js**.) + +Here are the steps I followed to install Kibana 7.1.1 for MacOS: + + 1. Make sure Elasticsearch is downloaded and running. See the previous article for instructions if needed. + + + +**Note**: At minimum, you’ll need to install Elasticsearch 1.4.4 or later before you can use Kibana. This is because you’ll need to give Kibana the URL for the Elasticsearch instance to connect to, along with the Elasticsearch indices you want to search. In general, it’s best to install the latest versions of both. + + 2. Click [here][6] to download Kibana. You’ll see the webpage below, which prompts you to download Kibana for Mac in the top right-hand corner of the **Downloads** section: + + + +![Download Kibana here.][7] + + 3. In your **Downloads** folder, open the **.tar** file to expand it. This action creates a folder with the same name (for example, **kibana-7.1.1-darwin-x86_64**). + 4. If you would prefer Kibana to live in another folder, move it now. + + + +Double-check that Elasticsearch is running, and if not, launch it before continuing. (See the previous article if you need instructions.)  + +### Opening the Kibana plugin + +With Elasticsearch running, you can now launch Kibana. The process is similar to launching Elasticsearch: + + 1. From your Mac’s **Downloads** folder (or the new folder if you moved Kibana), open the Kibana folder (i.e. **~Downloads/kibana-7.1.1-darwin-x86_64**). + 2. Open the **bin** subfolder to enter that one. + + + +![The Kibana bin folder.][8] + + 3. Run **kibana-plugin**. You may run into the same security warning that came up in the previous article: + + + +![Security warning][9] + +In general, if you get this warning, follow the instructions in that article to clear the warning and open Kibana. Note that if I try to open the plugin without Elasticsearch running in the terminal, I get this same security warning. To fix this, I open Elasticsearch and run it in the terminal as described in the previous article. Launching Elasticsearch with the GUI should open the terminal as well. + +Then, I right-clicked on **kibana-plugin** and selected **Open**. This solution worked for me, but you might need to try a few times. Several people in my Elasticsearch meetup had some trouble opening Kibana on their devices. + +### Changing Kibana’s host and port numbers + +Kibana’s default settings configure it to run on **localhost: 5601**. You’ll need to update the file (in the case of this example) **~Downloads/kibana-7.1.1-darwin-x86_64/config/kibana.yml** to change the host or port number before you run Kibana. + +![The Kibana config directory.][10] + +Here’s what the terminal looked like when my Elasticsearch meetup group configured Kibana so it would default to ****, which is the URL to use when querying your Elasticsearch instances: + +![Configuring Kibana's host and port connections.][11] + +### Running Kibana from the command line + +Once you’ve opened the plugin, you can run Kibana from the command line or from the GUI. Here’s what the terminal looked like once it connected to Elasticsearch: + +![Kibana running once it's connected to Elasticsearch.][12] + +Like Elasticsearch, Kibana runs in the foreground by default. You can stop it by pressing **Ctrl-C**. + +### Wrapping up + +Elasticsearch and Kibana are large packages that take up a fair amount of storage. With so many people downloading both packages at once, my fellow Elasticsearch meetup members and I had to wait an average of several minutes for both of them to download. This might have been due to poor WiFi and/or too many users at once, but keep this possibility in mind if the same thing happens to you. + +After that, I couldn’t upload the JSON file we were using due to low storage on my laptop. I was able to follow the instructor’s visualizations, but couldn’t use Kibana myself in real time. So, before you download Elasticsearch and Kibana, make sure there’s enough room (at least a few gigabytes) on your device to upload and search files with these tools. + +To learn more about Kibana, their user guide’s [Introduction][13] is ideal. (You can configure the guide based on which version of Kibana you’re using.) Their demo also shows you how to [build a dashboard in minutes][14] and then make your first deployment. + +Have fun! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/installing-kibana-macos + +作者:[Lauren Maffeo][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/lmaffeo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) +[2]: https://opensource.com/article/19/7/installing-elasticsearch-macos +[3]: https://opensource.com/article/19/7/installing-elasticsearch-and-kibana-linux +[4]: https://www.elastic.co/products/kibana +[5]: https://en.wikipedia.org/wiki/Time_series +[6]: https://www.elastic.co/downloads/kibana +[7]: https://opensource.com/sites/default/files/uploads/download_kibana.png (Download Kibana here.) +[8]: https://opensource.com/sites/default/files/uploads/kibana_bin_folder.png (The Kibana bin folder.) +[9]: https://opensource.com/sites/default/files/uploads/security_warning.png (Security warning) +[10]: https://opensource.com/sites/default/files/uploads/kibana_config_directory.png (The Kibana config directory.) +[11]: https://opensource.com/sites/default/files/uploads/kibana_host_port_config.png (Configuring Kibana's host and port connections.) +[12]: https://opensource.com/sites/default/files/uploads/kibana_running.png (Kibana running once it's connected to Elasticsearch.) +[13]: https://www.elastic.co/guide/en/kibana/7.2/introduction.html +[14]: https://www.elastic.co/webinars/getting-started-kibana?baymax=rtp&elektra=docs&storm=top-video&iesrc=ctr From 583c8a420beb074db4d240578b425d08435efc22 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:55:33 +0800 Subject: [PATCH 020/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20Public?= =?UTF-8?q?=20internet=20should=20be=20all=20software-defined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190717 Public internet should be all software-defined.md --- ...internet should be all software-defined.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20190717 Public internet should be all software-defined.md diff --git a/sources/talk/20190717 Public internet should be all software-defined.md b/sources/talk/20190717 Public internet should be all software-defined.md new file mode 100644 index 0000000000..3b834bea66 --- /dev/null +++ b/sources/talk/20190717 Public internet should be all software-defined.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Public internet should be all software-defined) +[#]: via: (https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Public internet should be all software-defined +====== +Having a programmable public internet will correct inefficiencies in the current system, engineers at NOIA say. +![Thinkstock][1] + +The public internet should migrate to a programmable backbone-as-a-service architecture, says a team of network engineers behind NOIA, a startup promising to revolutionize global traffic. They say the internet will be more efficient if internet protocols and routing technologies are re-worked and then combined with a traffic-trading blockchain. + +It’s “impossible to use internet for modern applications,” the company says on its website. “Almost all global internet companies struggle to ensure uptime and reliable user experience.” + +That’s because modern techniques aren’t being introduced fully, NOIA says. The engineers say algorithms should be implemented to route traffic and that segment routing technology should be adopted. Plus, blockchain should be instigated to trade internet transit capacity. A “programmable internet solves the web’s inefficiencies,” a representative from NOIA told me. + +**[ Read also: [What is IPv6, and why aren’t we there yet?][2] ]** + +### Deprecate the public internet + +NOIA has started introducing a caching, distributed content delivery application to improve website loading times, but it wants to ultimately deprecate the existing internet completely. + +The company currently has 353 active cache nodes around the world, with a total 27 terabytes of storage for that caching system—NOIA clients contribute spare bandwidth and storage. It’s also testing a network backbone using four providers with European and American locations that it says will be the [development environment for its envisaged software-defined and radical internet replacement][3]. + +### The problem with today's internet + +The “internet is a mesh of tangled up cables,” [NOIA says][4]. “Thousands of physically connected networks” are involved. Any configuration alterations in any of the jumble of networks causes issues with the protocols, it explains. The company is referring to Border Gateway Protocol (BGP), which lets routers discover paths to IP addresses through the disparate network. Because BGP only forwards to a neighboring router, it doesn’t manage the entire route. That introduces “severe variability” or unreliability. + +“It is impossible to guarantee service reliability without using overlay networks. Low-latency, performance-critical applications, and games cannot operate on public Internet,” the company says. + +### How a software-defined internet works + +NOIA's idea is to use [IPv6][5], the latest internet protocol. IPv6 features an expanded packet size and allows custom headers. The company then adds segment routing to create Segment Routing over IPv6 (SRv6). That SRv6 combo adds routing information to each data packet sent—a packet-level programmable network, in other words. + +Segment routing, roughly, is an updated internet protocol that lets routers comprehend routing information in packet headers and then perform the routing. Cisco has been using it, too. + +NOIA’s network then adds the SRv6 amalgamation to distributed ledger technology (blockchain) in order to let ISPs and data centers buy and sell the routes—buyers can choose their routes in the exchange, too. + +In addition to trade, blockchain introduces security. It's worth noting that routings aren’t the only internet technologies that could be disrupted due to blockchain. In April I wrote about [organizations that propose moving data storage transactions over to distributed ledgers][6]. They say that will be more secure than anything seen before. [Ethernet’s lack of inherent security could be corrected by smart contract, trackable verifiable transactions][7], say some. And, of course, supply chain, the automotive vertical, and the selling of sensor data overall may emerge as [use-contenders for secure, blockchain in the internet of things][8]. + +In NOIA’s case, with SRv6 blended with distributed ledgers, the encrypted ledger holds the IP addresses, but it is architecturally decentralized—no one controls it. That’s one element of added security, along with the aforementioned trading, provided by the ledger. + +That trading could handle the question of who’s paying for all this. However, NOIA says current internet hardware will be able to understand the segment routings, so no new equipment investments are needed. + +Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.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://images.idgesg.net/images/article/2018/05/dns_browser_http_web_internet_thinkstock-100758191-large.jpg +[2]: https://www.networkworld.com/article/3254575/lan-wan/what-is-ipv6-and-why-aren-t-we-there-yet.html +[3]: https://medium.com/noia/development-update-06-20-07-04-2879f9fce3cb +[4]: https://noia.network/ +[5]: https://www.networkworld.com/article/3254575/what-is-ipv6-and-why-aren-t-we-there-yet.html +[6]: https://www.networkworld.com/article/3390722/how-data-storage-will-shift-to-blockchain.html +[7]: https://www.networkworld.com/article/3356496/how-blockchain-will-manage-networks.html +[8]: https://www.networkworld.com/article/3330937/how-blockchain-will-transform-the-iot.html +[9]: https://www.facebook.com/NetworkWorld/ +[10]: https://www.linkedin.com/company/network-world From 7e3e4872122e1ab26faea82d5fb007792667ebb3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:55:51 +0800 Subject: [PATCH 021/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20How=20?= =?UTF-8?q?edge=20computing=20is=20driving=20a=20new=20era=20of=20CDN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190717 How edge computing is driving a new era of CDN.md --- ...e computing is driving a new era of CDN.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/talk/20190717 How edge computing is driving a new era of CDN.md diff --git a/sources/talk/20190717 How edge computing is driving a new era of CDN.md b/sources/talk/20190717 How edge computing is driving a new era of CDN.md new file mode 100644 index 0000000000..643d3aa713 --- /dev/null +++ b/sources/talk/20190717 How edge computing is driving a new era of CDN.md @@ -0,0 +1,107 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How edge computing is driving a new era of CDN) +[#]: via: (https://www.networkworld.com/article/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html) +[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) + +How edge computing is driving a new era of CDN +====== +A CDN is an edge application and an edge application is a superset of what your CDN is doing. +![geralt \(CC0\)][1] + +We are living in a hyperconnected world where anything can now be pushed to the cloud. The idea of having content located in one place, which could be useful from the management’s perspective, is now redundant. Today, the users and data are omnipresent. + +The customer’s expectations have up-surged because of this evolution. There is now an increased expectation of high-quality service and a decrease in customer’s patience. In the past, one could patiently wait 10 hours to download the content. But this is certainly not the scenario at the present time. Nowadays we have high expectations and high-performance requirements but on the other hand, there are concerns as well. The internet is a weird place, with unpredictable asymmetric patterns, buffer bloat and a list of other [performance-related problems][2] that I wrote about on Network Insight. _[Disclaimer: the author is employed by Network Insight.]_ + +Also, the internet is growing at an accelerated rate. By the year 2020, the internet is expected to reach 1.5 Gigabyte of traffic per day per person. In the coming times, the world of the Internet of Things (IoT) driven by objects will far supersede these data figures as well. For example, a connected airplane will generate around 5 Terabytes of data per day. This spiraling level of volume requires a new approach to data management and forces us to re-think how we delivery applications. + +[RELATED: How Notre Dame is going all in with Amazon’s cloud][3] + +Why? Because all this information cannot be processed by a single cloud or an on-premise location. Latency will always be a problem. For example, in virtual reality (VR) anything over 7 milliseconds will cause motion sickness. When decisions are required to be taken in real-time, you cannot send data to the cloud. You can, however, make use of edge computing and a multi-CDN design. + +### Introducing edge computing and multi-CDN + +The rate of cloud adoption, all-things-video, IoT and edge computing are bringing life back to CDNs and multi-CDN designs. Typically, a multi-CDN is an implementation pattern that includes more than one CDN vendor. The traffic direction is performed by using different metrics, whereby traffic can either be load balanced or failed across the different vendors. + +Edge computing moves actions as close as possible to the source. It is the point where the physical world interacts with the digital world. Logically, the decentralized approach of edge computing will not take over the centralized approach. They will be complementary to each other, so that the application can run at its peak level, depending on its position in the network. + +For example, in IoT, saving battery life is crucial. Let’s assume an IoT device can conduct the transaction in 10ms round trip time (RTT), instead of 100ms RTT. As a result, it can use 10 times less battery. + +### The internet, a performance bottleneck + +The internet is designed on the principle that everyone can talk to everyone, thereby providing universal connectivity whether required or not. There has been a number of design changes with network address translation (NAT) being the biggest. However, essentially the role of the internet has remained the same in terms of connectivity, regardless of location. + +With this type of connectivity model, distance is an important determinant for the application’s performance. Users on the other side of the planet will suffer regardless of buffer sizes or other device optimizations. Long RTT is experienced as packets go back and forth before the actual data transmission. Although caching and traffic redirection is being used but limited success has been achieved so far. + +### The principles of application delivery + +When transmission control protocol (TCP) starts, it thinks it is back in the late 1970s. It assumes that all services are on a local area network (LAN) and there is no packet loss. It then starts to work backward from there. Back when it was designed, we didn't have real-time traffic, such as voice and video that is latency and jitter sensitive. + +Ideally, TCP was designed for the ease of use and reliability, not to boost the performance. You actually need to optimize the TCP stack. And this is why CDNs are very good at performing such tasks. For example, if a connection is received from a mobile phone, a CDN will start with the assumption that there is going to be high jitter and packet loss. This allows them to size the TCP window correctly that accurately match network conditions. + +How do you magnify the performance, what options do you have? In a generic sense, many look to lowering the latency. However, with applications, such as video streaming, latency does not tell you if the video is going to buffer. One can only assume that lower latency will lead to less buffering. In such a scenario, measurement-based on throughput is a far better performance metric since will tell you how fast an object will load. + +We have also to consider the page load times. At the network level, it's the time to first byte (TTFB) and ping. However, these mechanisms don’t tell you much about the user experience as everything fits into one packet. Using ping will not inform you about the bandwidth problems. + +And if a web page goes slower by 25% once packet loss exceeds 5% and you are measuring time to the first byte which is the 4th packet - what exactly can you learn? TTFB is comparable to an internet control message protocol (ICMP) request just one layer up the stack. It's good if something is broken but not if there is underperformance issue. + +When you examine the history of TTFB measuring, you will find that it was deployed due to the lack of Real User Monitoring (RUM) measurements. Previously TTFB was as good in approximating how fast something was going to load, but we don't have to approximate anymore as we can measure it with RUM. RUM is measurements from the end-users. An example could be the metrics generated from a webpage that is being served to an actual user. + +Conclusively, TTFB, ping and page load times are not sophisticated measurements. We should prefer RUM time measurements as much as we can. This provides a more accurate picture of the user experience. This is something which has become critical over the last decade. + +Now we are living in a world of RUM which lets us build our network based on what matters to the business users. All CDNs should aim for RUM measurements. For this, they may need to integrate with traffic management systems that intelligently measure on what the end-user really sees. + +### The need for multi-CDN + +Primarily, the reasons one would opt for a multi-CDN environment are availability and performance. No single CDN can be the fastest to everyone and everywhere in the world. It is impossible due to the internet's connectivity model. However, combining the best of two or even more CDN providers will increase the performance. + +A multi-CDN will give a faster performance and higher availability than what can be achieved with a single CDN. A good design is what runs two availability zones. A better design is what runs two availability zones with a single CDN provider. However, superior design is what runs two availability zones in a multi-CDN environment. + +### Edge applications will be the new norm + +It’s not that long ago that there was a transition from the heavy physical monolithic architecture to the agile cloud. But all that really happened was the transition from the physical appliance to a virtual cloud-based appliance. Maybe now is the time that we should ask, is this the future that we really want? + +One of the main issues in introducing edge applications is the mindset. It is challenging to convince yourself or your peers that the infrastructure you have spent all your time working on and investing in is not the best way forward for your business.  + +Although the cloud has created a big buzz, just because you migrate to the cloud does not mean that your applications will run faster. In fact, all you are really doing is abstracting the physical pieces of the architecture and paying someone else to manage it. The cloud has, however, opened the door for the edge application conversation. We have already taken the first step to the cloud and now it's time to make the second move. + +Basically, when you think about edge applications: its simplicity is a programmable CDN. A CDN is an edge application and an edge application is a superset of what your CDN is doing. Edge applications denote cloud computing at the edge. It is a paradigm to distribute the application closer to the source for lower latency, additional resilience, and simplified infrastructure, where you still have control and privacy. + +From an architectural point of view, an edge application provides more resilience than deploying centralized applications. In today's world of high expectations, resilience is a necessity for the continuity of business. Edge applications allow you to collapse the infrastructure into an architecture that is cheaper, simpler and more attentive to the application. The less in the expanse of infrastructure, the more time you can focus on what really matters to your business - the customer. + +### An example of an edge architecture + +An example of edge architecture is within each PoP, every application has its own isolated JavaScript (JS) environment. JavaScript is great for security isolation and the performance guarantees scale. The JavaScript is a dedicated isolated instance that executes the code at the edge. + +Most likely, each JavaScript has its own virtual machine (VM). The sole operation that the VM is performing is the JavaScript runtime engine and the only thing it is running is the customer's code. One could use Google V8 open-source high-performance JavaScript and WebAssembly engine. + +Let’s face it, if you continue building more PoPs, you will hit the law of diminishing returns. When it comes to application such as mobile, you really are maxed out when throwing PoPs to form a solution. So we need to find another solution. + +In the coming times, we are going to witness a trend where most applications will become global, which means edge applications. It certainly makes little sense to place all the application in one location when your users are everywhere else. + +**This article is published as part of the IDG Contributor Network. [Want to Join?][4]** + +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/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html + +作者:[Matt Conran][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/Matt-Conran/ +[b]: https://github.com/lujun9972 +[1]: https://images.techhive.com/images/article/2017/02/network-traffic-100707086-large.jpg +[2]: https://network-insight.net/2016/12/buffers-packet-drops/ +[3]: https://www.networkworld.com/article/3014599/cloud-computing/how-notre-dame-is-going-all-in-with-amazon-s-cloud.html#tk.nww-fsb +[4]: https://www.networkworld.com/contributor-network/signup.html +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 546e1dc7b6eebf3e1b266982aae1012fc24a56ad Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:56:25 +0800 Subject: [PATCH 022/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20Master?= =?UTF-8?q?ing=20user=20groups=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190717 Mastering user groups on Linux.md --- ...20190717 Mastering user groups on Linux.md | 225 ++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 sources/tech/20190717 Mastering user groups on Linux.md diff --git a/sources/tech/20190717 Mastering user groups on Linux.md b/sources/tech/20190717 Mastering user groups on Linux.md new file mode 100644 index 0000000000..0778b93a4b --- /dev/null +++ b/sources/tech/20190717 Mastering user groups on Linux.md @@ -0,0 +1,225 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Mastering user groups on Linux) +[#]: via: (https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Mastering user groups on Linux +====== +Managing user groups on Linux systems is easy, but the commands can be more flexible than you might be aware. +![Scott 97006 \(CC BY 2.0\)][1] + +User groups play an important role on Linux systems. They provide an easy way for a select groups of users to share files with each other. They also allow sysadmins to more effectively manage user privileges, since they can assign privileges to groups rather than individual users. + +While a user group is generally created whenever a user account is added to a system, there’s still a lot to know about how they work and how to work with them. + +**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** + +### One user, one group? + +Most user accounts on Linux systems are set up with the user and group names the same. The user "jdoe" will be set up with a group named "jdoe" and will be the only member of that newly created group. The user’s login name, user id, and group id will be added to the **/etc/passwd** and **/etc/group** files when the account is added, as shown in this example: + +``` +$ sudo useradd jdoe +$ grep jdoe /etc/passwd +jdoe:x:1066:1066:Jane Doe:/home/jdoe:/bin/sh +$ grep jdoe /etc/group +jdoe:x:1066: +``` + +The values in these files allow the system to translate between the text (jdoe) and numeric (1066) versions of the user id — jdoe is 1066 and 1066 is jdoe. + +The assigned UID (user id) and GID (group id) for each user are generally the same and configured sequentially. If Jane Doe in the above example were the most recently added user, the next new user would likely be assigned 1067 as their user and group IDs. + +### GID = UID? + +UIDs and GIDs can get of out sync. For example, if you add a group using the **groupadd** command without specifying a group id, your system will assign the next available group id (in this case, 1067). The next user to be added to the system would then get 1067 as a UID but 1068 as a GID. + +You can avoid this issue by specifying a smaller group id when you add a group rather than going with the default. In this command, we add a new group and provide a GID that is smaller than the range used for user accounts. + +``` +$ sudo groupadd -g 500 devops +``` + +If it works better for you, you can specify a shared group when you create accounts. For example, you might want to assign new development staff members to a devops group instead of putting each one in their own group. + +``` +$ sudo useradd -g staff bennyg +$ grep bennyg /etc/passwd +bennyg:x:1064:50::/home/bennyg:/bin/sh +``` + +### Primary and secondary groups + +There are actually two types of groups — primary and secondary. + +The **primary group** is the one that’s recorded in the **/etc/passwd** file, configured when an account is set up. When a user creates a file, it’s their primary group that is associated with it. + +``` +$ whoami +jdoe +$ grep jdoe /etc/passwd +jdoe:x:1066:1066:John Doe:/home/jdoe:/bin/bash + ^ + | + +-------- primary group +$ touch newfile +$ ls -l newfile +-rw-rw-r-- 1 jdoe jdoe 0 Jul 16 15:22 newfile + ^ + | + +-------- primary group +``` + +**Secondary groups** are those that users might be added to once they already have accounts. Secondary group memberships show up in the /etc/group file. + +``` +$ grep devops /etc/group +devops:x:500:shs,jadep + ^ + | + +-------- secondary group for shs and jadep +``` + +The **/etc/group** file assigns names to user groups (e.g., 500 = devops) and records secondary group members. + +### Preferred convention + +The convention of having each user a member of their own group and optionally a member of any number of secondary groups allows users to more easily separate files that are personal from those they need to share with co-workers. When a user creates a file, members of the various user groups they belong to don't necessarily have access. A user will have to use the **chgrp** command to associate a file with a secondary group. + +### There’s no place like /home + +One important detail when adding a new account is that the **useradd** command does not necessarily add a home directory for a new user. If you want this step to be taken only some of the time, you can add **-m** (think of this as the “make home” option) with your useradd commands. + +``` +$ sudo useradd -m -g devops -c "John Doe" jdoe2 +``` + +The options in this command: + + * **-m** creates the home directory and populates it with start-up files + * **-g** specifies the group to assign the user to + * **-c** adds a descriptor for the account (usually the person’s name) + + + +If you want a home directory to be created _all_ of the time, you can change the default behavior by editing the **/etc/login.defs** file. Change or add a setting for the CREATE_HOME variable and set it to “yes”: + +``` +$ grep CREATE_HOME /etc/login.defs +CREATE_HOME yes +``` + +Another option is to set yourself up with an alias so that **useradd** always uses the -m option. + +``` +$ alias useradd=’useradd -m’ +``` + +Make sure you add the alias to your ~/.bashrc or similar start-up file to make it permanent. + +### Looking into /etc/login.defs + +Here’s a command to list all the setting in the /etc/login.defs file. The **grep** commands are hiding comments and blank lines. + +``` +$ cat /etc/login.defs | grep -v "^#" | grep -v "^$" +MAIL_DIR /var/mail +FAILLOG_ENAB yes +LOG_UNKFAIL_ENAB no +LOG_OK_LOGINS no +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes +FTMP_FILE /var/log/btmp +SU_NAME su +HUSHLOGIN_FILE .hushlogin +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +TTYGROUP tty +TTYPERM 0600 +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 +UID_MIN 1000 +UID_MAX 60000 +GID_MIN 1000 +GID_MAX 60000 +LOGIN_RETRIES 5 +LOGIN_TIMEOUT 60 +CHFN_RESTRICT rwh +DEFAULT_HOME yes +CREATE_HOME yes <=== +USERGROUPS_ENAB yes +ENCRYPT_METHOD SHA512 +``` + +Notice the various settings in this file determine the range of user ids to be used along with password aging and other setting (e.g., umask). + +### How to display a user’s groups + +Users can be members of multiple groups for various reasons. Group membership gives a user access to group-owned files and directories, and sometimes this behavior is critical. To generate a list of the groups that some user belongs to, use the **groups** command. + +``` +$ groups jdoe +jdoe : jdoe adm admin cdrom sudo dip plugdev lpadmin staff sambashare +``` + +You can list your own groups by typing “groups” without an argument. + +### How to add users to groups + +If you want to add an existing user to another group, you can do that with a command like this: + +``` +$ sudo usermod -a -G devops jdoe +``` + +You can also add a user to multiple groups by specifying the groups in a comma-separated list: + +``` +$ sudo usermod -a -G devops,mgrs jdoe +``` + +The **-a** argument means “add” while **-G** lists the groups. + +You can remove a user from a group by editing the **/etc/group** file and removing the username from the list. The usermod command may also have an option for removing a member from a group. + +``` +fish:x:16:nemo,dory,shark + | + V +fish:x:16:nemo,dory +``` + +### Wrap-up + +Adding and managing user groups isn't particularly difficult, but consistency in how you configure accounts can make it easier in the long run. + +**[ Now see: [Must-know Linux Commands][3] ]** + +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/3409781/mastering-user-groups-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://images.idgesg.net/images/article/2019/07/carrots-100801917-large.jpg +[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua +[3]: https://www.networkworld.com/article/3391029/must-know-linux-commands.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From d0f76a59968f0b8e69255b41e4e223f104c43942 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:57:00 +0800 Subject: [PATCH 023/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190717=20MPLS?= =?UTF-8?q?=20is=20hanging=20on=20in=20this=20SD-WAN=20world?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md --- ...MPLS is hanging on in this SD-WAN world.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md diff --git a/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md b/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md new file mode 100644 index 0000000000..159c8598db --- /dev/null +++ b/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md @@ -0,0 +1,71 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (MPLS is hanging on in this SD-WAN world) +[#]: via: (https://www.networkworld.com/article/3409070/mpls-is-hanging-on-in-this-sd-wan-world.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +MPLS is hanging on in this SD-WAN world +====== +The legacy networking protocol is still viable and there is no need to replace it in certain use cases, argues one cloud provider. +![jamesteohart][1] + +The [SD-WAN networking market is booming and is expected to grow][2] to $17 billion by 2025, and no wonder. Software-defined wide-area networking eliminates the need for expensive routers and does all the network connectivity in the cloud. + +Among its advantages is the support for secure cloud connectivity, one area where multiprotocol label switching (MPLS) falls short. MPLS is a data protocol from before the internet took off and while ideal for communications within the corporate firewall, it doesn’t lend itself to cloud and outside communications well. + +You would think that would seal MPLS’s fate, but just like IPv6 is ever so slowly replacing IPv4, MPLS is hanging on and some IT pros are even increasing their investment. + +**[ Related: [MPLS explained – What you need to know about multi-protocol label switching][3] ]** + +Avant Communications, a cloud services provider that specializes in SD-WAN, recently issued a report entitled [State of Disruption][4] that found that 83% of enterprises that use or are familiar with MPLS plan to increase their MPLS network infrastructure this year, and 40% say they will “significantly increase” their use of it. + +The report did not find one protocol winning that the expense of another. Just as 83% plan to use MPLS, 78% acknowledged plans to use SD-WAN in their corporate networks by the end of the year. Although SD-WAN is on the rise, MPLS is clearly not going away anytime soon. Both SD-WAN and MPLS can live together in harmony, adding value to each other. + +“SD-WAN is the most disruptive technology in our study. It’s not surprising that adoption of new technologies is slowest among the largest companies. The wave of SD-WAN disruption has not fully hit larger companies yet, but our belief is that it is moving quickly upmarket,” the report stated. + +While SD-WAN is much better suited for the job of cloud connectivity, 50% of network traffic is still staying within the corporate firewall. So while SD-WAN can solve the connection issues, so can MPLS. And if you have it deployed, rip and replace makes no sense. + +“MPLS continues to have a strong role in modern networks, and we expect that to continue,” the report stated. “This is especially true among larger enterprises that have larger networks depending on MPLS. While you’ll find MPLS at the core for a long time to come, we expect to see a shared environment with SD-WAN at the edge, enabled by broadband Internet and other lower cost networks. “ + +And MPLS isn’t without its advantages, most notably it can [guarantee performance][5] while SD-WAN, at the mercy of the public internet, cannot. + +As broadband networks continue to improve in performance, SD-WAN will allow companies to reduce their reliance on MPLS, especially as equipment ages and is replaced. Avant expects that, for the foreseeable future, there will continue to be a very viable role for both. + +**More about SD-WAN:** + + * [How to buy SD-WAN technology: Key questions to consider when selecting a supplier][6] + * [How to pick an off-site data-backup method][7] + * [SD-Branch: What it is and why you’ll need it][8] + * [What are the options for security SD-WAN?][9] + + + +Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409070/mpls-is-hanging-on-in-this-sd-wan-world.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://images.idgesg.net/images/article/2019/07/the-latest-in-innovation-in-the-sd-wan-managed-services-market1400-100801684-large.jpg +[2]: https://www.prnewswire.com/news-releases/software-defined-wide-area-network-sd-wan-market-to-hit-17bn-by-2025-global-market-insights-inc-300795304.html +[3]: https://www.networkworld.com/article/2297171/sd-wan/network-security-mpls-explained.html +[4]: https://www.goavant.net/Disruption +[5]: https://www.networkworld.com/article/2297171/network-security-mpls-explained.html +[6]: https://www.networkworld.com/article/3323407/sd-wan/how-to-buy-sd-wan-technology-key-questions-to-consider-when-selecting-a-supplier.html +[7]: https://www.networkworld.com/article/3328488/backup-systems-and-services/how-to-pick-an-off-site-data-backup-method.html +[8]: https://www.networkworld.com/article/3250664/lan-wan/sd-branch-what-it-is-and-why-youll-need-it.html +[9]: https://www.networkworld.com/article/3285728/sd-wan/what-are-the-options-for-securing-sd-wan.html?nsdr=true +[10]: https://www.facebook.com/NetworkWorld/ +[11]: https://www.linkedin.com/company/network-world From 52ae57facb762d2345d459f91f912371907cfe35 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Jul 2019 00:57:37 +0800 Subject: [PATCH 024/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190716=20Server?= =?UTF-8?q?=20hardware=20makers=20shift=20production=20out=20of=20China?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190716 Server hardware makers shift production out of China.md --- ...re makers shift production out of China.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20190716 Server hardware makers shift production out of China.md diff --git a/sources/talk/20190716 Server hardware makers shift production out of China.md b/sources/talk/20190716 Server hardware makers shift production out of China.md new file mode 100644 index 0000000000..be29283977 --- /dev/null +++ b/sources/talk/20190716 Server hardware makers shift production out of China.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Server hardware makers shift production out of China) +[#]: via: (https://www.networkworld.com/article/3409784/server-hardware-makers-shift-production-out-of-china.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Server hardware makers shift production out of China +====== +Tariffs on Chinese products and unstable U.S./China relations cause server makers to speed up their move out of China. +![Etereuti \(CC0\)][1] + +The supply chain of vendors that build servers and network communication devices is accelerating its shift of production out of China to Taiwan and North America, along with other nations not subject to the trade war between the U.S. and China. + +Last May, the Trump Administration levied tariffs on a number of imported Chinese goods, computer components among them. The tariffs ranged from 10-25%. Consumers were hit hardest, since they are more price sensitive than IT buyers. PC World said the [average laptop price could rise by $120][2] just for the tariffs. + +But since the tariff was based on the value of the product, that means server hardware prices could skyrocket, since servers cost much more than PCs. + +**[ Read also: [HPE’s CEO lays out his technology vision][3] ]** + +### Companies that are moving production out of China + +The Taiwanese tech publication DigiTimes reported (article now locked behind a paywall) that Mitac Computing Technology, a server ODM, reactivated an old production line at Hsinchu Science Park (HSP) in Taiwan at the end of 2018 and restarted another for motherboard SMT process in March 2019. The company plans to establish one more SMT production line prior to the end of 2019. + +It went on to say Mitac plans to produce all of its high-end U.S.-bound servers in Taiwan and is looking to move 30% of its overall server production lines back to Taiwan in the next three years. + +Wiwynn, a cloud computing server subsidiary of Wistron, is primarily assembling its U.S.-bound servers in Mexico and has also recently established a production site in southern Taiwan per clients' requests. + +Taiwan-based server chassis and assembly player AIC recently expanded the number of its factories in Taiwan to four and has been aggressively forming cooperation with its partners to expand its capacity. Many Taiwan-based component suppliers are also expanding their capacity in Taiwan. + +**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]** + +Several ODMs, such as Inventec, Wiwynn, Wistron, and Foxconn, all have plants in Mexico, while Quanta Computer has production lines in the U.S. Wiwynn also plans to open manufacturing facilities in eastern U.S. + +“This is not something that just happened overnight, it’s a process that started a few years ago. The tariffs just accelerated the desire of ODMs to do it,” said Ashish Nadkarni, group vice president for infrastructure systems, platforms and technologies at IDC. “Since [President] Trump has come into office there has been saber rattling about China and a trade war. There has also been a focus on margins.” + +He added that component makers are definitely moving out of China to other parts of Asia, like Korea, the Philippines, and Vietnam. + +### HPE, Dell and Lenovo should remain unaffected + +The big three branded server makers are all largely immunized against the tariffs. HP Enterprise, Dell, and Lenovo all have U.S.-based assemblies and their contract manufacturers are in Taiwan, said Nadkarni. So, their costs should remain unaffected by tariffs. + +The tariffs are not affecting sales as much as revenue for hyperscale whitebox vendors is being stressed. Hyperscale companies such as Amazon Web Services (AWS), Microsoft, Google, etc. have contracts with vendors such as Inspur and Super Micro, and if prices fluctuate, that’s not their problem. The hardware vendor is expected to deliver at the agreed cost. + +So margins, already paper thin, can’t be passed on to the customer, unlike the aforementioned laptop example. + +“It’s not the end customers who are affected by it, it’s the vendors who are affected by it. Certain things they can pass on, like component prices. But if the build value goes up, that’s not the customers problem, that’s the vendor’s problem,” said Nadkarni. + +So while it may cost you more to buy a laptop as this trade fracas goes on, it shouldn’t cost more to buy a server. + +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/3409784/server-hardware-makers-shift-production-out-of-china.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://images.idgesg.net/images/article/2018/07/asia_china_flag_grunge-stars_pixabay_etereuti-100763424-large.jpg +[2]: https://www.pcworld.com/article/3403405/trump-tariffs-on-chinese-goods-could-cost-you-120-more-for-notebook-pcs-say-dell-hp-and-cta.html +[3]: https://www.networkworld.com/article/3394879/hpe-s-ceo-lays-out-his-technology-vision.html +[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 7be623893da5866623369db02ad03d15c84416a8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 18 Jul 2019 08:58:28 +0800 Subject: [PATCH 025/951] translated --- ...1 How to install Elasticsearch on MacOS.md | 154 ------------------ ...1 How to install Elasticsearch on MacOS.md | 154 ++++++++++++++++++ 2 files changed, 154 insertions(+), 154 deletions(-) delete mode 100644 sources/tech/20190711 How to install Elasticsearch on MacOS.md create mode 100644 translated/tech/20190711 How to install Elasticsearch on MacOS.md diff --git a/sources/tech/20190711 How to install Elasticsearch on MacOS.md b/sources/tech/20190711 How to install Elasticsearch on MacOS.md deleted file mode 100644 index 052e174832..0000000000 --- a/sources/tech/20190711 How to install Elasticsearch on MacOS.md +++ /dev/null @@ -1,154 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to install Elasticsearch on MacOS) -[#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins) - -How to install Elasticsearch on MacOS -====== -Installing Elasticsearch is complex! Here's how to do it on a Mac. -![magnifying glass on computer screen][1] - -[Elasticsearch][2] is an open source, full-text search engine developed in Java. Users upload datasets as JSON files. Then, Elasticsearch stores the original document before adding a searchable reference to the document in the cluster’s index. - -Less than nine years after its creation, Elasticsearch is the most popular enterprise search engine. Elastic released its latest update—version 7.2.0 —on June 25, 2019. - -[Kibana][3] is an open source data visualizer for Elasticsearch. This tool helps users create visualizations on top of content indexed in an Elasticsearch cluster. - -[Sunbursts][4], [geospatial data maps][5], [relationship analyses][6], and dashboards with live data are just a few options. And thanks to Elasticsearch’s machine learning prowess, you can learn which properties might influence your data (like servers or IP addresses) and find abnormal patterns. - -At [DevFest DC][7] last month, [Dr. Summer Rankin][8]—lead data scientist at Booz Allen Hamilton—uploaded a dataset of content from TED Talks to Elasticsearch, then used Kibana to quickly build a dashboard. Intrigued, I went to an Elasticsearch meetup days later. - -Since this course was for newbies, we started at Square One: Installing Elastic and Kibana on our laptops. Without both packages installed, we couldn’t create our own visualizations from the dataset of Shakespeare texts we were using as a dummy JSON file. - -Next, I will share step-by-step instructions for downloading, installing, and running Elasticsearch Version 7.1.1 on MacOS. This was the latest version when I attended the Elasticsearch meetup in mid-June 2019. - -### Downloading Elasticsearch for MacOS - - 1. Go to , which takes you to the webpage below: - - - -![The Elasticsearch download page.][9] - - 2. In the **Downloads** section, click **MacOS**, which downloads the Elasticsearch TAR file (for example, **elasticsearch-7.1.1-darwin-x86_64.tar**) into your **Downloads** folder. - 3. Double-click this file to unpack it into its own folder (for example, **elasticsearch-7.1.1**), which contains all of the files that were in the TAR. - - - -**Tip**: If you want Elasticsearch to live in another folder, now is the time to move this folder. - -### Running Elasticsearch from the MacOS command line - -You can run Elasticsearch only using the command line if you prefer. Just follow this process: - - 1. [Open a **Terminal** window][10]. - 2. In the terminal window, enter your Elasticsearch folder. For example (if you moved the program, change **Downloads** to the correct path): - - - -**$ cd ~Downloads/elasticsearch-1.1.0** - - 3. Change to the Elasticsearch **bin** subfolder, and start the program. For example: - - - -**$ cd bin $ ./elasticsearch** - -Here’s some of the output that my command line terminal displayed when I launched Elasticsearch 1.1.0: - -![Terminal output when running Elasticsearch.][11] - -**NOTE**: Elasticsearch runs in the foreground by default, which can cause your computer to slow down. Press **Ctrl-C to** stop Elasticsearch from running. - -### Running Elasticsearch using the GUI - -If you prefer your point-and-click environment, you can run Elasticsearch like so: - - 1. Open a new **Finder** window. - 2. Select **Downloads** in the left Finder sidebar (or, if you moved Elasticsearch to another folder, navigate to there). - 3. Open the folder called (for the sake of this example) **elasticsearch-7.1.1**. A selection of eight subfolders appears. - - - -![The elasticsearch/bin menu.][12] - - 4. Open the **bin** subfolder. As the screenshot above shows, this subfolder yields 20 assets. - 5. Click the first option, which is **elasticsearch**. - - - -Note that you may get a security warning, as shown below: - -![The security warning dialog box.][13] - -  - -In order to open the program in this case: - - 1. Click **OK** in the warning dialog box. - 2. Open **System Preferences**. - 3. Click **Security & Privacy**, which opens the window shown below: - - - -![Where you can allow your computer to open the downloaded file.][14] - - 4. Click **Open Anyway**, which opens the confirmation dialog box shown below: - - - -![Security confirmation dialog box.][15] - - 5. Click **Open**. A terminal window opens and launches Elasticsearch. - - - -The launch process can take a while, so let it run. Eventually, it will finish, and you will see output similar to this at the end: - -![Launching Elasticsearch in MacOS.][16] - -### Learning more - -Once you’ve installed Elasticsearch, it’s time to start exploring! - -The tool’s [Elasticsearch: Getting Started][17] guide directs you based on your goals. Its introductory video walks through steps to launch a hosted cluster on [Elasticsearch Service][18], perform basic search queries, play with data through create, read, update, and delete (CRUD) REST APIs, and more. - -This guide also offers links to documentation, dev console commands, training subscriptions, and a free trial of Elasticsearch Service. This trial lets you deploy Elastic and Kibana on AWS and GCP to support your Elastic clusters in the cloud. - -In the follow-up to this article, we’ll walk through the steps you’ll take to install Kibana on MacOS. This process will take your Elasticsearch queries to the next level via diverse data visualizations. Stay tuned! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/installing-elasticsearch-macos - -作者:[Lauren Maffeo][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/lmaffeo/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) -[2]: https://www.getapp.com/it-management-software/a/qbox-dot-io-hosted-elasticsearch/ -[3]: https://www.elastic.co/products/kibana -[4]: https://en.wikipedia.org/wiki/Pie_chart#Ring -[5]: https://en.wikipedia.org/wiki/Spatial_analysis -[6]: https://en.wikipedia.org/wiki/Correlation_and_dependence -[7]: https://www.devfestdc.org/ -[8]: https://www.summerrankin.com/about -[9]: https://opensource.com/sites/default/files/uploads/wwa1f3_600px_0.png (The Elasticsearch download page.) -[10]: https://support.apple.com/en-ca/guide/terminal/welcome/mac -[11]: https://opensource.com/sites/default/files/uploads/io6t1a_600px.png (Terminal output when running Elasticsearch.) -[12]: https://opensource.com/sites/default/files/uploads/o43yku_600px.png (The elasticsearch/bin menu.) -[13]: https://opensource.com/sites/default/files/uploads/elasticsearch_security_warning_500px.jpg (The security warning dialog box.) -[14]: https://opensource.com/sites/default/files/uploads/the_general_tab_of_the_system_preferences_security_and_privacy_window.jpg (Where you can allow your computer to open the downloaded file.) -[15]: https://opensource.com/sites/default/files/uploads/confirmation_dialog_box.jpg (Security confirmation dialog box.) -[16]: https://opensource.com/sites/default/files/uploads/y5dvtu_600px.png (Launching Elasticsearch in MacOS.) -[17]: https://www.elastic.co/webinars/getting-started-elasticsearch?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch&gclid=EAIaIQobChMImdbvlqOP4wIVjI-zCh3P_Q9mEAAYASABEgJuAvD_BwE -[18]: https://info.elastic.co/elasticsearch-service-gaw-v10-nav.html?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch%20service&gclid=EAIaIQobChMI_MXHt-SZ4wIVJBh9Ch3wsQfPEAAYASAAEgJo9fD_BwE diff --git a/translated/tech/20190711 How to install Elasticsearch on MacOS.md b/translated/tech/20190711 How to install Elasticsearch on MacOS.md new file mode 100644 index 0000000000..c64353c88e --- /dev/null +++ b/translated/tech/20190711 How to install Elasticsearch on MacOS.md @@ -0,0 +1,154 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Elasticsearch on MacOS) +[#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins) + +如何在 MacOS 上安装 Elasticsearch +====== +安装 Elasticsearch 很复杂!以下是如何在 Mac 上安装。 +![magnifying glass on computer screen][1] + +[Elasticsearch][2] 是一个用 Java 开发的开源全文搜索引擎。用户上传 JSON 格式的数据集。然后,Elasticsearch 在向集群索引中的文档添加可搜索引用之前保存原始文档。 + +Elasticsearch 创建还不到九年,但它是最受欢迎的企业搜索引擎。Elastic 在 2019 年 6 月 25 日发布了最新的更新版本 7.2.0。 + +[Kibana][3] 是 Elasticsearch 的开源数据可视化工具。此工具可帮助用户在 Elasticsearch 集群的内容索引之上创建可视化。 + +[Sunbursts][4]、[地理空间数据地图][5]、[关系分析][6]和实时数据面板只是其中几个功能。并且由于 Elasticsearch 的机器学习能力,你可以了解哪些属性可能会影响你的数据(如服务器或 IP 地址)并查找异常模式。 + +在上个月的 [DevFest DC][7] 中,[Summer Rankin 博士][8],Booz Allen Hamilton 的首席数据科学家将 TED Talk 的内容数据集上传到了 Elasticsearch,然后使用 Kibana 快速构建了面板。出于好奇,几天后我去了 Elasticsearch 聚会。 + +由于本课程针对的是新手,因此我们从第一步开始:在我们的笔记本上安装 Elastic 和 Kibana。如果没有安装这两个包,我们无法将莎士比亚的文本数据集作为测试 JSON 文件创建可视化了。 + +接下来,我将分享在 MacOS 上下载、安装和运行 Elasticsearch V7.1.1 的分步说明。这是我在 2019 年 6 月中旬参加 Elasticsearch 聚会时的最新版本。 + +### 下载适合 MacOS 的 Elasticsearch + + 1. 进入 ,你会看到下面的页面: + + + +![The Elasticsearch download page.][9] + + 2. 在**下载**栏,单击 **MacOS**,将 Elasticsearch TAR 文件(例如,**elasticsearch-7.1.1-darwin-x86_64.tar**)下载到 **Downloads** 文件夹。 +  3. 双击此文件并解压到自己的文件夹中(例如,**elasticsearch-7.1.1**),这其中包含 TAR 中的所有文件。 + + + + +**提示**:如果你希望 Elasticsearch 放在另一个文件夹中,现在可以移动。 + +### 在 MacOS 命令行中运行 Elasticsearch + +如果你愿意,你可以只用命令行运行 Elasticsearch。只需遵循以下流程: + + 1. [打开**终端**窗口][10]。 +  2. 在终端窗口中,输入你的 Elasticsearch 文件夹。例如(如果你移动了程序,请将 **Downloads** 更改为正确的路径): + + +**$ cd ~Downloads/elasticsearch-1.1.0** + + 3. 切换到 Elasticsearch **bin** 子文件夹,然后启动该程序。例如: + + + +**$ cd bin $ ./elasticsearch** + +这是我启动 Elasticsearch 1.1.0 时命令行终端显示的一些输出: + +![Terminal output when running Elasticsearch.][11] + +**注意**:默认情况下,Elasticsearch 在前台运行,这可能会导致计算机速度变慢。按 **Ctrl-C** 可以阻止 Elasticsearch 运行。 + +### 使用 GUI 运行 Elasticsearch + +如果你更喜欢点击,你可以像这样运行 Elasticsearch: + + 1. 打开一个新的 **Finder** 窗口。 +  2. 在左侧 Finder 栏中选择 **Downloads**(如果你将 Elasticsearch 移动了另一个文件夹,请进入它)。 +  3. 打开名为 **elasticsearch-7.1.1** 的文件夹(对于此例)。出现了八个子文件夹。 + + + +![The elasticsearch/bin menu.][12] + + 4. 打开 **bin** 子文件夹。如上面的截图所示,此子文件夹中有 20 个文件。 +  5. 单击第一个文件,即 **elasticsearch**。 + + + +请注意,你可能会收到安全警告,如下所示: + +![The security warning dialog box.][13] + +  + +这时候要打开程序: + + 1. 在警告对话框中单击 **OK**。 +  2. 打开**系统偏好**。 +  3. 单击**安全和隐私**,打开如下窗口: + + + +![Where you can allow your computer to open the downloaded file.][14] + + 4. 单击**永远打开**,打开如下所示的确认对话框: + + + +![Security confirmation dialog box.][15] + + 5. 单击**打开**。会打开一个终端窗口并启动 Elasticsearch。 + + + +启动过程可能需要一段时间,所以让它继续运行。最终,它将完成,你最后将看到类似这样的输出: + +![Launching Elasticsearch in MacOS.][16] + +### 了解更多 + +安装 Elasticsearch 之后,就可以开始探索了! + +该工具的 [Elasticsearch:开始使用][17]指南会根据你的目标指导你。它的介绍视频介绍了在 [Elasticsearch Service][18] 上启动托管集群,执行基本搜索查询,通过创建,读取,更新和删除(CRUD)REST API等方式操作数据的步骤。 + +本指南还提供文档链接,开发控制台命令,培训订阅以及 Elasticsearch Service 的免费试用版。此试用版允许你在 AWS 和 GCP 上部署 Elastic 和 Kibana 以支持云中的 Elastic 集群。 + +在本文的后续内容中,我们将介绍在 MacOS 上安装 Kibana 所需的步骤。此过程将通过不同的数据可视化将你的 Elasticsearch 查询带到一个新的水平。 敬请关注! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/installing-elasticsearch-macos + +作者:[Lauren Maffeo][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/lmaffeo/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) +[2]: https://www.getapp.com/it-management-software/a/qbox-dot-io-hosted-elasticsearch/ +[3]: https://www.elastic.co/products/kibana +[4]: https://en.wikipedia.org/wiki/Pie_chart#Ring +[5]: https://en.wikipedia.org/wiki/Spatial_analysis +[6]: https://en.wikipedia.org/wiki/Correlation_and_dependence +[7]: https://www.devfestdc.org/ +[8]: https://www.summerrankin.com/about +[9]: https://opensource.com/sites/default/files/uploads/wwa1f3_600px_0.png (The Elasticsearch download page.) +[10]: https://support.apple.com/en-ca/guide/terminal/welcome/mac +[11]: https://opensource.com/sites/default/files/uploads/io6t1a_600px.png (Terminal output when running Elasticsearch.) +[12]: https://opensource.com/sites/default/files/uploads/o43yku_600px.png (The elasticsearch/bin menu.) +[13]: https://opensource.com/sites/default/files/uploads/elasticsearch_security_warning_500px.jpg (The security warning dialog box.) +[14]: https://opensource.com/sites/default/files/uploads/the_general_tab_of_the_system_preferences_security_and_privacy_window.jpg (Where you can allow your computer to open the downloaded file.) +[15]: https://opensource.com/sites/default/files/uploads/confirmation_dialog_box.jpg (Security confirmation dialog box.) +[16]: https://opensource.com/sites/default/files/uploads/y5dvtu_600px.png (Launching Elasticsearch in MacOS.) +[17]: https://www.elastic.co/webinars/getting-started-elasticsearch?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch&gclid=EAIaIQobChMImdbvlqOP4wIVjI-zCh3P_Q9mEAAYASABEgJuAvD_BwE +[18]: https://info.elastic.co/elasticsearch-service-gaw-v10-nav.html?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch%20service&gclid=EAIaIQobChMI_MXHt-SZ4wIVJBh9Ch3wsQfPEAAYASAAEgJo9fD_BwE From b7f0becf29819fe86490df35aa1fd1fe1b8cdfae Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 18 Jul 2019 09:03:24 +0800 Subject: [PATCH 026/951] translating --- ...inux Commands In Capital Letters To Run Them As Sudo User.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md index 0c06ba2489..b93c727644 100644 --- a/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md +++ b/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b7a2e4a73dd68d3181d12ce8b99aa3d39b8e215f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 18 Jul 2019 12:43:48 +0800 Subject: [PATCH 027/951] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @0x996 本文首发地址: https://linux.cn/article-11118-1.html 您的 LCTT 专页地址: https://linux.cn/lctt/0x996 请注册领取 LCCN: https://lctt.linux.cn/ --- ...t 200- Linux And Unix Operating Systems Online For Free.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md (99%) diff --git a/translated/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md b/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md similarity index 99% rename from translated/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md rename to published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md index 492bd087c1..cda9f2c351 100644 --- a/translated/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md +++ b/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (0x996) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11118-1.html) [#]: subject: (Test 200+ Linux And Unix Operating Systems Online For Free) [#]: via: (https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From 264b7825fbe500318437c13da375dcf1689b9ec4 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 18 Jul 2019 12:50:04 +0800 Subject: [PATCH 028/951] Rename sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md to sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md --- ...c Games Backs Blender Foundation with -1.2m Epic MegaGrants.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md (100%) diff --git a/sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md similarity index 100% rename from sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md rename to sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md From f19575d764ab38a85712ed4c26a13a8afde08bb0 Mon Sep 17 00:00:00 2001 From: ZhiW5217 <49193683+ZhiW5217@users.noreply.github.com> Date: Thu, 18 Jul 2019 13:07:26 +0800 Subject: [PATCH 029/951] Update 20171226 Top 10 Microsoft Visio Alternatives for Linux.md --- .../20171226 Top 10 Microsoft Visio Alternatives for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md index cf4c4b3969..575ab3045f 100644 --- a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md +++ b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md @@ -151,7 +151,7 @@ Graphviz 略有不同。它不是绘图工具,而是专用的图形可视化 ### 8. Draw.io -Draw.io 主要是一个免费的基于 Web 的图表工具,它有强大的工具几乎可以制作任何类型的图表。您只需要拖放然后连接它们以创建流程图,ER 图或任何相关的。此外,如果您喜欢该工具,则可以尝试脱机桌面版本[离线桌面版本][21]。 +Draw.io 主要是一个免费的基于 Web 的图表工具,它有强大的工具几乎可以制作任何类型的图表。您只需要拖放然后连接它们以创建流程图,ER 图或任何相关的。此外,如果您喜欢该工具,则可以尝试[离线桌面版本][21]。 **主要功能概述:** From cf3c9f00a21c115d985fb12e8ef9fa5e1ec1355f Mon Sep 17 00:00:00 2001 From: MjSeven Date: Thu, 18 Jul 2019 22:32:40 +0800 Subject: [PATCH 030/951] Translated --- ...08 Command line quick tips- Permissions.md | 133 ------------------ 1 file changed, 133 deletions(-) delete mode 100644 sources/tech/20190708 Command line quick tips- Permissions.md diff --git a/sources/tech/20190708 Command line quick tips- Permissions.md b/sources/tech/20190708 Command line quick tips- Permissions.md deleted file mode 100644 index 2ebd6a9c69..0000000000 --- a/sources/tech/20190708 Command line quick tips- Permissions.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Command line quick tips: Permissions) -[#]: via: (https://fedoramagazine.org/command-line-quick-tips-permissions/) -[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) - -Command line quick tips: Permissions -====== - -![][1] - -Fedora, like all Linux based systems, comes with a powerful set of security features. One of the basic features is _permissions_ on files and folders. These permissions allow files and folders to be secured from unauthorized access. This article explains a bit about these permissions, and shows you how to share access to a folder using them. - -### Permission basics - -Fedora is by nature a multi-user operating system. It also has _groups_, which users can be members of. But imagine for a moment a multi-user system with no concept of permissions. Different logged in users could read each other’s content at will. This isn’t very good for privacy or security, as you can imagine. - -Any file or folder on Fedora has three sets of permissions assigned. The first set is for the _user_ who owns the file or folder. The second is for the _group_ that owns it. The third set is for everyone else who’s not the user who owns the file, or in the group that owns the file. Sometimes this is called the _world_. - -### What permissions mean - -Each set of permissions comes in three flavors — _read_, _write_, and _execute_. Each of these has an initial that stands for the permission, thus _r_, _w_, and _x_. - -#### File permissions - -For _files_, here’s what these permissions mean: - - * Read (r): the file content can be read - - * Write (w): the file content can be changed - - * Execute (x): the file can be executed — this is used primarily for programs or scripts that are meant to be run directly - - * - - -You can see the three sets of these permissions when you do a long listing of any file. Try this with the _/etc/services_ file on your system: - -``` -$ ls -l /etc/services --rw-r--r--. 1 root root 692241 Apr 9 03:47 /etc/services -``` - -Notice the groups of permissions at the left side of the listing. These are provided in three sets, as mentioned above — for the user who owns the file, for the group that owns the file, and for everyone else. The user owner is _root_ and the group owner is the _root_ group. The user owner has read and write access to the file. Anyone in the group _root_ can only read the file. And finally, anyone else can also only read the file. (The dash at the far left shows this is a regular file.) - -By the way, you’ll commonly find this set of permissions on many (but not all) system configuration files. They are only meant to be changed by the system administrator, not regular users. Often regular users need to read the content as well. - -#### Folder (directory) permissions - -For folders, the permissions have slightly different meaning: - - * Read (r): the folder contents can be read (such as the _ls_ command) - * Write (w): the folder contents can be changed (files can be created or erased in this folder) - * Execute (x): the folder can be searched, although its contents cannot be read. (This may sound strange, but the explanation requires more complex details of file systems outside the scope of this article. So just roll with it for now.) - - - -Take a look at the _/etc/grub.d_ folder for example: - -``` -$ ls -ld /etc/grub.d -drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d -``` - -Note the _d_ at the far left. It shows this is a directory, or folder. The permissions show the user owner (_root_) can read, change, and _cd_ into this folder. However, no one else can do so — whether they’re a member of the _root_ group or not. Notice you can’t _cd_ into the folder, either: - -``` -$ cd /etc/grub.d -bash: cd: /etc/grub.d: Permission denied -``` - -Notice how your own home directory is setup: - -``` -$ ls -ld $HOME -drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul -``` - -Now, notice how no one, other than you as the owner, can access anything in this folder. This is intentional! You wouldn’t want others to be able to read your private content on a shared system. - -### Making a shared folder - -You can exploit this permissions capability to easily make a folder to share within a group. Imagine you have a group called _finance_ with several members who need to share documents. Because these are user documents, it’s a good idea to store them within the _/home_ folder hierarchy. - -To get started, [use][2] _[sudo][2]_ to make a folder for sharing, and set it to be owned by the _finance_ group: - -``` -$ sudo mkdir -p /home/shared/finance -$ sudo chgrp finance /home/shared/finance -``` - -By default the new folder has these permissions. Notice how it can be read or searched by anyone, even if they can’t create or erase files in it: - -``` -drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance -``` - -That doesn’t seem like a good idea for financial data. Next, use the _chmod_ command to change the mode (permissions) of the shared folder. Note the use of _g_ to change the owning group’s permissions, and _o_ to change other users’ permissions. Similarly, _u_ would change the user owner’s permissions: - -``` -$ sudo chmod g+w,o-rx /home/shared/finance -``` - -The resulting permissions look better. Now, anyone in the _finance_ group (or the user owner _root_) have total access to the folder and its contents: - -``` -drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance -``` - -If any other user tries to access the shared folder, they won’t be able to do so. Great! Now our finance group can put documents in a shared place. - -### Other notes - -There are additional ways to manipulate these permissions. For example, you may want any files in this folder to be set as owned by the group _finance_. This requires additional settings not covered in this article, but stay tuned to the Magazine for more on that topic soon. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/command-line-quick-tips-permissions/ - -作者:[Paul W. Frields][a] -选题:[lujun9972][b] -译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/pfrields/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg -[2]: https://fedoramagazine.org/howto-use-sudo/ From 2160eaced89a34ee9b36e5cfe139e1a0a52bd998 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Thu, 18 Jul 2019 22:41:25 +0800 Subject: [PATCH 031/951] f --- ...08 Command line quick tips- Permissions.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 translated/tech/20190708 Command line quick tips- Permissions.md diff --git a/translated/tech/20190708 Command line quick tips- Permissions.md b/translated/tech/20190708 Command line quick tips- Permissions.md new file mode 100644 index 0000000000..20bc371fed --- /dev/null +++ b/translated/tech/20190708 Command line quick tips- Permissions.md @@ -0,0 +1,129 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command line quick tips: Permissions) +[#]: via: (https://fedoramagazine.org/command-line-quick-tips-permissions/) +[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) + +命令行快速提示:权限 +====== + +![][1] + +Fedora 与所有基于 Linux 的系统一样,它提供了一组强大的安全特性。其中一个基本特性是文件和文件夹上的 _权限_。这些权限保护文件和文件夹免受未经授权的访问。本文将简要介绍这些权限,并向你展示如何使用它们共享对文件夹的访问。 + +### 权限基础 + +Fedora 本质上是一个多用户操作系统,它也有 _组_,用户可以是其成员。但是,想象一下一个没有权限概念的多用户系统,不同的登录用户可以随意阅读彼此的内容。你可以想象到这对隐私或安全性并不是很好。 + +Fedora 上的任何文件或文件夹都分配了三组权限。第一组用于拥有文件或文件夹的 _用户_,第二组用于拥有它的 _组_,第三组用于其他人,即不是该文件的用户或拥有该文件的组中的用户。有时这被称为 _world_。(to 校正:这个 world 没理解) + +### 权限意味着什么 + +每组权限都有三种形式:_读_,_写_ 和 _执行_。其中每个都可以用首字母来代替,即 _r_、_w_、_x_。 + +#### 文件权限 + +对于 _文件_,权限的含义如下所示: + + * 读(r):可以读取文件内容 + + * 写(w):可以更改文件内容 + + * 执行(x):可以执行文件 -- 这主要用于打算直接运行的程序或脚本 + + +当你对任何文件进行详细信息列表查看时,可以看到这三组权限。尝试查看系统上的 _/etc/services_ 文件: + +``` +$ ls -l /etc/services +-rw-r--r--. 1 root root 692241 Apr 9 03:47 /etc/services +``` + +注意列表左侧的权限组。如上所述,这些表明三种用户的权限:拥有该文件的用户,拥有该文件的组以及其他人。用户所有者是 _root_,组所有者是 _root_ 组。用户所有者具有对文件的读写权限,_root_ 组中的任何人都只能读取该文件。最后,其他任何人也只能读取该文件。(最左边的破折号显示这是一个常规文件。) + +顺便说一下,你通常会在许多(但不是所有)系统配置文件上发现这组权限,它们只由系统管理员而不是普通用户更改。通常,普通用户需要读取其内容。 + +#### 文件夹(目录)权限 + +对于文件夹,权限的含义略有不同: + + * 读(r):可以读取文件夹内容(例如 _ls_ 命令) + * 写(w):可以更改文件夹内容(可以在此文件夹中创建或删除文件) + * 执行(x):可以搜索文件夹,但无法读取其内容。(这听起来可能很奇怪,但解释起来需要更复杂的文件系统细节,这超出了本文的范围,所以现在就这样吧。) + + +看一下 _/etc/grub.d_ 文件夹的例子: + +``` +$ ls -ld /etc/grub.d +drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d +``` + +注意最左边的 _d_,它显示这是一个目录或文件夹。权限显示用户所有者(_root_)可以读取、更改和 _cd_ 到此文件夹中。但是,没有其他人可以这样做 - 无论他们是否是 _root_ 组的成员。注意,你不能 _cd_ 进入该文件夹。 + +``` +$ cd /etc/grub.d +bash: cd: /etc/grub.d: Permission denied +``` + +注意你自己的主目录是如何设置的: + +``` +$ ls -ld $HOME +drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul +``` + +现在,注意除了作为所有者之外,没有人可以访问此文件夹中的任何内容。这是特意的!你不希望其他人能够在共享系统上读取你的私人内容。 + +### 创建共享文件夹 + +你可以利用此权限功能轻松创建一个文件夹以在组内共享。假设你有一个名为 _finance_ 的小组,其中有几个成员需要共享文档。因为这些是用户文档,所以将它们存储在 _/home_ 文件夹层次结构中是个好主意。 + +首先,[使用][2] _[sudo][2]_ 创建一个共享文件夹,并将其设置为 _finance_ 组所有: + +``` +$ sudo mkdir -p /home/shared/finance +$ sudo chgrp finance /home/shared/finance +``` + +默认情况下,新文件夹具有这些权限。注意任何人都可以读取或搜索它,即使他们无法创建或删除其中的文件: + +``` +drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance +``` + +对于金融数据来说,这似乎不是一个好主意。接下来,使用 _chmod_ 命令更改共享文件夹的模式(权限)。注意,使用 _g_ 更改所属组的权限,使用 _o_ 更改其他用户的权限。同样,_u_ 会更改用户所有者的权限: + +``` +$ sudo chmod g+w,o-rx /home/shared/finance +``` + +生成的权限看起来更好。现在,_finance_ 组中的任何人(或用户所有者 _root_)都可以完全访问该文件夹及其内容: +``` +drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance +``` + +如果其他用户尝试访问共享文件夹,他们将无法执行此操作。太棒了!现在,我们的金融部门可以将文档放在一个共享的地方。 + +### 其他说明 + +还有其他方法可以操作这些权限。例如,你可能希望将此文件夹中的任何文件设置为 _finance_ 组所拥有。这需要本文未涉及的其他设置,但请继续关注杂志,以了解关于该主题的更多信息。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/command-line-quick-tips-permissions/ + +作者:[Paul W. Frields][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/pfrields/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg +[2]: https://fedoramagazine.org/howto-use-sudo/ From d546e5f775a73540c038401c26e4bfeb9a9e533b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 18 Jul 2019 23:49:53 +0800 Subject: [PATCH 032/951] PRF @qfzy1233 --- ...Mid-Weight Distro Focused on Simplicity.md | 93 ++++++++----------- 1 file changed, 40 insertions(+), 53 deletions(-) diff --git a/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md b/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md index c5ec0570fa..4955a1d7cb 100644 --- a/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md +++ b/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md @@ -1,109 +1,96 @@ -MX Linux: 一款专注于简洁性的发行版 +MX Linux:一款专注于简洁性的中等体量发行版 ====== +> 这个发行版可以使任何人在 Linux 上如家一般。 + ![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux.png?itok=OLjmCxT9) -Linux 有着如此多种的发型版。许多发行版为了使自己与众不同而做出了很多改变。另一方面,许多发行版之间的区别又是如此之小,你可能会问为什么有人还愿意不厌其烦的重复别人已经做过的工作呢?也正是基于这一疑惑,让我好奇为什么 [antiX][1] 和 [MEPIS][2]这两个社区要联合推出一个特殊的发行版,考虑到具体情况应该会是一个搭载 Xfce 桌面并基于 antiX 的版本,由 MEPIS 社区承担开发。 -这一开发中的使用 Xfce 桌面的 antiX 系统是否会基于他之前的发行版呢?毕竟,antiX 旨在提供一个“快速、轻量级、易于安装的、支持linux live CD 且基于Debian Stable的发行版”。antiX 所搭载的桌面是 [LXDE][3],能够极好的满足关于轻量化系统的相关要求和特性。那究竟是什么原因使得 antiX 决定构建另一个轻量化发行版呢,仅仅是因为这次换成了 Xfce 吗?好吧,Linux 社区中的任何人都知道,差异之处体现了不同版本的特性,一个好的轻量级发行版是值得一试的(特别是可以使得我们的旧硬件摆脱进入垃圾填埋场的宿命)。当然,LXDE 和 Xfce 并不完全属于同一类别。LXDE应该被认为是一个真正的轻量级桌面,而 Xfce 应该被认为是一个中等重量的桌面。朋友们,这就是为什么 MX Linux 是 antiX 的一个重要迭代的关键。一个基于Debian的中等体量的发行版,它包含你完成工作所需的所有工具。 +Linux 有着如此多种的发行版。许多发行版为了使自己与众不同而做出了很多改变。另一方面,许多发行版之间的区别又是如此之小,你可能会问为什么有人还愿意不厌其烦的重复别人已经做过的工作呢?也正是基于这一疑惑,让我好奇为什么 [antiX][1] 和 [MEPIS][2]这两个社区要联合推出一个特殊的发行版,考虑到具体情况应该会是一个搭载 Xfce 桌面并基于 antiX 的版本,由 MEPIS 社区承担开发。 -但是在 MX linux 中有一些直接从 antiX 借用来的非常有用的东西—那就是安装工具。当我第一次设置VirtualBox 的虚拟机来安装 MX Linux 时,我认为安装将是我已经习惯的典型的、非常简单的Linux安装。令我非常惊讶的是,MX Linux 使用的 antiX 安装程序打破了以往的痛点,特别是对于那些对尝试 Linux 持观望态度的人来说。 +这一开发中的使用 Xfce 桌面的 antiX 系统是否会基于它之前的发行版呢?毕竟,antiX 旨在提供一个“基于 Debian 稳定版的快速、轻量级、易于安装的非 systemd 的 live CD 发行版”。antiX 所搭载的桌面是 [LXDE][3],能够极好的满足关于轻量化系统的相关要求和特性。那究竟是什么原因使得 antiX 决定构建另一个轻量化发行版呢,仅仅是因为这次换成了 Xfce 吗?好吧,Linux 社区中的任何人都知道,增加了不同风格的好的轻量级发行版是值得一试的(特别是可以使得我们的旧硬件摆脱进入垃圾填埋场的宿命)。当然,LXDE 和 Xfce 并不完全属于同一类别。LXDE 应该被认为是一个真正的轻量级桌面,而 Xfce 应该被认为是一个中等体量的桌面。朋友们,这就是为什么 MX Linux 是 antiX 的一个重要迭代的关键。一个基于 Debian 的中等体量的发行版,它包含你完成工作所需的所有工具。 + +但是在 MX Linux 中有一些直接从 antiX 借用来的非常有用的东西 —— 那就是安装工具。当我初次设置了 VirtualBox 虚拟机来安装 MX Linux 时,我认为安装的系统将是我已经习惯的典型的、非常简单的 Linux 系统。令我非常惊讶的是,MX Linux 使用的 antiX 安装程序打破了以往的痛点,特别是对于那些对尝试 Linux 持观望态度的人来说。 因此,甚至在我开始尝试 MX Linux 之前,我就对它有了深刻的印象。让我们来看看是什么让这个发行版的安装如此特别,最后再来看看桌面。 你可以从[这里][4]下载 MX Linux 17.1。系统的最低要求是: - * CD/DVD驱动器(以及能够从该驱动器引导的BIOS)或活动USB(以及能够从USB引导的BIOS) - + * CD/DVD驱动器(以及能够从该驱动器引导的 BIOS)或 live USB(以及能够从 USB 引导的 BIOS) * 英特尔 i486 或 AMD 处理器 - * 512 MB 内存 - * 5 GB 硬盘空间 - * 扬声器,AC97 或 HDA-compatible 声卡 - * 作为一个 LiveUSB 使用,需要 4 GB 空间 ### 安装 -MX Linux安装程序使安装 Linux 变得轻而易举。虽然它可能不是外观最现代化的安装工具,但也已经差不多了。安装的要点是从选择磁盘和选择安装类型开始的(图1)。 +MX Linux 安装程序使安装 Linux 变得轻而易举。虽然它可能不是外观最现代化的安装工具,但也已经差不多了。安装的要点是从选择磁盘和选择安装类型开始的(图 1)。 ![install][6] -图1:MX Linux 的安装程序截图之一。 +*图 1:MX Linux 的安装程序截图之一* -[Used with permission][7] +下一个重要的界面(图 2)要求你设置一个计算机名称、域名和(如果需要的话,为微软网络设置)工作组。 -下一个重要的界面(图2)要求你为MS网络设置一个计算机名称、域名和(如果需要的话)工作组。 +![network][8] -配置工作组的能力是真正值得称赞的第一项。这是我记忆中第一款在安装期间提供此选项的发行版。它还应该提示你,MX Linux 提供了开箱即用共享目录的功能。它做到了,而且深藏功与名。它并不完美,但它可以在不需要安装任何额外包的情况下工作(稍后将详细介绍)。 +*图 2:设置网络名称* -最后一个重要的安装界面(需要用户交互)是创建用户帐户和 root 权限的密码(图3)。 +配置工作组的能力是第一个真正值得称赞的。这是我记忆中第一款在安装期间提供此选项的发行版。它还应该提示你,MX Linux 提供了开箱即用的共享目录功能。它做到了,而且深藏功与名。它并不完美,但它可以在不需要安装任何额外包的情况下工作(稍后将详细介绍)。 + +最后一个重要的安装界面(需要用户交互)是创建用户帐户和 root 权限的密码(图 3)。 ![user][9] -图3:设置用户帐户详细信息和 root 用户密码。 +*图 3:设置用户帐户详细信息和 root 用户密码* -[Used with permission][7] - -最后一个界面设置完成后,安装将完成并要求重新启动。重启后,你将看到登录屏幕。登录并享受MX Linux 带来的体验。 +最后一个界面设置完成后,安装将完成并要求重新启动。重启后,你将看到登录屏幕。登录并享受 MX Linux 带来的体验。 ### 使用 -Xfce桌面是一个非常容易上手的界面。默认设置将面板位于屏幕的左边缘(图4)。 +Xfce 桌面是一个非常容易上手的界面。默认设置将面板位于屏幕的左边缘(图 4)。 -![desktop ][11] +![desktop][11] -图4: MX Linux 的默认桌面。 +*图 4:MX Linux 的默认桌面* -[Used with permission][7] - -如果你想将面板移动到更传统的位置,右键单击面板上的空白点,然后单击面板>面板首选项。在生成的窗口中(图5),单击样式下拉菜单,在桌面栏、垂直栏或水平栏之间进行选择你想要的模式。 +如果你想将面板移动到更传统的位置,右键单击面板上的空白点,然后单击“面板”>“面板首选项”。在显示的窗口中(图 5),单击样式下拉菜单,在桌面栏、垂直栏或水平栏之间进行选择你想要的模式。 ![panel][13] -图5:配置 MX Linux 面板。 +*图 5:配置 MX Linux 面板* -[Used with permission][7] +桌面栏和垂直选项的区别在于,在桌面栏模式下,面板垂直对齐,就像在垂直模式下一样,但是插件是水平放置的。这意味着你可以创建更宽的面板(用于宽屏布局)。如果选择水平布局,它将默在顶部,然后你必须取消锁定面板,单击关闭,然后(使用面板左侧边缘的拖动手柄)将其拖动到底部。你可以回到面板设置窗口并重新锁定面板。 -桌面栏和垂直选项的区别在于,在桌面栏模式下,面板垂直对齐,就像在垂直模式下一样,但是插件是水平放置的。这意味着你可以创建更宽的面板(用于宽屏布局)。如果选择水平布局,它将默在顶部,然后你必须取消锁定面板,单击关闭,然后(使用面板左侧边缘的拖动手柄)将其拖动到底部。你可以回到面板设置窗口并重新锁定面板。 - -除此之外,使用 Xfce 桌面对于任何级别的用户来说都是无需动脑筋的事情……就是这么简单。你会发现很多生产力代表的软件(LibreOffice, Orage日历,PDF-Shuffler)、图像软件(GIMP)、通信(Firefox,Thunderbird,HexChat),多媒体(Clementine、guvcview SMTube, VLC媒体播放器),和一些 MX Linux 专属的工具(称为MX工具,涵盖了 live-USB 驱动器制作工具,包管理工具,repo 管理工具,回购经理,live ISO 快照工具,等等)。 - -![sharing][15] - -图6:向网络共享一个目录。 -[Used with permission][7] +除此之外,使用 Xfce 桌面对于任何级别的用户来说都是无需动脑筋的事情……就是这么简单。你会发现很多涵盖了生产力(LibreOffice、Orage Calendar、PDF-Shuffler)、图像(GIMP)、通信(Firefox、Thunderbird、HexChat)、多媒体(Clementine、guvcview SMTube、VLC媒体播放器)的软件,和一些 MX Linux 专属的工具(称为 MX 工具,涵盖了 live-USB 驱动器制作工具、网络助手、包管理工具、仓库管理工具、live ISO 快照工具等等)。 ### Samba -让我们讨论一下如何将文件夹共享到你的网络。正如我所提到的,你不需要安装任何额外的包就可以使其正常工作。只需打开文件管理器,右键单击任何位置,并选择网络上的共享文件夹。系统将提示你输入管理密码(已在安装期间设置)。验证成功之后,Samba服务器配置工具将打开(图6)。 +让我们讨论一下如何将文件夹共享到你的网络。正如我所提到的,你不需要安装任何额外的包就可以使其正常工作。只需打开文件管理器,右键单击任何位置,并选择网络上的共享文件夹。系统将提示你输入管理密码(已在安装期间设置)。验证成功之后,Samba 服务器配置工具将打开(图 6)。 + +![sharing][15] + +*图 6:向网络共享一个目录* + +单击“+”按钮配置你的共享。你将被要求指定一个目录,为共享提供一个名称/描述,然后决定该共享是否可写和可见(图 7)。 ![sharing][17] -图7:在MX Linux上配置共享。 +*图 7:在 MX Linux 上配置共享* -[Used with permission][7] +当你单击 Access 选项时,你可以选择是让每个人都访问共享,还是限于特定的用户。问题就出在这里。此时,没有用户可以共享。为什么?因为它们还没有被添加。有两种方法可以把它们添加到共享:从命令行或使用我们已经打开的工具。让我们用一种更为简单的方法。在 Samba 服务器配置工具的主窗口中,单击“首选项” > “Samba 用户”。在弹出的窗口中,单击“添加用户”。 -单击+按钮并配置你的共享。你将被要求指定一个目录,为共享提供一个名称/描述,然后决定该共享是否可写且可见(图7)。 - -当你单击 Access 选项时,你可以选择是让每个人都访问共享,还是限于特定的用户。问题就出在这里。此时,没有用户可以共享。为什么?因为它们还没有被添加。,有两种方法可以把它们添加到共享:从命令行或使用我们已经打开的工具。让我们用一种更为简单的方法。在Samba服务器配置工具的主窗口中,单击Preferences > Samba Users。在弹出的窗口中,单击 Add user。 - -将出现一个新窗口(图8),你需要从下拉框中选择用户,输入Windows用户名,并为用户键入/重新键入密码。 +将出现一个新窗口(图 8),你需要从下拉框中选择用户,输入 Windows 用户名,并为用户键入/重新键入密码。 ![Samba][19] -图8:向 Samba 添加用户。 +*图 8:向 Samba 添加用户* -[Used with permission][7] - -一旦你单击确定,用户将被添加,并且基于你的网络的对用户的共享功能也随之启用。创建 Samba 共享从未变得如此容易。 +一旦你单击“确定”,这用户就会被添加,并且基于你的网络的对用户的共享功能也随之启用。创建 Samba 共享从未变得如此容易。 ### 结论 -MX Linux 使任何从桌面操作系统转到 Linux 都变得非常简单。尽管有些人可能会觉得桌面界面不太现代,但发行版的主要关注点不是美观,而是简洁。为此,MX Linux 以出色的方式取得了成功。Linux 的这种特性可以让任何人在使用 Linux 的过程中感到宾至如归。尝试这一中等体量的发行版,看看它能否作为你的日常系统。 - -从Linux 基金会和 edX 的[“Linux入门”][20]课程了解更多关于Linux的知识。 +MX Linux 使任何从桌面操作系统转到 Linux 都变得非常简单。尽管有些人可能会觉得桌面界面不太现代,但发行版的主要关注点不是美观,而是简洁。为此,MX Linux 以出色的方式取得了成功。Linux 的这个特色发行版可以让任何人在使用 Linux 的过程中感到宾至如归。尝试这一中等体量的发行版,看看它能否作为你的日常系统。 -------------------------------------------------------------------------------- @@ -111,7 +98,7 @@ via: https://www.linux.com/learn/intro-to-linux/2018/4/mx-linux-mid-weight-distr 作者:[JACK WALLEN][a] 译者:[qfzy1233](https://github.com/qfzy1233) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 选题:[lujun9972](https://github.com/lujun9972) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -124,7 +111,7 @@ via: https://www.linux.com/learn/intro-to-linux/2018/4/mx-linux-mid-weight-distr [5]:/files/images/mxlinux1jpg [6]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_1.jpg?itok=i9bNScjH (install) [7]:/licenses/category/used-permission -[8]:/files/images/mxlinux3jpg +[8]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_2.jpg?itok=72nWxkGo [9]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_3.jpg?itok=ppf2l_bm (user) [10]:/files/images/mxlinux4jpg [11]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_4.jpg?itok=mS1eBy9m (desktop) From ce3fbbadfc863394e59f69cafce3361cee129961 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 18 Jul 2019 23:50:16 +0800 Subject: [PATCH 033/951] PUB @qfzy1233 https://linux.cn/article-11119-1.html --- ...0180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md (100%) diff --git a/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md b/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md similarity index 100% rename from translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md rename to published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md From a59523ff6ed1297c37228094a74cf75a81d2f716 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Jul 2019 00:52:38 +0800 Subject: [PATCH 034/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190718=20What?= =?UTF-8?q?=20you=20need=20to=20know=20to=20be=20a=20sysadmin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190718 What you need to know to be a sysadmin.md --- ... What you need to know to be a sysadmin.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20190718 What you need to know to be a sysadmin.md diff --git a/sources/tech/20190718 What you need to know to be a sysadmin.md b/sources/tech/20190718 What you need to know to be a sysadmin.md new file mode 100644 index 0000000000..55947b8456 --- /dev/null +++ b/sources/tech/20190718 What you need to know to be a sysadmin.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What you need to know to be a sysadmin) +[#]: via: (https://opensource.com/article/19/7/be-a-sysadmin) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/kimvila) + +What you need to know to be a sysadmin +====== +Kickstart your sysadmin career by gaining these minimum competencies. +![People work on a computer server with devices][1] + +The system administrator of yesteryear jockeyed users and wrangled servers all day, in between mornings and evenings spent running hundreds of meters of hundreds of cables. This is still true today, with the added complexity of cloud computing, containers, and virtual machines. + +Looking in from the outside, it can be difficult to pinpoint what exactly a sysadmin does, because they play at least a small role in so many places. Nobody goes into a career already knowing everything they need for a job, but everyone needs a strong foundation. If you're looking to start down the path of system administration, here's what you should be concentrating on in your personal or formal training. + +### Bash + +When you learn the Bash shell, you don't just learn the Bash shell. You learn a common interface to Linux systems, BSD, MacOS, and even Windows (under the right conditions). You learn the importance of syntax, so you can quickly adapt to systems like Cisco routers' command line or Microsoft's PowerShell, and eventually, you can even learn more powerful languages like Python or Go. And you also begin to think procedurally so you can analyze complex problems and break them down into individual components, which is key because _that's_ how systems, like the internet, or an organization's intranet, or a web server, or a backup solution, are designed. + +But wait. There's more. + +Knowing the Bash shell has become particularly important because of the recent trend toward DevOps and [containers][2]. Your career as a sysadmin may lead you into a world where infrastructure is treated like code, which usually means you'll have to know the basics of scripting, the structure of [YAML-based][3] configuration, and how to [interact][4] with [containers][5] (tiny Linux systems running inside a [sandboxed file][6]). Knowing Bash is the gateway to efficient management of the most exciting open source technology, so go get [Bourne Again][7]. + +#### Resources + +There are many ways to get practice in the Bash shell. + +Try a [portable Linux distribution][8]. You don't have to install Linux to use Linux, so grab a spare thumb drive and spend your evenings or weekends getting comfortable with a text-based interface. + +There are several excellent [Bash articles][9] available here on opensource.com as well as [on Enable SysAdmin][10]. + +The problem with telling someone to practice with Bash is that to practice, you must have something to do. And until you know how to use Bash, you probably won't be able to think of anything to do. If that's your situation, go to Over The Wire and play [Bandit][11]. It's a game aimed at absolute beginners, with 34 levels of interactive basic hacking to get you comfortable with the Linux shell. + +### Web server setup + +Once you're comfortable with Bash, you should try setting up a web server. Not all sysadmins go around setting up web servers or even maintain web servers, but the skills you acquire while installing and starting the HTTP daemon, configuring Apache or Nginx, setting up the [correct permissions][12], and [configuring a firewall][13], are the same skills you need on a daily basis. After a little bit of effort, you may start to notice certain patterns in your labor. There are concepts you probably took for granted before trying to administer production-ready software and hardware, and you're no longer shielded from them in your fledgling role as an administrator. It might be frustrating at first because everyone likes to be good at everything they do, but that's actually a good thing. Let yourself be bad at new skills. That's how you learn. + +And besides, the more you struggle through your first steps, the sweeter it is when you finally see that triumphant "it works!" default index.html. + +#### Resources + +David Both wrote an excellent article on [Apache web server][14] configuration. For extra credit, step through his follow-up article on how to [host multiple sites][15] on one machine. + +### DHCP + +The Dynamic Host Configuration Protocol (DHCP) is the system that assigns IP addresses to devices on a network. At home, the modem or router your ISP (internet service provider) supports probably has an embedded DHCP server in it, so it's likely out of your purview. If you've ever logged into your home router to adjust the IP address range or set up a static address for some of your network devices, then you're at least somewhat familiar with the concept. You may understand that devices on a network are assigned the equivalent of phone numbers in the form of IP addresses, and you may realize that computers communicate with one another by broadcasting messages addressed to a specific IP address. Message headers are read by routers along the path, each of which works to direct the message to the next most logical router along the path toward its ultimate goal. + +Even if you understand these concepts, the inevitable escalation of basic familiarity with DHCP is to set up a DHCP server. Installing and configuring your own DHCP server provides you the opportunity to introduce DHCP collisions on your home network (try to avoid that, if you can, as it will definitely kill your network until it's resolved), control the distribution of addresses, create subnets, and monitor connections and lease times. + +More importantly, setting up DHCP and experimenting with different configurations helps you understand inter-networking. You understand how networks represent "partitions" in data transference and what steps you have to take to pass information from one to the other. That's vital for a sysadmin to know because the network is easily one of the most important aspects of the job. + +#### Resources + +Before running your own DHCP server, ensure that the DHCP server in your home router (if you have one) is inactive. Once you have it up and running, read Archit Modi's [guide to network commands][16] for tips on how to explore your network. + +### Network cables + +It might sound mundane, but getting familiar with how network cables work not only makes for a really fun weekend but also gives you a whole new understanding of how data gets across the wires. The best way to learn is to go to your local hobby shop and purchase a Cat 5 cutter and crimper and a few Cat 5 terminators. Then head home, grab a spare Ethernet cable, and cut the terminators off. Spend whatever amount of time it takes to get that cable back in commission. + +Once you have solved that puzzle, do it again, this time creating a working [crossover cable][17]. + +You should also start obsessing _now_ about cable management. If you're not naturally inclined to run cables neatly along the floor molding or the edges of a desk or to bind cables together to keep them orderly, then make it a goal to permanently condition yourself with a phobia of messy cables. You won't understand why this is necessary at first, but the first time you walk into a server room, you will immediately know. + +### Ansible + +[Ansible][18] is configuration management software, and it's a bit of a bridge between sysadmin and DevOps. Sysadmins use Ansible to configure fresh installs of an operating system and to maintain specific states on machines. DevOps uses Ansible to reduce time and effort spent on tooling so that more time and effort gets spent on developing. You should learn Ansible as part of your sysadmin training, with an eye toward the practices of DevOps, because most of what DevOps is pioneering now will end up as part of your workflow in the system administration of the future. + +The good thing about Ansible is that you can start using it now. It's cross-platform, and it scales both up and down. Ansible may be overkill for a single-user computer, but then again, Ansible could change the way you spin up virtual machines, or it could help you synchronize the states of all the computers in your home or [home lab][19]. + +#### Resources + +Read "[How to manage your workstation configuration with Ansible][20]" by Jay LaCroix for the quintessential introduction to get started with Ansible on a casual basis. + +### Break stuff + +Problems arise on computers because of user error, buggy software, administrator (that's you!) error, and any number of other factors. There's no way to predict what's going to fail or why, so part of your personal sysadmin training regime should be to poke at the systems you set up until they fail. The worse you are to your own lab infrastructure, the more likely you are to find weak points. And the more often you repair those weak spots, the more confident you become in your problem-solving skills. + +Aside from the rigors of setting up all the usual software and hardware, your primary job as a sysadmin is to find solutions. There will be times when you encounter a problem outside your job description, and it may not even be possible for you to fix it, but it'll be up to you to find a workaround. + +The more you break stuff now and work to fix it, the better prepared you will be to work as a sysadmin. + +* * * + +Are you a working sysadmin? Are there tasks you wish you'd prepared better for? Add them in the comments below! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/be-a-sysadmin + +作者:[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/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/kimvila +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) +[2]: https://opensource.com/article/19/6/kubernetes-dump-truck +[3]: https://www.redhat.com/sysadmin/yaml-tips +[4]: https://opensource.com/article/19/6/how-ssh-running-container +[5]: https://opensource.com/resources/what-are-linux-containers +[6]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[7]: https://opensource.com/article/18/7/admin-guide-bash +[8]: https://opensource.com/article/19/6/linux-distros-to-try +[9]: https://opensource.com/tags/bash +[10]: https://www.redhat.com/sysadmin/managing-files-linux-terminal +[11]: http://overthewire.org/wargames/bandit +[12]: https://opensource.com/article/19/6/understanding-linux-permissions +[13]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[14]: https://opensource.com/article/18/2/how-configure-apache-web-server +[15]: https://opensource.com/article/18/3/configuring-multiple-web-sites-apache +[16]: https://opensource.com/article/18/7/sysadmin-guide-networking-commands +[17]: https://en.wikipedia.org/wiki/Ethernet_crossover_cable +[18]: https://opensource.com/sitewide-search?search_api_views_fulltext=ansible +[19]: https://opensource.com/article/19/6/create-centos-homelab-hour +[20]: https://opensource.com/article/18/3/manage-workstation-ansible From e1b5b96671540f0945a873f107dd306ecf6f599c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Jul 2019 00:53:15 +0800 Subject: [PATCH 035/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190718=20Redire?= =?UTF-8?q?ct=20a=20GitHub=20Pages=20site=20with=20this=20HTTP=20hack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md --- ...a GitHub Pages site with this HTTP hack.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md diff --git a/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md b/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md new file mode 100644 index 0000000000..75c6dd9afe --- /dev/null +++ b/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Redirect a GitHub Pages site with this HTTP hack) +[#]: via: (https://opensource.com/article/19/7/permanently-redirect-github-pages) +[#]: author: (Oleksii Tsvietnov https://opensource.com/users/oleksii-tsvietnov) + +Redirect a GitHub Pages site with this HTTP hack +====== +Learn how to configure two repositories to serve as static websites with +custom domain names. +![computer servers processing data][1] + +I run a few static websites for my private projects on [GitHub Pages][2]. I'm absolutely happy with the service, as it supports custom domains, automatically redirects to HTTPS, and transparently installs SSL certificates (with automatic issuing via [Let's Encrypt][3]). It is very fast (thanks to [Fastly's][4] content delivery network) and is extremely reliable (I haven't had any issues for years). Taking into account the fact that I get all of this for free, it perfectly matches my needs at the moment. + +It has, however, one important limitation: because it serves static websites only, this means no query parameters, no dynamic content generated on the server side, no options for injecting any server-side configuration (e.g., .htaccess), and the only things I can push to the website's root directory are static assets (e.g., HTML, CSS, JS, JPEG, etc.). In general, this is not a big issue. There are a lot of open source [static site generators][5] available, such as [Jekyll][6], which is available by default from the dashboard, and [Pelican][7], which I prefer in most cases. Nevertheless, when you need to implement something that is traditionally solved on the server side, a whole new level of challenge begins.  + +For example, I recently had to change a custom domain name for one of my websites. Keeping the old one was ridiculously expensive, and I wasn't willing to continue wasting money. I found a cheaper alternative and immediately faced a bigger problem: all the search engines have the old name in their indexes. Updating indexes takes time, and until that happens, I would have to redirect all requests to the new location. Ideally, I would redirect each indexed resource to the equivalent on the new site, but at minimum, I needed to redirect requests to the new start page. I had access to the old domain name for enough time, and therefore, I could run the site separately on both domain names at the same time. + +There is one proper solution to this situation that should be used whenever possible: Permanent redirect, or the [301 Moved Permanently][8] status code, is the way to redirect pages implemented in the HTTP protocol. The only issue is that it's supposed to happen on the server side within a server response's HTTP header. But the only solution I could implement resides on a client side; that is, either HTML code or JavaScript. I didn't consider the JS variant because I didn't want to rely on the script's support in web browsers. Once I defined the task, I recalled a solution: the [**HTML <meta> tag**][9] **<meta http-equiv>** with the [**refresh**][10] [HTTP header][11]. Although it can be used to ask browsers to reload a page or jump to another URL after a specified number of seconds, after some research, I learned it is more complicated than I thought with some interesting facts and details. + +### The solution + +**TL;DR** (for anyone who isn't interested in all the details): In brief, this solution configures two repositories to serve as static websites with custom domain names. + +On the site with the old domain, I reconstructed the website's entire directory structure and put the following index.html (including the root) in each of them:  + + +``` +<!DOCTYPE HTML>                                                                 +<html lang="en">                                                                 +    <head>                                                                       +        <meta charset="utf-8"> +        <meta http-equiv="refresh" content="0;url={{THE_NEW_URL}}" />       +        <link rel="canonical" href="{{THE_NEW_URL}}" />                     +    </head>                                                                                                                                                                   +    <body>                                                                       +        <h1>                                                                     +            The page been moved to <a href="{{THE_NEW_URL}}">{{THE_NEW_URL}}</a> +        </h1>                                                                   +    </body>                                                                     +</html> +``` + +When someone opens a resource on the old domain, most web browsers promptly redirect to the same resource on the new website (thanks to **http-equiv="refresh"**). For any resources that were missed or nonexistent, it's helpful to create a **404.html** file in the old website's root directory with similar content, but without **rel="canonical"** (because there is no a canonical page, in this case). + +The last piece of the puzzle is the [canonical link relation][12] (**rel="canonical"**), which prevents duplicating content as long as the implemented redirect _is not permanent._ From the HTTP response's perspective, it happens when [the request has succeeded][13] and there is an indication for search engines that a resource has moved and should be associated with a new (preferred) location. + +I have learned a few interesting facts related to **http-equiv="refresh"** and **rel="canonical"**. The HTML metatag **http-equiv** is used to simulate the presence of an HTTP header in a server response. That is, web developers without access to the web server's configuration can get a similar result by "injecting" HTTP headers from an HTML document (the "body" of an HTTP response). It seems the **refresh** header, which has been used by all popular web browsers for many years, _doesn't really exist_. At least not as a standardized HTTP header. There was a plan to add it in the HTTP/1.1 specification that was [deferred to HTTP/1.2][14] (or later), but it never happened. + +### Summary + +The task of finding the real source URL for a resource is far from trivial. There are different scheme names (HTTP, HTTPS), multiple query parameters (page.html, page.html?a=1), various hostnames that resolve to the same IP address, etc. All of these options make a webpage look different to search engines, but the page is still the same. It gets even worse when the same content is published on independent web services. In 2009, Google, Yahoo, and Microsoft announced [support for a canonical link element][15] to clean up duplicate URLs on sites by allowing webmasters to choose a canonical (preferred) URL for a group of possible URLs for the same page. This helps search engines pick up the correct URL to associate with the content and can also improve [SEO for a site][16]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/permanently-redirect-github-pages + +作者:[Oleksii Tsvietnov][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/oleksii-tsvietnov +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/server_data_system_admin.png?itok=q6HCfNQ8 (computer servers processing data) +[2]: https://pages.github.com/ +[3]: https://letsencrypt.org/ +[4]: https://www.fastly.com/ +[5]: https://www.staticgen.com/ +[6]: https://jekyllrb.com/ +[7]: https://github.com/getpelican/pelican +[8]: https://tools.ietf.org/html/rfc2616#section-10.3.2 +[9]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta +[10]: http://www.otsukare.info/2015/03/26/refresh-http-header +[11]: https://tools.ietf.org/html/rfc2616#section-14 +[12]: https://tools.ietf.org/html/rfc6596 +[13]: https://tools.ietf.org/html/rfc2616#section-10.2.1 +[14]: https://lists.w3.org/Archives/Public/ietf-http-wg-old/1996MayAug/0594.html +[15]: https://www.mattcutts.com/blog/canonical-link-tag/ +[16]: https://yoast.com/rel-canonical/ From b8b48eca4b7ea46272cc76ae3c32dc01a98d04c2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Jul 2019 00:53:33 +0800 Subject: [PATCH 036/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190718=20How=20?= =?UTF-8?q?to=20apply=20'release=20early,=20release=20often'=20to=20build?= =?UTF-8?q?=20a=20better=20brand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190718 How to apply -release early, release often- to build a better brand.md --- ... release often- to build a better brand.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/tech/20190718 How to apply -release early, release often- to build a better brand.md diff --git a/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md b/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md new file mode 100644 index 0000000000..4a16a41058 --- /dev/null +++ b/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md @@ -0,0 +1,110 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to apply 'release early, release often' to build a better brand) +[#]: via: (https://opensource.com/article/19/7/build-better-brand) +[#]: author: (Alex Kimball https://opensource.com/users/alex-kimballhttps://opensource.com/users/marcobravo) + +How to apply 'release early, release often' to build a better brand +====== +Try this faster, more collaborative process to promote your project. +![][1] + +The importance of open source—and specifically the maxim "release early, release often" (RERO)—can hardly be overstated.  + +This approach born at the command line has impacted the world as organizations of every shape and size discover what open, collaborative processes can do. Look around. The evidence is everywhere: on our phones, in our cars, in schools and hospitals. + +If we still built software the way we used to, innovations across these and countless other areas may never have seen the light of day. + +The worlds of marketing and brand development are no different. In today's fast-moving tech industry, marketers and strategists are taking a page out of the dev team's playbook, applying more agile methods to creating brand messaging and visual identities. + +Why? For the same reasons cathedral-style development is no longer the best way to build apps: it's too isolated, too slow, and too disconnected from the reality of how the rest of the world works. + +Fans of the TV series _Mad Men_ will be familiar with how marketing used to be done, especially within an agency. Marketing messages—taglines, slogans, jingles, and the like—developed by creative powerhouses with a unique gift they (and only they) seemed to truly understand. + +A typical project would go something like this: + + * The client hires the agency. Much excitement as the journey sets off; after a very brief introductory meeting, the client sends along a few existing materials. + * The agency retreats to its creative confines to wait for divine inspiration to strike. + * Many weeks and months later, the agency returns with—_**eureka!**_—the answer! + + + +Why these antiquated processes don't work: + + * They allow little room for the voice of the customer. + * They allow little room for the voice of those within the company who know it best and care about it most. + * They hold precious the final product until the very end, increasing the likelihood that bugs in the creative code will survive until it's too late. All destination. No journey. + + + +That's not how today's most agile, most innovative companies build their software. It shouldn't be how they build their brands. + +### 3 simple steps to begin your RERO journey + +Applying RERO to your brand projects is simple. Start with these three steps: + +#### 1\. Set clear expectations + +As the well-known African proverb cautions: "If you want to go fast, go alone; if you want to go far, go together." When it comes to projects guided by RERO principles, setting clear expectations early can be the key to going farther, faster. + +At any project's outset, gather your working team, partners, clients, or anyone else expected to contribute, and make sure everyone is prepared to adopt an agile mindset. Progress will be measured in speedy steps, not big leaps. In a room packed with perfectionists, some will likely bristle at this new approach—don't worry. + +Don't forget the logistics, either. Share the project schedule, clearly outlining the milestones where all are expected to participate, as well as windows of working time where individual progress should be made. + +#### 2\. Share silly first drafts + +Ideas, especially rough ones, should be welcomed with open arms. We call these early explorations Silly First Drafts. The SFD is a crucial piece of our creative puzzle. Naming it makes it less scary. An open invitation to share with the team even the smallest seed of an idea without fear of ridicule or rejection. + +Easier said than done, for sure. As a writer, I struggle to take this advice more than I'd care to admit. Putting something you've created out there before it's ready for primetime feels like a mortal sin. Not so in the RERO world. The goal of the SFD is to create more, more quickly — and get what you create in front of users and customers who can help you make it even better. To dive in, get messy and create in the open for more eyes to see and help improve. + +Some content creators will bristle at this approach initially. Encourage them to embrace this discomfort with a more curious, growth-oriented mindset. Apply what the improv world calls a "Yes, and…" mindset, which emphasizes additive contributions not subtractive naysaying. + +Emphasize the journey _and_ the destination. Not a simple binary of success or failure, but rather an opportunity for continuous development. At the project level, this approach helps combat progress-killing factors like the dreaded "paralysis by analysis." How much time have we all lost to hand-wringing indecision and over-thinking? + +Gather input on anything you've created—whether lines of code or lines of copy—and your final product will thank you. Just make sure these "fresh eyes" know what to look for. Equip your team to understand how they can be most helpful. Highlight specific areas where feedback is most needed (and by contrast, where things are feeling pretty good). + +#### 3\. Embrace technology + +This last step is probably the easiest but worth mentioning, as it's overlooked more often than you might expect. Collaboration software has made life a lot easier for all of us lately and can be a crucial strategy to implement a RERO approach for your next project effectively. + +##### Team communication + +Today's crop of online messaging platforms is well-suited to match the pace of a RERO-guided process. Provide all project contributors—especially those who work remotely—with a single, always-available venue for productive discussions. For our money, the best open source option of the bunch is [Mattermost][2]. It does just about everything Slack can do—file sharing, real-time chat, robust integrations—while also letting you access the source code. + +Set a few parameters for the team around best practices to keep the channel positive and productive. Without at least a few rules in place, channels and threads can quickly become side-tracked and GIF-overloaded. Describe the purpose of each channel when it's created so that everyone knows why it exists and what you're there to do. + +##### Content creation + +For content-related tasks that require word processing, spreadsheets, and presentations, open source alternatives to the Microsoft Office suite of products have been available for decades—chief among them was the now-defunct OpenOffice. Since its final release in 2011, a handful of other providers have picked up the torch. + +LibreOffice is a good option, but by the development team's own admission, it may not be the best choice for enterprise deployments. For business-critical applications, check out [Collabora Online][3]. This hosted solution offers a full suite of office applications with powerful team tools for live collaborative editing, support for all major file formats, and data security protections. + +With project files accessible to anyone with a modern browser, you won't have to worry about "I can't open it" issues that arise when your PC-loving executive goes to review work from the Mac-loving design team. And when revision histories are updated automatically, it's easy to revisit previous drafts and chronicle the journey you've taken. + +Just be sure to set some ground rules as all your cooks enter the content kitchen at once. Allow one content creator to retain editing permissions while granting other team members comment-only or view-only permissions. This helps keep revisions to the core piece of content firmly within the realm of the person who created it and helps ensure all reviewers are reacting to the same version. + +### How the future of business is built + +Release early, release often is more relevant to our world than ever. This faster, more collaborative process is the way businesses of all kinds must create their futures. + +Follow the steps outlined above, and you and your team will be well on your way to applying the principles of agile development, rapid iteration, and continuous innovation to your next brand development project. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/build-better-brand + +作者:[Alex Kimball][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/alex-kimballhttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/branding_opensource_intersection.png?itok=4lf-f5NB +[2]: https://mattermost.com/ +[3]: https://www.collaboraoffice.com/code/ From 12e07fe256f827858310597b099677fbf6f089c8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Jul 2019 00:54:32 +0800 Subject: [PATCH 037/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190718=20Smart?= =?UTF-8?q?=20cities=20offer=20window=20into=20the=20evolution=20of=20ente?= =?UTF-8?q?rprise=20IoT=20technology?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md --- ... evolution of enterprise IoT technology.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md diff --git a/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md b/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md new file mode 100644 index 0000000000..06b5726379 --- /dev/null +++ b/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Smart cities offer window into the evolution of enterprise IoT technology) +[#]: via: (https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html) +[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) + +Smart cities offer window into the evolution of enterprise IoT technology +====== +Smart-city technologies such as 0G networking hold clues for successful large-scale implementations of the internet of things in enterprise settings. +![Benjamin Hung modified by IDG Comm. \(CC0\)][1] + +Powering smart cities is one of the most ambitious use cases for the internet of things (IoT), combining a wide variety of IoT technologies to create coherent systems that span not just individual buildings or campuses but entire metropolises. As such, smart cities offer a window into the evolution of enterprise IoT technologies and implementations on the largest scale. + +And that’s why I connected with [Christophe Fourtet][2], CSO and co-founder of [Sigfox][3], a French global network operator, to learn more about using wireless networks to connect large numbers of low-power objects, ranging from smartwatches to electricity meters. (And I have to admit I was intrigued by the 0G network moniker, which conjured visions of weightless IoT devices floating in space, or maybe [OG-][4]style old-school authenticity. That’s not at all what it’s about, of course.) + +**[ Learns more: [Download a PDF bundle of five essential articles about IoT in the enterprise][5] ]** + +According to Fourtet, "Sigfox’s global 0G network specializes in inexpensively conveying small amounts of data over long ranges—without sacrificing quality. Whereas other networks aim to collect and transmit as much data as possible, as quickly as possible, we deliver small packets of information at regular intervals, giving customers only the critical information they need." + +The software-based wireless 0G network listens to devices without the need to establish and maintain network connection, eliminating signaling overhead. With network and computing complexity managed in the cloud, energy consumption and costs of connected devices are dramatically reduced, [the company says][6]. Just as important, the low power requirements can also dramatically cut battery requirements for IoT devices. + +Around the world, customers like Michelin, General Motors, and Airbus use the 0G networks to connect IoT devices, and the network is supported by more than 660 partner organizations, including device makers and service providers such as Urbansense and Bosch. Sigfox cited [0G-connected IoT devices enabling Danish cities][7] to monitor quality of life data, from detecting defects in buildings to tracking garbage collection. + +### 0G applications beyond smart cities + +In addition to smart cities applications, Sigfox serves several industry verticals, including manufacturing, agriculture, and retail. Common use cases include supply-chain management and asset tracking, both within factory/warehouse environments and between locations as containers/shipments move through the supply chain around the globe. The network is uniquely equipped for supply chain use cases due to its cost-efficiency, long-lasting batteries with totally predictable autonomy, and wide-range reach. + +In facilities management, the 0G network can connect IoT devices that track ambient factors such temperature, humidity, and occupancy. Doing so helps managers leverage occupancy data to adjust the amount of space a company needs to rent, reducing overhead costs. It can also help farmers optimize the planting, care, and harvesting of crops. + +Operating as a backup solution to ensure connectivity during a broadband network outage, 0G networking built into a cable box or router could allow service providers to access hardware even when the primary network is down, Fourtet said. + +“The 0G network does not promise a continuation of these services,” Fourtet noted, “but it can provide access to the necessary information to solve challenges associated with outages.” + +In a more dire example in the home and commercial building security market, sophisticated burglars could use cellular and Wi-Fi jammers to block a security system’s access to a network so even though alarms were issued, the service might never receive them, Fourtet said. But the 0G network can send an alert to the alarm system provider even if it has been jammed or blocked, he said. + +### How 0g networks are used today + +Current 0G implementations include helping [Louis Vuitton track luggage][8] for its traveling customers. Using a luggage tracker powered by by [Sigfox’s Monarch service][9], a suitcase can stay connected to the 0G network throughout a trip, automatically recognizing and adapting to local radio frequency standards. The idea is for travelers to track the location of their bags at major airports in multiple countries, Fourtet said, while low energy consumption promises a six-month battery life with a very small battery. + +At the Special Olympics World Games Abu Dhabi 2019, [iWire, LITE-ON and Sigfox worked together][10] to create a tracking solution designed to help safeguard 10,000 athletes and delegates. Sensors connected to the Sigfox 0G network and outfitted with Wi-Fi capabilities were equipped with tiny batteries designed to provide uninterrupted service throughout the weeklong event. The devices “periodically transmitted messages that helped to identify the location of athletes and delegates in case they went off course,” Fourtet said, while LITE-ON incorporated a panic button for use in case of emergencies. In fact, during the event, the system was used to locate a lost athlete and return them to the Games without incident, he said. + +French car manufacturer [Groupe PSA][11] uses the 0G network to optimize shipping container routes between suppliers and assembly plants. [Track&Trace][11] works with IBM’s cloud-based IoT technologies to track container locations and alert Groupe PSA when issues crop up, Fourtet said. + +### 0G is still growing + +“It takes time to build a new network,” Fourtet said. So while Sigfox has delivered 0G network coverage in 60 countries across five continents, covering 1 billion people  (including 51 U.S. metropolitan areas covering 30% of the population), Fourtet acknowledged, “[We] still have a ways to go to build our global network.” In the meantime, the company is expanding its Connectivity-as-a-Service (CaaS) solutions to enable coverage in areas where the 0G network does not yet exist. + +**More on IoT:** + + * [What is the IoT? How the internet of things works][12] + * [What is edge computing and how it’s changing the network][13] + * [Most powerful Internet of Things companies][14] + * [10 Hot IoT startups to watch][15] + * [The 6 ways to make money in IoT][16] + * [What is digital twin technology? [and why it matters]][17] + * [Blockchain, service-centric networking key to IoT success][18] + * [Getting grounded in IoT networking and security][5] + * [Building IoT-ready networks must become a priority][19] + * [What is the Industrial IoT? [And why the stakes are so high]][20] + + + +Join the Network World communities on [Facebook][21] and [LinkedIn][22] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html + +作者:[Fredric 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://www.networkworld.com/author/Fredric-Paul/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2018/07/tokyo_asia_smart-city_iot_networking_by-benjamin-hung-unsplash-100764249-large.jpg +[2]: https://www.sigfox.com/en/sigfox-story +[3]: https://www.sigfox.com/en +[4]: https://www.dictionary.com/e/slang/og/ +[5]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html +[6]: https://www.sigfox.com/en/sigfox-iot-technology-overview +[7]: https://www.youtube.com/watch?v=WXc722WGjnE&t=1s +[8]: https://www.sigfox.com/en/news/sigfox-and-louis-vuitton-partner-innovative-luggage-tracker +[9]: https://www.sigfox.com/en/solutions/sigfox-services +[10]: https://www.sigfox.com/en/news/case-study-special-olympics-2019 +[11]: https://www.sigfox.com/en/news/ibm-revolutionizes-container-tracking-groupe-psa-sigfox +[12]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html +[13]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html +[14]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html +[15]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html +[16]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html +[17]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html +[18]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html +[19]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html +[20]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[21]: https://www.facebook.com/NetworkWorld/ +[22]: https://www.linkedin.com/company/network-world From ffb7ff97af627d70595a821410b0e4908a698aa5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Jul 2019 05:42:20 +0800 Subject: [PATCH 038/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @robsean 这篇翻译的很认真 --- ... life support- Cross-compiling with GCC.md | 112 ++++++++---------- 1 file changed, 51 insertions(+), 61 deletions(-) diff --git a/translated/tech/20190710 32-bit life support- Cross-compiling with GCC.md b/translated/tech/20190710 32-bit life support- Cross-compiling with GCC.md index 7ae300aef7..b7af2b0f6b 100644 --- a/translated/tech/20190710 32-bit life support- Cross-compiling with GCC.md +++ b/translated/tech/20190710 32-bit life support- Cross-compiling with GCC.md @@ -1,21 +1,22 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (32-bit life support: Cross-compiling with GCC) [#]: via: (https://opensource.com/article/19/7/cross-compiling-gcc) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -32位生存支持:使用 GCC 交叉编译 +32 位支持:使用 GCC 交叉编译 ====== -使用 GCC 从一个单个构建机器中来为不同的架构交叉编译二进制文件。 -![Wratchet set tools][1] -如果你是一个开发者,创建二进制软件包,像一个 RPM, DEB, Flatpak,或 Snap 软件包,你不得不来为各种不同的目标平台编译代码。典型的目标包括32位和64位的 x86 和 ARM 。你可以在不同的物理或虚拟机器上完成你的构建。作为代替,你可以使用 GNU 编译器集合 ([GCC][2]) 来交叉编译,从一个单个构建机器中为几个不同的架构产生二进制文件。 +> 使用 GCC 在单一的构建机器上来为不同的 CPU 架构交叉编译二进制文件。 -假设你有一个简单的掷骰子游戏,你想交叉编译。在大多数系统上,以 C 语言写的一些东西相对简单,为了给现实性添加复杂性的目的,我以 C++ 语言写这个示例,所以程序依赖于一些不在 C 语言中东西 (具体来说,**iostream**)。 +![](https://img.linux.net.cn/data/attachment/album/201907/19/054242nwhludz9tm2lwd8t.jpg) +如果你是一个开发者,要创建二进制软件包,像一个 RPM、DEB、Flatpak 或 Snap 软件包,你不得不为各种不同的目标平台编译代码。典型的编译目标包括 32 位和 64 位的 x86 和 ARM。你可以在不同的物理或虚拟机器上完成你的构建,但这需要你为何几个系统。作为代替,你可以使用 GNU 编译器集合 ([GCC][2]) 来交叉编译,在单一的构建机器上为几个不同的 CPU 架构产生二进制文件。 + +假设你有一个想要交叉编译的简单的掷骰子游戏。在大多数系统上,以 C 语言来编写这个相对简单,出于给添加现实的复杂性的目的,我以 C++ 语言写这个示例,所以程序依赖于一些不在 C 语言中东西 (具体来说就是 `iostream`)。 ``` #include @@ -23,58 +24,55 @@ using namespace std; -void lose (int c); -void win (int c); -void draw (); +void lose (int c); +void win (int c); +void draw (); -int main() { - int i; - do { - cout << "Pick a number between 1 and 20: \n"; - cin >> i; - int c = rand ( ) % 21; - if (i > 20) lose (c); - else if (i < c ) lose (c); - else if (i > c ) win (c); - else draw (); - } - while (1==1); +int main() { + int i; + do { + cout << "Pick a number between 1 and 20: \n"; + cin >> i; + int c = rand ( ) % 21; + if (i > 20) lose (c); + else if (i < c ) lose (c); + else if (i > c ) win (c); + else draw (); + } + while (1==1); } -void lose (int c ) - { - cout << "You lose! Computer rolled " << c << "\n"; +void lose (int c ) + { + cout << "You lose! Computer rolled " << c << "\n"; } -void win (int c ) - { - cout << "You win!! Computer rolled " << c << "\n"; +void win (int c ) + { + cout << "You win!! Computer rolled " << c << "\n"; } -void draw ( ) - { +void draw ( ) + { cout << "What are the chances. You tied. Try again, I dare you! \n"; } ``` -在你的系统上使用 **g++** 命令编译它: - +在你的系统上使用 `g++` 命令编译它: ``` -`$ g++ dice.cpp -o dice` +$ g++ dice.cpp -o dice ``` 然后,运行它来确认其工作: - ``` $ ./dice Pick a number between 1 and 20: [...] ``` -你可以使用 **file** 命令来查看你刚刚生产的二进制文件的类型: - +你可以使用 `file` 命令来查看你刚刚生产的二进制文件的类型: ``` $ file ./dice @@ -82,8 +80,7 @@ dice: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 5.1.15, not stripped ``` -同样重要,使用 **ldd** 命令来窗口它链接哪些库: - +同样重要,使用 `ldd` 命令来查看它链接哪些库: ``` $ ldd dice @@ -99,19 +96,16 @@ libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fce8383c000) ``` -从这些测试中,你已经确认两件事:你刚刚运行的二进制文件是64位的,并且它链接64位库。 - -这意味着,为实现32位交叉编译,你必需告诉 **g++** 来: - - 1. 产生一个32位二进制文件 - 2. 链接32位库,而不是64位库 +从这些测试中,你已经确认了两件事:你刚刚运行的二进制文件是 64 位的,并且它链接的是 64 位库。 +这意味着,为实现 32 位交叉编译,你必需告诉 `g++` 来: + 1. 产生一个 32 位二进制文件 + 2. 链接 32 位库,而不是 64 位库 ### 设置你的开发环境 -为编译到32位,你需要在你的系统上安装32位库和头文件。如果你运行一个纯64位系统,那么,你没有32位库或头文件,并且需要安装一个基础集合。最起码,你需要 C 和 C++ 库 (**glibc** 和 **libstdc++**) 以及GCC 库 (**libgcc**) 的32位版本。这些软件包的名称可能在每个发行版中不同。在 Slackware 系统上,一个纯64位的带有32位兼容的发行版,可以从 [Alien BOB][3] 提供的 **multilib** 软件包中获得。在 Fedora,CentOS,和 RHEL 系统上: - +为编译成 32 位二进制,你需要在你的系统上安装 32 位的库和头文件。如果你运行一个纯 64 位系统,那么,你没有 32 位的库或头文件,并且需要安装一个基础集合。最起码,你需要 C 和 C++ 库(`glibc` 和 `libstdc++`)以及 GCC 库(`libgcc`)的 32 位版本。这些软件包的名称可能在每个发行版中不同。在 Slackware 系统上,一个纯 64 位的带有 32 位兼容的发行版,可以从 [Alien BOB][3] 提供的 `multilib` 软件包中获得。在 Fedora、CentOS 和 RHEL 系统上: ``` $ yum install libstdc++-*.i686 @@ -119,19 +113,17 @@ $ yum install glibc-*.i686 $ yum install libgcc.i686 ``` -不管你正在使用什么系统,你同样必需安装一些你工程使用的32位库。例如,如果你在你的工程中包含 **yaml-cpp** ,那么,在编译工程前,你必需安装 **yaml-cpp** 的32位版本,或者,在很多系统上,安装 **yaml-cpp** 的开发软件包(例如,在 Fedora 系统上**yaml-cpp-devel** )。 +不管你正在使用什么系统,你同样必须安装一些你工程使用的 32 位库。例如,如果你在你的工程中包含 `yaml-cpp`,那么,在编译工程前,你必需安装 `yaml-cpp` 的 32 位版本,或者,在很多系统上,安装 `yaml-cpp` 的开发软件包(例如,在 Fedora 系统上的 `yaml-cpp-devel`)。 一旦这些处理好了,编译是相当简单的: - ``` -`$ g++ -m32 dice.cpp -o dice32 -L /usr/lib -march=i686` +$ g++ -m32 dice.cpp -o dice32 -L /usr/lib -march=i686 ``` -**-m32** 标志告诉 GCC 以32位模式编译。**-march=i686** 选项进一步定义来使用哪种最优化类型(参考 **info gcc** 选项列表)。**-L** 标志设置你希望 GCC 来链接库的路径。对于32位来说通常是 **/usr/lib** ,不过,依赖于你的系统是如何设置的,它可以是 **/usr/lib32** ,甚至 **/opt/usr/lib** ,或者任何你知道你存放你的32位库的地方。 - -在代码编译后,查看你的构建证据: +`-m32` 标志告诉 GCC 以 32 位模式编译。`-march=i686` 选项进一步定义来使用哪种最优化类型(参考 `info gcc` 了解选项列表)。`-L` 标志设置你希望 GCC 来链接的库的路径。对于 32 位来说通常是 `/usr/lib`,不过,这依赖于你的系统是如何设置的,它可以是 `/usr/lib32`,甚至 `/opt/usr/lib`,或者任何你知道存放你的 32 位库的地方。 +在代码编译后,查看你的构建的证据: ``` $ file ./dice32 @@ -139,18 +131,17 @@ dice: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs) [...] ``` -接着,当然, **ldd ./dice32** 指向你的32位库。 +接着,当然, `ldd ./dice32` 也会指向你的 32 位库。 ### 不同的架构 -在64位相同的处理器家族上允许 GCC 制作很多关于如何编译代码的假设来编译32位软件。如果你需要为完全不同的处理器编译,你必需安装恰当地交叉构建实用程序。安装哪种实用程序取决于你正在编译的东西。这个过程比为相同的 CPU 家族编译更复杂一点。 +在 64 位相同的处理器家族上允许 GCC 做出很多关于如何编译代码的假设来编译 32 位软件。如果你需要为完全不同的处理器编译,你必需安装适当的交叉构建实用程序。安装哪种实用程序取决于你正在编译的东西。这个过程比为相同的 CPU 家族编译更复杂一点。 -当你为相同处理器家族交叉编译时,你可以期待找到与32位库集的相同的64位库集,因为你的 Linux 发行版是同时维护的。当为一个完全不同的架构编译时,你可能不得不穷追你代码需要的库。你需要的版本可能不在你的发行版的存储库中,因为你的发行版可能不为你的目标系统提供软件包,或者它不在容易到达的位置映照所有的软件包。如果你正在编译的代码是你的,那么你可能非常清楚它的依赖关系是什么,和清楚在哪里找到它们。如果代码是你下载的,并需要编译,那么你可能不熟悉它的要求。在这种情况下,研究正确编译代码需要什么 (它们通常被列在 README 或 INSTALL 文件中,当然也在源文件代码自身之中),然后收集需要的组件。 +当你为相同处理器家族交叉编译时,你可以期待找到与 32 位库集的相同的 64 位库集,因为你的 Linux 发行版是同时维护这二者的。当为一个完全不同的架构编译时,你可能不得不穷追你的代码所需要的库。你需要的版本可能不在你的发行版的存储库中,因为你的发行版可能不为你的目标系统提供软件包,或者它不在容易到达的位置提供所有的软件包。如果你正在编译的代码是你写的,那么你可能非常清楚它的依赖关系是什么,并清楚在哪里找到它们。如果代码是你下载的,并需要编译,那么你可能不熟悉它的要求。在这种情况下,研究正确编译代码需要什么(它们通常被列在 `README` 或 `INSTALL` 文件中,当然也出现在源文件代码自身之中),然后收集需要的组件。 -例如,如果你需要为 ARM 编译 C 代码,你必需首先在Fedora 或 RHEL 上安装 **gcc-arm-linux-gnu** (32位) 或 **gcc-aarch64-linux-gnu** (64位),或者,在 Ubuntu 上安装 **arm-linux-gnueabi-gcc** 和 **binutils-arm-linux-gnueabi** 。这提供你需要来构建(至少)一个简单的 C 程序的命令和库。此外,你需要你的代码使用的任何库。你可以在惯常的位置(在大多数系统上 **/usr/include** )放置头文件,或者,你可以放置它们在一个你选择的目录,并使用 **-I** 选项将 GCC 指向它。 - -当编译时,不使用标准的 **gcc** 或 **g++** 命令。作为代替,使用你安装的 GCC实用程序。例如: +例如,如果你需要为 ARM 编译 C 代码,你必须首先在 Fedora 或 RHEL 上安装 `gcc-arm-linux-gnu`(32 位)或 `gcc-aarch64-linux-gnu`(64 位);或者,在 Ubuntu 上安装 `arm-linux-gnueabi-gcc` 和 `binutils-arm-linux-gnueabi`。这提供你需要用来构建(至少)一个简单的 C 程序的命令和库。此外,你需要你的代码使用的任何库。你可以在惯常的位置(大多数系统上在 `/usr/include`)放置头文件,或者,你可以放置它们在一个你选择的目录,并使用 `-I` 选项将 GCC 指向它。 +当编译时,不使用标准的 `gcc` 或 `g++` 命令。作为代替,使用你安装的 GCC 实用程序。例如: ``` $ arm-linux-gnu-g++ dice.cpp \ @@ -158,8 +149,7 @@ $ arm-linux-gnu-g++ dice.cpp \ -o armdice.bin ``` -验证你构建的什么: - +验证你构建的内容: ``` $ file armdice.bin @@ -168,7 +158,7 @@ armdice.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV) [...] ### 库和可交付结果 -这是一个如何使用交叉编译的简单的示例。在真实的生活中,你的源文件代码可以产生多于一个单个的二进制文件。虽然你可以手动管理,在这里手动管理可能不是好的正当理由。在我接下来的文章中,我将说明 GNU 自动工具,GNU 自动工具做大多数工作来使你的代码可移植。 +这是一个如何使用交叉编译的简单的示例。在真实的生活中,你的源文件代码可能产生的不止于一个二进制文件。虽然你可以手动管理,在这里手动管理可能不是好的正当理由。在我接下来的文章中,我将说明 GNU 自动工具,GNU 自动工具做了使你的代码可移植的大部分工作。 -------------------------------------------------------------------------------- @@ -177,7 +167,7 @@ via: https://opensource.com/article/19/7/cross-compiling-gcc 作者:[Seth Kenlon][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 d98fb45d202dcc22670410894f500e3b1d784465 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Jul 2019 05:42:53 +0800 Subject: [PATCH 039/951] PUB @robsean https://linux.cn/article-11120-1.html --- .../20190710 32-bit life support- Cross-compiling with GCC.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190710 32-bit life support- Cross-compiling with GCC.md (99%) diff --git a/translated/tech/20190710 32-bit life support- Cross-compiling with GCC.md b/published/20190710 32-bit life support- Cross-compiling with GCC.md similarity index 99% rename from translated/tech/20190710 32-bit life support- Cross-compiling with GCC.md rename to published/20190710 32-bit life support- Cross-compiling with GCC.md index b7af2b0f6b..df71c9b3cd 100644 --- a/translated/tech/20190710 32-bit life support- Cross-compiling with GCC.md +++ b/published/20190710 32-bit life support- Cross-compiling with GCC.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11120-1.html) [#]: subject: (32-bit life support: Cross-compiling with GCC) [#]: via: (https://opensource.com/article/19/7/cross-compiling-gcc) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 7f74e280cfbde61a08246792b747aa0417be7d17 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Jul 2019 05:54:02 +0800 Subject: [PATCH 040/951] APL:20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md --- ...mes Backs Blender Foundation with -1.2m Epic MegaGrants.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md index 56e0214837..bda47315e5 100644 --- a/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md +++ b/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -7,7 +7,7 @@ [#]: via: (https://itsfoss.com/epic-games-blender-grant/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants +Epic Games 以 120 万美元的 Epic MegaGrants 支持Blender 基金会 ====== [Epic MegaGrants][1] is a program by [Epic Games][2] to support game developers, enterprise professionals, content creators and tool developers doing amazing things with Unreal Engine or enhancing open-source capabilities for the 3D graphics community. From fcc793c7e219b1fc5e032e078b9e991d48b5121a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Jul 2019 06:34:41 +0800 Subject: [PATCH 041/951] TSL&PRF:20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md --- ...r Foundation with -1.2m Epic MegaGrants.md | 98 ------------------- ...r Foundation with -1.2m Epic MegaGrants.md | 98 +++++++++++++++++++ 2 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md create mode 100644 translated/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md diff --git a/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md deleted file mode 100644 index bda47315e5..0000000000 --- a/sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants) -[#]: via: (https://itsfoss.com/epic-games-blender-grant/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Epic Games 以 120 万美元的 Epic MegaGrants 支持Blender 基金会 -====== - -[Epic MegaGrants][1] is a program by [Epic Games][2] to support game developers, enterprise professionals, content creators and tool developers doing amazing things with Unreal Engine or enhancing open-source capabilities for the 3D graphics community. - -As part of that, Epic Games granted [Blender Foundation][3] $1.2 million to help improve their development. If you didn’t know already, Blender is one of the [best open source video editors][4] and specifically famous for creating professional 3D computer graphics. - -**Tim Sweeney** (_Founder and CEO of Epic Games_) also commented on the grant: - -> “Open tools, libraries and platforms are critical to the future of the digital content ecosystem,. “Blender is an enduring resource within the artistic community, and we aim to ensure its advancement to the benefit of all creators.” - -Even if this is good news, there are people who are not happy with this. In this article, we shall take a look at the plans of Blender Foundation after the grant, and what people think about it. - -### Blender Foundation Plans for Improvement - -![Image Credit : BlenderNation][5] - -In the [press release][6], Blender Foundation has mentioned how the money will be utilized and for what purpose: - -> “_The Epic MegaGrant will be delivered incrementally over the next three years and will contribute to Blender’s Professionalizing Blender Development Initiative._“ - -So, yes, the financial help will be provided in cash – however, it will happen in the course of 3 years. This is a significant amount of time where we can expect major improvements to the Blender Foundation and its quality of software. - -Here’s what **Ton Roosendaal** (Founder of Blender Foundation) had to say about how it is going to be utilized; - -> “_Having Epic Games on board is a major milestone for Blender,” said Blender Foundation founder and chairman Ton Roosendaal. “Thanks to the grant we will make a significant investment in our project organization to improve on-boarding, coordination and best practices for code quality. As a result, we expect more contributors from the industry to join our projects.”_ - -### Why are some people not happy about this? - -Let me make this clear – personally, I do not like Epic Game’s marketplace or the client to play games. - -I would prefer [Steam][7] over Epic Games for a variety of reasons (features, privacy, and so on). - -However, Epic Games is known as the bad guy in the gaming community because it made several recent games exclusive to its platform – even though a lot of people warned users about the privacy issues on their platform. - -Not only this, the CEO of Epic Games tweeted this in the past: - -> Installing Linux is sort of the equivalent of moving to Canada when one doesn’t like US political trends. -> -> Nope, we’ve got to fight for the freedoms we have today, where we have them today. -> -> — Tim Sweeney (@TimSweeneyEpic) [February 15, 2018][8] - -Well, that does not directly imply that he hates Linux or does not actively promote game development for Linux – but there’s just a lot of history and people do not really trust Epic Games for its decisions. So, they do not appreciate the association with Blender Foundation (even it is a positive thing with the financial help). - -This has nothing to do with financial help. But, Epic Games does not have a good reputation (it is subjective – of course) – hence, the negativity. Take a look at some of the tweets after the grant announcement: - -> Hope you arent going exclusive now…. you might ruin your reputation. -> -> — Ray (@Epicshadow1994) [July 15, 2019][9] - -> I'm sceptical of what this turns into down the road. Too much epic has been doing nothing but hostile tactics lately. -> -> — acrid Heartwood (@acrid_heartwood) [July 15, 2019][10] - -**Wrapping Up** - -You can still [run Epic Games on Linux via Lutris][11] but that’s very feeble unofficial attempt. Epic Games has showed no interest to support officially. - -So, it is obvious that not everyone trusts Epic Games. Hence, all the negativity that comes along with this news. - -However, this grant will definitely help Blender Foundation improve its organization and the quality of software. - -What do you think about this? Let us know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/epic-games-blender-grant/ - -作者:[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.unrealengine.com/en-US/megagrants -[2]: https://www.epicgames.com/store/en-US/ -[3]: https://www.blender.org/ -[4]: https://itsfoss.com/open-source-video-editors/ -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/epic-games-blender-megagrant.jpg?resize=800%2C450&ssl=1 -[6]: https://www.blender.org/press/epic-games-supports-blender-foundation-with-1-2-million-epic-megagrant/ -[7]: https://itsfoss.com/install-steam-ubuntu-linux/ -[8]: https://twitter.com/TimSweeneyEpic/status/964284402741149698?ref_src=twsrc%5Etfw -[9]: https://twitter.com/Epicshadow1994/status/1150787326626263042?ref_src=twsrc%5Etfw -[10]: https://twitter.com/acrid_heartwood/status/1150789691979030528?ref_src=twsrc%5Etfw -[11]: https://itsfoss.com/epic-games-lutris-linux/ diff --git a/translated/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/translated/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md new file mode 100644 index 0000000000..d36b0db494 --- /dev/null +++ b/translated/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants) +[#]: via: (https://itsfoss.com/epic-games-blender-grant/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Epic Games 给予 Blender 基金会 120 万美元的拨款支持 +====== + +[Epic MegaGrants][1] 是 [Epic Games][2] 的一个计划,用于支持游戏开发人员、企业专业人士、内容创建者和工具开发人员使用虚幻引擎Unreal Engine(UE)做出神奇的作品或增强 3D 图形社区的开源功能。 + +作为该计划的一部分,Epic Games 给予 [Blender 基金会][3] 120 万美元拨款以帮助改善他们的发展。如果你还不知道,Blender 是[最好的开源视频编辑][4]之一,特别是以创建专业的 3D 计算机图形而闻名。 + +**Tim Sweeney**(Epic Games 的创始人兼首席执行官)这样评论这笔授予: + +> “开放式工具、库和平台对数字内容生态系统的未来至关重要。……Blender 是艺术社区持久的资源,我们的目标是确保其进步,造福所有创作者。” + +即使这是个好消息,也有人对此不满意。在本文中,我们将看一下得到该拨款后的 Blender 基金会的计划,以及人们对此的看法。 + +### Blender 基金会的改进计划 + +![Image Credit : BlenderNation][5] + +在[新闻稿][6]当中,Blender 基金会提到了如何利用这笔资金以及用于何种目的: + +> “Epic MegaGrant 将在未来三年内逐步交付,并将为 Blender 的专业 Blender 发展计划Professionalizing Blender Development Initiative做出贡献。” + +所以,没错,这笔财务帮助将以现金提供 —— 但是,它要在 3 年内完成。也就是说,我们要期待 Blender 基金会及其软件质量得到重大改进还有很长时间。 + +这是 **Ton Roosendaal**(Blender 基金会的创始人)需要说明的它将如何被利用: + +> “Epic Games 的支持对 Blender 是一个重要里程碑,”Blender 基金会的创始人兼董事长 Ton Roosendaal 说道。“由于这项拨款,我们将对我们的项目组织进行大量投入,以改善支持、协作和代码质量实践。因此,我们期望更多来自该行业的贡献者加入我们的项目。” + +### 为什么人们对此不是很喜欢? + +让我澄清一下,就我个人而言,我不喜欢用 Epic Game 的市场或客户端玩游戏。 + +由于各种原因(功能、隐私等),我更喜欢 [Steam][7] 而不是 Epic Games。 + +Epic Games 被称为游戏社区中的坏人,因为它最近几款游戏专属于其平台 —— 尽管很多人警告用户该平台上的隐私问题。 + +不仅如此,Epic Games 的首席执行官在过去发过这样的推特: + +> 安装 Linux 相当于人们不喜欢美国的政治趋势时就搬到加拿大。 +> +> 不,我们必须为今天的自由而战,如今我们拥有自由。 +> +> - Tim Sweeney(@TimSweeneyEpic)[2018年2月15日][8] + +嗯,这并不直接暗示他讨厌 Linux 或者没有积极推动 Linux 的游戏开发 —— 但是只是因为很多历史情况,人们并不真正信任 Epic Games 的决策。所以,他们并不欣赏与 Blender 基金会的联系(即使这个财务帮助是积极的)。 + +这与财务帮助无关。但是,Epic Games 缺乏良好的声誉(当然是主观的),因此,人们对此的看法是消极的。看看拨款公告后的一些推文: + +> 希望不要走向排它……这可能会破坏你的声誉。 +> +> - Ray(@ Epicshadow1994)[2019年7月15日][9] + +> 我对将来会变成什么样感到怀疑。EPIC 最近一直在采取敌对战术。 +> +> - acrid Heartwood(@acrid_heartwood)[2019年7月15日][10] + +### 总而言之 + +你仍然可以[通过 Lutris 在 Linux 上运行 Epic Games][11],但这是很单薄的非官方尝试。Epic Games 没有表示有兴趣正式支持该项目。 + +所以,很明显不是每个人都信任 Epic Games。因此,这个消息带来了各种消极反应。 + +但是,这笔拨款肯定会帮助 Blender 基金会改善其组织和软件质量。 + +你怎么看待这件事?请在下面的评论中告诉我们您的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/epic-games-blender-grant/ + +作者:[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.unrealengine.com/en-US/megagrants +[2]: https://www.epicgames.com/store/en-US/ +[3]: https://www.blender.org/ +[4]: https://itsfoss.com/open-source-video-editors/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/epic-games-blender-megagrant.jpg?resize=800%2C450&ssl=1 +[6]: https://www.blender.org/press/epic-games-supports-blender-foundation-with-1-2-million-epic-megagrant/ +[7]: https://itsfoss.com/install-steam-ubuntu-linux/ +[8]: https://twitter.com/TimSweeneyEpic/status/964284402741149698?ref_src=twsrc%5Etfw +[9]: https://twitter.com/Epicshadow1994/status/1150787326626263042?ref_src=twsrc%5Etfw +[10]: https://twitter.com/acrid_heartwood/status/1150789691979030528?ref_src=twsrc%5Etfw +[11]: https://linux.cn/article-10968-1.html From 9d323d856d5780a8c82db46ff5815e62cadff6ec Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Jul 2019 06:41:30 +0800 Subject: [PATCH 042/951] PUB:20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md @wxy https://linux.cn/article-11121-1.html --- ...mes Backs Blender Foundation with -1.2m Epic MegaGrants.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md (98%) diff --git a/translated/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md similarity index 98% rename from translated/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md rename to published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md index d36b0db494..268c9e16ca 100644 --- a/translated/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md +++ b/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11121-1.html) [#]: subject: (Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants) [#]: via: (https://itsfoss.com/epic-games-blender-grant/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 3717c62a0a78c46339c2efd04e53dc707fc0237b Mon Sep 17 00:00:00 2001 From: HALO Feng <289716347@qq.com> Date: Fri, 19 Jul 2019 08:42:39 +0800 Subject: [PATCH 043/951] translating --- sources/tech/20190715 Understanding software design patterns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190715 Understanding software design patterns.md b/sources/tech/20190715 Understanding software design patterns.md index 347fe5011b..4e17faf1dd 100644 --- a/sources/tech/20190715 Understanding software design patterns.md +++ b/sources/tech/20190715 Understanding software design patterns.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (arrowfeng) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From ebf3df10e37a27666ba1507d3ce3e9c2c7535e73 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 19 Jul 2019 08:51:17 +0800 Subject: [PATCH 044/951] translated --- ...ktop Client for ProtonMail and Tutanota.md | 118 ------------------ ...ktop Client for ProtonMail and Tutanota.md | 108 ++++++++++++++++ 2 files changed, 108 insertions(+), 118 deletions(-) delete mode 100644 sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md create mode 100644 translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md diff --git a/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md deleted file mode 100644 index 0c8b0028b6..0000000000 --- a/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) -[#]: via: (https://itsfoss.com/electronmail/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -ElectronMail – a Desktop Client for ProtonMail and Tutanota -====== - -The majority of people on the internet have email accounts from big companies, such as Google, that do not respect your privacy. Thankfully, there are privacy conscience alternatives like [Tutanota][1] and [ProtonMail][2]. The problems is that not all of them have a desktop client. Today, we will look at a project that seeks to solve that problem for you. Let’s take a look at ElectronMail. - -‘Electron’-ic warning! - -The following app is built with Electron (the name is ElectronMail for a reason). If the use of Electron upsets you, please consider this a trigger warning. - -### ElectronMail: Desktop Client for Tutanota and ProtonMail - -![Electron Mail About][3] - -[ElectronMail][4] is simply put an email client for ProtonMail and Tutanota. It is built using three big technologies: [Electron][5], [TypeScript][6] and [Angular][7]. It includes the following features: - - * Multi accounts support per each email provider - * Encrypted local storage - * Available for Linux, Windows, macOS, and FreeBSD - * Native notifications - * System tray icon with a total number of unread messages - * Master password to protect account information - * Switchable view layouts - * Offline access to the emails - * Encrypted local storage for emails - * Batch emails export to EML files - * Full-text search - * Built-in/prepackaged web clients - * Configuring proxy per account - * Spell Checking - * Support for two-factor authentication for extra security - - - -Currently, ElectronMail only supports Tutanota and ProtonMail. I get the feeling that they will be adding more in the future. According to the [GitHub page][4]: “Multi email providers support. ProtonMail and Tutanota at the moment.” - -ElectronMail is licensed under the MIT license. - -#### How to install ElectronMail - -Currently, there are several options to install ElectronMail on Linux. for Arch and Arch-based distros, you can install it from the [Arch User Repository][8]. There is also a Snap available for ElectrionMail. To install it, just enter `sudo snap install electron-mail`. - -For all other Linux distros, you can [download][9] a `.deb` or `.rpm` file. - -![Electron Mail Inbox][10] - -You can also [download][9] an `.exe` installer for Windows or a `.dmg` file for macOS. There is even a file for FreeBSD. - -[][11] - -Suggested read  Zettlr - Markdown Editor for Writers and Researchers - -#### Removing ElectronMail - -If you install ElectronMail and decide that it is not for you, there are a couple steps that the [developer][12] recommends. **Be sure to follow these steps before you uninstall the application.** - -If you are using the “Keep Me Signed In” feature, click “Log out” on the menu. This will delete the locally stored master password. It is possible to delete the master password after uninstalling ElectronMail, but that would involve editing the system keychain. - -You will also need to delete the settings folder manually. You can find it by clicking “Open setting folder” after selecting the application’s icon in the system tray. - -![Electron Mail Setting][13] - -### My Thoughts on ElectronMail - -I don’t usually use email clients. In fact, I mostly depend on web clients. So, I don’t have much use for this application. - -That being said, ElectronMail has a nice feel to it and is easy to set up. It has a good number of features activated out of the box and the advanced features aren’t that hard to activate. - -The one question I have relates to search. According to the features list, ElectronMail supports full-text search. However, the free version of Tutanota only supports a limited search. I wonder how ElectronMail handles that. - -At the end of the day, ElectronMail is just an Electron wrapper for a couple of web-based emails. I would rather just have them open in my browser than dedicate separate system resources to running Electron. If you only [use Tutanota email, they have their own official Electron-based desktop client][14]. You may try that. - -My biggest issue is with security. This is an unofficial app for two very secure email apps. What if there is a way to capture your login info or read through your emails? Someone who is smarter than I would have to go through the source code to know for sure. That is always the issue with unofficial apps for a security project. - -[][14] - -Suggested read  Secure Email Service Tutanota Has a Desktop App Now - -Have you every used ElectronMail? Do you think it would be worthwhile to install ElectronMail? What is your favorite email client? Please let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][15]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/electronmail/ - -作者:[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://itsfoss.com/tutanota-review/ -[2]: https://itsfoss.com/protonmail/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-about.jpg?resize=800%2C500&ssl=1 -[4]: https://github.com/vladimiry/ElectronMail -[5]: https://electronjs.org/ -[6]: http://www.typescriptlang.org/ -[7]: https://angular.io/ -[8]: https://aur.archlinux.org/packages/electronmail-bin -[9]: https://github.com/vladimiry/ElectronMail/releases -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1 -[11]: https://itsfoss.com/zettlr-markdown-editor/ -[12]: https://github.com/vladimiry -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-setting.jpg?ssl=1 -[14]: https://itsfoss.com/tutanota-desktop/ -[15]: http://reddit.com/r/linuxusersgroup diff --git a/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md new file mode 100644 index 0000000000..2f60c4ad7b --- /dev/null +++ b/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md @@ -0,0 +1,108 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) +[#]: via: (https://itsfoss.com/electronmail/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +ElectronMail - ProtonMail 和 Tutanota 的桌面客户端 +====== + +互联网上的大多数人都拥有来自 Google 等大公司的电子邮件帐户,但这些帐户不尊重你的隐私。值得庆幸的是,目前有 [Tutanota][1] 和 [ProtonMail][2] 等隐私良心替代品。问题是并非所有人都有桌面客户端。今天,我们将研究一个为你解决该问题的项目。我们来看看 ElectronMail 吧。 + +‘Electron’-ic 警告! + +以下应用是使用 Electron 构建的(也就是名为 ElectronMail 的原因之一)。如果使用 Electron 让你感到不安,请将此视为触发警告。 + +### ElectronMail:Tutanota 和 ProtonMail 的桌面客户端 + +![Electron Mail About][3] + +[ElectronMail][4] 简单地为 ProtonMail 和 Tutanota 设置了一个电子邮件客户端。它使用三大技术构建:[Electron][5]、[TypeScript][6] 和 [Angular][7]。它包括以下功能: + + * 每个电子邮件提供商提供多帐户支持 +  * 加密本地存储 +  * 适用于 Linux、Windows、macOS 和 FreeBSD +  * 原生通知 +  * 系统托盘图标,包含未读消息总数 +  * 主密码保护帐户信息 +  * 可切换的视图布局 +  * 离线访问电子邮件 +  * 电子邮件本地加密存储 +  * 批量导出电子邮件为 EML 文件 +  * 全文搜索 +  * 内置/预打包的 Web 客户端 +  * 为每个帐户配置代理 +  * 拼写检查 +  * 支持双因素身份验证,以提高安全性 + + + +目前,ElectronMail 仅支持 Tutanota 和 ProtonMail。我觉得他们将来会增加更多。根据 [GitHub 页面][4]:“多电子邮件提供商支持。 目前支持 ProtonMail 和 Tutanota 目前。“ + +ElectronMail 目前是 MIT 许可。 + +#### 如何安装 ElectronMail + +目前,有几种方法可以在 Linux 上安装 ElectronMail。对于Arch 和基于 Arch 的发行版,你可以从 [Arch 用户仓库]​[8]安装它。ElectrionMail 还有一个 Snap 包。要安装它,只需输入 `sudo snap install electron-mail` 即可。 + +对于所有其他 Linux 发行版,你可以[下载][9] `.deb` 或 `.rpm` 文件。 + +![Electron Mail Inbox][10] + +你也可以[下载] [9]用于 Windows 中的 `.exe` 安装程序或用于 macOS 的 `.dmg` 文件。甚至还有 FreeBSD 文件。 + +#### 删除 ElectronMail + +如果你安装了 ElectronMail 并确定它不适合你,那么[开发者][12]建议采用几个步骤。 **在卸载应用之前,请务必遵循以下步骤。** + +如果你使用了“保持登录”功能,请单击菜单上的“注销”。这将删除本地保存的主密码。卸载 ElectronMail 后可以删除主密码,但这涉及编辑系统密钥链。 + +你还需要手动删除设置文件夹。在系统托盘中选择应用图标后,单击“打开设置文件夹”可以找到它。 + +![Electron Mail Setting][13] + +### 我对 ElectronMail 的看法 + +我通常不使用电子邮件客户端。事实上,我主要依赖于 Web 客户端。所以,这个应用对我没太大用处。 + +话虽这么说,但是 ElectronMail 看着不错,而且很容易设置。它有大量开箱即用的功能,并且高级功能并不难激活。 + +我遇到的一个问题与搜索有关。根据功能列表,ElectronMail 支持全文搜索。但是,Tutanota 的免费版本仅支持有限的搜索。我想知道 ElectronMail 如何处理这个问题。 + +最后,ElectronMail 只是一个基于 Web Enail 的一个 Electron 封装。我宁愿在浏览器中打开它们,而不是将单独的系统资源用于运行 Electron。如果你只[使用 Tutanota,他们有自己官方的 Electron 桌面客户端][14]。你可以尝试一下。 + +我最大的问题是安全性。这是两个非常安全的电子邮件应用的非官方应用。如果有办法捕获你的登录信息或阅读你的电子邮件怎么办?比我聪明的人必须通过源代码才能确定。这始终是一个安全项目的非官方应用的问题。 + +你有没有使用过 ElectronMail?你认为是否值得安装 ElectronMail?你最喜欢的邮件客户端是什么?请在下面的评论中告诉我们。 + +如果你发现这篇文章很有趣,请花一点时间在社交媒体、Hacker News 或 [Reddit][15] 上分享它。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/electronmail/ + +作者:[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://itsfoss.com/tutanota-review/ +[2]: https://itsfoss.com/protonmail/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-about.jpg?resize=800%2C500&ssl=1 +[4]: https://github.com/vladimiry/ElectronMail +[5]: https://electronjs.org/ +[6]: http://www.typescriptlang.org/ +[7]: https://angular.io/ +[8]: https://aur.archlinux.org/packages/electronmail-bin +[9]: https://github.com/vladimiry/ElectronMail/releases +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1 +[12]: https://github.com/vladimiry +[14]: https://itsfoss.com/tutanota-desktop/ +[15]: http://reddit.com/r/linuxusersgroup From 1eb380dee823aba951f1d1ac48826c0347814e9c Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 19 Jul 2019 08:56:06 +0800 Subject: [PATCH 045/951] translating --- ... Use ImageGlass to quickly view JPG images as a slideshow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md index 31820a380b..d26c9cea62 100644 --- a/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md +++ b/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2880c1cd9f8fc3ff633b86bb3b2fd4653c9ce6d6 Mon Sep 17 00:00:00 2001 From: HALO Feng <289716347@qq.com> Date: Fri, 19 Jul 2019 15:59:16 +0800 Subject: [PATCH 046/951] translated --- ... Understanding software design patterns.md | 364 ------------------ ... Understanding software design patterns.md | 360 +++++++++++++++++ 2 files changed, 360 insertions(+), 364 deletions(-) delete mode 100644 sources/tech/20190715 Understanding software design patterns.md create mode 100644 translated/tech/20190715 Understanding software design patterns.md diff --git a/sources/tech/20190715 Understanding software design patterns.md b/sources/tech/20190715 Understanding software design patterns.md deleted file mode 100644 index 4e17faf1dd..0000000000 --- a/sources/tech/20190715 Understanding software design patterns.md +++ /dev/null @@ -1,364 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (arrowfeng) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Understanding software design patterns) -[#]: via: (https://opensource.com/article/19/7/understanding-software-design-patterns) -[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson) - -Understanding software design patterns -====== -Design patterns help eliminate redundant coding. Learn how to use the -singleton pattern, factory pattern, and observer pattern using Java. -![clouds in the sky with blue pattern][1] - -If you are a programmer or a student pursuing computer science or a similar discipline, sooner or later, you will encounter the term "software design pattern." According to Wikipedia, _"a [software design pattern][2] is a general, reusable solution to a commonly occurring problem within a given context in software design."_ Here is my take on the definition: When you have been working on a coding project for a while, you often begin to think, "Huh, this seems redundant. I wonder if I can change the code to be more flexible and accepting of changes?" So, you begin to think about how to separate what stays the same from what needs to change often. - -> A **design pattern** is a way to make your code easier to change by separating the part that stays the same and the part that needs constant changes. - -Not surprisingly, everyone who has worked on a programming project has probably had the same thought. Especially for any industry-level project, where it's common to work with dozens or even hundreds of developers; the collaboration process suggests that there have to be some standards and rules to make the code more elegant and adaptable to changes. That is why we have [object-oriented programming][3] (OOP) and [software framework tools][4]. A design pattern is somewhat similar to OOP, but it goes further by considering changes as part of the natural development process. Basically, the design pattern leverages some ideas from OOP, like abstractions and interfaces, but focuses on the process of changes. - -When you start to work on a project, you often hear the term _refactoring_, which means _to change the code to be more elegant and reusable;_ this is where the design pattern shines. Whenever you're working on existing code (whether built by someone else or your past self), knowing the design patterns helps you begin to see things differently—you will discover problems and ways to improve the code. - -There are numerous design patterns, but three popular ones, which I'll present in this introductory article, are singleton pattern, factory pattern, and observer pattern. - -### How to follow this guide - -I want this tutorial to be as easy as possible for anyone to understand, whether you are an experienced programmer or a beginner to coding. The design pattern concept is not exactly easy to understand, and reducing the learning curve when you start a journey is always a top priority. Therefore, in addition to this article with diagrams and code pieces, I've also created a [GitHub repository][5] you can clone and run the code to implement the three design patterns on your own. You can also follow along with the following [YouTube video][6] I created. - -#### Prerequisites - -If you just want to get the idea of design patterns in general, you do not need to clone the sample project or install any of the tools. However, to run the sample code, you need to have the following installed: - - * **Java Development Kit (JDK):** I highly recommend [OpenJDK][7]. - * **Apache Maven:** The sample project is built using [Apache Maven][8]; fortunately, many IDEs come with Maven installed. - * **Interactive development editor (IDE):** I use [IntelliJ Community Edition][9], but you can use [Eclipse IDE][10] or any other Java IDE of your choice - * **Git:** If you want to clone the project, you need a [Git][11] client. - - - -To clone the project and follow along, run the following command after you install Git: - - -``` -`git clone https://github.com/bryantson/OpensourceDotComDemos.git` -``` - -Then, in your favorite IDE, you can import the code in the TopDesignPatterns repo as an Apache Maven project. - -I am using Java, but you can implement the design pattern using any programming language that supports the [abstraction principle][12]. - -### Singleton pattern: Avoid creating an object every single time - -The [singleton pattern][13] is a very popular design pattern that is also relatively simple to implement because you need just one class. However, many developers debate whether the singleton design pattern's benefits outpace its problems because it lacks clear benefits and is easy to abuse. Few developers implement singleton directly; instead, programming frameworks like Spring Framework and Google Guice have built-in singleton design pattern features. - -But knowing about singleton is still tremendously useful. The singleton pattern makes sure that a class is created only once and provides a global point of access to it. - -> **Singleton pattern:** Ensures that only one instantation is created and avoids creating multiple instances of the same object. - -The diagram below shows the typical process for creating a class object. When the client asks to create an object, the constructor creates, or instantiates, an object and returns to the class with the caller method. However, this happens every single time an object is requested—the constructor is called, a new object is created, and it returns with a unique object. I guess the creators of the OOP language had a reason behind creating a new object every single time, but the proponents of the singleton process say this is redundant and a waste of resources. - -![Normal class instantiation][14] - -The following diagram creates the object using the singleton pattern. Here, the constructor is called only when the object is requested the first time through a designated getInstance() method. This is usually done by checking the null value, and the object is saved inside the singleton class as a private field value. The next time the getInstance() is called, the class returns the object that was created the first time. No new object is created; it just returns the old one. - -![Singleton pattern instantiation][15] - -The following script shows the simplest possible way to create the singleton pattern: - - -``` -package org.opensource.demo.singleton; - -public class OpensourceSingleton { - -    private static OpensourceSingleton uniqueInstance; - -    private OpensourceSingleton() { -    } - -    public static OpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            uniqueInstance = new OpensourceSingleton(); -        } -        return uniqueInstance; -    } - -} -``` - -On the caller side, here is how the singleton class will be called to get an object: - - -``` -Opensource newObject = Opensource.getInstance(); -``` - -This code demonstrates the idea of a singleton well: - - 1. When getInstance() is called, it checks whether the object was already created by checking the null value. - 2. If the value is null, it creates a new object, saves it into the private field, and returns the object to the caller. Otherwise, it returns the object that was created previously. - - - -The main problem with this singleton implementation is its disregard for parallel processes. When multiple processes using threads access the resource simultaneously, a problem occurs. There is one solution to this, and it is called _double-checked locking_ for multithread safety, which is shown here: - - -``` -package org.opensource.demo.singleton; - -public class ImprovedOpensourceSingleton { - -    private volatile static ImprovedOpensourceSingleton uniqueInstance; - -    private ImprovedOpensourceSingleton() {} - -    public static ImprovedOpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            synchronized (ImprovedOpensourceSingleton.class) { -                if (uniqueInstance == null) { -                    uniqueInstance = new ImprovedOpensourceSingleton(); -                } -            } -        } -        return uniqueInstance; -    } - -} -``` - -Just to emphasize the previous point, make sure to implement your singleton directly only when you believe is a safe option to do so. The best way is to leverage the singleton feature is by using a well-made programming framework. - -### Factory pattern: Delegate object creation to the factory class to hide creation logic - -The [factory pattern][16] is another well-known design pattern, but it is a little more complex. There are several ways to implement the factory pattern, but the following sample code demonstrates the simplest possible way. The factory pattern defines an interface for creating an object but lets the subclasses decide which class to instantiate. - -> **Factory pattern:** Delegates object creation to the factory class so it hides the creation logic. - -The diagram below shows how the simplest factory pattern is implemented. - -![Factory pattern][17] - -Instead of the client directly calling the object creation, the client asks the factory class for a certain object, type x. Based on the type, the factory pattern decides which object to create and to return. - -In this code sample, OpensourceFactory is the factory class implementation that takes the _type_ from the caller and decides which object to create based on that input value: - - -``` -package org.opensource.demo.factory; - -public class OpensourceFactory { - -    public OpensourceJVMServers getServerByVendor([String][18] name) { -        if(name.equals("Apache")) { -            return new Tomcat(); -        } -        else if(name.equals("Eclipse")) { -            return new Jetty(); -        } -        else if (name.equals("RedHat")) { -            return new WildFly(); -        } -        else { -            return null; -        } -    } -} -``` - -And OpenSourceJVMServer is a 100% abstraction class (or an interface class) that indicates what to implement, not how: - - -``` -package org.opensource.demo.factory; - -public interface OpensourceJVMServers { -    public void startServer(); -    public void stopServer(); -    public [String][18] getName(); -} -``` - -Here is a sample implementation class for OpensourceJVMServers. When "RedHat" is passed as the type to the factory class, the WildFly server is created: - - -``` -package org.opensource.demo.factory; - -public class WildFly implements OpensourceJVMServers { -    public void startServer() { -        [System][19].out.println("Starting WildFly Server..."); -    } - -    public void stopServer() { -        [System][19].out.println("Shutting Down WildFly Server..."); -    } - -    public [String][18] getName() { -        return "WildFly"; -    } -} -``` - -### Observer pattern: Subscribe to topics and get notified about updates - -Finally, there is the [observer pattern][20]_._ Like the singleton pattern, few professional programmers implement the observer pattern directly. However, many messaging queue and data service implementations borrow the observer pattern concept. The observer pattern defines one-to-many dependencies between objects so that when one object changes state, all of its dependents are notified and updated automatically. - -> **Observer pattern:** Subscribe to the topics/subjects where the client can be notified if there is an update. - -The easiest way to think about the observer pattern is to imagine a mailing list where you can subscribe to any topic, whether it is open source, technologies, celebrities, cooking, or anything else that interests you. Each topic maintains a list of its subscribers, which is equivalent to an "observer" in the observer pattern. When a topic is updated, all of its subscribers (observers) are notified of the changes. And a subscriber can always unsubscribe from a topic. - -As the following diagram shows, the client can be subscribed to different topics and add the observer to be notified about new information. Because the observer listens continuously to the subject, the observer notifies the client about any change that occurs. - -![Observer pattern][21] - -Let's look at the sample code for the observer pattern, starting with the subject/topic class: - - -``` -package org.opensource.demo.observer; - -public interface Topic { - -    public void addObserver([Observer][22] observer); -    public void deleteObserver([Observer][22] observer); -    public void notifyObservers(); -} -``` - -This code describes an interface for different topics to implement the defined methods. Notice how an observer can be added, removed, or notified. - -Here is an example implementation of the topic: - - -``` -package org.opensource.demo.observer; - -import java.util.List; -import java.util.ArrayList; - -public class Conference implements Topic { -    private List<Observer> listObservers; -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; - -    public Conference() { -        listObservers = new ArrayList<Observer>(); -    } - -    public void addObserver([Observer][22] observer) { -        listObservers.add(observer); -    } - -    public void deleteObserver([Observer][22] observer) { -        int i = listObservers.indexOf(observer); -        if (i >= 0) { -            listObservers.remove(i); -        } -    } - -    public void notifyObservers() { -        for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { -            [Observer][22] observer = listObservers.get(i); -            observer.update(totalAttendees,totalSpeakers,nameEvent); -        } -    } - -    public void setConferenceDetails(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        notifyObservers(); -    } -} -``` - -This class defines the implementation of a particular topic. When a change happens, this implementation is where it is invoked. Notice that this takes the number of observers, which is stored as the list, and can both notify and maintain the observers. - -Here is an observer class: - - -``` -package org.opensource.demo.observer; - -public interface [Observer][22] { -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent); -} -``` - -This class defines an interface that different observers can implement to take certain actions. - -For example, the observer implementation can print out the number of attendees and speakers at a conference: - - -``` -package org.opensource.demo.observer; - -public class MonitorConferenceAttendees implements [Observer][22] { -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; -    private Topic topic; - -    public MonitorConferenceAttendees(Topic topic) { -        this.topic = topic; -        topic.addObserver(this); -    } - -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        printConferenceInfo(); -    } - -    public void printConferenceInfo() { -        [System][19].out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); -    } -} -``` - -### Where to go from here? - -Now that you've read this introductory guide to design patterns, you should be in a good place to pursue other design patterns, such as facade, template, and decorator. There are also concurrent and distributed system design patterns like the circuit breaker pattern and the actor pattern. - -However, I believe it's best to hone your skills first by implementing these design patterns in your side projects or just as practice. You can even begin to contemplate how you can apply these design patterns in your real projects. Next, I highly recommend checking out the [SOLID principles][23] of OOP. After that, you will be ready to look into the other design patterns. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/understanding-software-design-patterns - -作者:[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/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) -[2]: https://en.wikipedia.org/wiki/Software_design_pattern -[3]: https://en.wikipedia.org/wiki/Object-oriented_programming -[4]: https://en.wikipedia.org/wiki/Software_framework -[5]: https://github.com/bryantson/OpensourceDotComDemos/tree/master/TopDesignPatterns -[6]: https://www.youtube.com/watch?v=VlBXYtLI7kE&feature=youtu.be -[7]: https://openjdk.java.net/ -[8]: https://maven.apache.org/ -[9]: https://www.jetbrains.com/idea/download/#section=mac -[10]: https://www.eclipse.org/ide/ -[11]: https://git-scm.com/ -[12]: https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming) -[13]: https://en.wikipedia.org/wiki/Singleton_pattern -[14]: https://opensource.com/sites/default/files/uploads/designpatterns1_normalclassinstantiation.jpg (Normal class instantiation) -[15]: https://opensource.com/sites/default/files/uploads/designpatterns2_singletonpattern.jpg (Singleton pattern instantiation) -[16]: https://en.wikipedia.org/wiki/Factory_method_pattern -[17]: https://opensource.com/sites/default/files/uploads/designpatterns3_factorypattern.jpg (Factory pattern) -[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[20]: https://en.wikipedia.org/wiki/Observer_pattern -[21]: https://opensource.com/sites/default/files/uploads/designpatterns4_observerpattern.jpg (Observer pattern) -[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+observer -[23]: https://en.wikipedia.org/wiki/SOLID diff --git a/translated/tech/20190715 Understanding software design patterns.md b/translated/tech/20190715 Understanding software design patterns.md new file mode 100644 index 0000000000..3a3af0750c --- /dev/null +++ b/translated/tech/20190715 Understanding software design patterns.md @@ -0,0 +1,360 @@ +[#]: collector: (lujun9972) +[#]: translator: (arrowfeng) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Understanding software design patterns) +[#]: via: (https://opensource.com/article/19/7/understanding-software-design-patterns) +[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson) + +理解软件设计模式 +====== +设计模式可以帮助消除冗余代码。学习如何利用Java使用单例模式、工厂模式和观察者模式。 +![clouds in the sky with blue pattern][1] + +如果你是一名正在致力于计算机科学或者相关学科的程序员或者学生,很快,你将会遇到一条术语 “软件设计模式。” 根据维基百科,_" [软件设计模式][2]是在平常的软件设计工作中所遭遇的问题是一种通用的, 可重复使用的解决方案。“_ 这里是我对定义的理解:当你在编码项目上的同时,你经常会思考,“呵呵,这里貌似是冗余代码,我想是否我能改变代码使得更灵活并且这个改变是可接受的?”因此,你将开始思考怎样分割那些保持不变的内容和需要经常改变的内容。 + + +> 设计模式是一种通过分割那些保持不变的部分和经常变化的部分,让你的代码更容易修改的方法。 + +不出意外的话,每个从事编码工程的人都可能会有同样的思考。特别是那些工业级别的工程,在那里通常工作着数十甚至数百名开发者;协作过程表明必须有一些标准和规则来使代码更加优雅并适应变化。 这就是为什么我们有 [面向对象编程][3](OOP)和 [软件框架工具][4]。设计模式有点类似于OOP,但它通过将变化视为自然开发过程的一部分而进一步发展。基本上,设计模式利用了一些OOP的思想,比如抽象和接口,但是专注于改变的过程。 + + +当你开始开发项目时, 你经常会听到这样一个术语 _重构_,_意味着通过改变代码使它变得更优雅和可复用;_ 这就是设计模式耀眼的地方。 无论什么时候你处理现有代码时(无论是由其他人构建还是你自己过去构建的),了解设计模式可以帮助你以不同的方式看待事物,你将发现问题以及改进代码的方法。 + +那里有很多种设计模式,其中单例模式,工厂模式,和观察者模式三种最受欢迎,在这篇文章中我将会一一介绍它们。 + +### 如何遵循本指南 + +无论你是一位有经验的编程工作者还是一名刚刚接触的新手,我想让这篇教程很容易让每个人都可以理解。设计模式概念并不容易理解,减少开始旅程时的学习曲线始终是首要任务。因此,除了这篇带有图表和代码片段的文章外,我还创建了一个 [GitHub仓库][5],你可以克隆和在你的电脑上运行代码去实现这三种设计模式。你也可以观看我创建的 [YouTube视频][6]。 + + +#### 必要条件 + +如果你只是想了解一般的设计模式思想,则无需克隆示例项目或安装任何工具。但是,如果要运行示例代码,你需要安装以下工具: + + + * **Java Development Kit (JDK):** 我强烈建议 [OpenJDK][7]。 + * **Apache Maven:** 这个简单的工程使用 [Apache Maven][8] 构建; 幸好许多IDEs自带了Maven。 + * **Interactive development editor (IDE):** 我使用 [IntelliJ Community Edition][9], 但是你也可以使用 [Eclipse IDE][10] 或者其他你喜欢的 Java IDE。 + * **Git:** 如果你想克隆这个工程,你需要 [Git][11]客户端。 + + +安装好Git后运行下列命令克隆这个工程: + +``` +`git clone https://github.com/bryantson/OpensourceDotComDemos.git` +``` + +然后在你喜欢的IDE中,你可以将TopDesignPatterns仓库中的代码作为Apache Maven项目导入。 + +我正在使用Java,但你也可以使用支持 [抽象原理][12]的任何编程语言来实现设计模式。 + +### 单例模式:避免每次创建一个对象 + +[单例模式][13]是非常受欢迎的设计模式,它的实现相对来说很简单,因为你只需要一个类。然而,许多开发人员争论单例设计模式的是否利大于弊,因为它缺乏明显的好处并且容易被滥用。很少有开发人员直接实现单例;相反,像Spring Framework和Google Guice等编程框架内置了单例设计模式的特性。 + +但是了解单例模式仍然有巨大的用处。单例模式确保一个类仅创建一次且提供了一个对他的全局访问点。 + +> **Singleton pattern:** 确保仅有一个实例被创建且避免在同样的工程中创建多个实例。 + +下面这幅图展示了经典的类对象创建过程。当客户端请求创建一个对象时,构造函数会创建或者实例化一个对象并调用方法返回这个类。但是每次请求一个对象都会发生这样的情况——构造函数被调用,一个新的对象被创建并且它返回一个唯一的对象。我猜面向对象语言的创建者有每次都创建一个新对象的原因,但是单例过程的支持者说这是冗余的且浪费资源。 + +![Normal class instantiation][14] + +下面这幅图使用单例模式创建对象。这里,构造函数仅当对象首次通过调用预先设计好的 getInstance() 方法时才会被调用。这通常通过检查值是否为 null 来完成,并且这个对象被作为私有变量保存在单例类的内部。下次 getInstance() 被调用时,这个类会返回第一次被创建的对象。没有新的对象产生;它只是返回旧的那一个。 + +![Singleton pattern instantiation][15] + +下面这段代码展示了创建单例模式最简单的方法: + + +``` +package org.opensource.demo.singleton; + +public class OpensourceSingleton { + +    private static OpensourceSingleton uniqueInstance; + +    private OpensourceSingleton() { +    } + +    public static OpensourceSingleton getInstance() { +        if (uniqueInstance == null) { +            uniqueInstance = new OpensourceSingleton(); +        } +        return uniqueInstance; +    } + +} +``` + +在调用方, 这里展示了如何调用单例类来获取对象: + +``` +Opensource newObject = Opensource.getInstance(); +``` + +这段代码很好的验证了单例模式的思想: + + 1. 当 getInstance() 被调用时,它通过检查 null 值来见检查对象是否已经被创建。 + 2. 如果值为空,它会创建一个新对象并把它保存到私有域,返回这个对象给调用者。否则直接返回之前被创建的对象。 + + +单例模式实现的主要问题是它忽略了并行进程。当多个进程使用线程同时访问资源时,这个问题就产生了。对于这种情况有对应的解决方案,它被称为 _双重检查锁_ 用于多线程安全,如下所示: + +``` +package org.opensource.demo.singleton; + +public class ImprovedOpensourceSingleton { + +    private volatile static ImprovedOpensourceSingleton uniqueInstance; + +    private ImprovedOpensourceSingleton() {} + +    public static ImprovedOpensourceSingleton getInstance() { +        if (uniqueInstance == null) { +            synchronized (ImprovedOpensourceSingleton.class) { +                if (uniqueInstance == null) { +                    uniqueInstance = new ImprovedOpensourceSingleton(); +                } +            } +        } +        return uniqueInstance; +    } + +} +``` + +只是为了强调前一点,确保只有在你认为这是一个安全的选项时才能直接实现你的单例模式。最好的方法是通过使用一个制作精良的编程框架来利用单例功能。 + +### 工厂模式:将对象创建委派给工厂类以隐藏创建逻辑 + +[工厂模式][16] 是另一种众所周知的设计模式,但是有一小点复杂。实现工厂模式的方法有很多,而下列的代码示例为最简单的实现方式。为了创建对象,工厂模式定义了一个接口,让它的子类去决定哪一个子类实例化。 + +> **Factory pattern:** 将对象创建委派给工厂类,因此它能隐藏创建逻辑。 + +下列的图片展示了最简单的工厂模式是如何实现的? + +![Factory pattern][17] + +客户端请求工厂类创建某个对象,类型 x,而不是客户端直接调用对象创建。根据类型,工厂模式决定要创建和返回的对象。 + +在下列代码示例中,OpensourceFactory 是工厂类实现,它从调用者那里获取 _类型_ 并根据该输入值决定要创建和返回的对象: + +``` +package org.opensource.demo.factory; + +public class OpensourceFactory { + +    public OpensourceJVMServers getServerByVendor([String][18] name) { +        if(name.equals("Apache")) { +            return new Tomcat(); +        } +        else if(name.equals("Eclipse")) { +            return new Jetty(); +        } +        else if (name.equals("RedHat")) { +            return new WildFly(); +        } +        else { +            return null; +        } +    } +} +``` + +OpenSourceJVMServer 是一个100%的抽象类(或者一个接口类),它指示要实现的是什么,而不是怎样实现: + + +``` +package org.opensource.demo.factory; + +public interface OpensourceJVMServers { +    public void startServer(); +    public void stopServer(); +    public [String][18] getName(); +} +``` + +这是一个 OpensourceJVMServers 实现类示例。当 “RedHat” 被作为类型传递给工厂类,WildFly 服务器将被创建: + + +``` +package org.opensource.demo.factory; + +public class WildFly implements OpensourceJVMServers { +    public void startServer() { +        [System][19].out.println("Starting WildFly Server..."); +    } + +    public void stopServer() { +        [System][19].out.println("Shutting Down WildFly Server..."); +    } + +    public [String][18] getName() { +        return "WildFly"; +    } +} +``` + +### 观察者模式:订阅主题并获取相关更新的通知 + +最后是[观察者模式][20]。像单例模式那样,很少有专业的程序员直接实现观察者模式。但是,许多消息队列和数据服务实现都借用了观察者模式的概念。观察者模式在对象之间定义了一对多的依赖关系,当一个对象的状态发生改变时,所有依赖它的对象都将被自动地通知和更新。 + +> **Observer pattern:** 如果有更新,那么订阅了该话题/主题的客户端将被通知。 + +思考观察者模式的最简单方法是想象一个邮件列表,你可以在其中订阅任何主题,无论是开源,技术,名人,烹饪还是您感兴趣的任何其他内容。每个主题维护者一个它的订阅者列表,在观察者模式中它们相当于观察者。当某一个主题更新时,它所有的订阅者(观察者)都将被通知这次改变。并且订阅者总是能取消某一个主题的订阅。 + +如下图所示,客户端可以订阅不同的主题并添加观察者以获得最新信息的通知。因为观察者不断的监听着这个主题,这个观察者会通知客户端任何发生的改变。 + +![Observer pattern][21] + +让我们呢来看看观察者模式的代码示例,从主题/话题类开始: + + +``` +package org.opensource.demo.observer; + +public interface Topic { + +    public void addObserver([Observer][22] observer); +    public void deleteObserver([Observer][22] observer); +    public void notifyObservers(); +} +``` +这段代码描述了一个接口为不同的主题去实现已定义的方法。注意一个观察者如何被添加、移除和通知。 + +这是一个主题的实现示例: + +``` +package org.opensource.demo.observer; + +import java.util.List; +import java.util.ArrayList; + +public class Conference implements Topic { +    private List<Observer> listObservers; +    private int totalAttendees; +    private int totalSpeakers; +    private [String][18] nameEvent; + +    public Conference() { +        listObservers = new ArrayList<Observer>(); +    } + +    public void addObserver([Observer][22] observer) { +        listObservers.add(observer); +    } + +    public void deleteObserver([Observer][22] observer) { +        int i = listObservers.indexOf(observer); +        if (i >= 0) { +            listObservers.remove(i); +        } +    } + +    public void notifyObservers() { +        for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { +            [Observer][22] observer = listObservers.get(i); +            observer.update(totalAttendees,totalSpeakers,nameEvent); +        } +    } + +    public void setConferenceDetails(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { +        this.totalAttendees = totalAttendees; +        this.totalSpeakers = totalSpeakers; +        this.nameEvent = nameEvent; +        notifyObservers(); +    } +} +``` + +这段代码定义了一个特定主题的实现。当发生改变时,这个实现调用它自己的方法。 注意这将获取存储为列表的观察者的数量,并且可以通知和维护观察者。 + +这是一个观察者类: + +``` +package org.opensource.demo.observer; + +public interface [Observer][22] { +    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent); +} +``` + +这个类定义了一个接口,不同的观察者可以实现该接口以执行特定的操作。 + +例如,实现了该接口的观察者可以在会议上打印出与会者和发言人的数量: + + +``` +package org.opensource.demo.observer; + +public class MonitorConferenceAttendees implements [Observer][22] { +    private int totalAttendees; +    private int totalSpeakers; +    private [String][18] nameEvent; +    private Topic topic; + +    public MonitorConferenceAttendees(Topic topic) { +        this.topic = topic; +        topic.addObserver(this); +    } + +    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { +        this.totalAttendees = totalAttendees; +        this.totalSpeakers = totalSpeakers; +        this.nameEvent = nameEvent; +        printConferenceInfo(); +    } + +    public void printConferenceInfo() { +        [System][19].out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); +    } +} +``` + +### 之后去哪? + +现在你已经阅读了这篇对于设计模式的介绍引导,你应该去一个好地方寻求其他设计模式,例如外观模式,模版模式和装饰器模式。也有一些并发和分布式系统的设计模式如断路器模式和锚定模式。 + +可是,我相信最好的磨砺你的技能首先是通过在你的边缘工程或者练习中实现这些设计模式。你甚至可以开始考虑如何在实际项目中应用这些设计模式。接下来,我强烈建议您查看OOP的 [SOLID原则][23]。之后,你将准备好了解其他设计模式。 + +However, I believe it's best to hone your skills first by implementing these design patterns in your side projects or just as practice. You can even begin to contemplate how you can apply these design patterns in your real projects. Next, I highly recommend checking out the [SOLID principles][23] of OOP. After that, you will be ready to look into the other design patterns. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/understanding-software-design-patterns + +作者:[Bryant Son][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/arrowfeng) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) +[2]: https://en.wikipedia.org/wiki/Software_design_pattern +[3]: https://en.wikipedia.org/wiki/Object-oriented_programming +[4]: https://en.wikipedia.org/wiki/Software_framework +[5]: https://github.com/bryantson/OpensourceDotComDemos/tree/master/TopDesignPatterns +[6]: https://www.youtube.com/watch?v=VlBXYtLI7kE&feature=youtu.be +[7]: https://openjdk.java.net/ +[8]: https://maven.apache.org/ +[9]: https://www.jetbrains.com/idea/download/#section=mac +[10]: https://www.eclipse.org/ide/ +[11]: https://git-scm.com/ +[12]: https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming) +[13]: https://en.wikipedia.org/wiki/Singleton_pattern +[14]: https://opensource.com/sites/default/files/uploads/designpatterns1_normalclassinstantiation.jpg (Normal class instantiation) +[15]: https://opensource.com/sites/default/files/uploads/designpatterns2_singletonpattern.jpg (Singleton pattern instantiation) +[16]: https://en.wikipedia.org/wiki/Factory_method_pattern +[17]: https://opensource.com/sites/default/files/uploads/designpatterns3_factorypattern.jpg (Factory pattern) +[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[20]: https://en.wikipedia.org/wiki/Observer_pattern +[21]: https://opensource.com/sites/default/files/uploads/designpatterns4_observerpattern.jpg (Observer pattern) +[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+observer +[23]: https://en.wikipedia.org/wiki/SOLID From 8283d4be2a25c6d7584166a531848c7636d0c68d Mon Sep 17 00:00:00 2001 From: HALO Feng <289716347@qq.com> Date: Fri, 19 Jul 2019 16:27:37 +0800 Subject: [PATCH 047/951] translated --- .../tech/20190715 Understanding software design patterns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20190715 Understanding software design patterns.md b/translated/tech/20190715 Understanding software design patterns.md index 3a3af0750c..9767669658 100644 --- a/translated/tech/20190715 Understanding software design patterns.md +++ b/translated/tech/20190715 Understanding software design patterns.md @@ -328,7 +328,7 @@ via: https://opensource.com/article/19/7/understanding-software-design-patterns 作者:[Bryant Son][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/arrowfeng) +译者:[arrowfeng](https://github.com/arrowfeng) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b62471bc792c385e9b60c5f3db1abe961f31cbea Mon Sep 17 00:00:00 2001 From: 0x996 <52857718+0x996@users.noreply.github.com> Date: Fri, 19 Jul 2019 19:53:51 +1000 Subject: [PATCH 048/951] APL:20190717 Mastering user groups on Linux --- sources/tech/20190717 Mastering user groups on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190717 Mastering user groups on Linux.md b/sources/tech/20190717 Mastering user groups on Linux.md index 0778b93a4b..82f9cca815 100644 --- a/sources/tech/20190717 Mastering user groups on Linux.md +++ b/sources/tech/20190717 Mastering user groups on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (0x996) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7600770539ead3bac8f5e0cda83157c13b0335fe Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Jul 2019 00:20:31 +0800 Subject: [PATCH 049/951] PRF @MjSeven --- ...08 Command line quick tips- Permissions.md | 49 +++++++++---------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/translated/tech/20190708 Command line quick tips- Permissions.md b/translated/tech/20190708 Command line quick tips- Permissions.md index 20bc371fed..25702ff573 100644 --- a/translated/tech/20190708 Command line quick tips- Permissions.md +++ b/translated/tech/20190708 Command line quick tips- Permissions.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Command line quick tips: Permissions) @@ -12,37 +12,34 @@ ![][1] -Fedora 与所有基于 Linux 的系统一样,它提供了一组强大的安全特性。其中一个基本特性是文件和文件夹上的 _权限_。这些权限保护文件和文件夹免受未经授权的访问。本文将简要介绍这些权限,并向你展示如何使用它们共享对文件夹的访问。 +Fedora 与所有基于 Linux 的系统一样,它提供了一组强大的安全特性。其中一个基本特性是文件和文件夹上的*权限*。这些权限保护文件和文件夹免受未经授权的访问。本文将简要介绍这些权限,并向你展示如何使用它们共享对文件夹的访问。 ### 权限基础 -Fedora 本质上是一个多用户操作系统,它也有 _组_,用户可以是其成员。但是,想象一下一个没有权限概念的多用户系统,不同的登录用户可以随意阅读彼此的内容。你可以想象到这对隐私或安全性并不是很好。 +Fedora 本质上是一个多用户操作系统,它也有*组*,用户可以是其成员。但是,想象一下一个没有权限概念的多用户系统,不同的登录用户可以随意阅读彼此的内容。你可以想象到这对隐私或安全性并不是很好。 -Fedora 上的任何文件或文件夹都分配了三组权限。第一组用于拥有文件或文件夹的 _用户_,第二组用于拥有它的 _组_,第三组用于其他人,即不是该文件的用户或拥有该文件的组中的用户。有时这被称为 _world_。(to 校正:这个 world 没理解) +Fedora 上的任何文件或文件夹都分配了三组权限。第一组用于拥有文件或文件夹的*用户*,第二组用于拥有它的*组*,第三组用于其他人,即既不是该文件的用户也不是拥有该文件的组中的用户。有时这被称为*全世界*。 ### 权限意味着什么 -每组权限都有三种形式:_读_,_写_ 和 _执行_。其中每个都可以用首字母来代替,即 _r_、_w_、_x_。 +每组权限都有三种形式:*读*、*写*和*执行*。其中每个都可以用首字母来代替,即 `r`、`w`、`x`。 #### 文件权限 -对于 _文件_,权限的含义如下所示: +对于*文件*,权限的含义如下所示: - * 读(r):可以读取文件内容 + * 读(`r`):可以读取文件内容 + * 写(`w`):可以更改文件内容 + * 执行(`x`):可以执行文件 —— 这主要用于打算直接运行的程序或脚本 - * 写(w):可以更改文件内容 - - * 执行(x):可以执行文件 -- 这主要用于打算直接运行的程序或脚本 - - -当你对任何文件进行详细信息列表查看时,可以看到这三组权限。尝试查看系统上的 _/etc/services_ 文件: +当你对任何文件进行详细信息列表查看时,可以看到这三组权限。尝试查看系统上的 `/etc/services` 文件: ``` $ ls -l /etc/services -rw-r--r--. 1 root root 692241 Apr 9 03:47 /etc/services ``` -注意列表左侧的权限组。如上所述,这些表明三种用户的权限:拥有该文件的用户,拥有该文件的组以及其他人。用户所有者是 _root_,组所有者是 _root_ 组。用户所有者具有对文件的读写权限,_root_ 组中的任何人都只能读取该文件。最后,其他任何人也只能读取该文件。(最左边的破折号显示这是一个常规文件。) +注意列表左侧的权限组。如上所述,这些表明三种用户的权限:拥有该文件的用户,拥有该文件的组以及其他人。用户所有者是 `root`,组所有者是 `root` 组。用户所有者具有对文件的读写权限,`root` 组中的任何人都只能读取该文件。最后,其他任何人也只能读取该文件。(最左边的 `-` 显示这是一个常规文件。) 顺便说一下,你通常会在许多(但不是所有)系统配置文件上发现这组权限,它们只由系统管理员而不是普通用户更改。通常,普通用户需要读取其内容。 @@ -50,19 +47,18 @@ $ ls -l /etc/services 对于文件夹,权限的含义略有不同: - * 读(r):可以读取文件夹内容(例如 _ls_ 命令) - * 写(w):可以更改文件夹内容(可以在此文件夹中创建或删除文件) - * 执行(x):可以搜索文件夹,但无法读取其内容。(这听起来可能很奇怪,但解释起来需要更复杂的文件系统细节,这超出了本文的范围,所以现在就这样吧。) + * 读(`r`):可以读取文件夹内容(例如 `ls` 命令) + * 写(`w`):可以更改文件夹内容(可以在此文件夹中创建或删除文件) + * 执行(`x`):可以搜索文件夹,但无法读取其内容。(这听起来可能很奇怪,但解释起来需要更复杂的文件系统细节,这超出了本文的范围,所以现在就这样吧。) - -看一下 _/etc/grub.d_ 文件夹的例子: +看一下 `/etc/grub.d` 文件夹的例子: ``` $ ls -ld /etc/grub.d drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d ``` -注意最左边的 _d_,它显示这是一个目录或文件夹。权限显示用户所有者(_root_)可以读取、更改和 _cd_ 到此文件夹中。但是,没有其他人可以这样做 - 无论他们是否是 _root_ 组的成员。注意,你不能 _cd_ 进入该文件夹。 +注意最左边的 `d`,它显示这是一个目录或文件夹。权限显示用户所有者(`root`)可以读取、更改和 `cd` 到此文件夹中。但是,没有其他人可以这样做 —— 无论他们是否是 `root` 组的成员。注意,你不能 `cd` 进入该文件夹。 ``` $ cd /etc/grub.d @@ -80,9 +76,9 @@ drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul ### 创建共享文件夹 -你可以利用此权限功能轻松创建一个文件夹以在组内共享。假设你有一个名为 _finance_ 的小组,其中有几个成员需要共享文档。因为这些是用户文档,所以将它们存储在 _/home_ 文件夹层次结构中是个好主意。 +你可以利用此权限功能轻松创建一个文件夹以在组内共享。假设你有一个名为 `finance` 的小组,其中有几个成员需要共享文档。因为这些是用户文档,所以将它们存储在 `/home` 文件夹层次结构中是个好主意。 -首先,[使用][2] _[sudo][2]_ 创建一个共享文件夹,并将其设置为 _finance_ 组所有: +首先,[使用 sudo][2] 创建一个共享文件夹,并将其设置为 `finance` 组所有: ``` $ sudo mkdir -p /home/shared/finance @@ -95,13 +91,14 @@ $ sudo chgrp finance /home/shared/finance drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance ``` -对于金融数据来说,这似乎不是一个好主意。接下来,使用 _chmod_ 命令更改共享文件夹的模式(权限)。注意,使用 _g_ 更改所属组的权限,使用 _o_ 更改其他用户的权限。同样,_u_ 会更改用户所有者的权限: +对于金融数据来说,这似乎不是一个好主意。接下来,使用 `chmod` 命令更改共享文件夹的模式(权限)。注意,使用 `g` 更改所属组的权限,使用 `o` 更改其他用户的权限。同样,`u` 会更改用户所有者的权限: ``` $ sudo chmod g+w,o-rx /home/shared/finance ``` -生成的权限看起来更好。现在,_finance_ 组中的任何人(或用户所有者 _root_)都可以完全访问该文件夹及其内容: +生成的权限看起来更好。现在,`finance` 组中的任何人(或用户所有者 `root`)都可以完全访问该文件夹及其内容: + ``` drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance ``` @@ -110,7 +107,7 @@ drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance ### 其他说明 -还有其他方法可以操作这些权限。例如,你可能希望将此文件夹中的任何文件设置为 _finance_ 组所拥有。这需要本文未涉及的其他设置,但请继续关注杂志,以了解关于该主题的更多信息。 +还有其他方法可以操作这些权限。例如,你可能希望将此文件夹中的任何文件设置为 `finance` 组所拥有。这需要本文未涉及的其他设置,但请继续关注我们,以了解关于该主题的更多信息。 -------------------------------------------------------------------------------- @@ -119,7 +116,7 @@ via: https://fedoramagazine.org/command-line-quick-tips-permissions/ 作者:[Paul W. Frields][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 ed1710816c86e1314d4ef44672e9acc7505888a9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Jul 2019 00:21:12 +0800 Subject: [PATCH 050/951] PUB @MjSeven https://linux.cn/article-11123-1.html --- .../20190708 Command line quick tips- Permissions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190708 Command line quick tips- Permissions.md (98%) diff --git a/translated/tech/20190708 Command line quick tips- Permissions.md b/published/20190708 Command line quick tips- Permissions.md similarity index 98% rename from translated/tech/20190708 Command line quick tips- Permissions.md rename to published/20190708 Command line quick tips- Permissions.md index 25702ff573..028916247a 100644 --- a/translated/tech/20190708 Command line quick tips- Permissions.md +++ b/published/20190708 Command line quick tips- Permissions.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11123-1.html) [#]: subject: (Command line quick tips: Permissions) [#]: via: (https://fedoramagazine.org/command-line-quick-tips-permissions/) [#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) From 987233da05cf59094acc80081064570052fe9e3d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 20 Jul 2019 00:51:48 +0800 Subject: [PATCH 051/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190719=20Modify?= =?UTF-8?q?ing=20Windows=20local=20accounts=20with=20Fedora=20and=20chntpw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md --- ...s local accounts with Fedora and chntpw.md | 375 ++++++++++++++++++ 1 file changed, 375 insertions(+) create mode 100644 sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md diff --git a/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md b/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md new file mode 100644 index 0000000000..10d779fe6b --- /dev/null +++ b/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md @@ -0,0 +1,375 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Modifying Windows local accounts with Fedora and chntpw) +[#]: via: (https://fedoramagazine.org/modifying-windows-local-accounts-with-fedora-and-chntpw/) +[#]: author: (Shaun Assam https://fedoramagazine.org/author/sassam/) + +Modifying Windows local accounts with Fedora and chntpw +====== + +![][1] + +I recently encountered a problem at work where a client’s Windows 10 PC lost trust to the domain. The user is an executive and the hindrance of his computer can affect real-time mission-critical tasks. He gave me 30 minutes to resolve the issue while he attended a meeting. + +Needless to say, I’ve encountered this issue many times in my career. It’s an easy fix using the Windows 7/8/10 installation media to reset the Administrator password, remove the PC off the domain and rejoin it. Unfortunately it didn’t work this time. After 20 minutes of scouring the net and scanning through the Microsoft Docs with no success, I turned to my development machine running Fedora with hopes of finding a solution. + +With _dnf search_ I found a utility called **chntpw**: + +``` +$ dnf search windows | grep password +``` + +According to the summary, _chntpw_ will “change passwords in Windows SAM files.” + +Little did I know at the time there was more to this utility than explained in the summary. Hence, this article will go through the steps I used to successfully reset a Windows local user password using _chntpw_ and a Fedora Workstation Live boot USB. The article will also cover some of the features of _chntpw_ used for basic user administration. + +### Installation and setup + +If the PC can connect to the internet after booting the live media, install _chntpw_ from the official Fedora repository with: + +``` +$ sudo dnf install chntpw +``` + +If you’re unable to access the internet, no sweat! Fedora Workstation Live boot media has all the dependencies installed out-of-the-box, so all we need is the package. You can find the builds for your Fedora version from the [Fedora Project’s Koji][2] site. You can use another computer to download the utility and use a USB thumb drive, or other form of media to copy the package. + +First and foremost we need to create the Fedora Live USB stick. If you need instructions, the article on [How to make a Fedora USB stick][3] is a great reference. + +Once the key is created shut-down the Windows PC, insert the thumb drive if the USB key was created on another computer, and turn on the PC — be sure to boot from the USB drive. Once the live media boots, select “Try Fedora” and open the Terminal application. + +Also, we need to mount the Windows drive to access the files. Enter the following command to view all drive partitions with an NTFS filesystem: + +``` +$ sudo blkid | grep ntfs +``` + +Most hard drives are assigned to _/dev/sdaX_ where X is the partition number — virtual drives may be assigned to _/dev/vdX_, and some newer drives (like SSDs) use _/dev/nvmeX_. For this example the Windows C drive is assigned to _/dev/sda2_. To mount the drive enter: + +``` +$ sudo mount /dev/sda2 /mnt +``` + +Fedora Workstation contains the _ntfs-3g_ and _ntfsprogs_ packages out-of-the-box. If you’re using a spin that does not have NTFS working out of the box, you can install these two packages from the official Fedora repository with: + +``` +$ sudo dnf install ntfs-3g ntfsprogs +``` + +Once the drive is mounted, navigate to the location of the SAM file and verify that it’s there: + +``` +$ cd /mnt/Windows/System32/config +$ ls | grep SAM + SAM + SAM.LOG1 + SAM.LOG2 +``` + +### Clearing or resetting a password + +Now it’s time to get to work. The help flag **-h** provides everything we need to know about this utility and how to use it: + +``` +$ chntpw -h +chntpw: change password of a user in a Windows SAM file, +or invoke registry editor. Should handle both 32 and 64 bit windows and +all version from NT3.x to Win8.1 +chntpw [OPTIONS] [systemfile] [securityfile] [otherreghive] […] + -h This message + -u Username or RID (0x3e9 for example) to interactively edit + -l list all users in SAM file and exit + -i Interactive Menu system + -e Registry editor. Now with full write support! + -d Enter buffer debugger instead (hex editor), + -v Be a little more verbose (for debuging) + -L For scripts, write names of changed files to /tmp/changed + -N No allocation mode. Only same length overwrites possible (very safe mode) + -E No expand mode, do not expand hive file (safe mode) + +Usernames can be given as name or RID (in hex with 0x first) +See readme file on how to get to the registry files, and what they are. + Source/binary freely distributable under GPL v2 license. See README for details. + NOTE: This program is somewhat hackish! You are on your own! +``` + +Use the **-l** parameter to display a list of users it reads from the SAM file: + +``` +$ sudo chntpw -l SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +| RID -|---------- Username ------------| Admin? |- Lock? --| +| 01f4 | Administrator | ADMIN | dis/lock | +| 01f7 | DefaultAccount | | dis/lock | +| 03e8 | defaultuser0 | | dis/lock | +| 01f5 | Guest | | dis/lock | +| 03ea | sysadm | ADMIN | | +| 01f8 | WDAGUtilityAccount | | dis/lock | +| 03e9 | WinUser | | | +``` + +Now that we have a list of Windows users we can edit the account. Use the **-u** parameter followed by the username and the name of the SAM file. For this example, edit the _sysadm_ account: + +``` +$ sudo chntpw -u sysadm SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +================= USER EDIT ==================== + +RID : 1002 [03ea] +Username: sysadm +fullname: SysADM +comment : +homedir : + +00000220 = Administrators (which has 2 members) + +Account bits: 0x0010 = +[ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | +[ ] Temp. duplicate | [X] Normal account | [ ] NMS account | +[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | +[ ] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | +[ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) | + +Failed login count: 0, while max tries is: 0 +Total login count: 0 + +- - - User Edit Menu: +1 - Clear (blank) user password +(2 - Unlock and enable user account) [seems unlocked already] +3 - Promote user (make user an administrator) +4 - Add user to a group +5 - Remove user from a group +q - Quit editing user, back to user select +Select: [q] > +``` + +To clear the password press **1** and ENTER. If successful you will see the following message: + +``` +... +Select: [q] > 1 +Password cleared! +================= USER EDIT ==================== + +RID : 1002 [03ea] +Username: sysadm +fullname: SysADM +comment : +homedir : + +00000220 = Administrators (which has 2 members) + +Account bits: 0x0010 = +[ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | +[ ] Temp. duplicate | [X] Normal account | [ ] NMS account | +[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | +[ ] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | +[ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) | + +Failed login count: 0, while max tries is: 0 +Total login count: 0 +** No NT MD4 hash found. This user probably has a BLANK password! +** No LANMAN hash found either. Try login with no password! +... +``` + +Verify the change by repeating: + +``` +$ sudo chntpw -l SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +| RID -|---------- Username ------------| Admin? |- Lock? --| +| 01f4 | Administrator | ADMIN | dis/lock | +| 01f7 | DefaultAccount | | dis/lock | +| 03e8 | defaultuser0 | | dis/lock | +| 01f5 | Guest | | dis/lock | +| 03ea | sysadm | ADMIN | *BLANK* | +| 01f8 | WDAGUtilityAccount | | dis/lock | +| 03e9 | WinUser | | | + +... +``` + +The “Lock?” column now shows _BLANK_ for the sysadm user. Type **q** to exit and **y** to write the changes to the SAM file. Reboot the machine into Windows and login using the account (in this case _sysadm_) without a password. + +### Features + +Furthermore, _chntpw_ can perform basic Windows user administrative tasks. It has the ability to promote the user to the administrators group, unlock accounts, view and modify group memberships, and edit the registry. + +#### The interactive menu + +_chntpw_ has an easy-to-use interactive menu to guide you through the process. Use the **-i** parameter to launch the interactive menu: + +``` +$ chntpw -i SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +<>========<> chntpw Main Interactive Menu <>========<> +Loaded hives: + 1 - Edit user data and passwords + 2 - List groups + - - - + 9 - Registry editor, now with full write support! + q - Quit (you will be asked if there is something to save) +``` + +#### Groups and account membership + +To display a list of groups and view its members, select option **2** from the interactive menu: + +``` +... +What to do? [1] -> 2 +Also list group members? [n] y +=== Group # 220 : Administrators + 0 | 01f4 | Administrator | + 1 | 03ea | sysadm | +=== Group # 221 : Users + 0 | 0004 | NT AUTHORITY\INTERACTIVE | + 1 | 000b | NT AUTHORITY\Authenticated Users | + 2 | 03e8 | defaultuser0 | + 3 | 03e9 | WinUser | +=== Group # 222 : Guests + 0 | 01f5 | Guest | +=== Group # 223 : Power Users +... +=== Group # 247 : Device Owners +``` + +#### Adding the user to the administrators group + +To elevate the user with administrative privileges press **1** to edit the account, then **3** to promote the user: + +``` +... +Select: [q] > 3 + +=== PROMOTE USER +Will add the user to the administrator group (0x220) +and to the users group (0x221). That should usually be +what is needed to log in and get administrator rights. +Also, remove the user from the guest group (0x222), since +it may forbid logins. + +(To add or remove user from other groups, please other menu selections) + +Note: You may get some errors if the user is already member of some +of these groups, but that is no problem. + +Do it? (y/n) [n] : y + +Adding to 0x220 (Administrators) … +sam_put_user_grpids: success exit +Adding to 0x221 (Users) … +sam_put_user_grpids: success exit +Removing from 0x222 (Guests) … +remove_user_from_grp: NOTE: group not in users list of groups, may mean user not member at all. Safe. Continuing. +remove_user_from_grp: NOTE: user not in groups list of users, may mean user was not member at all. Does not matter, continuing. +sam_put_user_grpids: success exit + +Promotion DONE! +``` + +#### Editing the Windows registry + +Certainly the most noteworthy, as well as the most powerful, feature of chntpw is the ability to edit the registry and write to it. Select **9** from the interactive menu: + +``` +... +What to do? [1] -> 9 +Simple registry editor. ? for help. + +> ? + Simple registry editor: + hive [] - list loaded hives or switch to hive number + cd - change current key + ls | dir [] - show subkeys & values, + cat | type - show key value + dpi - show decoded DigitalProductId value + hex - hexdump of value data + ck [] - Show keys class data, if it has any + nk - add key + dk - delete key (must be empty) + ed - Edit value + nv - Add value + dv - Delete value + delallv - Delete all values in current key + rdel - Recursively delete key & subkeys + ek - export key to (Windows .reg file format) + debug - enter buffer hexeditor + st [] - debug function: show struct info + q - quit +``` + +#### Finding help + +As we saw earlier, the **-h** parameter allows us to quickly access a reference guide to the options available with chntpw. The man page contains detailed information and can be accessed with: + +``` +$ man chntpw +``` + +Also, if you’re interested in a more hands-on approach, spin up a virtual machine. [Windows Server 2019][4] has an evaluation period of 180 days, and [Windows Hyper-V Server 2019][5] is unlimited. Creating a Windows guest VM will provide the basics to modify the Administrator account for testing and learning. For help with quickly creating a guest VM refer to the article [Getting started with virtualization in Gnome Boxes][6]. + +### Conclusion + +_chntpw_ is a hidden gem for Linux administrators and IT professionals alike. While a nifty tool to quickly reset Windows account passwords, it can also be used to troubleshoot and modify local Windows accounts with a no-nonsense feel that delivers. This is perhaps only one such tool for solving the problem, though. If you’ve experienced this issue and have an alternative solution, feel free to put it in the comments below. + +This tool, like many other “hacking” tools, holds with it an ethical responsibility. Even chntpw states: + +> NOTE: This program is somewhat hackish! You are on your own! + +When using such programs, we should remember the three edicts outlined in the message displayed when running **sudo** for the first time: + + 1. Respect the privacy of others. + 2. Think before you type. + 3. With great power comes great responsibility. + + + +* * * + +_Photo by _[_Silas Köhler_][7]_ on _[_Unsplash_][8]_,_ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/modifying-windows-local-accounts-with-fedora-and-chntpw/ + +作者:[Shaun Assam][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/sassam/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/chntpw-816x345.jpg +[2]: https://koji.fedoraproject.org/koji/packageinfo?packageID=6945 +[3]: https://fedoramagazine.org/make-fedora-usb-stick/ +[4]: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019 +[5]: https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019 +[6]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ +[7]: https://unsplash.com/@silas_crioco?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[8]: https://unsplash.com/search/photos/key-lock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText From 6ecc02ac5557efdddca7ea18649e80c0a61d3339 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 20 Jul 2019 00:53:10 +0800 Subject: [PATCH 052/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190719=20Buying?= =?UTF-8?q?=20a=20Linux-ready=20laptop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190719 Buying a Linux-ready laptop.md --- .../20190719 Buying a Linux-ready laptop.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/tech/20190719 Buying a Linux-ready laptop.md diff --git a/sources/tech/20190719 Buying a Linux-ready laptop.md b/sources/tech/20190719 Buying a Linux-ready laptop.md new file mode 100644 index 0000000000..f63f9276e4 --- /dev/null +++ b/sources/tech/20190719 Buying a Linux-ready laptop.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Buying a Linux-ready laptop) +[#]: via: (https://opensource.com/article/19/7/linux-laptop) +[#]: author: (Ricardo Berlasso https://opensource.com/users/rgb-eshttps://opensource.com/users/greg-phttps://opensource.com/users/chrisodhttps://opensource.com/users/victorhckhttps://opensource.com/users/hankghttps://opensource.com/users/noplanman) + +Buying a Linux-ready laptop +====== +Tuxedo makes it easy to buy an out-of-the-box "penguin-ready" laptop. +![Penguin with green background][1] + +Recently, I bought and started using a Tuxedo Book BC1507, a Linux laptop computer. Ten years ago, if someone had told me that, by the end of the decade, I could buy top-quality, "penguin-ready" laptops from companies such as [System76][2], [Slimbook][3], and [Tuxedo][4], I probably would have laughed. Well, now I'm laughing, but with joy! + +Going beyond designing computers for free/libre open source software (FLOSS), all three companies recently [announced][5] they are trying to eliminate proprietary BIOS software by switching to [Coreboot][6]. + +### Buying it + +Tuxedo Computers is a German company that builds Linux-ready laptops. In fact, if you want a different operating system, it costs more. + +Buying the computer was incredibly easy. Tuxedo offers many payment methods: not only credit cards but also PayPal and even bank transfers. Just fill out the bank transfer form on Tuxedo's web page, and the company will send you the bank coordinates. + +Tuxedo builds every computer on demand, and picking exactly what you want is as easy as selecting the basic model and exploring the drop-down menus to select different components. There is a lot of information on the page to guide you in the purchase. + +If you pick a different Linux distribution from the recommended one, Tuxedo does a "net install," so have a network cable ready to finish the installation, or you can burn your preferred image onto a USB key. I used a DVD with the openSUSE Leap 15.1 installer through an external DVD reader instead, but you get the idea. + +The model I chose accepts up to two disks: one SSD and the other either an SSD or a conventional hard drive. As I was already over budget, I decided to pick a conventional 1TB disk and increase the RAM to 16GB. The processor is an 8th Generation i5 with four cores. I selected a back-lit Spanish keyboard, a 1920×1080/96dpi screen, and an SD card reader—all in all, a great system. + +If you're fine with the default English or German keyboard, you can even ask for a penguin icon on the Meta key! I needed a Spanish keyboard, which doesn't offer this option. + +### Receiving and using it + +The perfectly packaged computer arrived in total safety to my door just six working days after the payment was registered. After unpacking the computer and unlocking the battery, I was ready to roll. + +![Tuxedo Book BC1507][7] + +The new toy on top of my (physical) desktop. + +The computer's design is really nice and feels solid. Even though the chassis on this model is not aluminum, it stays cool. The fan is really quiet, and the airflow goes to the back edge, not to the sides, as in many other laptops. The battery provides several hours of autonomy from an electrical outlet. An option in the BIOS called FlexiCharger stops charging the battery after it reaches a certain percentage, so you don't need to remove the battery when you work for a long time while plugged in. + +The keyboard is really comfortable and surprisingly quiet. Even the touchpad keys are quiet! Also, you can easily adjust the light intensity on the back-lit keyboard. + +Finally, it's easy to access every component in the laptop so the computer can be updated or repaired without problems. Tuxedo even sends spare screws! + +### Conclusion + +After a month of heavy use, I'm really happy with the system. I got exactly what I asked for, and everything works perfectly. + +Because they are usually high-end systems, Linux-included computers tend to be on the expensive side of the spectrum. If you compare the price of a Tuxedo or Slimbook computer with something with similar specifications from a more established brand, the prices are not that different. If you are after a powerful system to use with free software, don't hesitate to support these companies: What they offer is worth the price. + +Let's us know in the comments about your experience with Tuxedo and other "penguin-friendly" companies. + +* * * + +_This article is based on "[My new 'penguin ready' laptop: Tuxedo-Book-BC1507][8]," published on Ricardo's blog, [From Mind to Type][9]._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/linux-laptop + +作者:[Ricardo Berlasso][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/rgb-eshttps://opensource.com/users/greg-phttps://opensource.com/users/chrisodhttps://opensource.com/users/victorhckhttps://opensource.com/users/hankghttps://opensource.com/users/noplanman +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_penguin_green.png?itok=ENdVzW22 (Penguin with green background) +[2]: https://system76.com/ +[3]: https://slimbook.es/en/ +[4]: https://www.tuxedocomputers.com/ +[5]: https://www.tuxedocomputers.com/en/Infos/News/Tuxedo-Computers-stands-for-Free-Software-and-Security-.tuxedo +[6]: https://coreboot.org/ +[7]: https://opensource.com/sites/default/files/uploads/tuxedo-600_0.jpg (Tuxedo Book BC1507) +[8]: https://frommindtotype.wordpress.com/2019/06/17/my-new-penguin-ready-laptop-tuxedo-book-bc1507/ +[9]: https://frommindtotype.wordpress.com/ From 1c69f3f11ad14ff9b1265516952d4e4cf717e508 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 20 Jul 2019 00:54:01 +0800 Subject: [PATCH 053/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190718=20Worst?= =?UTF-8?q?=20DNS=20attacks=20and=20how=20to=20mitigate=20them?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190718 Worst DNS attacks and how to mitigate them.md --- ...st DNS attacks and how to mitigate them.md | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 sources/talk/20190718 Worst DNS attacks and how to mitigate them.md diff --git a/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md b/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md new file mode 100644 index 0000000000..b490eeeea1 --- /dev/null +++ b/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md @@ -0,0 +1,151 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Worst DNS attacks and how to mitigate them) +[#]: via: (https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Worst DNS attacks and how to mitigate them +====== +DNS threats, including DNS hijacking, tunneling, phishing, cache poisoning and DDoS attacks, are all on the rise. +![Max Bender \(CC0\)][1] + +The Domain Name System remains under constant attack, and there seems to be no end in sight as threats grow increasingly sophisticated. + +DNS, known as the internet’s phonebook, is part of the global internet infrastructure that translates between familiar names and the numbers computers need to access a website or send an email. While DNS has long been the target of assailants looking to steal all manner of corporate and private information, the threats in the [past year][2] or so indicate a worsening of the situation. + +**More about DNS:** + + * [DNS in the cloud: Why and why not][3] + * [DNS over HTTPS seeks to make internet use more private][4] + * [How to protect your infrastructure from DNS cache poisoning][5] + * [ICANN housecleaning revokes old DNS security key][6] + + + +IDC reports that 82% of companies worldwide have faced a DNS attack over the past year. The research firm recently published its fifth annual [Global DNS Threat Report][7], which is based on a survey IDC conducted on behalf of DNS security vendor EfficientIP of 904 organizations across the world during the first half of 2019. + +According to IDC's research, the average costs associated with a DNS attack rose by 49% compared to a year earlier. In the U.S., the average cost of a DNS attack tops out at more than $1.27 million. Almost half of respondents (48%) report losing more than $500,000 to a DNS attack, and nearly 10% say they lost more than $5 million on each breach. In addition, the majority of U.S. organizations say that it took more than one day to resolve a DNS attack. + +“Worryingly, both in-house and cloud applications were damaged, with growth of over 100% for in-house application downtime, making it now the most prevalent damage suffered,” IDC wrote. "DNS attacks are moving away from pure brute-force to more sophisticated attacks acting from the internal network. This will force organizations to use intelligent mitigation tools to cope with insider threats." + +### Sea Turtle DNS hijacking campaign + +An ongoing DNS hijacking campaign known as Sea Turtle is one example of what's occuring in today's DNS threat landscape. + +This month, [Cisco Talos][8] security researchers said the people behind the Sea Turtle campaign have been busy [revamping their attacks][9] with new infrastructure and going after new victims. + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]** + +In April, Talos released a [report detailing][11] Sea Turtle and calling it the “first known case of a domain name registry organization that was compromised for cyber espionage operations.” Talos says the ongoing DNS threat campaign is a state-sponsored attack that abuses DNS to harvest credentials to gain access to sensitive networks and systems in a way that victims are unable to detect, which displays unique knowledge on how to manipulate DNS. + +By obtaining control of victims’ DNS, the attackers can change or falsify any data on the Internet and illicitly modify DNS name records to point users to actor-controlled servers; users visiting those sites would never know, Talos reports.  + +The hackers behind Sea Turtle appear to have regrouped after the April report from Talos and are redoubling their efforts with new infrastructure – a move Talos researchers find to be unusual: “While many actors will slow down once they are discovered, this group appears to be unusually brazen, and will be unlikely to be deterred going forward,” Talos [wrote][9] in July. + +“Additionally, we discovered a new DNS hijacking technique that we assess with moderate confidence is connected to the actors behind Sea Turtle. This new technique is similar in that the threat actors compromise the name server records and respond to DNS requests with falsified A records,” Talos stated.  + +“This new technique has only been observed in a few highly targeted operations. We also identified a new wave of victims, including a country code top-level domain (ccTLD) registry, which manages the DNS records for every domain [that] uses that particular country code; that access was used to then compromise additional government entities. Unfortunately, unless there are significant changes made to better secure DNS, these sorts of attacks are going to remain prevalent,” Talos wrote. + +### DNSpionage attack upgrades its tools + +Another newer threat to DNS comes in the form of an attack campaign called [DNSpionage][12].  + +DNSpionage initially used two malicious websites containing job postings to compromise targets via crafted Microsoft Office documents with embedded macros. The malware supported HTTP and DNS communication with the attackers. And the attackers are continuing to develop new assault techniques. + +“The threat actor's ongoing development of DNSpionage malware shows that the attacker continues to find new ways to avoid detection. DNS tunneling is a popular method of exfiltration for some actors, and recent examples of DNSpionage show that we must ensure DNS is monitored as closely as an organization's normal proxy or weblogs,” [Talos wrote][13]. “DNS is essentially the phonebook of the internet, and when it is tampered with, it becomes difficult for anyone to discern whether what they are seeing online is legitimate.” + +The DNSpionage campaign targeted various businesses in the Middle East as well as United Arab Emirates government domains. + +“One of the biggest problems with DNS attacks or the lack of protection from them is complacency,” said Craig Williams, director of Talos outreach. Companies think DNS is stable and that they don’t need to worry about it. “But what we are seeing with attacks like DNSpionage and Sea Turtle are kind of the opposite, because attackers have figured out how to use it to their advantage – how to use it to do damage to credentials in a way, in the case of Sea Turtle, that the victim never even knows it happened. And that’s a real potential problem.” + +If you know, for example, your name server has been compromised, then you can force everyone to change their passwords. But if instead they go after the registrar and the registrar points to the bad guy’s name, you never knew it happened because nothing of yours was touched – that’s why these new threats are so nefarious, Williams said. + +“Once attackers start using it publicly, successfully, other bad guys are going to look at it and say, ‘Hey, why don't I use that to harvest a bunch of credentials from the sites I am interested in,’” Williams said. + +### **The DNS IoT risk** + +Another developing risk would be the proliferation of IoT devices.  The Internet Corporation for Assigned Names and Numbers (ICANN) recently wrote a [paper on the risk that IoT brings to DNS][14].  + +“The IoT is a risk to the DNS because various measurement studies suggest that IoT devices could stress the DNS infrastructure in ways that we have not seen before,” ICANN stated.   “For example, a software update for a popular IP-enabled IoT device that causes the device to use the DNS more frequently (e.g., regularly lookup random domain names to check for network availability) could stress the DNS in individual networks when millions of devices automatically install the update at the same time.” + +While this is a programming error from the perspective of individual devices, it could result in a significant attack vector from the perspective of DNS infrastructure operators. Incidents like this have already occurred on a small scale, but they may occur more frequently in the future due to the growth of heterogeneous IoT devices from manufacturers that equip their IoT devices with controllers that use the DNS, ICANN stated. + +ICANN also suggested that IoT botnets will represent an increased threat to DNS operators. “Larger DDoS attacks, partly because IoT bots are more difficult to eradicate. Current botnet sizes are on the order of hundreds of thousands. The most well-known example is the Mirai botnet, which involved 400K (steady-state) to 600K (peak) infected IoT devices.  The Hajime botnet hovers around 400K infected IoT devices, but has not launched any DDoS attacks yet. With the growth of the IoT, these attacks may grow to involve millions of bots and as a result larger DDoS attacks. + +### **DNS security warnings grow** + +The UK's [National Cyber Security Centre (NCSC)][15] issued a warning this month about ongoing DNS attacks, particularly focusing on DNS hijacking. It cited a number of risks associated with the uptick in DNS hijacking including: + +**Creating malicious DNS records.** A malicious DNS record could be used, for example, to create a phishing website that is present within an organization’s familiar domain. This may be used to phish employees or customers. + +**Obtaining SSL certificates.** Domain-validated SSL certificates are issued based on the creation of DNS records; thus an attacker may obtain valid SSL certificates for a domain name, which could be used to create a phishing website intended to look like an authentic website, for example. + +**Transparent proxying.** One serious risk employed recently involves transparently proxying traffic to intercept data. The attacker modifies an organization’s configured domain zone entries (such as “A” or “CNAME” records) to point traffic to their own IP address, which is infrastructure they manage. + +“An organization may lose total control of their domain and often the attackers will change the domain ownership details making it harder to recover,” the NCSC wrote. + +These new threats, as well as other dangers, led the U.S. government to issue a warning earlier this year about DNS attacks on federal agencies.  + +The Department of Homeland Security’s Cybersecurity and Infrastructure Security Agency (CISA) told all federal agencies to bolt down their DNS in the face of a series of global hacking campaigns. + +CISA said in its [Emergency Directive][16] that it was tracking a series of incidents targeting DNS infrastructure. CISA wrote that it “is aware of multiple executive branch agency domains that were impacted by the tampering campaign and has notified the agencies that maintain them.” + +CISA says that attackers have managed to intercept and redirect web and mail traffic and could target other networked services. The agency said the attacks start with compromising user credentials of an account that can make changes to DNS records.  Then the attacker alters DNS records, like Address, Mail Exchanger, or Name Server records, replacing the legitimate address of the services with an address the attacker controls. + +These actions let the attacker direct user traffic to their own infrastructure for manipulation or inspection before passing it on to the legitimate service, should they choose. This creates a risk that persists beyond the period of traffic redirection, CISA stated.  + +“Because the attacker can set DNS record values, they can also obtain valid encryption certificates for an organization’s domain names. This allows the redirected traffic to be decrypted, exposing any user-submitted data. Since the certificate is valid for the domain, end users receive no error warnings,” CISA stated. + +### **Get on the DNSSEC bandwagon** + +“Enterprises that are potential targets – in particular those that capture or expose user and enterprise data through their applications – should heed this advisory by the NSCS and should pressure their DNS and registrar vendors to make DNSSEC and other domain security best practices easy to implement and standardized,” said Kris Beevers, co-founder and CEO of DNS security vendor [NS1][17]. “They can easily implement DNSSEC signing and other domain security best practices with technologies in the market today. At the very least, they should work with their vendors and security teams to audit their implementations.” + +DNSSEC was in the news earlier this year when in response to increased DNS attacks, ICANN called for an intensified community effort to install stronger DNS security technology.  + +Specifically, ICANN wants full deployment of the Domain Name System Security Extensions ([DNSSEC][18]) across all unsecured domain names. DNSSEC adds a layer of security on top of DNS. Full deployment of DNSSEC ensures end users are connecting to the actual web site or other service corresponding to a particular domain name, ICANN said. “Although this will not solve all the security problems of the Internet, it does protect a critical piece of it – the directory lookup – complementing other technologies such as SSL (https:) that protect the ‘conversation’, and provide a platform for yet-to-be-developed security improvements,” ICANN stated. + +DNSSEC technologies have been around since about 2010 but are not widely deployed, with less than 20% of the world’s DNS registrars having deployed it, according to the regional internet address registry for the Asia-Pacific region ([APNIC][19]). + +DNSSEC adoption has been lagging because it was viewed as optional and can require a tradeoff between security and functionality, said NS1's Beevers. + +### **Traditional DNS threats** + +While DNS hijacking may be the front line attack method, other more traditional threats still exist.  + +The IDC/EfficientIP study found most popular DNS threats have changed compared with last year. Phishing (47%) is now more popular than last year’s favorite, DNS-based malware (39%), followed by DDoS attacks (30%), false positive triggering (26%), and lock-up domain attacks (26%). + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.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://images.idgesg.net/images/article/2018/08/anonymous_faceless_hooded_mand_in_scary_halloween_mask_finger_to_lips_danger_threat_stealth_attack_hacker_hush_silence_warning_by_max_bender_cc0_via_unsplash_1200x800-100766358-large.jpg +[2]: https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html +[3]: https://www.networkworld.com/article/3273891/hybrid-cloud/dns-in-the-cloud-why-and-why-not.html +[4]: https://www.networkworld.com/article/3322023/internet/dns-over-https-seeks-to-make-internet-use-more-private.html +[5]: https://www.networkworld.com/article/3298160/internet/how-to-protect-your-infrastructure-from-dns-cache-poisoning.html +[6]: https://www.networkworld.com/article/3331606/security/icann-housecleaning-revokes-old-dns-security-key.html +[7]: https://www.efficientip.com/resources/idc-dns-threat-report-2019/ +[8]: https://www.talosintelligence.com/ +[9]: https://blog.talosintelligence.com/2019/07/sea-turtle-keeps-on-swimming.html +[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[11]: https://blog.talosintelligence.com/2019/04/seaturtle.html +[12]: https://www.networkworld.com/article/3390666/cisco-dnspionage-attack-adds-new-tools-morphs-tactics.html +[13]: https://blog.talosintelligence.com/2019/04/dnspionage-brings-out-karkoff.html +[14]: https://www.icann.org/en/system/files/files/sac-105-en.pdf +[15]: https://www.ncsc.gov.uk/news/ongoing-dns-hijacking-and-mitigation-advice +[16]: https://cyber.dhs.gov/ed/19-01/ +[17]: https://ns1.com/ +[18]: https://www.icann.org/resources/pages/dnssec-qaa-2014-01-29-en +[19]: https://www.apnic.net/ From 340a5648696c4c17260c684993e7f49e4de9fb86 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Jul 2019 06:15:25 +0800 Subject: [PATCH 054/951] PRF @wxy --- ...90708 10 ways to get started with Linux.md | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/translated/tech/20190708 10 ways to get started with Linux.md b/translated/tech/20190708 10 ways to get started with Linux.md index 316157de65..8dc925b80f 100644 --- a/translated/tech/20190708 10 ways to get started with Linux.md +++ b/translated/tech/20190708 10 ways to get started with Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (10 ways to get started with Linux) @@ -12,9 +12,9 @@ Linux 入门十法 > 想要进入 Linux 之门,试试这十个方法。 -![Penguins gathered together in the Artic][1] +![](https://img.linux.net.cn/data/attachment/album/201907/20/061608n0ro5z6p3tjv6w5p.jpg) -文章《[什么是 Linux 用户?][2]》的作者 Anderson Silva 明确表示,现今人们使用 Linux(在某种程度上)就像使用 Windows 一样,只要你对“使用 Linux”这个事情定义得足够广泛。尽管如此,如果你的生活中没有足够的使用 Linux 的机会,现在正是以前所未有的方式尝试 Linux 的好时机。 +文章《[什么是 Linux 用户?][2]》的作者 Anderson Silva 明确表示,现今人们使用 Linux(在某种程度上)就像使用 Windows 一样,只要你对“使用 Linux”这个事情定义得足够广义。尽管如此,如果你的生活中没有太多的使用 Linux 的机会,现在正是以前所未有的方式尝试 Linux 的好时机。 以下是 Linux 入门的十种方法。你可以试试其中一个或者全部试试。 @@ -22,65 +22,65 @@ Linux 入门十法 ![Free shell screenshot][3] -有很多人在用不上的服务器上运行 Linux (请记住,“Linux 服务器”可以是从最新的超级计算机到丢弃的已经用了 12 年的笔记本电脑中的任何一个)。为了充分利用多余的计算机,许多管理员用这些备用的机器提供了免费的 shell 帐户。 +有很多人在用不上的服务器上运行 Linux (请记住,“Linux 服务器”可以是从最新的超级计算机到丢弃的、已经用了 12 年的笔记本电脑中的任何一个)。为了充分利用多余的计算机,许多管理员用这些备用的机器提供了免费的 shell 帐户。 -如果你想要登录到 Linux 终端中学习命令、shell 脚本、Python 以及 Web 开发的基础知识,那么免费的 shell 帐户是一种简单、免费的入门方式。这是一个简短的列表: +如果你想要登录到 Linux 终端中学习命令、shell 脚本、Python 以及 Web 开发的基础知识,那么免费的 shell 帐户是一种简单、免费的入门方式。下面是一个可以体验一下的简短列表: -* [Freeshell.de][4] 是一个自 2002 年以来一直在线的公用 Linux 系统。你可以通过 SSH、IPv6 和 OpenSSL 进行访问,以获得 Linux shell 体验,并且可以使用 MySQL 数据库。 -* [Blinkenshell][5] 提供了一个学习 Unix、使用 IRC、托管简单网站和共享文件的 Linux shell。它自 2006 年以来一直在线。 -* [SDF 公用 Unix 系统][6]成立于 1987 年,提供了免费的 NetBSD 账户。当然,NetBSD 不是 Linux,但它是开源的 Unix,因此它提供了类似的体验。它也有几个自制应用程序,因此它跨越了老派 BBS 和普通的免费 shell 之间的界限。 +* [Freeshell.de][4] 是一个自 2002 年以来一直在线服务的公用 Linux 系统。你可以通过 SSH、IPv6 和 OpenSSL 进行访问,以获得 Linux shell 体验,并且可以使用 MySQL 数据库。 +* [Blinkenshell][5] 提供了一个学习 Unix、使用 IRC、托管简单网站和共享文件的 Linux shell。它自 2006 年以来一直在线服务。 +* [SDF 公用 Unix 系统][6]成立于 1987 年,提供了免费的 NetBSD 账户。当然,NetBSD 不是 Linux,但它是开源的 Unix,因此它提供了类似的体验。它也有几个自制应用程序,因此它不但有普通的免费 shell,还提供了老派 BBS。 -免费 shell 帐户受到很多滥用,因此你表现出的信任度和参与集体活动的意愿越多,你的体验就越好。你通常可以访问数据库引擎、编译器和高级编程语言(通过特殊请求或小额捐赠来证明声誉)。你还可以要求安装其他软件或库,但需经管理员批准。 +免费 shell 帐户常会受到滥用,因此你表现出的可信程度和积极参与协作的意愿越多,你的体验就越好。你可以通过专门请求或小额捐赠来证明你的诚意,通常可以访问数据库引擎、编译器和高级编程语言。你还可以要求安装其他软件或库,但需经管理员批准。 #### 如何使用 -公用 shell 帐户是尝试真正的 Linux 系统的好方法。你无法获得 root 权限这一事实意味着你可学习本地软件管理,而无需做更多的维护工作。你可以做很多实际操作,以完成真正的工作,尽管它们对于学习关键任务还不够。 +公用 shell 帐户是尝试真正的 Linux 系统的好方法。你无法获得 root 权限这一事实意味着你可以学习本地软件管理,而无需做更多的维护工作。你可以做很多实际操作,以完成真正的工作,尽管它们对于学习关键任务还不够。 ### 2、试试 Windows WSL 2 里面的 Linux -不管你信不信,微软从 2019 年 6 月开始在 Windows 里面带上了 Linux,这意味着你可以从 Windows 运行 Linux 应用程序,这是第二代的 [Windows 里的 Linux 子系统][7](WSL 2)。虽然它主要针对开发人员,但 Windows 用户会发现 WSL 2 是一个熟悉的桌面上的 Linux 环境,而没有被任何虚拟化占用额外资源。这是一个以进程方式运行在 Windows 机器上的 Linux。在这个时候,它仍然是一个新的动向和正在进行中的工作,因此它可能会发生变化。如果你试图用它承担重任,你可能会遇到一两个错误,但是如果你只是想入门 Linux、学习一些命令,并感受在基于文本的环境如何完成工作,那么 WSL 2 可能正是你所需要的。 +不管你信不信,微软从 2019 年 6 月开始在 Windows 里面带上了 Linux,这意味着你可以从 Windows 运行 Linux 应用程序,这是 [Windows 里的 Linux 子系统][7]的第二版(WSL 2)。虽然它主要针对开发人员,但 Windows 用户可以发现 WSL 2 是一个来自于他们熟悉的桌面上的 Linux 环境,而没有被任何虚拟化占用额外资源。这是一个以进程方式运行在 Windows 机器上的 Linux。现阶段,它仍然是一个新的动向和正在进行中的工作,因此它可能会发生变化。如果你试图用它承担重任,你可能会遇到一两个错误,但是如果你只是想入门 Linux、学习一些命令,并感受在基于文本的环境如何完成工作,那么 WSL 2 可能正是你所需要的。 #### 如何使用 -WSL 还没有明确的方向或目的,但它在 Windows 机器上提供了 Linux 环境。你可以获得 root 访问权限,并可以运行 Linux 发行版和应用程序,因此这是一种简单而无缝的学习方式。但是,即使 WSL *是Linux*,它也不能给你典型的 Linux 体验。它是由 Windows 提供的 Linux,而这不太会是你在现实世界中遇到的。WSL 是一个开发和教育工具,但如果你可以使用它,那么你应该试试它。 +WSL 还没有明确的用途或目的,但它在 Windows 机器上提供了 Linux 环境。你可以获得 root 访问权限,并可以运行 Linux 发行版和应用程序,因此这是一种简单而无缝的学习方式。但是,即使 WSL *是Linux*,它也不能给你典型的 Linux 体验。它是由 Windows 提供的 Linux,而这不太会是你在现实世界中遇到的情况。WSL 是一个开发和教育工具,但如果你可以使用它,那么你应该试试它。 ### 3、把 Linux 放到可启动的 U 盘上 ![Porteus Linux][8] -便携 Linux 可以安装到 U 盘上随身携带,并用该 U 盘启动你遇到的任何计算机。你可以获得个性化的 Linux 桌面,而无需担心所启动的主机上的数据。计算机不会接触你的 Linux 操作系统,并且你的 Linux 操作系统也不会影响计算机。它非常适合酒店商务中心、图书馆、学校的公共计算机,或者只是给自己一个不时启动 Linux 的借口。 +便携 Linux 可以安装到 U 盘上随身携带,并用该 U 盘启动你遇到的任何计算机。你可以获得个性化的 Linux 桌面,而无需担心所用于启动的主机上的数据。该计算机上原有的系统不会与你的 Linux 系统相接触,并且你的 Linux 操作系统也不会影响计算机。它非常适合酒店商务中心、图书馆、学校的公共计算机,或者只是给自己一个不时启动 Linux 的借口。 -与许多其他快速取得的 Linux shell 不同,此方法为你提供了一个完整而强大的 Linux 系统,包括桌面环境,可访问你需要的任何软件以及持久的数据存储。 +与许多其他快速获得的 Linux shell 不同,此方法为你提供了一个完整而强大的 Linux 系统,包括桌面环境,可访问你需要的任何软件以及持久的数据存储。 这个系统永远不会改变。你要保存的任何数据都将写入压缩的文件系统中,然后在引导时将其作为覆盖层应用于该系统。这种灵活性允许你选择是以持久模式启动,将所有数据保存回 U 盘;还是以临时模式启动,以便一旦关闭电源,你所做的一切都会消失。换句话说,你可以将其用作不受信任的计算机上的安全信息亭或你信任的计算机上的便携式操作系统。 -你可以尝试很多 [U 盘发行版][9],有些桌面环境很少,适用于低功耗计算机,有些适用于完整桌面环境。我偏爱 [Porteus][10] Linux。在过去的八年里,我每天都把它放在我的钥匙链上,在商务旅行中使用它作为我的主要计算平台,如果在工作或家中计算机发生问题,它也会用作工具盘。它是一个可靠而稳定的操作系统,有趣且易于使用。 +你可以尝试很多 [U 盘发行版][9],有些带有精简的桌面环境,适用于低功耗计算机,而另一些带有完整的桌面环境。我偏爱 [Porteus][10] Linux。在过去的八年里,我每天都把它放在我的钥匙链上,在商务旅行中使用它作为我的主要计算平台,如果在工作场所或家中计算机发生问题,它也会用作工具盘。它是一个可靠而稳定的操作系统,有趣且易于使用。 在 Mac 或 Windows 上,下载 [Fedora Media Writer][11] 以创建你下载的任何便携式发行版的可启动 U 盘。 #### 如何使用 -从 U 盘启动一个“实时 Linux”可提供完整的 Linux 发行版。虽然数据存储与你安装到硬盘驱动器的系统略有不同,但其他所有内容都与你在 Linux 桌面上所期望的一样。在便携式 Linux 操作系统上你几乎没有什么不能做的,所以在你的钥匙串上安装一个以解锁你遇到的每台计算机的全部潜力吧。 +从 U 盘启动一个 “实时 Linux” 可提供完整的 Linux 发行版环境。虽然数据存储与你安装到硬盘驱动器的系统略有不同,但其它的所有内容都与你在 Linux 桌面上所期望的一样。在便携式 Linux 操作系统上你几乎没有什么不能做的,所以在你的钥匙串上挂上一个以解锁你遇到的每台计算机的全部潜力吧。 -### 4、在线导览 +### 4、在线游览 ![Linux tour screenshot][12] -Ubuntu 的某个人想到了在浏览器中托管 Ubuntu GNOME 桌面的好主意。想要自己尝试一下,可以打开 Web 浏览器并导航到 [tour.ubuntu.com][13]。你可以选择要演示的活动,也可以跳过单个课程并单击 “四处看看” 按钮。 +Ubuntu 的某个人想到了在浏览器中托管 Ubuntu GNOME 桌面的好主意。如果想要自己尝试一下,可以打开 Web 浏览器并导航到 [tour.ubuntu.com][13]。你可以选择要演示的活动,也可以跳过单个课程并单击 “四处看看Show Yourself Around” 按钮。 -即使你是 Linux 桌面的新用户,你也可能会发现“四处看看”功能比你想象的更还简单。在线游览中,您可以四处看看,查看可用的应用程序,以及查看典型的默认 Linux 桌面。你不能在 Firefox 中调整设置或启动另一个在线导览(这是我尝试的第一件事),虽然你可以完成安装应用程序的动作,但你无法启动它们。 但是,如果你之前从未使用过 Linux 桌面,并且想要看到各种新奇的东西,那这就是一场旋风之旅。 +即使你是 Linux 桌面的新用户,你也可能会发现“四处看看”功能比你想象的更还简单。在线游览中,你可以四处看看,查看可用的应用程序,以及查看典型的默认 Linux 桌面。你不能在 Firefox 中调整设置或启动另一个在线游览(这是我尝试过的第一件事),虽然你可以完成安装应用程序的动作,但你无法启动它们。但是,如果你之前从未使用过 Linux 桌面,并且想要看到各种新奇的东西,那这就是一场旋风之旅。 #### 如何使用 -在线导览真的只是一次旅行。如果你从未见过 Linux 桌面,那么这是一个了解它的情况的机会。不是为了正式的使用,而是一个吸引过客的展示。 +在线游览真的只是一次旅行。如果你从未见过 Linux 桌面,那么这是一个了解它的情况的机会。这不是一个正式的使用,而是一个吸引过客的展示。 ### 5、在浏览器中用 JavaScript 运行 Linux ![JSLinux][14] -就在不久之前,虚拟化的计算成本还很高,这仅限于使用高级硬件的用户。而现在虚拟化已被优化到可以由 JavaScript 引擎执行的程度,这要归功于 Fabrice Bellard,它是优秀的开源 [QEMU][15] 机器仿真器和虚拟器的创建者。 +就在不久之前,虚拟化的计算成本还很高,还仅限于使用先进的硬件的用户。而现在虚拟化已被优化到可以由 JavaScript 引擎执行的程度,这要归功于 Fabrice Bellard,它是优秀的开源 [QEMU][15] 机器仿真器和虚拟器的创建者。 -Bellard 还启动了 JSLinux 项目,该项目允许你在浏览器中运行 Linux 和其他操作系统,算是闲暇时间的一个乐趣。它仍然是一个实验项目,但它是一个技术奇迹。打开 Web 浏览器导航到 [JSLinux][16] 页面,你可以启动基于文本的 Linux shell 或极简的图形 Linux 环境。你可以上传和下载文件到 JSLinux 主机上或(在理论上)将文件发送到一个网络备份位置,因为 JSLinux 可以通过 VPN 套接字访问互联网(尽管上限速度取决于 VPN 服务)。 +Bellard 还启动了 JSLinux 项目,该项目允许你在浏览器中运行 Linux 和其他操作系统,这算是闲暇时间的一个乐趣。它仍然是一个实验性项目,但它是一个技术奇迹。打开 Web 浏览器导航到 [JSLinux][16] 页面,你可以启动基于文本的 Linux shell 或精简的图形 Linux 环境。你可以上传和下载文件到 JSLinux 主机上或(在理论上可以)将文件发送到一个网络备份位置,因为 JSLinux 可以通过 VPN 套接字访问互联网(尽管上限速度取决于 VPN 服务)。 #### 如何使用 @@ -88,7 +88,7 @@ Bellard 还启动了 JSLinux 项目,该项目允许你在浏览器中运行 Li ### 6、阅读关于它的书 -并非每种 Linux 体验都要用计算机。也许你是那种喜欢在开始新事物之前保持距离,先观察和研究的人,或者你可能还不清楚 “Linux” 所包含的内容,或者你喜欢全情投入其中。关于 Linux 如何工作、运行 Linux 的方式以及 Linux 世界中有什么,有很多书可以读。 +并非每种 Linux 体验都要用到计算机。也许你是那种喜欢在开始新事物之前保持距离先观察和研究的人,或者你可能还不清楚 “Linux” 所包含的内容,或者你喜欢全情投入其中。关于 Linux 如何工作、运行 Linux 的方式以及 Linux 世界中有什么,有很多书可以读。 你越熟悉开源世界,就越容易理解常用术语,将城市神话与实际经验区分开来。我们不时会发布[图书清单] [17],但我的最爱之一是 Hazel Russman 的《[The Charm of Linux][18]》。这是一个从不同角度巡览 Linux 的过程,是由一位独立作者在发现 Linux 时兴奋之余写作的。 @@ -100,41 +100,41 @@ Bellard 还启动了 JSLinux 项目,该项目允许你在浏览器中运行 Li ![Raspberry Pi 4][19] -如果你正在使用[树莓派][20],那么你就正在运行 Linux。Linux 和低功耗计算很容易上手。关于树莓派的好处,除了价格低于 100 美元之外,它的[网站][21]是专为教育而设计的。你可以了解树莓派所做的一切,当你了解之后,就知道了 Linux 可以为你做些什么。 +如果你正在使用[树莓派][20],那么你就正在运行 Linux。Linux 和低功耗计算很容易上手。关于树莓派的好处,除了价格低于 100 美元之外,它的[网站][21]是专为教育而设计的。你可以了解树莓派所能做的一切,当你了解之后,就知道了 Linux 可以为你做些什么。 #### 如何使用 -树莓派被设计为低功耗计算机。这意味着你不能像过去那样做那么多的多任务处理,但这是一种避免不堪重负的方便方法。树莓派是学习 Linux 及其附带的所有可能性的好方法,它是发现环保、小型、简化计算能力的有趣方式。并且一定要关注 Opensource.com 上的[提示][22]和[技巧][23]和[有趣的][24][活动] [25],特别是在每年三月份的树莓派之周期间。 +树莓派被设计为低功耗计算机。这意味着你不能像过去那样做那么多的多任务处理,但这是一种避免不堪重负的方便方法。树莓派是学习 Linux 及其附带的所有可能性的好方法,它是发现环保、小型、简化计算能力的有趣方式。并且一定要关注 Opensource.com 上的[提示][22]、[技巧][23]和[有趣的][24][活动] [25],特别是在每年三月份的树莓派之周的期间。 ### 8、赶上容器热潮 -如果你在神话般的[云][26]的后端附近工作,那么你已经听说过容器热潮。虽然你可以在 Windows、Azure、Mac 和 Linux 上运行 Docker 和 Kubernetes,但你可能不知道容器本身就是 Linux。云计算应用和基础设施实际上是精简的 Linux 系统,部分虚拟化,部分基于裸机。如果启动容器,则会启动微型的超特定的 Linux 发行版。 +如果你从事于神话般的[云服务][26]的后端工作,那么你已经听说过容器热潮。虽然你可以在 Windows、Azure、Mac 和 Linux 上运行 Docker 和 Kubernetes,但你可能不知道容器本身就是 Linux。云计算应用和基础设施实际上是精简的 Linux 系统,部分虚拟化,部分基于裸机。如果启动容器,则会启动微型的超特定的 Linux 发行版。 容器与虚拟机或物理服务器[不同][27]。它们不打算用作通用操作系统。但是,如果你在容器中进行开发,你可以停下来四处打量一下,你将了解到 Linux 系统的结构、保存重要文件的位置以及最常见的命令。你甚至可以[在线尝试容器][28],你可以在我的文章中[深入到 Linux 容器的背后][29]了解它们如何工作的。 #### 如何使用 -根据设计,容器特定于单个任务,但它们是 Linux,因此它们非常灵活。你可以如你预期的使用它们,也可以在你的 Linux 实验当中将容器构建到大部分完整系统中。它虽然不是桌面 Linux 体验,但它是完整的 Linux 体验。 +根据设计,容器特定于一个单一任务,但它们是 Linux,因此它们非常灵活。你可以如你预期的使用它们,也可以在你的 Linux 实验当中将容器构建到大部分完整系统中。它虽然不提供桌面 Linux 体验,但它是完整的 Linux 体验。 ### 9、以虚拟机方式安装 Linux -虚拟化是尝试操作系统的简便方法,[VirtualBox][30]是一种很好的开源虚拟化方法。VirtualBox 可以在 Windows 和 Mac 上运行,因此你可以将 Linux 安装为虚拟机(VM)并使用它,就好像它只是一个应用程序一样。如果你不习惯安装操作系统,VirtualBox 也是一种尝试 Linux 的非常安全的方式,而不会意外地将其安装在你通常的操作系统上。 +虚拟化是尝试操作系统的简便方法,[VirtualBox][30] 是一种很好的开源虚拟化方法。VirtualBox 可以在 Windows 和 Mac 上运行,因此你可以将 Linux 安装为虚拟机(VM)并使用它,就好像它只是一个应用程序一样。如果你不习惯安装操作系统,VirtualBox 也是一种尝试 Linux 的非常安全的方式,而不会意外地将其安装覆盖在你通常的操作系统上。 #### 如何使用 -将 Linux 作为虚拟机运行既方便又简单,既可以作为试运行使用,也可以在需要 Linux 环境时进行双启动或重启。它功能齐全,因为它使用虚拟硬件,主机操作系统负责驱动你的外围设备。将 Linux 作为虚拟机运行的唯一缺点主要是心理上的。如果你打算使用 Linux 作为主操作系统,但最终默认在宿主操作系统做除了特定于 Linux 的大多数任务,那么虚拟机就会让你失望。否则,虚拟机是现代技术的胜利,在 VirtualBox 中使用 Linux 可以为你提供 Linux 所提供的所有最佳功能。 +将 Linux 作为虚拟机运行既方便又简单,既可以作为试运行使用,也可以在需要 Linux 环境时进行双启动或重启进入。它功能齐全,因为它使用虚拟硬件,宿主操作系统负责驱动你的外围设备。将 Linux 作为虚拟机运行的唯一缺点主要是心理上的。如果你打算使用 Linux 作为主要操作系统,但最终默认在宿主操作系统上做除了特定于 Linux 的大多数任务,那么虚拟机就会让你失望。否则,虚拟机是现代技术的胜利,在 VirtualBox 中使用 Linux 可以为你提供 Linux 所提供的所有最佳功能。 ### 10、安装一个 Linux ![Fedora Silverblue][31] -如果对上述方式有疑问,那么总会有传统的方式。如果你想给予 Linux 应有的关注,你可以下载 Linux,将安装程序刻录到 U 盘(或 DVD,如果你更喜欢光学介质的话),并将其安装在你的计算机上。Linux 是开源的,所以任何想要花时间打包 Linux 的人都可以分发 Linux,并且可以将所有可用的部分分配到通常称为发行版的内容中。询问任何 Linux 用户哪个发行版是“最好的”,你必然会得到一个不同的答案(主要是因为术语“最佳”通常是未定义的)。大多数人都认可你应该使用适合你的 Linux 发行版,这意味着你应该测试一些流行的发行版,并坚持使你的计算机按照你期望的行为行事。这是一种务实和功能性的方法。例如,如果发行版无法识别你的网络摄像头而你希望它可以正常工作,则可以使用一个可识别该网络摄像头的发行版。 +如果对上述方式有疑问,那么总会有传统的方式。如果你想给予 Linux 应有的关注,你可以下载 Linux,将安装程序刻录到 U 盘(或 DVD,如果你更喜欢光学介质的话),并将其安装在你的计算机上。Linux 是开源的,所以任何想要花时间打包 Linux 的人都可以分发 Linux,并且可以将所有可用的部分分配到通常称为发行版的内容中。无论问哪一个 Linux 用户什么发行版是“最好的”,你必然都会得到一个不同的答案(主要是因为这个术语“最佳”通常是尚未定义的)。大多数人都认可:你应该使用适合你的 Linux 发行版,这意味着你应该测试一些流行的发行版,并坚持使你的计算机按照你期望的行为行事。这是一种务实和功能性的方法。例如,如果发行版无法识别你的网络摄像头而你希望它可以正常工作,则可以使用一个可识别该网络摄像头的发行版。 -如果你之前从未安装过操作系统,你会发现大多数 Linux 发行版都包含友好且简单的安装程序。只需下载一个发行版(它们作为 ISO 文件提供),然后下载 [Fedora Media Writer][11] 来创建一个可启动的安装 U 盘。 +如果你之前从未安装过操作系统,你会发现大多数 Linux 发行版都包含一个友好且简单的安装程序。只需下载一个发行版(它们以 ISO 文件提供),然后下载 [Fedora Media Writer][11] 来创建一个可启动的安装 U 盘。 #### 如何使用 -安装 Linux 并将其用作操作系统是迈向熟悉和熟悉它的一步。怎么使用它都可以。你可能会发现你从未了解过所需的必备功能,你可能会比你想象的更多地了解计算机,并且可能会改变你的世界观。或者你可以使用 Linux 桌面,因为它易于下载和安装,或者因为你想要削减某些公司霸主的中间人,或者因为它可以帮助你完成工作。 +安装 Linux 并将其用作操作系统是迈向熟悉它的一步。怎么使用它都可以。你可能会发现一些你从未了解过的所需的必备功能,你可能会比你想象的更多地了解计算机,并且可能会改变你的世界观。你使用一个 Linux 桌面,或者是因为它易于下载和安装,或者是因为你想要削弱公司中某些人的霸主地位,或者只是因为它可以帮助你完成工作。 无论你的原因是什么,只需尝试使用上面这些任何(或所有)这些方式。 @@ -145,7 +145,7 @@ via: https://opensource.com/article/19/7/ways-get-started-linux 作者:[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 b8c3520db52f81632690a581a6239b5ce0d02902 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Jul 2019 06:17:19 +0800 Subject: [PATCH 055/951] PUB @wxy https://linux.cn/article-11124-1.html --- .../20190708 10 ways to get started with Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190708 10 ways to get started with Linux.md (99%) diff --git a/translated/tech/20190708 10 ways to get started with Linux.md b/published/20190708 10 ways to get started with Linux.md similarity index 99% rename from translated/tech/20190708 10 ways to get started with Linux.md rename to published/20190708 10 ways to get started with Linux.md index 8dc925b80f..49ba29a574 100644 --- a/translated/tech/20190708 10 ways to get started with Linux.md +++ b/published/20190708 10 ways to get started with Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11124-1.html) [#]: subject: (10 ways to get started with Linux) [#]: via: (https://opensource.com/article/19/7/ways-get-started-linux) [#]: author: (Seth Kenlon https://opensource.com/users/seth/users/don-watkins) @@ -12,7 +12,7 @@ Linux 入门十法 > 想要进入 Linux 之门,试试这十个方法。 -![](https://img.linux.net.cn/data/attachment/album/201907/20/061608n0ro5z6p3tjv6w5p.jpg) +![](https://img.linux.net.cn/data/attachment/album/201907/20/061809wwkmb51vqookoqq5.jpg) 文章《[什么是 Linux 用户?][2]》的作者 Anderson Silva 明确表示,现今人们使用 Linux(在某种程度上)就像使用 Windows 一样,只要你对“使用 Linux”这个事情定义得足够广义。尽管如此,如果你的生活中没有太多的使用 Linux 的机会,现在正是以前所未有的方式尝试 Linux 的好时机。 From f22cffe15dd331a652cb3a488d6f5d241651e49d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Jul 2019 06:48:56 +0800 Subject: [PATCH 056/951] PRF @geekpi --- ...1 How to install Elasticsearch on MacOS.md | 90 +++++++++---------- 1 file changed, 40 insertions(+), 50 deletions(-) diff --git a/translated/tech/20190711 How to install Elasticsearch on MacOS.md b/translated/tech/20190711 How to install Elasticsearch on MacOS.md index c64353c88e..94485d0bad 100644 --- a/translated/tech/20190711 How to install Elasticsearch on MacOS.md +++ b/translated/tech/20190711 How to install Elasticsearch on MacOS.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to install Elasticsearch on MacOS) @@ -9,10 +9,12 @@ 如何在 MacOS 上安装 Elasticsearch ====== -安装 Elasticsearch 很复杂!以下是如何在 Mac 上安装。 -![magnifying glass on computer screen][1] -[Elasticsearch][2] 是一个用 Java 开发的开源全文搜索引擎。用户上传 JSON 格式的数据集。然后,Elasticsearch 在向集群索引中的文档添加可搜索引用之前保存原始文档。 +> 安装 Elasticsearch 很复杂!以下是如何在 Mac 上安装。 + +![](https://img.linux.net.cn/data/attachment/album/201907/20/064958dnnwvp8wqzqq4fm2.jpg) + +[Elasticsearch][2] 是一个用 Java 开发的开源全文搜索引擎。用户上传 JSON 格式的数据集。然后,Elasticsearch 在向集群索引中的文档添加可搜索的引用之前先保存原始文档。 Elasticsearch 创建还不到九年,但它是最受欢迎的企业搜索引擎。Elastic 在 2019 年 6 月 25 日发布了最新的更新版本 7.2.0。 @@ -20,7 +22,7 @@ Elasticsearch 创建还不到九年,但它是最受欢迎的企业搜索引擎 [Sunbursts][4]、[地理空间数据地图][5]、[关系分析][6]和实时数据面板只是其中几个功能。并且由于 Elasticsearch 的机器学习能力,你可以了解哪些属性可能会影响你的数据(如服务器或 IP 地址)并查找异常模式。 -在上个月的 [DevFest DC][7] 中,[Summer Rankin 博士][8],Booz Allen Hamilton 的首席数据科学家将 TED Talk 的内容数据集上传到了 Elasticsearch,然后使用 Kibana 快速构建了面板。出于好奇,几天后我去了 Elasticsearch 聚会。 +在上个月的 [DevFest DC][7] 中,Booz Allen Hamilton 的首席数据科学家 [Summer Rankin 博士][8]将 TED Talk 的内容数据集上传到了 Elasticsearch,然后使用 Kibana 快速构建了面板。出于好奇,几天后我去了一个 Elasticsearch 聚会。 由于本课程针对的是新手,因此我们从第一步开始:在我们的笔记本上安装 Elastic 和 Kibana。如果没有安装这两个包,我们无法将莎士比亚的文本数据集作为测试 JSON 文件创建可视化了。 @@ -28,84 +30,72 @@ Elasticsearch 创建还不到九年,但它是最受欢迎的企业搜索引擎 ### 下载适合 MacOS 的 Elasticsearch - 1. 进入 ,你会看到下面的页面: - - +1、进入 ,你会看到下面的页面: ![The Elasticsearch download page.][9] - 2. 在**下载**栏,单击 **MacOS**,将 Elasticsearch TAR 文件(例如,**elasticsearch-7.1.1-darwin-x86_64.tar**)下载到 **Downloads** 文件夹。 -  3. 双击此文件并解压到自己的文件夹中(例如,**elasticsearch-7.1.1**),这其中包含 TAR 中的所有文件。 +2、在**下载**区,单击 **MacOS**,将 Elasticsearch TAR 文件(例如,`elasticsearch-7.1.1-darwin-x86_64.tar`)下载到 `Downloads` 文件夹。 +  +3、双击此文件并解压到自己的文件夹中(例如,`elasticsearch-7.1.1`),这其中包含 TAR 中的所有文件。 - - - -**提示**:如果你希望 Elasticsearch 放在另一个文件夹中,现在可以移动。 +**提示**:如果你希望 Elasticsearch 放在另一个文件夹中,现在可以移动它。 ### 在 MacOS 命令行中运行 Elasticsearch 如果你愿意,你可以只用命令行运行 Elasticsearch。只需遵循以下流程: - 1. [打开**终端**窗口][10]。 -  2. 在终端窗口中,输入你的 Elasticsearch 文件夹。例如(如果你移动了程序,请将 **Downloads** 更改为正确的路径): +1、[打开终端窗口][10]。 +2、在终端窗口中,输入你的 Elasticsearch 文件夹。例如(如果你移动了程序,请将 `Downloads` 更改为正确的路径): -**$ cd ~Downloads/elasticsearch-1.1.0** +``` +$ cd ~Downloads/elasticsearch-1.1.0 +``` - 3. 切换到 Elasticsearch **bin** 子文件夹,然后启动该程序。例如: +3、切换到 Elasticsearch 的 `bin` 子文件夹,然后启动该程序。例如: - - -**$ cd bin $ ./elasticsearch** +``` +$ cd bin +$ ./elasticsearch +``` 这是我启动 Elasticsearch 1.1.0 时命令行终端显示的一些输出: ![Terminal output when running Elasticsearch.][11] -**注意**:默认情况下,Elasticsearch 在前台运行,这可能会导致计算机速度变慢。按 **Ctrl-C** 可以阻止 Elasticsearch 运行。 +**注意**:默认情况下,Elasticsearch 在前台运行,这可能会导致计算机速度变慢。按 `Ctrl-C` 可以阻止 Elasticsearch 运行。 ### 使用 GUI 运行 Elasticsearch -如果你更喜欢点击,你可以像这样运行 Elasticsearch: +如果你更喜欢点击操作,你可以像这样运行 Elasticsearch: - 1. 打开一个新的 **Finder** 窗口。 -  2. 在左侧 Finder 栏中选择 **Downloads**(如果你将 Elasticsearch 移动了另一个文件夹,请进入它)。 -  3. 打开名为 **elasticsearch-7.1.1** 的文件夹(对于此例)。出现了八个子文件夹。 +1、打开一个新的 **Finder** 窗口。 +2、在左侧 Finder 栏中选择 `Downloads`(如果你将 Elasticsearch 移动了另一个文件夹,请进入它)。 +3、打开名为 `elasticsearch-7.1.1` 的文件夹(对于此例)。出现了八个子文件夹。 ![The elasticsearch/bin menu.][12] - 4. 打开 **bin** 子文件夹。如上面的截图所示,此子文件夹中有 20 个文件。 -  5. 单击第一个文件,即 **elasticsearch**。 - - +4、打开 `bin` 子文件夹。如上面的截图所示,此子文件夹中有 20 个文件。 +  +5、单击第一个文件,即 `elasticsearch`。 请注意,你可能会收到安全警告,如下所示: ![The security warning dialog box.][13] -  +这时候要打开程序需要: -这时候要打开程序: - - 1. 在警告对话框中单击 **OK**。 -  2. 打开**系统偏好**。 -  3. 单击**安全和隐私**,打开如下窗口: - - - -![Where you can allow your computer to open the downloaded file.][14] - - 4. 单击**永远打开**,打开如下所示的确认对话框: - - - -![Security confirmation dialog box.][15] - - 5. 单击**打开**。会打开一个终端窗口并启动 Elasticsearch。 +1. 在警告对话框中单击 **OK**。 +2. 打开**系统偏好**。 +3. 单击**安全和隐私**,打开如下窗口: + ![Where you can allow your computer to open the downloaded file.][14] +4. 单击**永远打开**,打开如下所示的确认对话框: + ![Security confirmation dialog box.][15] +5. 单击**打开**。会打开一个终端窗口并启动 Elasticsearch。 启动过程可能需要一段时间,所以让它继续运行。最终,它将完成,你最后将看到类似这样的输出: @@ -115,7 +105,7 @@ Elasticsearch 创建还不到九年,但它是最受欢迎的企业搜索引擎 安装 Elasticsearch 之后,就可以开始探索了! -该工具的 [Elasticsearch:开始使用][17]指南会根据你的目标指导你。它的介绍视频介绍了在 [Elasticsearch Service][18] 上启动托管集群,执行基本搜索查询,通过创建,读取,更新和删除(CRUD)REST API等方式操作数据的步骤。 +该工具的 [Elasticsearch:开始使用][17]指南会根据你的目标指导你。它的介绍视频介绍了在 [Elasticsearch Service][18] 上启动托管集群,执行基本搜索查询,通过创建、读取、更新和删除(CRUD)REST API 等方式操作数据的步骤。 本指南还提供文档链接,开发控制台命令,培训订阅以及 Elasticsearch Service 的免费试用版。此试用版允许你在 AWS 和 GCP 上部署 Elastic 和 Kibana 以支持云中的 Elastic 集群。 @@ -128,7 +118,7 @@ via: https://opensource.com/article/19/7/installing-elasticsearch-macos 作者:[Lauren Maffeo][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 3858afc4090a06d12808e7b46d26583a78be5c9a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Jul 2019 06:49:34 +0800 Subject: [PATCH 057/951] PUB @geekpi https://linux.cn/article-11125-1.html --- .../20190711 How to install Elasticsearch on MacOS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190711 How to install Elasticsearch on MacOS.md (99%) diff --git a/translated/tech/20190711 How to install Elasticsearch on MacOS.md b/published/20190711 How to install Elasticsearch on MacOS.md similarity index 99% rename from translated/tech/20190711 How to install Elasticsearch on MacOS.md rename to published/20190711 How to install Elasticsearch on MacOS.md index 94485d0bad..b213d2bcd8 100644 --- a/translated/tech/20190711 How to install Elasticsearch on MacOS.md +++ b/published/20190711 How to install Elasticsearch on MacOS.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11125-1.html) [#]: subject: (How to install Elasticsearch on MacOS) [#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos) [#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins) From 3fe55a5d66ddbd9f633a5a946c5d5cef0d628e89 Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Sun, 21 Jul 2019 09:08:24 +0800 Subject: [PATCH 058/951] hankchow translating --- sources/tech/20190716 Save and load Python data with JSON.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190716 Save and load Python data with JSON.md b/sources/tech/20190716 Save and load Python data with JSON.md index 6400ab0cac..2245c64cc9 100644 --- a/sources/tech/20190716 Save and load Python data with JSON.md +++ b/sources/tech/20190716 Save and load Python data with JSON.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (HankChow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9cd83458e0ba2f6fae2d506201663c7b9f10a853 Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Sun, 21 Jul 2019 14:33:15 +0800 Subject: [PATCH 059/951] hankchow translated --- ...716 Save and load Python data with JSON.md | 134 ------------------ ...716 Save and load Python data with JSON.md | 134 ++++++++++++++++++ 2 files changed, 134 insertions(+), 134 deletions(-) delete mode 100644 sources/tech/20190716 Save and load Python data with JSON.md create mode 100644 translated/tech/20190716 Save and load Python data with JSON.md diff --git a/sources/tech/20190716 Save and load Python data with JSON.md b/sources/tech/20190716 Save and load Python data with JSON.md deleted file mode 100644 index 2245c64cc9..0000000000 --- a/sources/tech/20190716 Save and load Python data with JSON.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (HankChow) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Save and load Python data with JSON) -[#]: via: (https://opensource.com/article/19/7/save-and-load-data-python-json) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Save and load Python data with JSON -====== -The JSON format saves you from creating your own data formats, and is -particularly easy to learn if you already know Python. Here's how to use -it with Python. -![Cloud and databsae incons][1] - -[JSON][2] stands for JavaScript Object Notation. This format is a popular method of storing data in key-value arrangements so it can be parsed easily later. Don’t let the name fool you, though: You can use JSON in Python—not just JavaScript—as an easy way to store data, and this article demonstrates how to get started. - -First, take a look at this simple JSON snippet: - - -``` -{ -        "name":"tux", -        "health":"23", -        "level":"4" -} -``` - -That's pure JSON and has not been altered for Python or any other language. Yet if you’re familiar with Python, you might notice that this example JSON code looks an awful lot like a Python dictionary. In fact, the two are very similar: If you are comfortable with Python lists and dictionaries, then JSON is a natural fit for you. - -### Storing data in JSON format - -You might consider using JSON if your application needs to store somewhat complex data. While you may have previously resorted to custom text configuration files or data formats, JSON offers you structured, recursive storage, and Python’s JSON module offers all of the parsing libraries necessary for getting this data in and out of your application. So, you don’t have to write parsing code yourself, and other programmers don’t have to decode a new data format when interacting with your application. For this reason, JSON is easy to use, and ubiquitous. - -Here is some sample Python code using a dictionary within a dictionary: - - -``` -#!/usr/bin/env python3 - -import json - -# instantiate an empty dict -team = {} - -# add a team member -team['tux'] = {'health': 23, 'level': 4} -team['beastie'] = {'health': 13, 'level': 6} -team['konqi'] = {'health': 18, 'level': 7} -``` - -This code creates a Python dictionary called **team**. It’s empty initially (you can create one that's already populated, but that’s impossible if you don’t have the data to put into the dictionary yet). - -To add to the **dict** object, you create a key, such as **tux**, **beastie**, or **konqi** in the example code, and then provide a value. In this case, the value is _another_ dictionary full of player statistics. - -Dictionaries are mutable. You can add, remove, and update the data they contain as often as you please. This format is ideal storage for data that your application frequently uses. - -### Saving data in JSON format  - -If the data you’re storing in your dictionary is user data that needs to persist after the application quits, then you must write the data to a file on disk. This is where the JSON Python module comes in: - - -``` -with open('mydata.json', 'w') as f: -    json.dump(team, f) -``` - -This code block creates a file called **mydata.json** and opens it in write mode. The file is represented with the variable **f** (a completely arbitrary designation; you can use whatever variable name you like, such as **file**, **FILE**, **output**, or practically anything). Meanwhile, the JSON module’s **dump** function is used to dump the data from the **dict** into the data file. - -Saving data from your application is as simple as that, and the best part about this is that the data is structured and predictable. To see, take a look at the resulting file: - - -``` -$ cat mydata.json -{"tux": {"health": 23, "level": 4}, "beastie": {"health": 13, "level": 6}, "konqi": {"health": 18, "level": 7}} -``` - -### Reading data from a JSON file - -If you are saving data to JSON format, you probably want to read the data back into Python eventually. To do this, use the Python JSON module’s **json.load** function: - - -``` -#!/usr/bin/env python3 - -import json - -f = open('mydata.json') -team = json.load(f) - -print(team['tux']) -print(team['tux']['health']) -print(team['tux']['level']) - -print(team['beastie']) -print(team['beastie']['health']) -print(team['beastie']['level']) - -# when finished, close the file -f.close() -``` - -This function implements the inverse, more or less, of saving the file: an arbitrary variable (**f**) represents the data file, and then the JSON module’s **load** function dumps the data from the file into the arbitrary **team** variable. - -The **print** statements in the code sample demonstrate how to use the data. It can be confusing to compound **dict** key upon **dict** key, but as long as you are familiar with your own dataset, or else can read the JSON source to get a mental map of it, the logic makes sense. - -Of course, the **print** statements don’t have to be hard-coded. You could rewrite the sample application using a **for** loop: - - -``` -for i in team.values(): -    print(i) -``` - -### Using JSON - -As you can see, JSON integrates surprisingly well with Python, so it’s a great format when your data fits in with its model. JSON is flexible and simple to use, and learning one basically means you’re learning the other, so consider it for data storage the next time you’re working on a Python application. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/save-and-load-data-python-json - -作者:[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/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) -[2]: https://json.org diff --git a/translated/tech/20190716 Save and load Python data with JSON.md b/translated/tech/20190716 Save and load Python data with JSON.md new file mode 100644 index 0000000000..456cfc9fd5 --- /dev/null +++ b/translated/tech/20190716 Save and load Python data with JSON.md @@ -0,0 +1,134 @@ +[#]: collector: (lujun9972) +[#]: translator: (HankChow) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Save and load Python data with JSON) +[#]: via: (https://opensource.com/article/19/7/save-and-load-data-python-json) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + + +使用 Python 处理 JSON 格式数据 +====== +如果你不希望从头开始创造一种数据格式来存放数据,JSON 是一个很好的选择。如果你对 Python 有所了解,就更加事半功倍了。下面就来介绍一下如何使用 Python 处理 JSON 数据。 +![Cloud and databsae incons][1] + +[JSON][2] 的全称是 JavaScript 对象表示法Object Notation。这是一种以键值对的形式存储数据的格式,并且很容易解析,因而成为了一种被广泛使用的数据格式。另外,不要因为 JSON 名称而望文生义,JSON 并不仅仅在 JavaScript 中使用,它也可以在其它语言中使用。下文会介绍它是如何在 Python 中使用的。 + +首先我们给出一个 JSON 示例: + + +``` +{ + "name":"tux", + "health":"23", + "level":"4" +} +``` + +上面是一个和编程语言无关的原生 JSON 数据。熟悉 Python 的人会看出来这个 JSON 数据跟 Python 中的字典dictionary长得很像。而这两者之间确实非常相似,如果你对 Python 中的列表和字典数据结构有一定的理解,那么 JSON 理解起来也不难。 + +### 使用字典存放数据 + +如果你的应用需要存储一些结构复杂的数据,不妨考虑使用 JSON 格式。对比你可能曾经用过的自定义格式的文本配置文件,JSON 提供了更加结构化的可递归的存储格式。同时,Python 自带的 `json` 模块已经提供了可以将 JSON 数据导入/导出应用时所需的所有解析库。因此,你不需要针对 JSON 自行编写代码用于解析,而其他开发人员在与你的应用进行数据交互的时候也不需要去解析新的数据格式。正是这个原因,JSON 在数据交换时被广泛地采用了。 + +以下是一段在 Python 中使用嵌套字典的代码: + + +``` +#!/usr/bin/env python3 + +import json + +# instantiate an empty dict +team = {} + +# add a team member +team['tux'] = {'health': 23, 'level': 4} +team['beastie'] = {'health': 13, 'level': 6} +team['konqi'] = {'health': 18, 'level': 7} +``` + +这段代码声明了一个名为 `team` 的字典,并初始化为一个空字典。 + +如果要给这个字典添加内容,首先需要创建一个键,例如上面示例中的 `tux`、`beastie`、`konqi`,然后为这些键一一提供对应的值。上面示例中的值由一个个包含游戏玩家信息的字典充当。 + +字典是一种可变的变量。字典中的数据可以随时添加、删除或更新。这样的特性使得字典成为了应用程序存储数据的极好选择。 + +### 使用 JSON 格式存储数据 + +如果存放在字典中的数据需要被持久性存储,这些数据就需要写到文件当中。这个时候就需要用到 Python 中的 `json` 模块了: + + +``` +with open('mydata.json', 'w') as f: + json.dump(team, f) +``` + +上面的代码首先创建了一个名为 `mydata.json` 的文件,然后以写模式打开了这个文件,这个被打开的文件以变量 `f` 表示(当然也可以用任何你喜欢的名称,例如 `file`、`output` 等)。而 `json` 模块中的 `dump()` 方法则是用于将一个字典输出到一个文件中。 + +从应用中导出数据就是这么简单,同时这些导出的数据是结构化的、可理解的。现在可以查看导出的数据: + + +``` +$ cat mydata.json +{"tux": {"health": 23, "level": 4}, "beastie": {"health": 13, "level": 6}, "konqi": {"health": 18, "level": 7}} +``` + +### 从 JSON 文件中读取数据 + +如果已经将数据以 JSON 格式导出到文件中了,也有可能需要将这些数据读回到应用中去。这个时候,可以使用 Python `json` 模块中的 `load()` 方法: + + +``` +#!/usr/bin/env python3 + +import json + +f = open('mydata.json') +team = json.load(f) + +print(team['tux']) +print(team['tux']['health']) +print(team['tux']['level']) + +print(team['beastie']) +print(team['beastie']['health']) +print(team['beastie']['level']) + +# when finished, close the file +f.close() +``` + +这个方法实现了和保存文件大致相反的操作。使用一个变量 `f` 来表示打开了的文件,然后使用 `json` 模块中的 `load()` 方法读取文件中的数据并存放到 `team` 变量中。 + +其中的 `print()` 展示了如何查看读取到的数据。在过于复杂的字典中迭代调用字典键的时候有可能会稍微转不过弯来,但只要熟悉整个数据的结构,就可以慢慢摸索出其中的逻辑。makes sense. + +当然,这里使用 `print()` 的方式太不灵活了。你可以将其改写成使用 for 循环的形式: + + +``` +for i in team.values(): + print(i) +``` + +### 使用 JSON + +如上所述,在 Python 中可以很轻松地处理 JSON 数据。因此只要你的数据符合 JSON 的模式,就可以选择使用 JSON。JSON 非常灵活易用,下次使用 Python 的时候不妨尝试一下。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/save-and-load-data-python-json + +作者:[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/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) +[2]: https://json.org From f30c534a2f38bd12a43415462513a3b561f1cd1b Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Sun, 21 Jul 2019 14:34:25 +0800 Subject: [PATCH 060/951] hankchow translated --- translated/tech/20190716 Save and load Python data with JSON.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20190716 Save and load Python data with JSON.md b/translated/tech/20190716 Save and load Python data with JSON.md index 456cfc9fd5..f2bf9c0e71 100644 --- a/translated/tech/20190716 Save and load Python data with JSON.md +++ b/translated/tech/20190716 Save and load Python data with JSON.md @@ -123,7 +123,7 @@ via: https://opensource.com/article/19/7/save-and-load-data-python-json 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[HankChow](https://github.com/HankChow) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c45f9d810a13cfd5e8b2827d2d69497ea9e80d0e Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Sun, 21 Jul 2019 15:26:33 +0800 Subject: [PATCH 061/951] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?20190718=20What=20you=20need=20to=20know=20to=20be=20a=20sysadm?= =?UTF-8?q?in.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 20190718 What you need to know to be a sysadmin.md --- sources/tech/20190718 What you need to know to be a sysadmin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190718 What you need to know to be a sysadmin.md b/sources/tech/20190718 What you need to know to be a sysadmin.md index 55947b8456..bd482f3ca4 100644 --- a/sources/tech/20190718 What you need to know to be a sysadmin.md +++ b/sources/tech/20190718 What you need to know to be a sysadmin.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (WangYueScream ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From ac70da9e3ecab17431dd2e4d8595f29756fe2eb2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 20:04:51 +0800 Subject: [PATCH 062/951] PRF @geekpi --- ...ktop Client for ProtonMail and Tutanota.md | 62 +++++++++---------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md index 2f60c4ad7b..d534c5d44b 100644 --- a/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md +++ b/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md @@ -1,64 +1,62 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) [#]: via: (https://itsfoss.com/electronmail/) [#]: author: (John Paul https://itsfoss.com/author/john/) -ElectronMail - ProtonMail 和 Tutanota 的桌面客户端 +ElectronMail:ProtonMail 和 Tutanota 的桌面客户端 ====== -互联网上的大多数人都拥有来自 Google 等大公司的电子邮件帐户,但这些帐户不尊重你的隐私。值得庆幸的是,目前有 [Tutanota][1] 和 [ProtonMail][2] 等隐私良心替代品。问题是并非所有人都有桌面客户端。今天,我们将研究一个为你解决该问题的项目。我们来看看 ElectronMail 吧。 +互联网上的大多数人都拥有来自 Google 等大公司的电子邮件帐户,但这些帐户不尊重你的隐私。值得庆幸的是,目前有 [Tutanota][1] 和 [ProtonMail][2] 等具有隐私意识的替代品。问题是并非所有人都有桌面客户端。今天,我们将研究一个为你解决该问题的项目。我们来看看 ElectronMail 吧。 -‘Electron’-ic 警告! +> ‘Electron’ 警告! -以下应用是使用 Electron 构建的(也就是名为 ElectronMail 的原因之一)。如果使用 Electron 让你感到不安,请将此视为触发警告。 +> 以下应用是使用 Electron 构建的(也就是名为 ElectronMail 的原因之一)。如果使用 Electron 让你感到不安,请将此视为触发警告。 ### ElectronMail:Tutanota 和 ProtonMail 的桌面客户端 ![Electron Mail About][3] -[ElectronMail][4] 简单地为 ProtonMail 和 Tutanota 设置了一个电子邮件客户端。它使用三大技术构建:[Electron][5]、[TypeScript][6] 和 [Angular][7]。它包括以下功能: +[ElectronMail][4] 可以简单地视作 ProtonMail 和 Tutanota 的电子邮件客户端。它使用三大技术构建:[Electron][5]、[TypeScript][6] 和 [Angular][7]。它包括以下功能: - * 每个电子邮件提供商提供多帐户支持 -  * 加密本地存储 -  * 适用于 Linux、Windows、macOS 和 FreeBSD -  * 原生通知 -  * 系统托盘图标,包含未读消息总数 -  * 主密码保护帐户信息 -  * 可切换的视图布局 -  * 离线访问电子邮件 -  * 电子邮件本地加密存储 -  * 批量导出电子邮件为 EML 文件 -  * 全文搜索 -  * 内置/预打包的 Web 客户端 -  * 为每个帐户配置代理 -  * 拼写检查 -  * 支持双因素身份验证,以提高安全性 +* 针对每个电子邮件提供商提供多帐户支持 +* 加密本地存储 +* 适用于 Linux、Windows、macOS 和 FreeBSD +* 原生通知系统 +* 带有未读消息总数的系统托盘图标 +* 用主密码保护帐户信息 +* 可切换的视图布局 +* 可离线访问电子邮件 +* 电子邮件在本地加密存储 +* 批量导出电子邮件为 EML 文件 +* 全文搜索 +* 内置/预打包的 Web 客户端 +* 可以为每个帐户配置代理 +* 拼写检查 +* 支持双因素身份验证,以提高安全性 +目前,ElectronMail 仅支持 Tutanota 和 ProtonMail。我觉得他们将来会增加更多。根据 [GitHub 页面][4]:“多电子邮件提供商支持。目前支持 ProtonMail 和 Tutanota。” - -目前,ElectronMail 仅支持 Tutanota 和 ProtonMail。我觉得他们将来会增加更多。根据 [GitHub 页面][4]:“多电子邮件提供商支持。 目前支持 ProtonMail 和 Tutanota 目前。“ - -ElectronMail 目前是 MIT 许可。 +ElectronMail 目前是 MIT 许可证。 #### 如何安装 ElectronMail -目前,有几种方法可以在 Linux 上安装 ElectronMail。对于Arch 和基于 Arch 的发行版,你可以从 [Arch 用户仓库]​[8]安装它。ElectrionMail 还有一个 Snap 包。要安装它,只需输入 `sudo snap install electron-mail` 即可。 +目前,有几种方法可以在 Linux 上安装 ElectronMail。对于Arch 和基于 Arch 的发行版,你可以从[Arch 用户仓库][8]安装它。ElectrionMail 还有一个 Snap 包。要安装它,只需输入 `sudo snap install electron-mail` 即可。 对于所有其他 Linux 发行版,你可以[下载][9] `.deb` 或 `.rpm` 文件。 ![Electron Mail Inbox][10] -你也可以[下载] [9]用于 Windows 中的 `.exe` 安装程序或用于 macOS 的 `.dmg` 文件。甚至还有 FreeBSD 文件。 +你也可以[下载][9]用于 Windows 中的 `.exe` 安装程序或用于 macOS 的 `.dmg` 文件。甚至还有给 FreeBSD 用的文件。 #### 删除 ElectronMail 如果你安装了 ElectronMail 并确定它不适合你,那么[开发者][12]建议采用几个步骤。 **在卸载应用之前,请务必遵循以下步骤。** -如果你使用了“保持登录”功能,请单击菜单上的“注销”。这将删除本地保存的主密码。卸载 ElectronMail 后可以删除主密码,但这涉及编辑系统密钥链。 +如果你使用了“保持登录”功能,请单击菜单上的“注销”。这将删除本地保存的主密码。卸载 ElectronMail 后也可以删除主密码,但这涉及编辑系统密钥链。 你还需要手动删除设置文件夹。在系统托盘中选择应用图标后,单击“打开设置文件夹”可以找到它。 @@ -68,11 +66,11 @@ ElectronMail 目前是 MIT 许可。 我通常不使用电子邮件客户端。事实上,我主要依赖于 Web 客户端。所以,这个应用对我没太大用处。 -话虽这么说,但是 ElectronMail 看着不错,而且很容易设置。它有大量开箱即用的功能,并且高级功能并不难激活。 +话虽这么说,但是 ElectronMail 看着不错,而且很容易设置。它有大量开箱即用的功能,并且高级功能并不难使用。 我遇到的一个问题与搜索有关。根据功能列表,ElectronMail 支持全文搜索。但是,Tutanota 的免费版本仅支持有限的搜索。我想知道 ElectronMail 如何处理这个问题。 -最后,ElectronMail 只是一个基于 Web Enail 的一个 Electron 封装。我宁愿在浏览器中打开它们,而不是将单独的系统资源用于运行 Electron。如果你只[使用 Tutanota,他们有自己官方的 Electron 桌面客户端][14]。你可以尝试一下。 +最后,ElectronMail 只是一个基于 Web Email 的一个 Electron 封装。我宁愿在浏览器中打开它们,而不是将单独的系统资源用于运行 Electron。如果你只[使用 Tutanota,他们有自己官方的 Electron 桌面客户端][14]。你可以尝试一下。 我最大的问题是安全性。这是两个非常安全的电子邮件应用的非官方应用。如果有办法捕获你的登录信息或阅读你的电子邮件怎么办?比我聪明的人必须通过源代码才能确定。这始终是一个安全项目的非官方应用的问题。 @@ -87,7 +85,7 @@ via: https://itsfoss.com/electronmail/ 作者:[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/) 荣誉推出 @@ -104,5 +102,5 @@ via: https://itsfoss.com/electronmail/ [9]: https://github.com/vladimiry/ElectronMail/releases [10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1 [12]: https://github.com/vladimiry -[14]: https://itsfoss.com/tutanota-desktop/ +[14]: https://linux.cn/article-10688-1.html [15]: http://reddit.com/r/linuxusersgroup From 83e4d6df0bb5db4ba123cdd3d8bd5af64124ad9c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 20:05:16 +0800 Subject: [PATCH 063/951] PUB @geekpi https://linux.cn/article-11128-1.html --- ...tronMail - a Desktop Client for ProtonMail and Tutanota.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md (98%) diff --git a/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md similarity index 98% rename from translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md rename to published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md index d534c5d44b..b59148825d 100644 --- a/translated/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md +++ b/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11128-1.html) [#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) [#]: via: (https://itsfoss.com/electronmail/) [#]: author: (John Paul https://itsfoss.com/author/john/) From 202beb8dfe67cafc3fb30d6d16136ff7bb1d6b71 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 20:56:18 +0800 Subject: [PATCH 064/951] PRF @heguangzhi --- ... a lifelong learner and succeed at work.md | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/translated/tech/20190716 Become a lifelong learner and succeed at work.md b/translated/tech/20190716 Become a lifelong learner and succeed at work.md index cf02891184..2725f93ac4 100644 --- a/translated/tech/20190716 Become a lifelong learner and succeed at work.md +++ b/translated/tech/20190716 Become a lifelong learner and succeed at work.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (heguangzhi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Become a lifelong learner and succeed at work) @@ -11,50 +11,47 @@ 成为终身学习者,并在工作中取得成功 ====== -在具有适应性文化的开放组织中,学习应该一直持续——不会总是在正式场合发生。我们真的明白它是如何工作的吗? +> 在具有适应性文化的开放组织中,学习应该一直持续 —— 但不会总是出现在正式场合。我们真的明白它是如何工作的吗? ![Writing in a notebook][1] -持续学习是指人们为发展自己而进行的持续的、职业驱动的、有意识的学习过程。对于那些认为自己是持续学习者的人来说,学习从未停止——这些人从日常经历中看到学习机会。与同事进行辩论、反思反馈、在互联网上寻找问题的解决方案、尝试新事物或冒险都是一个人在工作中可以进行的非正式学习活动的例子。 - +持续学习是指人们为发展自己而进行的持续的、职业驱动的、有意识的学习过程。对于那些自认是持续学习者的人来说,学习从未停止 —— 这些人从日常经历中看到学习机会。与同事进行辩论、反思反馈、在互联网上寻找问题的解决方案、尝试新事物或冒险都是一个人在工作中可以进行的非正式学习活动的例子。 持续学习是开放组织中任何人的核心能力。毕竟,开放的组织是建立在同行相互思考、争论和行动的基础上的。在开放组织的模棱两可、话语驱动的世界中茁壮成长,每天都需要员工具备这些技能。 -不幸的是,科学文献在传播我们在工作中学习的知识方面,帮助个人欣赏和发展自己的学习能力方面,做得很差。因此,在本文系列中,我将向您介绍非正式学习,并帮助您理解将学习视为一种技能如何帮助您在任何组织中茁壮成长,尤其是在开源组织中。 +不幸的是,科学文献在传播我们在工作中学习的知识方面、帮助个人欣赏和发展自己的学习能力方面,做得很差。因此,在本文系列中,我将向你介绍非正式学习,并帮助你理解将学习视为一种技能会如何帮助你在任何组织中茁壮成长,尤其是在开放式组织中。 ### 为什么这么正式? -迄今为止,对组织中学习的科学研究主要集中在正式学习而不是非正式学习的设计、实施和评估上。 +迄今为止,对组织中学习的科学研究主要集中在正式学习而不是非正式学习的设计、交付和评估上。 -投资于员工知识、技能和能力的发展是一个组织保持其相对于竞争对手优势的重要方式。组织通过创建或购买课程、在线课程、研讨会等来提供正式确定学习机会。意在指导个人学习与工作相关的内容,就像学校里的一节课。对于一个组织来说,提供一门课程是一种简单(如果昂贵的话)的方法,可以确保其员工的技能或知识保持最新。同样,教室环境是研究人员的天然实验室,使得基于培训的研究和工作不仅可能,而且强大。 +投资于员工知识、技能和能力的发展是一个组织保持其相对于竞争对手优势的重要方式。组织通过创建或购买课程、在线课程、研讨会等来使学习机会正规化。这些课程旨在像个人传授与工作相关的内容,就像学校里的班级一样。对于一个组织来说,提供一门课程是一种简单(如果成本高昂的话)的方法,可以确保其员工的技能或知识保持最新。同样,教室环境是研究人员的天然实验室,使得基于培训的研究和工作不仅可能,而且强大。 -最近的评估表明,70%到80%的工作相关知识不是在培训中学到的,而是非正式的在职学习中得到的。 - -当然,人们不需要训练来学习一些东西;通常,人们通过研究答案、与同事交谈、思考、实验或适应变化来学习。事实上,[最近的评估表明][2]70%到80%的与工作相关的知识不是在培训中学到的,而是在工作中非正式学到的。这并不是说正式培训无效;培训可能非常有效,但它是一种精确的干预方式。在工作的大部分方面正式培训一个人是不现实的,尤其是当这些工作变得更加复杂的时候。 +当然,有些东西人们不需要培训来学习;通常,人们通过研究答案、与同事交谈、思考、实验或适应变化来学习。事实上,[最近的评估表明][2] 70% 到 80% 的与工作相关的知识不是在培训中学到的,而是在工作中非正式学到的。这并不是说正规的培训无效;培训可能非常有效,但它是一种精确的干预方式。在工作的大部分方面正式培训一个人是不现实的,尤其是当这些工作变得更加复杂的时候。 因此,非正式学习,或者任何发生在结构化学习环境之外的学习,对工作场所来说是极其重要的。事实上,[最近的科学证据][3]表明,非正式学习比正式培训更能预测工作表现。 -那么,为什么组织和科学界如此关注培训呢? +那么,为什么机构和科学界如此关注培训呢? ### 循环过程 -除了我前面提到的原因,研究非正式学习可能非常困难。与正式学习不同,非正式学习发生在非结构化环境中,高度依赖于个人,很难或不可能观察并研究。 +除了我前面提到的原因,研究非正式学习可能非常困难。与正式学习不同,非正式学习发生在非结构化环境中,高度依赖于个人,很难或不可能观察到。 直到最近,大多数关于非正式学习的研究都集中在定义非正式学习的合格特征和确定非正式学习在理论上是如何与工作经验联系在一起的。研究人员描述了一个[动态的周期性过程][4],通过这个过程,个人可以在组织中非正式地学习。 与正式学习一样,非正式学习发生在非结构化环境中,高度依赖于个人,很难或不可能观察。 -在这个过程中,个人和组织都有创造学习机会的机构。例如,一个人可能对学习某样东西感兴趣,并为此表现出学习行为。组织以反馈的形式传递给个人,可能表明需要学习。这可能是一个糟糕的绩效评估,一个在项目中发表的评论,或者一个不是个人指导的组织环境的更广泛的变化。这些力量在组织环境中(例如,有人尝试了一个新想法,他或她的同事认识到并奖励了这种行为)或者通过在个人的头脑中反思(例如,有人反思了关于他或她的表现的,并决定在学习工作中付出更多的努力)。与培训不同,非正式学习不遵循正式的线性过程。一个人可以在任何时候体验过程的任何部分,同时体验过程的多个部分。 +在这个过程中,个人和组织都有创造学习机会的机构。例如,一个人可能对学习某样东西感兴趣,并为此表现出学习行为。组织以向个人提供反馈的形式,可能表明需要学习。这可能是一个糟糕的绩效评估、一个在项目中发表的评论、或者一个不是个人指导的组织环境的更广泛的变化。这些力量在组织环境中(例如,有人尝试了一个新想法,他或她的同事认识到并奖励了这种行为)或者通过在个人的头脑中反思(例如,有人反思了关于他或她的表现的,并决定在学习工作中付出更多的努力)。与培训不同,非正式学习不遵循正式的线性过程。个人可以随时体验过程的任何部分,同时体验过程的多个部分。 ### 开放组织中的非正式学习 -具体而言,在开放组织中,对等级制度的重视程度降低,对参与式文化的重视程度提高,这两者都推动了这种非正式的学习。简而言之,开放的组织只是为个人和组织环境提供了更多互动和激发学习的机会。此外,想法和变革需要开放组织中员工更广泛的认同——而认同需要对他人的适应性和洞察力的欣赏。 +具体而言,在开放组织中,既减少了对等级制度的重视程度,又更加注重对参与式文化的重视程度,这两者都推动了这种非正式的学习。简而言之,开放式组织只是为个人和组织环境提供了更多互动和激发学习的机会。此外,想法和变革需要开放式组织中员工给予更广泛的认同 —— 而认同需要对他人的适应性和洞察力的欣赏。 -也就是说,仅仅增加学习机会并不能保证学习会发生或成功。有人甚至可能会说,开放组织中常见的模糊性和开放性话语可能会阻止不擅长持续学习的人——再一次,随着时间的推移学习的习惯和开放组织的核心能力——尽可能有效地为组织做出贡献。 +也就是说,仅仅增加学习机会并不能保证学习会发生或成功。有人甚至可能会说,开放式组织中常见的模糊性和公开性话语可能会阻止不擅长持续学习的人——同样,随着时间的推移学习的习惯和开放式组织的核心能力——尽可能有效地为组织做出贡献。 -解决这些问题需要一种以一致的方式跟踪非正式学习。最近,科学界呼吁创造衡量非正式学习的方法,这样就可以进行系统的研究来解决非正式学习的前因后果的问题。我自己的研究集中在这一呼吁上,我花了几年时间发展和完善我们对非正式学习行为的理解,以便对它们进行测量。 +解决这些问题需要一种以一致的方式跟踪非正式学习。最近,科学界呼吁创造衡量非正式学习的方法,这样就可以进行系统的研究来解决非正式学习的前因后果的问题。我自己的研究集中在这一呼吁上,我花了几年时间发展和完善我们对非正式学习行为的理解,以便可以衡量它们。 -在本文系列的第二部分,我将重点介绍我最近在一个开放组织中进行的一项研究的成果,在该研究中,我测试了我对非正式学习行为的研究,并将它们与更广泛的工作环境和个人工作成果联系起来。 +在本文系列的第二部分,我将重点介绍我最近在一个开放式组织中进行的一项研究的成果,在该研究中,我测试了我对非正式学习行为的研究,并将它们与更广泛的工作环境和个人工作成果联系起来。 -------------------------------------------------------------------------------- @@ -62,8 +59,8 @@ via: https://opensource.com/open-organization/19/7/informal-learning-adaptabilit 作者:[Colin Willis][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/heguangzhi) -校对:[校对者ID](https://github.com/校对者ID) +译者:[heguangzhi](https://github.com/heguangzhi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 02f535c71cc6485041ffb388448da2b3c9032a5a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 20:56:41 +0800 Subject: [PATCH 065/951] PUB @heguangzhi https://linux.cn/article-11130-1.html --- .../20190716 Become a lifelong learner and succeed at work.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190716 Become a lifelong learner and succeed at work.md (98%) diff --git a/translated/tech/20190716 Become a lifelong learner and succeed at work.md b/published/20190716 Become a lifelong learner and succeed at work.md similarity index 98% rename from translated/tech/20190716 Become a lifelong learner and succeed at work.md rename to published/20190716 Become a lifelong learner and succeed at work.md index 2725f93ac4..c9906592db 100644 --- a/translated/tech/20190716 Become a lifelong learner and succeed at work.md +++ b/published/20190716 Become a lifelong learner and succeed at work.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (heguangzhi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11130-1.html) [#]: subject: (Become a lifelong learner and succeed at work) [#]: via: (https://opensource.com/open-organization/19/7/informal-learning-adaptability) [#]: author: (Colin Willis https://opensource.com/users/colinwillishttps://opensource.com/users/marcobravo) From 4253e4a2208e163874a363d14f6e7517af41a368 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 23:35:09 +0800 Subject: [PATCH 066/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @hopefully2333 原文逻辑不通,我做了段落调整 --- ...stall Security Updates on Debian-Ubuntu.md | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/translated/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md b/translated/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md index 4e76fd235f..b441aa9f68 100644 --- a/translated/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md +++ b/translated/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (hopefully2333) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Manually Install Security Updates on Debian/Ubuntu?) @@ -10,13 +10,11 @@ 如何在 Debian/Ubuntu 上手动安装安全更新? ====== -在 Linux 上通过命令行安装一个包程序是一件简单的事。 - -在一行命令中组合使用多个命令能让你更加简单地完成任务。 +在 Linux 上通过命令行安装一个包程序是一件简单的事。在一行命令中组合使用多个命令能让你更加简单地完成任务。 安全更新也同样如此。 -在这个教程里面,我们会向你展示如何查看可用的安全更新,以及如何在 Ubuntu,LinuxMint 等等这些基于 Debian 的系统中安装它们。 +在这个教程里面,我们会向你展示如何查看可用的安全更新,以及如何在 Ubuntu、LinuxMint 等等这些基于 Debian 的系统中安装它们。 有三种方法可以完成这件事,下面会详细地描述这三种方法。 @@ -24,25 +22,23 @@ 如果你因为一些应用的依赖问题不能解决,导致不能给所有的系统进行全部更新。那至少,你应该打上安全补丁来让你的系统 100% 符合要求。 -### 如何在 Debian/Ubuntu 上安装 unattended-upgrades? - -默认情况下,你的系统上应该是已经安装了 unattended-upgrades 包的。但是如果你的系统没有装这个包,那么请使用下面的命令来安装它。 - -使用 **[APT-GET 命令][1]** 或者 **[APT 命令][2]** 来安装 unattended-upgrades 包. - -``` -$ sudo apt-get install unattended-upgrades -or -$ sudo apt install unattended-upgrades -``` - ### 方法一:如何检查 Debian/Ubuntu 中是否有任何可用的安全更新? 在进行补丁安装之前,检查可用安全更新列表始终是一个好习惯。它会为你提供将在你的系统中进行更新的软件包的列表。 +默认情况下,你的系统上应该是已经安装了 `unattended-upgrades` 包的。但是如果你的系统没有装这个包,那么请使用下面的命令来安装它。 + +使用 [APT-GET 命令][1] 或者 [APT 命令][2] 来安装 `unattended-upgrades` 包。 + +``` +$ sudo apt-get install unattended-upgrades +或 +$ sudo apt install unattended-upgrades +``` + **什么是试运行?** 大多数的 Linux 命令都有一个试运行选项,它会给出实际的输出但不会下载或安装任何东西。 -为此,你需要在 unattended-upgrades 命令中添加 --dry-run 选项。 +为此,你需要在 `unattended-upgrades` 命令中添加 `--dry-run` 选项。 ``` $ sudo unattended-upgrade --dry-run -d @@ -101,9 +97,9 @@ vim-tiny xxd ``` -如果在终端里,上面的命令输出说 **“No packages found that can be upgraded unattended and no pending auto-removals”** , 这意味着你的系统已经是最新的了。 +如果在终端里,上面的命令输出说 “No packages found that can be upgraded unattended and no pending auto-removals”,这意味着你的系统已经是最新的了。 -### 如何在 Debian/Ubuntu 中安装可用的安全更新? +#### 如何在 Debian/Ubuntu 中安装可用的安全更新? 如果你在上面的命令输出中获得了任意的软件包更新,就运行下面的命令来安装它们。 @@ -111,7 +107,7 @@ xxd $ sudo unattended-upgrade -d ``` -除此之外,你也可以使用 apt-get 命令来进行安装。但是这个方法有点棘手,我会建议用户用第一个选项。 +除此之外,你也可以使用 `apt-get` 命令来进行安装。但是这个方法有点棘手,我会建议用户用第一个选项。 ### 方法二:如何使用 apt-get 命令在 Debian/Ubuntu 中检查是否有可用的安全更新? @@ -160,7 +156,7 @@ Inst gcc [4:7.3.0-3ubuntu2.1] (4:7.4.0-1ubuntu2.3 Ubuntu:18.04/bionic-updates, U Inst g++ [4:7.3.0-3ubuntu2.1] (4:7.4.0-1ubuntu2.3 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64]) ``` -### 如何使用 apt-get 命令在 Debian/Ubuntu 系统中安装可用的安全更新? +#### 如何使用 apt-get 命令在 Debian/Ubuntu 系统中安装可用的安全更新? 如果你在上面命令的输出中发现任何的软件包更新。就运行下面的命令来安装它们。 @@ -168,7 +164,7 @@ Inst g++ [4:7.3.0-3ubuntu2.1] (4:7.4.0-1ubuntu2.3 Ubuntu:18.04/bionic-updates, U $ sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs apt-get install ``` -除此之外,也可以使用 apt 命令来完成。但是这个方法有点棘手,我会建议用户用第一个选项。 +除此之外,也可以使用 `apt` 命令来完成。但是这个方法有点棘手,我会建议用户用第一个方式。 ### 方法三:如何使用 apt 命令在 Debian/Ubuntu 系统中检查是否有可用的安全更新? @@ -217,7 +213,7 @@ vim-tiny/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 [upgradable xxd/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 [upgradable from: 2:8.0.1453-1ubuntu1] ``` -### 如何在 Debian/Ubuntu 系统中使用 apt 命令来安装可用的安全更新? +#### 如何在 Debian/Ubuntu 系统中使用 apt 命令来安装可用的安全更新? 如果你在上面命令的输出中发现任何的软件包更新。就运行下面的命令来安装它们。 @@ -241,7 +237,7 @@ via: https://www.2daygeek.com/manually-install-security-updates-ubuntu-debian/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] 译者:[hopefully2333](https://github.com/hopefully2333) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From db63f2d1e8193a386f244c9684aeecbb9e61b815 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 23:35:43 +0800 Subject: [PATCH 067/951] PUB @hopefully2333 https://linux.cn/article-11132-1.html --- ...w to Manually Install Security Updates on Debian-Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md (99%) diff --git a/translated/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md b/published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md similarity index 99% rename from translated/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md rename to published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md index b441aa9f68..600598ce4c 100644 --- a/translated/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md +++ b/published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (hopefully2333) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11132-1.html) [#]: subject: (How to Manually Install Security Updates on Debian/Ubuntu?) [#]: via: (https://www.2daygeek.com/manually-install-security-updates-ubuntu-debian/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) From 3855dbfef9e4fe78af35da96d37caca0967eb68b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 23:56:05 +0800 Subject: [PATCH 068/951] PRF @HankChow --- ...716 Save and load Python data with JSON.md | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/translated/tech/20190716 Save and load Python data with JSON.md b/translated/tech/20190716 Save and load Python data with JSON.md index f2bf9c0e71..18c00a038a 100644 --- a/translated/tech/20190716 Save and load Python data with JSON.md +++ b/translated/tech/20190716 Save and load Python data with JSON.md @@ -1,28 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Save and load Python data with JSON) [#]: via: (https://opensource.com/article/19/7/save-and-load-data-python-json) [#]: author: (Seth Kenlon https://opensource.com/users/seth) - -使用 Python 处理 JSON 格式数据 +使用 Python 处理 JSON 格式的数据 ====== -如果你不希望从头开始创造一种数据格式来存放数据,JSON 是一个很好的选择。如果你对 Python 有所了解,就更加事半功倍了。下面就来介绍一下如何使用 Python 处理 JSON 数据。 + +> 如果你不希望从头开始创造一种数据格式来存放数据,JSON 是一个很好的选择。如果你对 Python 有所了解,就更加事半功倍了。下面就来介绍一下如何使用 Python 处理 JSON 数据。 + ![Cloud and databsae incons][1] -[JSON][2] 的全称是 JavaScript 对象表示法Object Notation。这是一种以键值对的形式存储数据的格式,并且很容易解析,因而成为了一种被广泛使用的数据格式。另外,不要因为 JSON 名称而望文生义,JSON 并不仅仅在 JavaScript 中使用,它也可以在其它语言中使用。下文会介绍它是如何在 Python 中使用的。 +[JSON][2] 的全称是 JavaScript 对象表示法JavaScript Object Notation。这是一种以键值对的形式存储数据的格式,并且很容易解析,因而成为了一种被广泛使用的数据格式。另外,不要因为 JSON 名称而望文生义,JSON 并不仅仅在 JavaScript 中使用,它也可以在其它语言中使用。下文会介绍它是如何在 Python 中使用的。 首先我们给出一个 JSON 示例: - ``` { - "name":"tux", - "health":"23", - "level":"4" + "name":"tux", + "health":"23", + "level":"4" } ``` @@ -30,11 +30,10 @@ ### 使用字典存放数据 -如果你的应用需要存储一些结构复杂的数据,不妨考虑使用 JSON 格式。对比你可能曾经用过的自定义格式的文本配置文件,JSON 提供了更加结构化的可递归的存储格式。同时,Python 自带的 `json` 模块已经提供了可以将 JSON 数据导入/导出应用时所需的所有解析库。因此,你不需要针对 JSON 自行编写代码用于解析,而其他开发人员在与你的应用进行数据交互的时候也不需要去解析新的数据格式。正是这个原因,JSON 在数据交换时被广泛地采用了。 +如果你的应用需要存储一些结构复杂的数据,不妨考虑使用 JSON 格式。对比你可能曾经用过的自定义格式的文本配置文件,JSON 提供了更加结构化的可递归的存储格式。同时,Python 自带的 `json` 模块已经提供了可以将 JSON 数据导入/导出应用时所需的所有解析库。因此,你不需要针对 JSON 自行编写代码进行解析,而其他开发人员在与你的应用进行数据交互的时候也不需要去解析新的数据格式。正是这个原因,JSON 在数据交换时被广泛地采用了。 以下是一段在 Python 中使用嵌套字典的代码: - ``` #!/usr/bin/env python3 @@ -57,8 +56,7 @@ team['konqi'] = {'health': 18, 'level': 7} ### 使用 JSON 格式存储数据 -如果存放在字典中的数据需要被持久性存储,这些数据就需要写到文件当中。这个时候就需要用到 Python 中的 `json` 模块了: - +如果存放在字典中的数据需要持久存储,这些数据就需要写到文件当中。这个时候就需要用到 Python 中的 `json` 模块了: ``` with open('mydata.json', 'w') as f: @@ -69,7 +67,6 @@ with open('mydata.json', 'w') as f: 从应用中导出数据就是这么简单,同时这些导出的数据是结构化的、可理解的。现在可以查看导出的数据: - ``` $ cat mydata.json {"tux": {"health": 23, "level": 4}, "beastie": {"health": 13, "level": 6}, "konqi": {"health": 18, "level": 7}} @@ -79,7 +76,6 @@ $ cat mydata.json 如果已经将数据以 JSON 格式导出到文件中了,也有可能需要将这些数据读回到应用中去。这个时候,可以使用 Python `json` 模块中的 `load()` 方法: - ``` #!/usr/bin/env python3 @@ -102,10 +98,9 @@ f.close() 这个方法实现了和保存文件大致相反的操作。使用一个变量 `f` 来表示打开了的文件,然后使用 `json` 模块中的 `load()` 方法读取文件中的数据并存放到 `team` 变量中。 -其中的 `print()` 展示了如何查看读取到的数据。在过于复杂的字典中迭代调用字典键的时候有可能会稍微转不过弯来,但只要熟悉整个数据的结构,就可以慢慢摸索出其中的逻辑。makes sense. - -当然,这里使用 `print()` 的方式太不灵活了。你可以将其改写成使用 for 循环的形式: +其中的 `print()` 展示了如何查看读取到的数据。在过于复杂的字典中迭代调用字典键的时候有可能会稍微转不过弯来,但只要熟悉整个数据的结构,就可以慢慢摸索出其中的逻辑。 +当然,这里使用 `print()` 的方式太不灵活了。你可以将其改写成使用 `for` 循环的形式: ``` for i in team.values(): @@ -116,7 +111,6 @@ for i in team.values(): 如上所述,在 Python 中可以很轻松地处理 JSON 数据。因此只要你的数据符合 JSON 的模式,就可以选择使用 JSON。JSON 非常灵活易用,下次使用 Python 的时候不妨尝试一下。 - -------------------------------------------------------------------------------- via: https://opensource.com/article/19/7/save-and-load-data-python-json @@ -124,7 +118,7 @@ via: https://opensource.com/article/19/7/save-and-load-data-python-json 作者:[Seth Kenlon][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 725e14bcc86b043b96ae863e8f058607f9263281 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Jul 2019 23:56:37 +0800 Subject: [PATCH 069/951] PUB @HankChow https://linux.cn/article-11133-1.html --- .../20190716 Save and load Python data with JSON.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190716 Save and load Python data with JSON.md (98%) diff --git a/translated/tech/20190716 Save and load Python data with JSON.md b/published/20190716 Save and load Python data with JSON.md similarity index 98% rename from translated/tech/20190716 Save and load Python data with JSON.md rename to published/20190716 Save and load Python data with JSON.md index 18c00a038a..a716d958c4 100644 --- a/translated/tech/20190716 Save and load Python data with JSON.md +++ b/published/20190716 Save and load Python data with JSON.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11133-1.html) [#]: subject: (Save and load Python data with JSON) [#]: via: (https://opensource.com/article/19/7/save-and-load-data-python-json) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From b94f463bfcc61aa1b757989b4373450fc41f4efa Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 22 Jul 2019 00:52:31 +0800 Subject: [PATCH 070/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190720=20How=20?= =?UTF-8?q?to=20Upgrade=20Debian=209=20(Stretch)=20to=20Debian=2010=20(Bus?= =?UTF-8?q?ter)=20via=20Command=20Line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md --- ... to Debian 10 (Buster) via Command Line.md | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md diff --git a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md new file mode 100644 index 0000000000..bc17875b14 --- /dev/null +++ b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md @@ -0,0 +1,165 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line) +[#]: via: (https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line +====== + +Hello All!!!, Good to See you! So we saw how to install [Debian 10(Buster)][1] in the previous article. Today, we are going to learn how to upgrade from Debian 9 to Debian 10. Since we have already seen about Debian 10 and its features, let’s not go deep into it. But readers who didn’t have the chance to read that article, let’s give a quick update about Debian 10 and its new features. + + + +After almost two years of development, the team at Debian has finally released a stable version of Buster, code name for Debian 10. Buster is a LTS (Long Term Support) version and hence will be supported for the next 5 years by Debian. + +### Debian 10 (Buster) – New Features + +Debian 10 (Buster) comes packed with a lot of new features which could be rewarding to most of the Debian fans out there. Some of the features include: + + * GNOME Desktop 3.30 + * AppArmor enabled by default + * Supports Linux Kernel 4.19.0-4 + * Supports OpenJDk 11.0 + * Moved from Nodejs 4-8 to Nodejs 10.15.2 + * Iptables replaced by NFTables + + + +and a lot more. + +### Step by Step Guide to Upgrade from Debian 9 to Debian 10 + +Before we start upgrading to Debian 10, let’s look at the prerequisites needed for the upgrade: + +### Step 1) Debian upgrade prerequisites + + * A good internet connection + * Root user permission + * Data backup + + + +It is extremely important to backup all your application code bases, data files, user account details, configuration files, so that you can always revert to the previous version if anything goes wrong during the upgrade. + +### Step 2) Upgrade Debian 9 Existing Packages + +Next step is to upgrade all your existing packages as any packages that are tagged as held back cannot be upgraded and there is a possibility the upgrade from Debian 9 to Debian 10 may fail or cause some issues. So, let’s not take any chances and better upgrade the packages. Use the following code to upgrade the packages: + +``` +root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y +``` + +### Step 3) Modify Package Repository file (/etc/sources.list) + +Next step is to modify package repository file “/etc/sources.list” where you need to replace the text “Stretch” with the text “Buster”. + +But before you change anything, make sure to create a backup of the sources.list file as shown below: + +``` +root@linuxtechi:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak +``` + +Now use below sed commands to replace the text ‘**stretch**‘ with ‘**buster**‘ in package repository file, example is shown below, + +``` +root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list +root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*.list +``` + +Once the text is updated, you need to update the package index like shown below: + +``` +root@linuxtechi:~$ sudo apt update +``` + +Before start upgrading  your existing Debian OS , let’s verify the current version using the following command, + +``` +root@linuxtechi:~$ cat /etc/*-release +PRETTY_NAME="Debian GNU/Linux 9 (stretch)" +NAME="Debian GNU/Linux" +VERSION_ID="9" +VERSION="9 (stretch)" +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" +root@linuxtechi:~$ +``` + +### Step 4) Upgrade from Debian 9 to Debian 10 + +Once you made all the changes, it is time to upgrade from Debian 9 – Debian 10. But before that, make sure to update your packages again as shown below: + +``` +root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y +``` + +During packages upgrade you will be prompted to start the services, so choose your preferred option + +Once all the packages are updated in your system, it is time to upgrade your distribution package. Use the following code to upgrade the distribution: + +``` +root@linuxtechi:~$ sudo apt dist-upgrade -y +``` + +The upgrade process may take a few minutes depending upon your internet connection. Remember during the upgrade process, you’ll also be asked a few questions whether you need to restart the services during the packages are upgraded and whether you need to keep the existing configurations files. If you don’t want to make any custom changes, simply type “Y” and let the upgrade process continue. + +### Step 5) Verify Upgrade + +Once the upgrade process is completed, reboot your machine and check the version using the following command: + +``` +root@linuxtechi:~$ lsb_release -a +``` + +If you get the output as shown below: + +``` +Distributor ID: Debian +Description: Debian GNU/Linux 10 (buster) +Release: 10 +Codename: buster +root@linuxtechi:~$ +``` + +Yes, you have successfully upgraded from Debian 9 to Debian 10. + +Alternate way to verify upgrade + +``` +root@linuxtechi:~$ cat /etc/*-release +PRETTY_NAME="Debian GNU/Linux 10 (buster)" +NAME="Debian GNU/Linux" +VERSION_ID="10" +VERSION="10 (buster)" +VERSION_CODENAME=buster +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" +root@linuxtechi:~$ +``` + +### Conclusion + +Hope the above step by step guide provided you with all the information needed to upgrade from Debian 9(Stretch) to Debian 10 (Buster) easily. Please give us your feedback, suggestions and your experiences with the all new Debian 10 in the comments section. For more such Linux tutorials and articles, keep visiting LinuxTechi.com every now and then. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/ + +作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ From 6eb19dd48351df71bdb095cb4aebbcbfc91cc455 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 22 Jul 2019 08:50:57 +0800 Subject: [PATCH 071/951] translated --- ...apital Letters To Run Them As Sudo User.md | 162 ----------------- ...apital Letters To Run Them As Sudo User.md | 163 ++++++++++++++++++ 2 files changed, 163 insertions(+), 162 deletions(-) delete mode 100644 sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md create mode 100644 translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md diff --git a/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md deleted file mode 100644 index b93c727644..0000000000 --- a/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) -[#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -Type Linux Commands In Capital Letters To Run Them As Sudo User -====== - -![Type Linux Commands In Capital Letters To Run Them As Sudo User][1] - -The reason I love Linux community a lot is they create so many FUN projects which you rarely find in any other propriety operating systems. A while ago, we looked at a fun project named [**“Hollywood”**][2] which turns the Terminal into a Hollywood technical melodrama hacker interface in Ubuntu-like systems. There are few other utilities available, for example **cowsay** , **fortune** , **sl** and **toilet** (!) etc., to kill your free time and keep you entertained! They may not be useful, but these utilities are really entertaining and fun to use. Today, I stumbled upon yet another similar utility named **“SUDO”**. As the name implies, whenever you type Linux commands in capital letters, the SUDO utility will run them as sudo user! Meaning, you need not to type “sudo” in-front of the Linux commands you about to run. Cool, yeah? - -### Install SUDO - -* * * - -**A word of caution:** - -Before installing this (or any utility), take a look at the source code (Link given at the end) and see if there are suspicious/malicious code included to harm your system. Test it in a VM. If you like or found it useful, you can use it in your personal/production systems. - -* * * - -Git clone the SUDO repository: - -``` -$ git clone https://github.com/jthistle/SUDO.git -``` - -This command will clone the contents of SUDO GIT repository and saves them in a directory named “SUDO” in your current working directory. - -``` -Cloning into 'SUDO'... -remote: Enumerating objects: 42, done. -remote: Counting objects: 100% (42/42), done. -remote: Compressing objects: 100% (29/29), done. -remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 -Unpacking objects: 100% (42/42), done. -``` - -Switch to SUDO directory: - -``` -$ cd SUDO/ -``` - -And, install it using command: - -``` -$ ./install.sh -``` - -The command will add the following entries in your **~/.bashrc** file: - -``` -[...] -# SUDO - shout at bash to su commands -# Distributed under GNU GPLv2, @jthistle on github - -shopt -s expand_aliases - -IFS_=${IFS} -IFS=":" read -ra PATHS <<< "$PATH" - -for i in "${PATHS[@]}"; do - for j in $( ls "$i" ); do - if [ ${j^^} != $j ] && [ $j != "sudo" ]; then - alias ${j^^}="sudo $j" - fi - done -done - -alias SUDO='sudo $(history -p !!)' - -IFS=${IFS_} - -# end SUDO -``` - -It will also take a backup of your **~/.bashrc** and save it as **~/.bashrc.old**. You can restore it if anything goes catastrophically wrong. - -Finally, update the changes using command: - -``` -$ source ~/.bashrc -``` - -### Now, type Linux Commands in Capital letters to run them as Sudo user - -Usually, we execute Linux commands that requires sudo/root privileges like below. - -``` -$ sudo mkdir /ostechnix -``` - -Right? Yes! The above command will create directory named “ostechnix” in root (/). Let us cancel this command using **Ctrl+c**. - -Once SUDO is installed, you can **type any Linux command in capital without sudo** and run them. So, you can run the above command like below: - -``` -$ MKDIR /ostechnix - -$ TOUCH /ostechnix/test.txt - -$ LS /ostechnix -``` - -![][3] - -Type Linux Commands In Capital Letters To Run Them As Sudo User - -Please note that **it will not bypass the sudo password**. You still need to type sudo password to execute the given command. It will only help to avoid typing “sudo” in-front of each command. - -* * * - -**Related read:** - - * [**How To Run Particular Commands Without Sudo Password In Linux**][4] - * [**How To Restore Sudo Privileges To A User**][5] - * [**How To Grant And Remove Sudo Privileges To Users On Ubuntu**][6] - * [**How To Find All Sudo Users In Your Linux System**][7] - * [**How To Display Asterisks When You Type Password In Terminal**][8] - * [**How To Change The Sudo Prompt In Linux**][9] - - - -* * * - -Of course, typing “sudo” will take only a few seconds, so it is not a big deal. I must tell this is just fun and USELESS project to pass time. If you don’t like it, go away and learn something useful. If you like it, give it a go and have fun! - -**Resource:** - - * [**SUDO GitHub Repository**][10] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/sudo-720x340.png -[2]: https://www.ostechnix.com/turn-ubuntu-terminal-hollywood-technical-melodrama-hacker-interface/ -[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/SUDO-in-action.gif -[4]: https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/ -[5]: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/ -[6]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/ -[7]: https://www.ostechnix.com/find-sudo-users-linux-system/ -[8]: https://www.ostechnix.com/display-asterisks-type-password-terminal/ -[9]: https://www.ostechnix.com/change-sudo-prompt-linux-unix/ -[10]: https://github.com/jthistle/SUDO diff --git a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md new file mode 100644 index 0000000000..c321d5374d --- /dev/null +++ b/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md @@ -0,0 +1,163 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) +[#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 +====== + +![Type Linux Commands In Capital Letters To Run Them As Sudo User][1] + +我非常喜欢 Linux 社区的原因是他们创建了很多有趣的项目,你很少能在任何其他操作系统中找到它们。不久前,我们看了一个名为 [**“Hollywood”**][2] 的有趣项目,它在类 Ubuntu 系统将终端变成了好莱坞技术情景剧的黑客界面。还有一些其他工具,例如 **cowsay**、**fortune**、**sl** 和 **toilet** 等,用来打开时间和自娱自乐!它们可能没有用,但这些程序娱乐性不错并且使用起来很有趣。今天,我偶然发现了另一个名为 **“SUDO”** 的类似工具。正如名字暗示的那样,你无论何时用大写字母输入 Linux 命令,SUDO 程序都会将它们作为 sudo 用户运行!这意味着,你无需在要运行的 Linux 命令前面输入 “sudo”。很酷,不是么? + + +### 安装 SUDO + +* * * + +**提醒一句:** + +在安装(或任何程序)之前,请查看源代码(最后给出的链接),并查看是否包含会损害你的系统的可疑/恶意代码。在 VM中 测试它。如果你喜欢或觉得它很有用,你可以在个人/生产系统中使用它。 + +* * * + +用 Git 克隆 SUDO 仓库: + +``` +$ git clone https://github.com/jthistle/SUDO.git +``` + +此命令将克隆 SUDO GIT 仓库的内容,并将它们保存在当前目录下的 “SUDO” 的目录中。 + +``` +Cloning into 'SUDO'... +remote: Enumerating objects: 42, done. +remote: Counting objects: 100% (42/42), done. +remote: Compressing objects: 100% (29/29), done. +remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 +Unpacking objects: 100% (42/42), done. +``` + +切换到 SUDO 目录: + +``` +$ cd SUDO/ +``` + +并使用命令安装它: + +``` +$ ./install.sh +``` + +该命令将在 **~/.bashrc** 文件中添加以下行: + +``` +[...] +# SUDO - shout at bash to su commands +# Distributed under GNU GPLv2, @jthistle on github + +shopt -s expand_aliases + +IFS_=${IFS} +IFS=":" read -ra PATHS <<< "$PATH" + +for i in "${PATHS[@]}"; do + for j in $( ls "$i" ); do + if [ ${j^^} != $j ] && [ $j != "sudo" ]; then + alias ${j^^}="sudo $j" + fi + done +done + +alias SUDO='sudo $(history -p !!)' + +IFS=${IFS_} + +# end SUDO +``` + +它还会备份你的 **~/.bashrc** 并将其保存为 **~/.bashrc.old**。如果有重大错误,你可以恢复它。 + +最后,使用命令更新更改: + +``` +$ source ~/.bashrc +``` + +### 现在,用大写字母中输入 Linux 命令,将它们作为 Sudo 用户运行 + +通常我们像下面那样执行需要 sudo/root 权限的命令。 + +``` +$ sudo mkdir /ostechnix +``` + +对么?没错!上面的命令将在根目录(/)中创建名为 “ostechnix” 的目录。让我们使用 **Ctrl + c** 取消。 + +一旦安装了 SUDO,你就可以**在没有 sudo 的情况下输入任何大写 Linux 命令**并运行它们。因此,你可以像下面那样运行上面的命令: + +``` +$ MKDIR /ostechnix + +$ TOUCH /ostechnix/test.txt + +$ LS /ostechnix +``` + +![][3] + +用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 + +请注意**它无法绕过 sudo 密码**。你仍然需要键入 sudo 密码才能执行给定的命令。它只会有助于避免在每个命令前面输入“sudo”。 + +* * * + +**相关阅读:Related read:=** + + * [**如何在 Linux 中没有 Sudo 密码运行特定命令**][4] + * [**如何恢复用户的 Sudo 权限**][5] + * [**如何在 Ubuntu 上为用户授予和删除 Sudo 权限**][6] + * [**如何在 Linux 系统中查找所有 Sudo 用户**][7] + * [**如何在终端中输入密码时显示星号**][8] + * [**如何更改 Linux 中的 Sudo 提示符**][9] + + + +* * * + +当然,输入 “sudo” 只需几秒钟,所以这不是什么大问题。 我必须告诉这是一个用来消磨时间的有趣且无用的项目。 如果你不喜欢它,那就去学习一些有用的东西吧。 如果你喜欢它,试一试,玩得开心! + +**资源:** + + * [**SUDO GitHub 仓库**][10] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/sudo-720x340.png +[2]: https://www.ostechnix.com/turn-ubuntu-terminal-hollywood-technical-melodrama-hacker-interface/ +[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/SUDO-in-action.gif +[4]: https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/ +[5]: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/ +[6]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/ +[7]: https://www.ostechnix.com/find-sudo-users-linux-system/ +[8]: https://www.ostechnix.com/display-asterisks-type-password-terminal/ +[9]: https://www.ostechnix.com/change-sudo-prompt-linux-unix/ +[10]: https://github.com/jthistle/SUDO From 95d07637ffe5a908c00b0e7e0063c25bf0c2a465 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 22 Jul 2019 09:14:25 +0800 Subject: [PATCH 072/951] translating --- sources/tech/20190703 Parse arguments with Python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190703 Parse arguments with Python.md b/sources/tech/20190703 Parse arguments with Python.md index 73933c53ed..e84978cde9 100644 --- a/sources/tech/20190703 Parse arguments with Python.md +++ b/sources/tech/20190703 Parse arguments with Python.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 93fa488e74966028bfab90004f12fc0672e28026 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 22 Jul 2019 19:25:33 +0800 Subject: [PATCH 073/951] APL:20190717 How to install Kibana on MacOS --- sources/tech/20190717 How to install Kibana on MacOS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190717 How to install Kibana on MacOS.md b/sources/tech/20190717 How to install Kibana on MacOS.md index cd930fcddc..102e31ddd9 100644 --- a/sources/tech/20190717 How to install Kibana on MacOS.md +++ b/sources/tech/20190717 How to install Kibana on MacOS.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 90ad954a7a0eda927059e8eb547a91c02cb2722d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 22 Jul 2019 20:39:34 +0800 Subject: [PATCH 074/951] PRF --- ...20190717 How to install Kibana on MacOS.md | 81 +++++++++---------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/sources/tech/20190717 How to install Kibana on MacOS.md b/sources/tech/20190717 How to install Kibana on MacOS.md index 102e31ddd9..05f6550e88 100644 --- a/sources/tech/20190717 How to install Kibana on MacOS.md +++ b/sources/tech/20190717 How to install Kibana on MacOS.md @@ -1,95 +1,88 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to install Kibana on MacOS) [#]: via: (https://opensource.com/article/19/7/installing-kibana-macos) [#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) -How to install Kibana on MacOS +如何在 MacOS 上安装 Kibana ====== -Once you have Elasticsearch installed, the Kibana plugin adds -visualization to this powerful search tool. -![Analytics: Charts and Graphs][1] -In my previous post, I walked Mac users through the steps they’ll take to [install Elasticsearch][2], the world’s most popular enterprise search engine. (Here's a [separate article][3] for Linux users.) Its natural language processing power makes Elasticsearch excel at finding details within datasets. Once you’ve discovered the data you need, you can take it to the next level if you’ve installed [Kibana][4] as well. +> Elasticsearch 当安装好了之后,Kibana 插件可以为这个功能强大的搜索工具添加可视化功能。 -Kibana is an open source data visualization plugin for Elasticsearch. Once you’ve found data in Elasticsearch, Kibana helps you put it into line charts, [time series queries][5], geospatial maps, and more. This tool is ideal for data scientists who must present their research results, especially those working with open source data. +![](https://img.linux.net.cn/data/attachment/album/201907/22/204048vl8t88y6q8988229.jpg) -### Installing Kibana +在我之前的文章中,我向 Mac 用户介绍了[安装 Elasticsearch][2] 的步骤,这是世界上最受欢迎的企业级搜索引擎。(这里有一篇针对 Linux 用户的[单独文章][3]。)其自然语言处理能力使得 Elasticsearch 在数据集中查找细节方面表现出色。一旦你发现了你需要的数据,如果你已经安装了 [Kibana][4],你可以将它提升到一个新的水平。 -You’ll need to install Kibana separately from Elasticsearch. Since I installed Elasticsearch 7.1.1, I’ll install Kibana 1.1. It’s important to match versions so Kibana runs against an Elasticsearch node of the same version. (Kibana runs on **node.js**.) +Kibana 是 Elasticsearch 的开源的数据可视化插件。当你在 Elasticsearch 中找到了数据,Kibana 就会帮助你将其放入折线图、[时间序列查询][5]、地理空间地图等。该工具非常适合于必须展示其研究成果的数据科学家,尤其是那些使用开源数据的人。 -Here are the steps I followed to install Kibana 7.1.1 for MacOS: +### 安装 Kibana - 1. Make sure Elasticsearch is downloaded and running. See the previous article for instructions if needed. +你需要在 Elasticsearch 之外单独安装 Kibana。因为我安装了 Elasticsearch 7.1.1,所以我将安装 Kibana 1.1。版本的匹配非常重要,Kibana 需要针对相同版本的 Elasticsearch 节点运行。 (Kibana 运行在 node.js 上。) +以下是我为 MacOS 安装 Kibana 7.1.1 时所遵循的步骤: +1、确保 Elasticsearch 已下载并运行。如果需要,请参阅上一篇文章。 -**Note**: At minimum, you’ll need to install Elasticsearch 1.4.4 or later before you can use Kibana. This is because you’ll need to give Kibana the URL for the Elasticsearch instance to connect to, along with the Elasticsearch indices you want to search. In general, it’s best to install the latest versions of both. - - 2. Click [here][6] to download Kibana. You’ll see the webpage below, which prompts you to download Kibana for Mac in the top right-hand corner of the **Downloads** section: - +**注意**:你至少需要先安装 Elasticsearch 1.4.4 或更高版本才能使用 Kibana。这是因为你需要向 Kibana 提供要连接的 Elasticsearch 实例的 URL 以及你要搜索的 Elasticsearch 索引。通常,最好安装两者的最新版本。 +2、单击[此处][6]下载 Kibana。你将看到如下的网页,它会提示你在**下载**部分的右上角下载 Kibana for Mac: ![Download Kibana here.][7] - 3. In your **Downloads** folder, open the **.tar** file to expand it. This action creates a folder with the same name (for example, **kibana-7.1.1-darwin-x86_64**). - 4. If you would prefer Kibana to live in another folder, move it now. +3、在你的 `Downloads` 文件夹中,打开 .tar 文件以展开它。此操作将创建一个具有相同名称的文件夹(例如,`kibana-7.1.1-darwin-x86_64`)。 +4、如果你希望 Kibana 放在另一个文件夹中,请立即移动它。 +仔细检查 Elasticsearch 是否正在运行,如果没有,请在继续之前启动它。(如果你需要说明,请参阅上一篇文章。) -Double-check that Elasticsearch is running, and if not, launch it before continuing. (See the previous article if you need instructions.)  +### 打开 Kibana 插件 -### Opening the Kibana plugin - -With Elasticsearch running, you can now launch Kibana. The process is similar to launching Elasticsearch: - - 1. From your Mac’s **Downloads** folder (or the new folder if you moved Kibana), open the Kibana folder (i.e. **~Downloads/kibana-7.1.1-darwin-x86_64**). - 2. Open the **bin** subfolder to enter that one. +Elasticsearch 运行起来后,你现在可以启动 Kibana 了。该过程类似于启动 Elasticsearch: +1、从 Mac 的 `Downloads` 文件夹(或 Kibana 移动到的新文件夹)里,打开 Kibana 文件夹(即 `~Downloads/kibana-7.1.1-darwin-x86_64`)。 +2、打开 `bin` 子文件夹。 ![The Kibana bin folder.][8] - 3. Run **kibana-plugin**. You may run into the same security warning that came up in the previous article: - - - +3、运行 `kibana-plugin`。你可能会遇到上一篇文章中出现的相同安全警告: +   ![Security warning][9] -In general, if you get this warning, follow the instructions in that article to clear the warning and open Kibana. Note that if I try to open the plugin without Elasticsearch running in the terminal, I get this same security warning. To fix this, I open Elasticsearch and run it in the terminal as described in the previous article. Launching Elasticsearch with the GUI should open the terminal as well. +通常,如果收到此警告,请按照那篇文章中的说明清除警告并打开 Kibana。请注意,如果我在终端中没有运行 Elasticsearch 的情况下打开该插件,我会收到相同的安全警告。要解决此问题,如上一篇文章中所述,打开 Elasticsearch 并在终端中运行它。使用 GUI 启动 Elasticsearch 也应该打开终端。 -Then, I right-clicked on **kibana-plugin** and selected **Open**. This solution worked for me, but you might need to try a few times. Several people in my Elasticsearch meetup had some trouble opening Kibana on their devices. +然后,我右键单击 `kibana-plugin` 并选择“打开”。这个解决方案对我有用,但你可能需要尝试几次。 我的 Elasticsearch 聚会中的几个人在他们的设备上打开 Kibana 时遇到了一些麻烦。 -### Changing Kibana’s host and port numbers +### 更改 Kibana 的主机和端口号 -Kibana’s default settings configure it to run on **localhost: 5601**. You’ll need to update the file (in the case of this example) **~Downloads/kibana-7.1.1-darwin-x86_64/config/kibana.yml** to change the host or port number before you run Kibana. +Kibana 的默认设置将其配置为在 `localhost:5601` 上运行。你需要更新文件(在这个例子的情况下)`~Downloads/kibana-7.1.1-darwin-x86_64/config/kibana.yml` 以在运行 Kibana 之前更改主机或端口号。 ![The Kibana config directory.][10] -Here’s what the terminal looked like when my Elasticsearch meetup group configured Kibana so it would default to ****, which is the URL to use when querying your Elasticsearch instances: +以下是我的 Elasticsearch 聚会组里配置 Kibana 时终端的样子,因此默认为 `http://localhost:9200`,这是查询 Elasticsearch 实例时使用的 URL: ![Configuring Kibana's host and port connections.][11] -### Running Kibana from the command line +### 从命令行运行 Kibana -Once you’ve opened the plugin, you can run Kibana from the command line or from the GUI. Here’s what the terminal looked like once it connected to Elasticsearch: +打开插件后,可以从命令行或 GUI 运行 Kibana。这是终端连接到 Elasticsearch 后的样子: ![Kibana running once it's connected to Elasticsearch.][12] -Like Elasticsearch, Kibana runs in the foreground by default. You can stop it by pressing **Ctrl-C**. +与 Elasticsearch 一样,Kibana 默认在前台运行。你可以按 `Ctrl-C` 来停止它。 -### Wrapping up +### 总结 -Elasticsearch and Kibana are large packages that take up a fair amount of storage. With so many people downloading both packages at once, my fellow Elasticsearch meetup members and I had to wait an average of several minutes for both of them to download. This might have been due to poor WiFi and/or too many users at once, but keep this possibility in mind if the same thing happens to you. +Elasticsearch 和 Kibana 是占用大量存储空间的大型软件包。有这么多人一次下载这两个软件包,当我的Elasticsearch 会员和我下载它们两个时,我平均要下载几分钟。这可能是由于 WiFi 不佳和/或用户数量太多,但如果发生同样的事情,请记住这种可能性。 -After that, I couldn’t upload the JSON file we were using due to low storage on my laptop. I was able to follow the instructor’s visualizations, but couldn’t use Kibana myself in real time. So, before you download Elasticsearch and Kibana, make sure there’s enough room (at least a few gigabytes) on your device to upload and search files with these tools. +之后,由于我的笔记本电脑存储空间不足,我无法上传我们正在使用的 JSON 文件。我能够按照讲师的可视化进行操作,但无法实时使用 Kibana。因此,在下载 Elasticsearch 和 Kibana 之前,请确保设备上有足够的空间(至少几千兆字节)来上传和使用这些工具搜索文件。 -To learn more about Kibana, their user guide’s [Introduction][13] is ideal. (You can configure the guide based on which version of Kibana you’re using.) Their demo also shows you how to [build a dashboard in minutes][14] and then make your first deployment. +要了解有关 Kibana 的更多信息,他们的用户指南[简介][13]是理想的。(你可以根据你正在使用的 Kibana 版本配置该指南。)他们的演示还向你展示了如何[在几分钟内构建仪表板][14],然后进行首次部署。 -Have fun! +玩得开心! -------------------------------------------------------------------------------- @@ -97,15 +90,15 @@ via: https://opensource.com/article/19/7/installing-kibana-macos 作者:[Lauren Maffeo][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/) 荣誉推出 [a]: https://opensource.com/users/lmaffeo [b]: https://github.com/lujun9972 [1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) -[2]: https://opensource.com/article/19/7/installing-elasticsearch-macos +[2]: https://linux.cn/article-11125-1.html [3]: https://opensource.com/article/19/7/installing-elasticsearch-and-kibana-linux [4]: https://www.elastic.co/products/kibana [5]: https://en.wikipedia.org/wiki/Time_series From bbcac02c39fbbf09e96e27627149f432226ee144 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 22 Jul 2019 20:40:06 +0800 Subject: [PATCH 075/951] TSL&PRF --- .../tech/20190717 How to install Kibana on MacOS.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20190717 How to install Kibana on MacOS.md (100%) diff --git a/sources/tech/20190717 How to install Kibana on MacOS.md b/translated/tech/20190717 How to install Kibana on MacOS.md similarity index 100% rename from sources/tech/20190717 How to install Kibana on MacOS.md rename to translated/tech/20190717 How to install Kibana on MacOS.md From 5ca7cdf9bb0738561cb5dad8f2b6aa6d8d40c8fb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 22 Jul 2019 20:47:49 +0800 Subject: [PATCH 076/951] PUB @wxy https://linux.cn/article-11135-1.html --- .../20190717 How to install Kibana on MacOS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190717 How to install Kibana on MacOS.md (99%) diff --git a/translated/tech/20190717 How to install Kibana on MacOS.md b/published/20190717 How to install Kibana on MacOS.md similarity index 99% rename from translated/tech/20190717 How to install Kibana on MacOS.md rename to published/20190717 How to install Kibana on MacOS.md index 05f6550e88..a4495adc46 100644 --- a/translated/tech/20190717 How to install Kibana on MacOS.md +++ b/published/20190717 How to install Kibana on MacOS.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11135-1.html) [#]: subject: (How to install Kibana on MacOS) [#]: via: (https://opensource.com/article/19/7/installing-kibana-macos) [#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) From 8a150270bf4ab2c536f5ddd5f678a54cd4cf630a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 23 Jul 2019 00:53:32 +0800 Subject: [PATCH 077/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190723=20How=20?= =?UTF-8?q?to=20Create=20a=20User=20Account=20Without=20useradd=20Command?= =?UTF-8?q?=20in=20Linux=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md --- ...ccount Without useradd Command in Linux.md | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md diff --git a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md new file mode 100644 index 0000000000..2f8d92bb28 --- /dev/null +++ b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md @@ -0,0 +1,119 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Create a User Account Without useradd Command in Linux?) +[#]: via: (https://www.2daygeek.com/linux-user-account-creation-in-manual-method/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +How to Create a User Account Without useradd Command in Linux? +====== + +There are three commands are available in Linux to create an user account. + +Did you ever tried to create a user account in Linux using manual method? + +I mean to say without using an above three commands. + +If you don’t know how to do that? we are here to help you on this and will show you in details. + +Have you wondering, how it’s possible? If yes, don’t worry, as we have mentioned many times that anything can be done on Linux. It is one of the example. + +Yes, we can create it. Are you excited to know more it? + + * **[Three Methods To Create A User Account In Linux?][1]** + * **[Two Methods To Create Bulk Users In Linux][2]** + + + +I don’t want to you to wait any more. Let’s do it right away. + +To do so, first, we need to find out last created UID and GID information. Once you have these information handy then proceed to next step. + +``` +# cat /etc/passwd | tail -1 + +tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash +``` + +Based on the above output. Last created user UID is 1153 and GID is 1154. To experiment this, we are going to add `tuser2` in the system. + +Now, add an entry of user details in /etc/passwd. There are seven fields exist and you need to add required details. + +``` ++-----------------------------------------------------------------------+ +|username:password:UID:GID:Comments:User Home Directory:User Login Shell| ++-----------------------------------------------------------------------+ + | | | | | | | + 1 2 3 4 5 6 7 + +1- Username: This field indicates the User name. Characters length should be between 1 to 32. +2- Password (x): It indicates that encrypted password is stored at /etc/shadow file. +3- User ID: It indicates the user ID (UID) each user should be contain unique UID. UID (0-Zero) is reserved for root, UID (1-99) reserved for system users and UID (100-999) reserved for system accounts/groups +4- Group ID (GID): It indicates the group ID (GID) each group should be contain unique GID is stored at /etc/group file. +5- Comment/User ID Info: It indicates the command field. This field can be used to describe the user information. +6- Home directory (/home/$USER): It indicates the user's home directory. +7- shell (/bin/bash): It indicates the user's shell. +``` + +Add the user information in end of the file. + +``` +# vi /etc/passwd + +tuser2:x:1154:1155:Test User2:/home/tuser2:/bin/bash +``` + +You have to create a group with same name. So, add a group details in /etc/group file as well. + +``` +# vi /etc/group + +tuser2:x:1155: +``` + +Once you done the above two steps, then set a password for user. + +``` +# passwd tuser2 + +Changing password for user tuser2. +New password: +Retype new password: +passwd: all authentication tokens updated successfully. +``` + +Finally, try to login with newly created user. + +``` +# ssh [email protected] + +[email protected]'s password: +Creating directory '/home/tuser2'. + +$ls -la + +total 16 +drwx------. 2 tuser2 tuser2 59 Jun 17 09:46 . +drwxr-xr-x. 15 root root 4096 Jun 17 09:46 .. +-rw-------. 1 tuser2 tuser2 18 Jun 17 09:46 .bash_logout +-rw-------. 1 tuser2 tuser2 193 Jun 17 09:46 .bash_profile +-rw-------. 1 tuser2 tuser2 231 Jun 17 09:46 .bashrc +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-user-account-creation-in-manual-method/ + +作者:[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/linux-user-account-creation-useradd-adduser-newusers/ +[2]: https://www.2daygeek.com/linux-bulk-users-creation-useradd-newusers/ From 61d0ca824851e6c5df7ce32bae1408fa2ec5ab4e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 23 Jul 2019 00:54:46 +0800 Subject: [PATCH 078/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190722=20How=20?= =?UTF-8?q?to=20run=20virtual=20machines=20with=20virt-manager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190722 How to run virtual machines with virt-manager.md --- ... run virtual machines with virt-manager.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 sources/tech/20190722 How to run virtual machines with virt-manager.md diff --git a/sources/tech/20190722 How to run virtual machines with virt-manager.md b/sources/tech/20190722 How to run virtual machines with virt-manager.md new file mode 100644 index 0000000000..8a2586ea25 --- /dev/null +++ b/sources/tech/20190722 How to run virtual machines with virt-manager.md @@ -0,0 +1,169 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to run virtual machines with virt-manager) +[#]: via: (https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/) +[#]: author: (Marco Sarti https://fedoramagazine.org/author/msarti/) + +How to run virtual machines with virt-manager +====== + +![][1] + +In the beginning there was dual boot, it was the only way to have more than one operating system on the same laptop. At the time, it was difficult for these operating systems to be run simultaneously or interact with each other. Many years passed before it was possible, on common PCs, to run an operating system inside another through virtualization. + +Recent PCs or laptops, including moderately-priced ones, have the hardware features to run virtual machines with performance close to the physical host machine. + +Virtualization has therefore become normal, to test operating systems, as a playground for learning new techniques, to create your own home cloud, to create your own test environment and much more. This article walks you through using Virt Manager on Fedora to setup virtual machines. + +### Introducing QEMU/KVM and Libvirt + +Fedora, like all other Linux systems, comes with native support for virtualization extensions. This support is given by KVM (Kernel based Virtual Machine) currently available as a kernel module. + +QEMU is a complete system emulator that works together with KVM and allows you to create virtual machines with hardware and peripherals. + +Finally [libvirt][2] is the API layer that allows you to administer the infrastructure, ie create and run virtual machines. + +The set of these three technologies, all open source, is what we’re going to install on our Fedora Workstation. + +### Installation + +#### Step 1: install packages + +Installation is a fairly simple operation. The Fedora repository provides the “virtualization” package group that contains everything you need. +``` + +``` + +sudo dnf install @virtualization +``` + +``` + +#### Step 2: edit the libvirtd configuration + +By default the system administration is limited to the root user, if you want to enable a regular user you have to proceed as follows. + +Open the /etc/libvirt/libvirtd.conf file for editing +``` + +``` + +sudo vi /etc/libvirt/libvirtd.conf +``` + +``` + +Set the domain socket group ownership to libvirt +``` + +``` + +unix_sock_group = "libvirt" +``` + +``` + +Adjust the UNIX socket permissions for the R/W socket +``` + +``` + +unix_sock_rw_perms = "0770" +``` + +``` + +#### Step 3: start and enable the libvirtd service +``` + +``` + +sudo systemctl start libvirtd +sudo systemctl enable libvirtd +``` + +``` + +#### Step 4: add user to group + +In order to administer libvirt with the regular user you must add the user to the libvirt group, otherwise every time you start virtual-manager you will be asked for the password for sudo. +``` + +``` + +sudo usermod -a -G libvirt $(whoami) +``` + +``` + +This adds the current user to the group. You must log out and log in to apply the changes. + +### Getting started with virt-manager + +The libvirt system can be managed either from the command line (virsh) or via the virt-manager graphical interface. The command line can be very useful if you want to do automated provisioning of virtual machines, for example with [Ansible][3], but in this article we will concentrate on the user-friendly graphical interface. + +The virt-manager interface is simple. The main form shows the list of connections including the local system connection. + +The connection settings include virtual networks and storage definition. it is possible to define multiple virtual networks and these networks can be used to communicate between guest systems and between the guest systems and the host. + +### Creating your first virtual machine + +To start creating a new virtual machine, press the button at the top left of the main form: + +![][4] + +The first step of the wizard requires the installation mode. You can choose between a local installation media, network boot / installation or an existing virtual disk import: + +![][5] + +Choosing the local installation media the next step will require the ISO image path: + +![ ][6] + +The subsequent two steps will allow you to size the CPU, memory and disk of the new virtual machine. The last step will ask you to choose network preferences: choose the default network if you want the virtual machine to be separated from the outside world by a NAT, or bridged if you want it to be reachable from the outside. Note that if you choose bridged the virtual machine cannot communicate with the host machine. + +Check “Customize configuration before install” if you want to review or change the configuration before starting the setup: + +![][7] + +The virtual machine configuration form allows you to review and modify the hardware configuration. You can add disks, network interfaces, change boot options and so on. Press “Begin installation” when satisfied: + +![][8] + +At this point you will be redirected to the console where to proceed with the installation of the operating system. Once the operation is complete, you will have the working virtual machine that you can access from the console: + +![][9] + +The virtual machine just created will appear in the list of the main form, where you will also have a graph of the CPU and memory occupation: + +![][10] + +libvirt and virt-manager is a powerful tool that allows great customization to your virtual machines with enterprise level management. If something even simpler is desired, note that Fedora Workstation comes with [GNOME Boxes pre-installed and can be sufficient for basic virtualization needs][11]. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ + +作者:[Marco Sarti][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/msarti/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/virt-manager-816x346.jpg +[2]: https://libvirt.org/ +[3]: https://fedoramagazine.org/get-the-latest-ansible-2-8-in-fedora/ +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-41-45.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-30-53.png +[6]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-42-39.png +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-43-21.png +[8]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-44-58.png +[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-55-35.png +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-11-09-22.png +[11]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ From ca2e7d2f0e32c03655f7e4da840b0c11fd8a8065 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 23 Jul 2019 00:55:50 +0800 Subject: [PATCH 079/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190723=208=20Be?= =?UTF-8?q?st=20Open=20Source=20CRM=20Software?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190723 8 Best Open Source CRM Software.md --- ...0190723 8 Best Open Source CRM Software.md | 230 ++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 sources/tech/20190723 8 Best Open Source CRM Software.md diff --git a/sources/tech/20190723 8 Best Open Source CRM Software.md b/sources/tech/20190723 8 Best Open Source CRM Software.md new file mode 100644 index 0000000000..89d0b977b4 --- /dev/null +++ b/sources/tech/20190723 8 Best Open Source CRM Software.md @@ -0,0 +1,230 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (8 Best Open Source CRM Software) +[#]: via: (https://itsfoss.com/best-open-source-crm/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +8 Best Open Source CRM Software +====== + +_**In this article, we list some of the best open source CRM software available for small and medium sized businesses.**_ + +### What is CRM? + +CRM stands for [Customer Relationship Management][1]. A CRM software enables the companies to interact with their potential and existing customers, understand and manage their requirement. This improved the relation of the organization with customer and you know that a happy customer brings profitability to the business. + +No matter how big your team is (small business or a big firm), a CRM software always comes in handy when you want to keep things organized in your business. + +You may avoid a CRM software for a couple of employees when you start a business. However, to streamline the process and make the work efficient and fast – you will eventually need a CRM software. + +But, what about the level of control (or security) in a CRM software? Do you want a transparent CRM software which you can take control of? + +Well, that is when an open source CRM software comes into play. You can host it yourself, and you can customize it as per your requirements. You may also opt for the hosted version where you don’t have to manage it yourself. + +In this article, we talk about some of the best open-source CRM software I have found. + +### Best Free and Open Source CRM Software + +![][2] + +Let me clarify something. CRM is intended for businesses and when there is a software created for business organizations, the developers would also like to make money. This is why almost all of the free and open source software also have their paid ‘enterprise versions’ available. + +While you can download the open source version and host it on your own Linux based server, the ‘enterprise versions’ are hosted by the developers themselves so that you don’t have to manage it. Some enterprise versions also provide premium features that are not available for the open source versions. Ticket support is also a feature available only for the enterprise versions. + +I have tried to highlight their ‘premium features’ in the list. Of course, t_he list below is in no particular order of ranking._ + +#### 1\. SuiteCRM + +![Suitecrm Hosting][3] + +Key Highlights: + + * Sever-basis charge instead of per-user subscription for hosted service + * Open-source + * Affordable managed hosting plans + * Supports third party integration + * 7-days free trial + + + +SuiteCRM was originally inspired (and forked) from SugarCRM’s open-source version. Well, that is no longer available. So, SuiteCRM is the open source alternative for organizations who utilized SugarCRM earlier. + +[][4] + +Suggested read  Use Do Not Disturb Mode in Ubuntu With NoNotifications + +In addition to all the essential features a CRM has to offer, SuiteCRM offers some great affordable managed hosting deals for organizations. With an impressive pricing plan (on server-basis with unlimited users), [SuiteCRM takes aim at Salesforce][5] – which is promising. + +[SuiteCRM][6] + +#### 2\. Odoo + +![][7] + +Key Highlights: + + * Open-source edition available + * Enterprise edition pricing on a per-user basis + * Wide variety of third party integrations + * 15-days free trial + + + +Odoo is yet another popular open-source CRM solution. However, in contrast to SuitCRM, you will observe the pricing plan per user. So, if you are just starting out with a lot of users – you might find it a bit pricey. + +The third-party integrations can be done easily and you can find the pricing for each app/integration when purchasing a subscription. You can either opt for the open source community edition or purchase the enterprise edition. + +[Odoo][8] + +#### 3\. Vtiger + +![][9] + +Key Highlights: + + * Open source edition based on SugarCRM + * Separate pricing plans for Marketing, Sales, Help desk or all-in-one + * Regional pricing available for some countries like India + * Per-user pricing + + + +Vtiger offers a cloud version and an open source version. Of course, if you opt for the open source version, you get to host it yourself and manage it all by yourself or hire a team. + +After observing the pricing plan, the managed cloud version obviously looks promising. – with separate pricing plans for sales, marketing, and help desk. However, if you have the required technical expertise, the open-source version is good enough as well. Also, it was interesting to see a regional pricing plan for India because they have an office here. + +[Vtiger][10] + +#### 4\. ConcourseSuite + +![][11] + +Key Highlights: + + * Offers a separate (but outdated) open source community edition + * Provides a 5-user trial plan for the latest version + + + +ConcourseSuite is a simple CRM which offers open-source version as well. The community edition (or the open-source version) is outdated – which you can still utilize as a basic CRM. + +In case you want the latest version (which is the enhanced version of the community edition), you will have to opt for a 5-user trial or purchase the enterprise/cloud version. I couldn’t find a clear pricing plan but its pricing page did mention $10,000 for unlimited users. So, you will probably find out about it after trying out the trial. + +[ConcourseSuite][12] + +#### 5\. EspoCRM + +![][13] + +Key Highlights: + + * The ability to switch to on-premise anytime. + * Actively maintained open source (self-hosted) package. + + + +EspoCRM is new to the scene and it is an impressive CRM software. You can download it for free and host it yourself or opt for the cloud solution where they do it for you. + +[][14] + +Suggested read  10 Amazing Websites Every Linux Gamer Must Follow + +They have got a detailed [documentation][15] – in case you want to try it yourself. Also, if you want to go with the cloud solution – you can always switch to on-premise anytime you want. I guess that makes it a bit more appealing. + +[EspoCRM][16] + +#### 6\. Axelor CRM + +![Axelor Crm][17] + +Key Highlights: + + * A complete suite of ERP, CRM, and BPM. + * Mobile apps for Android and iOS + + + +Axelor is normally a complete suite of ERP, CRM, and BPM. Here, we talk about the CRM which is an incredible open source CRM available out there. + +In addition to the web app, it also offers mobiles apps for Android and iOS. So, no matter you host it yourself or purchase a subscription for managed hosting – Axelor CRM is a great choice to keep up across multiple platforms. + +#### 7\. Crust CRM (Corteza) + +![][18] + +Key Highlights: + + * A unified open source solution + * Recently launched with latest features on board + + + +[Crust CRM][19] is one of the best enterprise-level Slack/Salesforce alternatives. Well, the primary aim of Crust CRM is to provide you a unified platform. + +Crust CRM offers a community edition “Corteza” which is open-source in nature with all the latest features that you get with Crust CRM. It has been recently launched – so you can expect it to be compatible with a lot of services. You need to go through the [technical documentation][20] to set it up. + +[Corteza][21] + +#### 8\. X2CRM + +![][22] + +Key Highlights: + + * The open-source package is no longer actively maintained – but available. + * On-premise and hosted options available + + + +X2CRM is yet another convincing open source solution. The open source package includes all the modules (Sales, Marketing, and Support). + +However, do note that the open source package isn’t actively maintained anymore – so if you want the latest and greatest features, you will have to purchase it. You can let them manage everything (hosted solution) or you get to manage everything and opt for their support and optimization services (on-premise). + +[X2CRM][23] + +### Wrapping Up + +I had made the [list of best open source CMS][24] earlier. You may read that to get some ideas about which open source technology to use for creating your business website. + +Coming back to CRM, if you would ever consider trying out an open source CRM, these are the best ones I would recommend. Did I miss one of your favorites? Let us know about it in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-open-source-crm/ + +作者:[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/Customer_relationship_management +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/open-source-crm-software.png?resize=800%2C450&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/suitecrm-hosting.jpg?resize=800%2C457&ssl=1 +[4]: https://itsfoss.com/do-not-disturb-mode-ubuntu/ +[5]: https://itsfoss.com/suitecrm-ondemand/ +[6]: https://suitecrm.com/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/odoocrm.jpg?fit=800%2C384&ssl=1 +[8]: https://www.odoo.com/page/crm +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/vtiger.jpg?fit=800%2C419&ssl=1 +[10]: https://www.vtiger.com/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/concoursesuite-crm.jpg?fit=800%2C629&ssl=1 +[12]: https://www.concursive.com/show/concoursesuite/wiki/How+to+Get+ConcourseSuite +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/espo-crm.jpg?ssl=1 +[14]: https://itsfoss.com/best-linux-gaming-websites/ +[15]: https://github.com/espocrm/documentation +[16]: https://www.espocrm.com/ +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/axelor-crm.jpg?fit=800%2C526&ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/corteza.jpg?resize=800%2C417&ssl=1 +[19]: https://www.crust.tech/products/crust-crm/ +[20]: https://github.com/cortezaproject/corteza-docs +[21]: https://cortezaproject.org/ +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/x2crm.png?ssl=1 +[23]: https://x2crm.com/download +[24]: https://itsfoss.com/open-source-cms/ From b1b540f8c1a5a505f06ab3f2fb513897b730263d Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Mon, 22 Jul 2019 17:00:35 +0000 Subject: [PATCH 080/951] =?UTF-8?q?Revert=20"Revert=20"=E8=B6=85=E6=9C=9F?= =?UTF-8?q?=E5=9B=9E=E6=94=B6:=20sources/tech/20131228=20Introduction=20to?= =?UTF-8?q?=20Clojure=20-=20Modern=20dialect=20of=20Lisp=20(Part=201).md""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 359e0506a2a403d56de7a17a3c2009ee00b32598. --- ...Introduction to Clojure - Modern dialect of Lisp (Part 1).md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md b/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md index 0fb3c6469d..5e5f4df763 100644 --- a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md +++ b/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (ninifly) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 546ab9bb560be4df147fecc935a687bf3c990c65 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 23 Jul 2019 07:34:47 +0800 Subject: [PATCH 081/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ZhiW5217 恭喜你完成了第一篇翻译。 --- ... Microsoft Visio Alternatives for Linux.md | 163 ++++++++---------- 1 file changed, 75 insertions(+), 88 deletions(-) diff --git a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md index 575ab3045f..d146b9bd16 100644 --- a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md +++ b/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md @@ -1,37 +1,39 @@ -用于 Linux 中代替 Microsoft Visio 的十个最佳备选方案 +10 个 Linux 中最好的 Visio 替代品 ====== -**简介:如果您正在 Linux 中寻找一个好的 Visio 查看器,这里有一些可以在 Linux 中使用的 Microsoft Visio 的替代方案。** -Microsoft Visio 是创建或生成关键任务图和矢量表示的绝佳工具。虽然它可能是制作平面图或其他类型图表的好工具 - 但它既不是免费的,也不是开源的 +> 如果你正在 Linux 中寻找一个好的 Visio 查看器,这里有一些可以在 Linux 中使用的微软 Visio 的替代方案。 -此外,Microsoft Visio 不是一个独立的产品。它与 Microsoft Office 捆绑在一起。我们过去已经看过 MS Office 的开源替代品。今天我们将看到您可以使用哪些工具代替 Linux 上的 Visio。 +[微软 Visio][1] 是创建或生成关键任务图和矢量表示的绝佳工具。虽然它可能是制作平面图或其他类型图表的好工具 —— 但它既不是免费的,也不是开源的 -## 适用于 Linux 的最佳 Microsoft Visio 备选方案 +此外,微软 Visio 不是一个独立的产品。它与微软 Office 捆绑在一起。我们过去已经看过 [MS Office 的开源替代品][2]。今天我们将看看你可以在 Linux 上使用哪些工具代替 Visio。 -![用于 Linux 的 Microsoft Visio 备选方案][4] +### 适用于 Linux 的最佳 微软 Visio 备选方案 + +![用于 Linux 的微软 Visio 备选方案][4] 此处为强制性免责声明。该列表不是排名。排名第三的产品并不比排名第六的好。 -我还提到了一些可以从 Web 界面使用的非开源 Visio 软件。 +我还提到了两个可以从 Web 界面使用的非开源 Visio 软件。 -| 软件| 输入| 许可证类型| -| LibreOffice Draw | 桌面软件| 免费和开源| -| OpenOffice Draw | 桌面软件| 免费和开源| -| Dia | 桌面软件| 免费和开源| -| yED图形编辑器| 桌面和基于网络| 免费增值| -| Inkscape | 桌面软件| 免费和开源| -| 铅笔| 桌面和基于网络| 免费和开源| -| Graphviz | 桌面软件| 免费和开源| -| darw.io | 桌面和基于网络| 免费和开源| -| Lucidchart | 基于网络| 免费增值| -| Calligra Flow | 桌面软件| 免费和开源| +| 软件 | 类型 | 许可证类型 | +| --- | --- | --- | +| [LibreOffice Draw][6] | 桌面软件 | 自由开源 | +| [OpenOffice Draw][10] | 桌面软件 | 自由开源 | +| [Dia][12] | 桌面软件 | 自由开源 | +| [yED Graph Editor][14] | 桌面和基于 Web | 免费增值 | +| [Inkscape][16] | 桌面软件 | 自由开源 | +| [Pencil][18] | 桌面和基于 Web | 自由开源 | +| [Graphviz][20] | 桌面软件 | 自由开源 | +| [darw.io][22] | 桌面和基于 Web | 自由开源 | +| [Lucidchart][24] | 基于 Web | 免费增值 | +| [Calligra Flow][27] | 桌面软件 | 自由开源 | -### 1. LibreOffice Draw +### 1、LibreOffice Draw ![][5] -LibreOffice Draw 模块是 Microsoft Visio 的最佳开源替代方案之一。在它的帮助下,你可以选择制作一个想法的速写或一个复杂的专业平面布置图来展示。流程图,组织结构图,网络图,小册子,海报等等!所有这些都不需要花一分钱。 +LibreOffice Draw 模块是微软 Visio 的最佳开源替代方案之一。在它的帮助下,你可以选择制作一个想法的速写或一个复杂的专业平面布置图来展示。流程图、组织结构图、网络图、小册子、海报等等!所有这些都不需要花一分钱。 好的是它与 LibreOffice 捆绑在一起,默认情况下安装在大多数 Linux 发行版中。 @@ -41,68 +43,62 @@ LibreOffice Draw 模块是 Microsoft Visio 的最佳开源替代方案之一。 * Calc 数据可视化 * PDF 文件编辑功能 * 通过操作图库中的图片来创建相册 - * 灵活的绘图工具类似于 Microsoft Visio (智能连接器,尺寸线等)的工具 + * 灵活的绘图工具类似于 微软 Visio (智能连接器,尺寸线等)的工具 * 支持 .VSD 文件(打开) +官网:[LibreOffice Draw][6] - -[LibreOffice Draw][6] - -### 2. Apache OpenOffice Draw +### 2、Apache OpenOffice Draw ![][7] -很多人都知道 OpenOffice ( LibreOffice 项目最初基于它),但他们并没有真正提到 Apache OpenOffice Draw 作为 Microsoft Visio 的替代方案。但事实上,它是另一个令人惊奇的开源图表软件工具。与 LibreOffice Draw 不同,它不支持编辑 PDF 文件,但它为任何类型的图表创建提供了绘图工具。 +很多人都知道 OpenOffice(LibreOffice 项目最初就是基于它的),但他们并没有真正意识到 Apache OpenOffice Draw 可以作为微软 Visio 的替代方案。但事实上,它是另一个令人惊奇的开源图表软件工具。与 LibreOffice Draw 不同,它不支持编辑 PDF 文件,但它为任何类型的图表创建提供了绘图工具。 -这只是个警告。仅当您的系统中已经有 OpenOffice 时才使用此工具。这是因为[安装 OpenOffice ][8] 是一件痛苦的事情,而且[不再继续开发][9]。 +这只是个警告。仅当你的系统中已经有 OpenOffice 时才使用此工具。这是因为[安装 OpenOffice][8] 是一件痛苦的事情,而且它已经[不再继续开发][9]。 #### 主要功能概述: * 快速创建 3D 形状控制器 - * 创建(.swf)工作的 flash 版本 + * 创建作品的 flash 版本(.swf) * 样式和格式工具 - * 与M icrosoft Visio 类似的灵活绘图工具(智能连接器,尺寸线等) + * 与微软 Visio 类似的灵活绘图工具(智能连接器、尺寸线等) +官网:[Apache OpenOffice Draw][10] - -[Apache OpenOffice Draw][10] - -### 3. Dia +### 3、Dia ![][11] -Dia 是另一个有趣的开源工具。它可能不像前面提到的那样处于积极发展之中。但是,如果您正在寻找一个免费的,开源的替代 Microsoft Visio 的简单而体面的图表,那么 Dia 可能是您的选择。这个工具唯一让你失望的地方就是它的用户界面。除此之外,它还允许您为复杂的图使用强大的工具(但它看起来可能不太好——所以我们建议您使用更简单的图)。 +Dia 是另一个有趣的开源工具。它可能不像前面提到的那样处于积极开发之中。但是,如果你正在寻找一个自由而开源的替代微软 Visio 的简单而体面的图表,那么 Dia 可能是你的选择。这个工具可能唯一让你失望的地方就是它的用户界面。除此之外,它还允许你为复杂的图使用强大的工具(但它看起来可能不太好 —— 所以我们建议你用于更简单的图)。 #### 主要功能概述: * 它可以通过命令行使用 * 样式和格式工具 * 用于自定义形状的形状存储库 - * 与 Microsoft Visio 类似的绘图工具(特殊对象,网格线,图层等) + * 与微软 Visio 类似的绘图工具(特殊对象、网格线、图层等) * 跨平台 +官网:[Dia][12] +### 4、yED Graph Editor -[Dia][12] +[视频](https://youtu.be/OmSTwKw7dX4) -### 4. yED Graph Editor - -是最受欢迎的免费 Microsoft Visio 替代方案之一。如果你担心它是一个免费软件而不是开源项目,您仍然可以通过 web 浏览器免费使用 yED 的实时编辑器。如果您想用一个非常易于使用的界面快速绘制图表,这是最好的建议之一。 +是最受欢迎的免费的微软 Visio 替代方案之一。如果你对它是一个免费软件而不是开源项目有些担心,你仍然可以通过 web 浏览器免费使用 [yED 的实时编辑器][13]。如果你想用一个非常易于使用的界面快速绘制图表,这是最好的建议之一。 #### 主要功能概述: * 拖放功能,方便图表制作 * 支持导入外部数据进行链接 +官网:[yED Graph Editor][14] - -[yED Graph Editor][14] - -### 5. Inkscape +### 5、Inkscape ![][15] -Inkscape 是一个免费的开源矢量图形编辑器。您将了解创建流程图或数据流程图的基本功能。它不提供高级的图表绘制工具,而是提供创建更简单图表的基本工具。因此,Inkscape 可能是您的 Visio 替代品,只有当您希望通过使用图库中的可用符号,在图库连接器工具的帮助下生成基本图时,才可以使用它。 +Inkscape 是一个自由开源的矢量图形编辑器。你将拥有创建流程图或数据流程图的基本功能。它不提供高级的图表绘制工具,而是提供创建更简单图表的基本工具。因此,当你希望通过使用图库中的可用符号,在图库连接器工具的帮助下生成基本图时,Inkscape 可能是你的 Visio 替代品。 #### 主要功能概述: @@ -110,17 +106,15 @@ Inkscape 是一个免费的开源矢量图形编辑器。您将了解创建流 * 灵活的绘图工具 * 广泛的文件格式兼容性 +官网:[Inkscape][16] - -[Inkscape][16] - -### 6. Pencil Project +### 6、Pencil 项目 ![][17] -Pencil Project 是一个令人印象深刻的开源项目,适用于 Windows 和 Mac 以及 Linux。它具有易于使用的 GUI,使绘图更容易和方便。一个很好的内建形状和符号的集合,使您的图表看起来很棒。它还内置了 Android 和 iOS UI 模板,可以让你在需要时创建应用程序原型。 +Pencil 项目是一个令人印象深刻的开源项目,适用于 Windows、Mac 以及 Linux。它具有易于使用的图形界面,使绘图更容易和方便。它有一个很好的内建形状和符号的集合,可以使你的图表看起来很棒。它还内置了 Android 和 iOS UI 模板,可以让你在需要时创建应用程序原型。 -您也可以将其安装为 Firefox 扩展,但该扩展不能使用项目的最新版本。 +你也可以将其安装为 Firefox 扩展,但该扩展不能使用项目的最新版本。 #### 主要功能概述: @@ -129,15 +123,13 @@ Pencil Project 是一个令人印象深刻的开源项目,适用于 Windows * 图表连接工具 * 跨平台 +官网:[Pencil 项目][18] -[Pencil Project][18] - -### 7. Graphviz - +### 7、Graphviz ![][19] -Graphviz 略有不同。它不是绘图工具,而是专用的图形可视化工具。如果您在网络图中需要多个设计来表示一个节点,那么一定要使用这个工具。当然,你不能用这个工具做平面布置图(至少这不容易)。因此,它最适合于网络图,生物信息学,数据库连接和类似的东西。 +Graphviz 略有不同。它不是绘图工具,而是专用的图形可视化工具。如果你在网络图中需要多个设计来表示一个节点,那么一定要使用这个工具。当然,你不能用这个工具做平面布置图(至少这不容易)。因此,它最适合于网络图、生物信息学、数据库连接和类似的东西。 #### 主要功能概述: @@ -145,68 +137,63 @@ Graphviz 略有不同。它不是绘图工具,而是专用的图形可视化 * 支持自定义形状和表格节点布局 * 基本样式和格式设置工具 +官网:[Graphviz][20] +### 8、Draw.io -[Graphviz][20] +[视频](https://youtu.be/Z0D96ZikMkc) -### 8. Draw.io +Draw.io 主要是一个基于 Web 的免费图表工具,它的强大的工具几乎可以制作任何类型的图表。你只需要拖放然后连接它们以创建流程图、ER 图或任何相关的。此外,如果你喜欢该工具,则可以尝试[离线桌面版本][21]。 -Draw.io 主要是一个免费的基于 Web 的图表工具,它有强大的工具几乎可以制作任何类型的图表。您只需要拖放然后连接它们以创建流程图,ER 图或任何相关的。此外,如果您喜欢该工具,则可以尝试[离线桌面版本][21]。 - -**主要功能概述:** +#### 主要功能概述: * 直接上传到云存储服务 * 自定义形状 * 样式和格式工具 * 跨平台 +官网:[Draw.io][22] - -[Draw.io][22] - -### 9. Lucidchart +### 9、Lucidchart ![][23] -Lucidchart 是一个高级的基于 Web 的图表工具,它提供了一个具有有限功能的免费订阅。您可以使用免费订阅创建几种类型的图表,并将其导出为图像或 PDF。但是,免费版本不支持数据链接和 Visio 导入/导出功能。如果您不需要数据链接 Lucidchart 可以说是一个非常好的工具,同时可以生成漂亮的图表。 +Lucidchart 是一个基于 Web 的高级图表工具,它提供了一个具有有限功能的免费订阅。你可以使用免费订阅创建几种类型的图表,并将其导出为图像或 PDF。但是,免费版本不支持数据链接和 Visio 导入/导出功能。如果你不需要数据链接功能,Lucidchart 可以说是一个生成漂亮的图表的非常好的工具。 -####主要功能概述: +#### 主要功能概述: - * 集成到 Slack,Jira 核心,Confluence + * 可以集成到 Slack、Jira 核心、Confluence * 能够制作产品模型 * 导入 Visio 文件 +官网:[Lucidchart][24] - -[Lucidchart][24] - -### 10. Calligra Flow +### 10、Calligra Flow ![calligra flow][25] -Calligra Flow 是[Calligra Project][26]的一部分,宗旨市提供免费和开源的软件工具。使用 Calligra flow 您可以轻松地创建网络图,实体关系图,流程图等 +Calligra Flow 是 [Calligra 项目][26]的一部分,旨在提供自由开源的软件工具。使用 Calligra flow 你可以轻松地创建网络图、实体关系图、流程图等 #### 主要功能概述: * 各种模具盒 * 样式和格式工具 - - -[Calligra Flow][27] +官网:[Calligra Flow][27] ### 总结 -既然你已经知道了最好的免费和开源的 Visio 替代方案,你对它们有什么看法? +既然你已经了解到了这些最好的自由开源的 Visio 替代方案,你对它们有什么看法? + +对于你任何方面的需求,它们是否优于 微软 Visio?另外,如果我们错过了你最喜欢的基于 Linux 的替代微软 Visio 的绘图工具,请在下面的评论中告诉我们。 -在您任何方面的需求中,它们是否优于 Microsoft Visio?另外,如果我们错过了您最喜欢的基于 Linux 替代 Microsoft Visio 的绘图工具,请在下面的评论中告诉我们。 -------------------------------------------------------------------------------- via: https://itsfoss.com/visio-alternatives-linux/ 作者:[Ankush Das][a] -译者:[ZhiW5217](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[ZhiW5217](https://github.com/ZhiW5217) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -214,27 +201,27 @@ via: https://itsfoss.com/visio-alternatives-linux/ [1]:https://products.office.com/en/visio/flowchart-software [2]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ [3]:data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs= -[4]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png -[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg +[4]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png +[5]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg [6]:https://www.libreoffice.org/discover/draw/ -[7]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg +[7]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg [8]:https://itsfoss.com/install-openoffice-ubuntu-linux/ [9]:https://itsfoss.com/openoffice-shutdown/ [10]:https://www.openoffice.org/product/draw.html -[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/dia-screenshot.jpg +[11]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/dia-screenshot.jpg [12]:http://dia-installer.de/ [13]:https://www.yworks.com/products/yed-live [14]:https://www.yworks.com/products/yed -[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg +[15]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg [16]:https://inkscape.org/en/ -[17]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/pencil-project.jpg +[17]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/pencil-project.jpg [18]:http://pencil.evolus.vn/Downloads.html -[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/graphviz.jpg +[19]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/graphviz.jpg [20]:http://graphviz.org/ [21]:https://about.draw.io/integrations/#integrations_offline [22]:https://about.draw.io/ -[23]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg +[23]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg [24]:https://www.lucidchart.com/ -[25]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/calligra-flow.jpg +[25]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/calligra-flow.jpg [26]:https://www.calligra.org/ [27]:https://www.calligra.org/flow/ From c70e7e72d424a3c2570de782b48b4afd7fcf7cc3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 23 Jul 2019 07:36:06 +0800 Subject: [PATCH 082/951] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ZhiW5217 本文首发地址: https://linux.cn/article-11138-1.html 你的 LCTT 专页地址: https://linux.cn/lctt/ZhiW5217 请注册领取你的 LCCN: https://lctt.linux.cn/ --- .../20171226 Top 10 Microsoft Visio Alternatives for Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20171226 Top 10 Microsoft Visio Alternatives for Linux.md (100%) diff --git a/translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md similarity index 100% rename from translated/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md rename to published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md From 72a29190a2a0595d8db7b26ca9a83182c4853be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 23 Jul 2019 08:15:35 +0800 Subject: [PATCH 083/951] Translating --- ...Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md index bc17875b14..6c28cfb644 100644 --- a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md +++ b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e75eda41ee8bbf86727e4b188eef4d4a0bda786a Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 23 Jul 2019 08:57:35 +0800 Subject: [PATCH 084/951] translated --- ... quickly view JPG images as a slideshow.md | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md diff --git a/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md deleted file mode 100644 index d26c9cea62..0000000000 --- a/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md +++ /dev/null @@ -1,53 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) -[#]: via: (https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10) -[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) - -Use ImageGlass to quickly view JPG images as a slideshow -====== -Want to view images from a folder one-by-one in a slideshow on Windows -10? Open source to the rescue. -![Looking back with binoculars][1] - -Welcome to today’s episode of "How Can I Make This Work?" In my case, I was trying to view a folder of JPG images as a slideshow on Windows 10. As often happens, I turned to open source to solve the issue. - -On a Mac, viewing a folder of JPG images as a slideshow is a simple matter of selecting all the images in a folder ( **Command-A** ), and then pressing **Option-Command-Y**. From there, you can advance the images with the arrow key. Of course, you can do a similar thing on Windows by selecting the first image, then clicking on the window frame's yellow **Manage** bar, then selecting **Slide Show**. There, you can control the speed, but only to a point: slow, medium, and fast. - -I wanted to advance the images in Windows the same way I do it on a Mac. Naturally, I fired up the Googler and searched for a solution. There, I found the [ImageGlass][2] open source app, [licensed GPL 3.0][3], and it did the trick perfectly. Here's what it looks like: - -![Viewing an image in ImageGlass.][4] - -### About ImageGlass - -ImageGlass was developed by Dương Diệu Pháp, a Vietnamese developer who works on the front end for Chainstack, according to his website. He collaborates with US-based [Kevin Routley][5], who "develops new features for ImageGlass." The source code is available on [GitHub][6]. - -ImageGlass supports most common image formats, including JPG, GIF, PNG, WEBP, SVG, and RAW. Users can customize this extension list easily. - -My specific problem was needing to find an image for a catalog cover. Unfortunately, it was in a folder containing dozens of photos. Navigating through the slideshow in ImageGlass, stopping on the image I wanted, and downloading it into my project folder turned out to be easy. Open source to the rescue yet again, and the app took only seconds to download and use. - -ImageGlass was featured as a Picasa alternative in Jason Baker’s article [9 open source alternatives to][7] [Picasa][7] from March 10, 2016. There are some other interesting image-related open source tools in there as well if you are in need. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10 - -作者:[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/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) -[2]: https://imageglass.org/ -[3]: https://github.com/d2phap/ImageGlass/blob/master/LICENSE -[4]: https://opensource.com/sites/default/files/uploads/imageglass-screenshot.png (Viewing an image in ImageGlass.) -[5]: https://github.com/fire-eggs -[6]: https://github.com/d2phap/ImageGlass -[7]: https://opensource.com/alternatives/picasa From 73eb257e2215b57425ef6589a07a2f3697122b80 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 23 Jul 2019 08:57:41 +0800 Subject: [PATCH 085/951] translated --- ... quickly view JPG images as a slideshow.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md diff --git a/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md new file mode 100644 index 0000000000..92dd792db0 --- /dev/null +++ b/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md @@ -0,0 +1,52 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) +[#]: via: (https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10) +[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) + +使用 ImageGlass 以幻灯片形式快速查看 JPG 图像 +====== +想在 Windows 10 中以幻灯片形式逐个查看文件夹中的图像么?开源软件可以做到。 +![Looking back with binoculars][1] + +欢迎阅读今天的系列文章 “我该如何让它实现?”就我而言,我试图在 Windows 10 上以幻灯片形式查看 JPG 图像的文件夹。这个经常发生,我转向开源来解决这个问题。 + +在Mac上,以幻灯片形式查看 JPG 图像文件夹只需选择文件夹中的所有图像(**Command-A**),然后按 **Option-Command-Y**即可。之后,你可以使用箭头键向前。当然,在 Windows 中,你可以通过选择第一个图像,然后单击窗口中黄色的**管理**栏,然后选择**幻灯片**来执行类似的操作。在那里,你可以控制速度,但只能做到:慢,中,快。 + +我希望像在 Windows 中能像 Mac 一样翻下一张图片。自然地,我 google 搜索了一下并找到了一个方案。我发现了 [ImageGlass][2] 这个开源应用,许可证是 [GPL 3.0][3],并且它完美地做到了。这是它的样子: + +![Viewing an image in ImageGlass.][4] + +### 关于 ImageGlass + +ImageGlass是由 Dương Diệu Pháp 开发的,根据他的网站,他是一名越南开发人员,在 Chainstack 负责前端。他与美国人 [Kevin Routley][5] 协作,后者“为ImageGlass开发新功能”。源代码可以在 [GitHub][6] 上找到。 + +ImageGlass 支持最常见的图像格式,包括 JPG、GIF、PNG、WEBP、SVG 和 RAW。用户可以轻松自定义扩展名列表。 + +我遇到的具体问题是需要找到一张用于目录封面的图像。不幸的是,它在一个包含数十张照片的文件夹中。在 ImageGlass 中以幻灯片浏览照片,在我想要的照片前停止,并将其下载到我的项目文件夹中变得很容易。开源再次帮助了我,应用只花很短的时间下载和使用。 + +在 2016 年 3 月 10 日,Jason Baker 在他的文章 [9 款 Picasa 的开源替代品][7] 中将 ImageGlass 列为其中之一。如果你有需求,里面还有一些其他有趣的图像相关工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10 + +作者:[Jeff Macharyas][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/jeffmacharyas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) +[2]: https://imageglass.org/ +[3]: https://github.com/d2phap/ImageGlass/blob/master/LICENSE +[4]: https://opensource.com/sites/default/files/uploads/imageglass-screenshot.png (Viewing an image in ImageGlass.) +[5]: https://github.com/fire-eggs +[6]: https://github.com/d2phap/ImageGlass +[7]: https://opensource.com/alternatives/picasa From 3b476f4d096f50d955304bb0f56a4711b15a40be Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 23 Jul 2019 10:03:29 +0800 Subject: [PATCH 086/951] translating --- ...717 Bond WiFi and Ethernet for easier networking mobility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md index 4eeabbeeb6..bcde06e8a1 100644 --- a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md +++ b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2fee1f384605dc1dc1228fc307277e262ef4e1ab Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 23 Jul 2019 23:33:03 +0800 Subject: [PATCH 087/951] PRF @geekpi --- ...o quickly view JPG images as a slideshow.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md index 92dd792db0..b9901c80ba 100644 --- a/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md +++ b/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) @@ -9,24 +9,26 @@ 使用 ImageGlass 以幻灯片形式快速查看 JPG 图像 ====== -想在 Windows 10 中以幻灯片形式逐个查看文件夹中的图像么?开源软件可以做到。 + +> 想要在 Windows 10 中以幻灯片形式逐个查看文件夹中的图像么?开源软件可以做到。 + ![Looking back with binoculars][1] -欢迎阅读今天的系列文章 “我该如何让它实现?”就我而言,我试图在 Windows 10 上以幻灯片形式查看 JPG 图像的文件夹。这个经常发生,我转向开源来解决这个问题。 +欢迎阅读今天的系列文章 “我该如何让它实现?”就我而言,我试图在 Windows 10 上以幻灯片形式查看 JPG 图像的文件夹。像往常一样,我转向开源来解决这个问题。 -在Mac上,以幻灯片形式查看 JPG 图像文件夹只需选择文件夹中的所有图像(**Command-A**),然后按 **Option-Command-Y**即可。之后,你可以使用箭头键向前。当然,在 Windows 中,你可以通过选择第一个图像,然后单击窗口中黄色的**管理**栏,然后选择**幻灯片**来执行类似的操作。在那里,你可以控制速度,但只能做到:慢,中,快。 +在 Mac 上,以幻灯片形式查看 JPG 图像文件夹只需选择文件夹中的所有图像(`Command-A`),然后按 `Option-Command-Y` 即可。之后,你可以使用箭头键向前翻动。当然,在 Windows 中,你可以通过选择第一个图像,然后单击窗口中黄色的**管理**栏,然后选择**幻灯片**来执行类似的操作。在那里,你可以控制速度,但只能做到:慢、中、快。 -我希望像在 Windows 中能像 Mac 一样翻下一张图片。自然地,我 google 搜索了一下并找到了一个方案。我发现了 [ImageGlass][2] 这个开源应用,许可证是 [GPL 3.0][3],并且它完美地做到了。这是它的样子: +我希望像在 Windows 中能像 Mac 一样翻下一张图片。自然地,我 Google 搜索了一下并找到了一个方案。我发现了 [ImageGlass][2] 这个开源应用,其许可证是 [GPL 3.0][3],并且它完美地做到了。这是它的样子: ![Viewing an image in ImageGlass.][4] ### 关于 ImageGlass -ImageGlass是由 Dương Diệu Pháp 开发的,根据他的网站,他是一名越南开发人员,在 Chainstack 负责前端。他与美国人 [Kevin Routley][5] 协作,后者“为ImageGlass开发新功能”。源代码可以在 [GitHub][6] 上找到。 +ImageGlass 是由 Dương Diệu Pháp 开发的,根据他的网站,他是一名越南开发人员,在 Chainstack 负责前端。他与在美国的 [Kevin Routley][5] 协作,后者“为 ImageGlass 开发新功能”。源代码可以在 [GitHub][6] 上找到。 ImageGlass 支持最常见的图像格式,包括 JPG、GIF、PNG、WEBP、SVG 和 RAW。用户可以轻松自定义扩展名列表。 -我遇到的具体问题是需要找到一张用于目录封面的图像。不幸的是,它在一个包含数十张照片的文件夹中。在 ImageGlass 中以幻灯片浏览照片,在我想要的照片前停止,并将其下载到我的项目文件夹中变得很容易。开源再次帮助了我,应用只花很短的时间下载和使用。 +我遇到的具体问题是需要找到一张用于目录封面的图像。不幸的是,它在一个包含数十张照片的文件夹中。在 ImageGlass 中以幻灯片浏览照片,在我想要的照片前停止,并将其下载到我的项目文件夹中变得很容易。开源再次帮助了我,该应用只花了很短的时间下载和使用。 在 2016 年 3 月 10 日,Jason Baker 在他的文章 [9 款 Picasa 的开源替代品][7] 中将 ImageGlass 列为其中之一。如果你有需求,里面还有一些其他有趣的图像相关工具。 @@ -37,7 +39,7 @@ via: https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slidesho 作者:[Jeff Macharyas][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 ae99962c1d35140e50af2565edbdadc74c6d9d91 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 23 Jul 2019 23:34:48 +0800 Subject: [PATCH 088/951] PUB @geekpi https://linux.cn/article-11141-1.html --- ...se ImageGlass to quickly view JPG images as a slideshow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md (97%) diff --git a/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md similarity index 97% rename from translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md rename to published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md index b9901c80ba..8d60619efc 100644 --- a/translated/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md +++ b/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11141-1.html) [#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) [#]: via: (https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10) [#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) From 38dd7895dd12909968c03743fe9436ef2ff06778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=E2=99=A1Adele?= Date: Wed, 24 Jul 2019 00:38:37 +0800 Subject: [PATCH 089/951] Merge (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * PART * TSL PART 2 * 完成翻译 (╯°Д°)╯ ┻━┻ * translated by hopefully2333 translated by hopefully2333 * 申领原文 * Update 20190715 What is POSIX- Richard Stallman explains.md * 提交译文:20190710 Test 200- Linux And Unix Operating Systems Online For Free * 提交译文:20190710 Test 200- Linux And Unix Operating Systems Online For Free * TSL 初译 * TSL:20190708 10 ways to get started with Linux * APL:20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore * TSL&PRF:20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md * PUB @wxy https://linux.cn/article-11110-1.html * 选题: 20190716 Security scanning your DevOps pipeline sources/tech/20190716 Security scanning your DevOps pipeline.md * 选题: 20190716 Save and load Python data with JSON sources/tech/20190716 Save and load Python data with JSON.md * 选题: 20190716 Become a lifelong learner and succeed at work sources/tech/20190716 Become a lifelong learner and succeed at work.md * Translated * translated * translating * 提交翻译 * 提交翻译 * update * heguangzhi is translating * PRF @vizv * heguangzhi translated * leemeans translating leemeans translating 7 deadly sins of documentation * PRF @vizv * PUB @vizv https://linux.cn/article-11113-1.html * PRF @geekpi * PUB @geekpi https://linux.cn/article-11115-1.html * PRF @0x996 翻译的不错!恭喜你,完成了第一篇翻译! * PRF @WangYueScream 这篇翻译的很好呀 * PUB @WangYueScream https://linux.cn/article-11116-1.html * 选题: 20190717 Bond WiFi and Ethernet for easier networking mobility sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md * 选题: 20190718 Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md * 选题: 20190717 Start tinkering with the Circuit Playground Express sources/tech/20190717 Start tinkering with the Circuit Playground Express.md * 选题: 20190717 Get going with EtherCalc, a web-based alternative to Google Sheets sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md * 选题: 20190717 How to install Kibana on MacOS sources/tech/20190717 How to install Kibana on MacOS.md * 选题: 20190717 Public internet should be all software-defined sources/talk/20190717 Public internet should be all software-defined.md * 选题: 20190717 How edge computing is driving a new era of CDN sources/talk/20190717 How edge computing is driving a new era of CDN.md * 选题: 20190717 Mastering user groups on Linux sources/tech/20190717 Mastering user groups on Linux.md * 选题: 20190717 MPLS is hanging on in this SD-WAN world sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md * 选题: 20190716 Server hardware makers shift production out of China sources/talk/20190716 Server hardware makers shift production out of China.md * translated * translating * PUB @0x996 本文首发地址: https://linux.cn/article-11118-1.html 您的 LCTT 专页地址: https://linux.cn/lctt/0x996 请注册领取 LCCN: https://lctt.linux.cn/ * Rename sources/tech/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md to sources/news/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md * Update 20171226 Top 10 Microsoft Visio Alternatives for Linux.md * Translated * f * PRF @qfzy1233 * PUB @qfzy1233 https://linux.cn/article-11119-1.html * 选题: 20190718 What you need to know to be a sysadmin sources/tech/20190718 What you need to know to be a sysadmin.md * 选题: 20190718 Redirect a GitHub Pages site with this HTTP hack sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md * 选题: 20190718 How to apply 'release early, release often' to build a better brand sources/tech/20190718 How to apply -release early, release often- to build a better brand.md * 选题: 20190718 Smart cities offer window into the evolution of enterprise IoT technology sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md * PRF @robsean 这篇翻译的很认真 * PUB @robsean https://linux.cn/article-11120-1.html * APL:20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md * TSL&PRF:20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md * PUB:20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md @wxy https://linux.cn/article-11121-1.html * translating * translated * translating * heguangzhi translated * translated * translated * heguangzhi tranlated * APL:20190717 Mastering user groups on Linux * PRF @MjSeven * PUB @MjSeven https://linux.cn/article-11123-1.html * 选题: 20190719 Modifying Windows local accounts with Fedora and chntpw sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md * 选题: 20190719 Buying a Linux-ready laptop sources/tech/20190719 Buying a Linux-ready laptop.md * 选题: 20190718 Worst DNS attacks and how to mitigate them sources/talk/20190718 Worst DNS attacks and how to mitigate them.md * PRF @wxy * PUB @wxy https://linux.cn/article-11124-1.html * PRF @geekpi * PUB @geekpi https://linux.cn/article-11125-1.html * hankchow translating * hankchow translated * hankchow translated * 申请翻译 20190718 What you need to know to be a sysadmin.md 申请翻译 20190718 What you need to know to be a sysadmin.md * PRF @geekpi * PUB @geekpi https://linux.cn/article-11128-1.html * PRF @heguangzhi * PUB @heguangzhi https://linux.cn/article-11130-1.html * PRF @hopefully2333 原文逻辑不通,我做了段落调整 * PUB @hopefully2333 https://linux.cn/article-11132-1.html * PRF @HankChow * PUB @HankChow https://linux.cn/article-11133-1.html * 选题: 20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md * translated * translating * APL:20190717 How to install Kibana on MacOS * PRF * TSL&PRF * PUB @wxy https://linux.cn/article-11135-1.html * 选题: 20190723 How to Create a User Account Without useradd Command in Linux? sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md * 选题: 20190722 How to run virtual machines with virt-manager sources/tech/20190722 How to run virtual machines with virt-manager.md * 选题: 20190723 8 Best Open Source CRM Software sources/tech/20190723 8 Best Open Source CRM Software.md * Revert "Revert "超期回收: sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md"" This reverts commit 359e0506a2a403d56de7a17a3c2009ee00b32598. * PRF @ZhiW5217 恭喜你完成了第一篇翻译。 * PUB @ZhiW5217 本文首发地址: https://linux.cn/article-11138-1.html 你的 LCTT 专页地址: https://linux.cn/lctt/ZhiW5217 请注册领取你的 LCCN: https://lctt.linux.cn/ * Translating * translated * translated * PRF @geekpi * PUB @geekpi https://linux.cn/article-11141-1.html --- ... Microsoft Visio Alternatives for Linux.md | 227 ++++++++ ...Mid-Weight Distro Focused on Simplicity.md | 126 +++++ ...s to computational thinking with Python.md | 35 +- ... quickly view JPG images as a slideshow.md | 54 ++ ...stall Security Updates on Debian-Ubuntu.md | 70 ++- ...lete A Repository And GPG Key In Ubuntu.md | 136 +++++ ...90708 10 ways to get started with Linux.md | 184 +++++++ ...08 Command line quick tips- Permissions.md | 126 +++++ ... Sysadmin vs SRE- What-s the difference.md | 62 +++ ... life support- Cross-compiling with GCC.md | 178 +++++++ ... Unix Operating Systems Online For Free.md | 256 +++++++++ ...1 How to install Elasticsearch on MacOS.md | 144 ++++++ ...ktop Client for ProtonMail and Tutanota.md | 106 ++++ ...a Driver Updates -No PPA Needed Anymore.md | 79 +++ ... a lifelong learner and succeed at work.md | 72 +++ ...716 Save and load Python data with JSON.md | 128 +++++ ...20190717 How to install Kibana on MacOS.md | 113 ++++ ...r Foundation with -1.2m Epic MegaGrants.md | 98 ++++ ...a Driver Updates -No PPA Needed Anymore.md | 81 --- ... quickly view JPG images as a slideshow.md | 53 -- ...ns in Vendor Lock-in- Google and Huawei.md | 17 +- ...re makers shift production out of China.md | 73 +++ ...e computing is driving a new era of CDN.md | 107 ++++ ...MPLS is hanging on in this SD-WAN world.md | 71 +++ ...internet should be all software-defined.md | 73 +++ ... evolution of enterprise IoT technology.md | 102 ++++ ...st DNS attacks and how to mitigate them.md | 151 ++++++ ...ojure - Modern dialect of Lisp (Part 1).md | 2 +- ...20171006 7 deadly sins of documentation.md | 1 + ... Microsoft Visio Alternatives for Linux.md | 242 --------- .../20190703 Parse arguments with Python.md | 2 +- ...lete A Repository And GPG Key In Ubuntu.md | 134 ----- ...90708 10 ways to get started with Linux.md | 184 ------- ...08 Command line quick tips- Permissions.md | 133 ----- ... Sysadmin vs SRE- What-s the difference.md | 63 --- ... life support- Cross-compiling with GCC.md | 189 ------- ... Unix Operating Systems Online For Free.md | 269 ---------- ...1 How to install Elasticsearch on MacOS.md | 154 ------ ...apital Letters To Run Them As Sudo User.md | 162 ------ ...ktop Client for ProtonMail and Tutanota.md | 118 ----- ... Understanding software design patterns.md | 364 ------------- ...hat is POSIX- Richard Stallman explains.md | 2 +- ... Security scanning your DevOps pipeline.md | 488 ++++++++++++++++++ ...Ethernet for easier networking mobility.md | 126 +++++ ... web-based alternative to Google Sheets.md | 130 +++++ ...20190717 Mastering user groups on Linux.md | 225 ++++++++ ...ing with the Circuit Playground Express.md | 96 ++++ ... release often- to build a better brand.md | 110 ++++ ...a GitHub Pages site with this HTTP hack.md | 85 +++ ... What you need to know to be a sysadmin.md | 121 +++++ .../20190719 Buying a Linux-ready laptop.md | 80 +++ ...s local accounts with Fedora and chntpw.md | 375 ++++++++++++++ ... to Debian 10 (Buster) via Command Line.md | 165 ++++++ ... run virtual machines with virt-manager.md | 169 ++++++ ...0190723 8 Best Open Source CRM Software.md | 230 +++++++++ ...ccount Without useradd Command in Linux.md | 119 +++++ ...Mid-Weight Distro Focused on Simplicity.md | 139 ----- ...apital Letters To Run Them As Sudo User.md | 163 ++++++ ... Understanding software design patterns.md | 360 +++++++++++++ 59 files changed, 5769 insertions(+), 2353 deletions(-) create mode 100644 published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md create mode 100644 published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md rename {translated/talk => published}/20190211 Introducing kids to computational thinking with Python.md (54%) create mode 100644 published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md rename {sources/tech => published}/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md (80%) create mode 100644 published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md create mode 100644 published/20190708 10 ways to get started with Linux.md create mode 100644 published/20190708 Command line quick tips- Permissions.md create mode 100644 published/20190709 Sysadmin vs SRE- What-s the difference.md create mode 100644 published/20190710 32-bit life support- Cross-compiling with GCC.md create mode 100644 published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md create mode 100644 published/20190711 How to install Elasticsearch on MacOS.md create mode 100644 published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md create mode 100644 published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md create mode 100644 published/20190716 Become a lifelong learner and succeed at work.md create mode 100644 published/20190716 Save and load Python data with JSON.md create mode 100644 published/20190717 How to install Kibana on MacOS.md create mode 100644 published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md delete mode 100644 sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md delete mode 100644 sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md create mode 100644 sources/talk/20190716 Server hardware makers shift production out of China.md create mode 100644 sources/talk/20190717 How edge computing is driving a new era of CDN.md create mode 100644 sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md create mode 100644 sources/talk/20190717 Public internet should be all software-defined.md create mode 100644 sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md create mode 100644 sources/talk/20190718 Worst DNS attacks and how to mitigate them.md delete mode 100644 sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md delete mode 100644 sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md delete mode 100644 sources/tech/20190708 10 ways to get started with Linux.md delete mode 100644 sources/tech/20190708 Command line quick tips- Permissions.md delete mode 100644 sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md delete mode 100644 sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md delete mode 100644 sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md delete mode 100644 sources/tech/20190711 How to install Elasticsearch on MacOS.md delete mode 100644 sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md delete mode 100644 sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md delete mode 100644 sources/tech/20190715 Understanding software design patterns.md create mode 100644 sources/tech/20190716 Security scanning your DevOps pipeline.md create mode 100644 sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md create mode 100644 sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md create mode 100644 sources/tech/20190717 Mastering user groups on Linux.md create mode 100644 sources/tech/20190717 Start tinkering with the Circuit Playground Express.md create mode 100644 sources/tech/20190718 How to apply -release early, release often- to build a better brand.md create mode 100644 sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md create mode 100644 sources/tech/20190718 What you need to know to be a sysadmin.md create mode 100644 sources/tech/20190719 Buying a Linux-ready laptop.md create mode 100644 sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md create mode 100644 sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md create mode 100644 sources/tech/20190722 How to run virtual machines with virt-manager.md create mode 100644 sources/tech/20190723 8 Best Open Source CRM Software.md create mode 100644 sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md delete mode 100644 translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md create mode 100644 translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md create mode 100644 translated/tech/20190715 Understanding software design patterns.md diff --git a/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md new file mode 100644 index 0000000000..d146b9bd16 --- /dev/null +++ b/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md @@ -0,0 +1,227 @@ +10 个 Linux 中最好的 Visio 替代品 +====== + +> 如果你正在 Linux 中寻找一个好的 Visio 查看器,这里有一些可以在 Linux 中使用的微软 Visio 的替代方案。 + +[微软 Visio][1] 是创建或生成关键任务图和矢量表示的绝佳工具。虽然它可能是制作平面图或其他类型图表的好工具 —— 但它既不是免费的,也不是开源的 + +此外,微软 Visio 不是一个独立的产品。它与微软 Office 捆绑在一起。我们过去已经看过 [MS Office 的开源替代品][2]。今天我们将看看你可以在 Linux 上使用哪些工具代替 Visio。 + +### 适用于 Linux 的最佳 微软 Visio 备选方案 + +![用于 Linux 的微软 Visio 备选方案][4] + +此处为强制性免责声明。该列表不是排名。排名第三的产品并不比排名第六的好。 + +我还提到了两个可以从 Web 界面使用的非开源 Visio 软件。 + +| 软件 | 类型 | 许可证类型 | +| --- | --- | --- | +| [LibreOffice Draw][6] | 桌面软件 | 自由开源 | +| [OpenOffice Draw][10] | 桌面软件 | 自由开源 | +| [Dia][12] | 桌面软件 | 自由开源 | +| [yED Graph Editor][14] | 桌面和基于 Web | 免费增值 | +| [Inkscape][16] | 桌面软件 | 自由开源 | +| [Pencil][18] | 桌面和基于 Web | 自由开源 | +| [Graphviz][20] | 桌面软件 | 自由开源 | +| [darw.io][22] | 桌面和基于 Web | 自由开源 | +| [Lucidchart][24] | 基于 Web | 免费增值 | +| [Calligra Flow][27] | 桌面软件 | 自由开源 | + + +### 1、LibreOffice Draw + +![][5] + +LibreOffice Draw 模块是微软 Visio 的最佳开源替代方案之一。在它的帮助下,你可以选择制作一个想法的速写或一个复杂的专业平面布置图来展示。流程图、组织结构图、网络图、小册子、海报等等!所有这些都不需要花一分钱。 + +好的是它与 LibreOffice 捆绑在一起,默认情况下安装在大多数 Linux 发行版中。 + +#### 主要功能概述: + + * 用于制作宣传册/海报的样式和格式工具 + * Calc 数据可视化 + * PDF 文件编辑功能 + * 通过操作图库中的图片来创建相册 + * 灵活的绘图工具类似于 微软 Visio (智能连接器,尺寸线等)的工具 + * 支持 .VSD 文件(打开) + +官网:[LibreOffice Draw][6] + +### 2、Apache OpenOffice Draw + +![][7] + +很多人都知道 OpenOffice(LibreOffice 项目最初就是基于它的),但他们并没有真正意识到 Apache OpenOffice Draw 可以作为微软 Visio 的替代方案。但事实上,它是另一个令人惊奇的开源图表软件工具。与 LibreOffice Draw 不同,它不支持编辑 PDF 文件,但它为任何类型的图表创建提供了绘图工具。 + +这只是个警告。仅当你的系统中已经有 OpenOffice 时才使用此工具。这是因为[安装 OpenOffice][8] 是一件痛苦的事情,而且它已经[不再继续开发][9]。 + +#### 主要功能概述: + + * 快速创建 3D 形状控制器 + * 创建作品的 flash 版本(.swf) + * 样式和格式工具 + * 与微软 Visio 类似的灵活绘图工具(智能连接器、尺寸线等) + +官网:[Apache OpenOffice Draw][10] + +### 3、Dia + +![][11] + +Dia 是另一个有趣的开源工具。它可能不像前面提到的那样处于积极开发之中。但是,如果你正在寻找一个自由而开源的替代微软 Visio 的简单而体面的图表,那么 Dia 可能是你的选择。这个工具可能唯一让你失望的地方就是它的用户界面。除此之外,它还允许你为复杂的图使用强大的工具(但它看起来可能不太好 —— 所以我们建议你用于更简单的图)。 + +#### 主要功能概述: + + * 它可以通过命令行使用 + * 样式和格式工具 + * 用于自定义形状的形状存储库 + * 与微软 Visio 类似的绘图工具(特殊对象、网格线、图层等) + * 跨平台 + +官网:[Dia][12] + +### 4、yED Graph Editor + +[视频](https://youtu.be/OmSTwKw7dX4) + +是最受欢迎的免费的微软 Visio 替代方案之一。如果你对它是一个免费软件而不是开源项目有些担心,你仍然可以通过 web 浏览器免费使用 [yED 的实时编辑器][13]。如果你想用一个非常易于使用的界面快速绘制图表,这是最好的建议之一。 + +#### 主要功能概述: + + * 拖放功能,方便图表制作 + * 支持导入外部数据进行链接 + +官网:[yED Graph Editor][14] + +### 5、Inkscape + +![][15] + +Inkscape 是一个自由开源的矢量图形编辑器。你将拥有创建流程图或数据流程图的基本功能。它不提供高级的图表绘制工具,而是提供创建更简单图表的基本工具。因此,当你希望通过使用图库中的可用符号,在图库连接器工具的帮助下生成基本图时,Inkscape 可能是你的 Visio 替代品。 + +#### 主要功能概述: + + * 连接器工具 + * 灵活的绘图工具 + * 广泛的文件格式兼容性 + +官网:[Inkscape][16] + +### 6、Pencil 项目 + +![][17] + +Pencil 项目是一个令人印象深刻的开源项目,适用于 Windows、Mac 以及 Linux。它具有易于使用的图形界面,使绘图更容易和方便。它有一个很好的内建形状和符号的集合,可以使你的图表看起来很棒。它还内置了 Android 和 iOS UI 模板,可以让你在需要时创建应用程序原型。 + +你也可以将其安装为 Firefox 扩展,但该扩展不能使用项目的最新版本。 + +#### 主要功能概述: + + * 轻松浏览剪贴画(使用 openclipart.org) + * 导出为 ODT 文件/PDF 文件 + * 图表连接工具 + * 跨平台 + +官网:[Pencil 项目][18] + +### 7、Graphviz + +![][19] + +Graphviz 略有不同。它不是绘图工具,而是专用的图形可视化工具。如果你在网络图中需要多个设计来表示一个节点,那么一定要使用这个工具。当然,你不能用这个工具做平面布置图(至少这不容易)。因此,它最适合于网络图、生物信息学、数据库连接和类似的东西。 + +#### 主要功能概述: + + * 支持命令行使用 + * 支持自定义形状和表格节点布局 + * 基本样式和格式设置工具 + +官网:[Graphviz][20] + +### 8、Draw.io + +[视频](https://youtu.be/Z0D96ZikMkc) + +Draw.io 主要是一个基于 Web 的免费图表工具,它的强大的工具几乎可以制作任何类型的图表。你只需要拖放然后连接它们以创建流程图、ER 图或任何相关的。此外,如果你喜欢该工具,则可以尝试[离线桌面版本][21]。 + +#### 主要功能概述: + + * 直接上传到云存储服务 + * 自定义形状 + * 样式和格式工具 + * 跨平台 + +官网:[Draw.io][22] + +### 9、Lucidchart + +![][23] + +Lucidchart 是一个基于 Web 的高级图表工具,它提供了一个具有有限功能的免费订阅。你可以使用免费订阅创建几种类型的图表,并将其导出为图像或 PDF。但是,免费版本不支持数据链接和 Visio 导入/导出功能。如果你不需要数据链接功能,Lucidchart 可以说是一个生成漂亮的图表的非常好的工具。 + +#### 主要功能概述: + + * 可以集成到 Slack、Jira 核心、Confluence + * 能够制作产品模型 + * 导入 Visio 文件 + +官网:[Lucidchart][24] + +### 10、Calligra Flow + +![calligra flow][25] + +Calligra Flow 是 [Calligra 项目][26]的一部分,旨在提供自由开源的软件工具。使用 Calligra flow 你可以轻松地创建网络图、实体关系图、流程图等 + +#### 主要功能概述: + + * 各种模具盒 + * 样式和格式工具 + +官网:[Calligra Flow][27] + +### 总结 + +既然你已经了解到了这些最好的自由开源的 Visio 替代方案,你对它们有什么看法? + +对于你任何方面的需求,它们是否优于 微软 Visio?另外,如果我们错过了你最喜欢的基于 Linux 的替代微软 Visio 的绘图工具,请在下面的评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/visio-alternatives-linux/ + +作者:[Ankush Das][a] +译者:[ZhiW5217](https://github.com/ZhiW5217) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://itsfoss.com/author/ankush/ +[1]:https://products.office.com/en/visio/flowchart-software +[2]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[3]:data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs= +[4]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png +[5]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg +[6]:https://www.libreoffice.org/discover/draw/ +[7]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg +[8]:https://itsfoss.com/install-openoffice-ubuntu-linux/ +[9]:https://itsfoss.com/openoffice-shutdown/ +[10]:https://www.openoffice.org/product/draw.html +[11]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/dia-screenshot.jpg +[12]:http://dia-installer.de/ +[13]:https://www.yworks.com/products/yed-live +[14]:https://www.yworks.com/products/yed +[15]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg +[16]:https://inkscape.org/en/ +[17]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/pencil-project.jpg +[18]:http://pencil.evolus.vn/Downloads.html +[19]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/graphviz.jpg +[20]:http://graphviz.org/ +[21]:https://about.draw.io/integrations/#integrations_offline +[22]:https://about.draw.io/ +[23]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg +[24]:https://www.lucidchart.com/ +[25]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/calligra-flow.jpg +[26]:https://www.calligra.org/ +[27]:https://www.calligra.org/flow/ diff --git a/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md b/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md new file mode 100644 index 0000000000..4955a1d7cb --- /dev/null +++ b/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md @@ -0,0 +1,126 @@ +MX Linux:一款专注于简洁性的中等体量发行版 +====== + +> 这个发行版可以使任何人在 Linux 上如家一般。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux.png?itok=OLjmCxT9) + +Linux 有着如此多种的发行版。许多发行版为了使自己与众不同而做出了很多改变。另一方面,许多发行版之间的区别又是如此之小,你可能会问为什么有人还愿意不厌其烦的重复别人已经做过的工作呢?也正是基于这一疑惑,让我好奇为什么 [antiX][1] 和 [MEPIS][2]这两个社区要联合推出一个特殊的发行版,考虑到具体情况应该会是一个搭载 Xfce 桌面并基于 antiX 的版本,由 MEPIS 社区承担开发。 + +这一开发中的使用 Xfce 桌面的 antiX 系统是否会基于它之前的发行版呢?毕竟,antiX 旨在提供一个“基于 Debian 稳定版的快速、轻量级、易于安装的非 systemd 的 live CD 发行版”。antiX 所搭载的桌面是 [LXDE][3],能够极好的满足关于轻量化系统的相关要求和特性。那究竟是什么原因使得 antiX 决定构建另一个轻量化发行版呢,仅仅是因为这次换成了 Xfce 吗?好吧,Linux 社区中的任何人都知道,增加了不同风格的好的轻量级发行版是值得一试的(特别是可以使得我们的旧硬件摆脱进入垃圾填埋场的宿命)。当然,LXDE 和 Xfce 并不完全属于同一类别。LXDE 应该被认为是一个真正的轻量级桌面,而 Xfce 应该被认为是一个中等体量的桌面。朋友们,这就是为什么 MX Linux 是 antiX 的一个重要迭代的关键。一个基于 Debian 的中等体量的发行版,它包含你完成工作所需的所有工具。 + +但是在 MX Linux 中有一些直接从 antiX 借用来的非常有用的东西 —— 那就是安装工具。当我初次设置了 VirtualBox 虚拟机来安装 MX Linux 时,我认为安装的系统将是我已经习惯的典型的、非常简单的 Linux 系统。令我非常惊讶的是,MX Linux 使用的 antiX 安装程序打破了以往的痛点,特别是对于那些对尝试 Linux 持观望态度的人来说。 + +因此,甚至在我开始尝试 MX Linux 之前,我就对它有了深刻的印象。让我们来看看是什么让这个发行版的安装如此特别,最后再来看看桌面。 + +你可以从[这里][4]下载 MX Linux 17.1。系统的最低要求是: + + * CD/DVD驱动器(以及能够从该驱动器引导的 BIOS)或 live USB(以及能够从 USB 引导的 BIOS) + * 英特尔 i486 或 AMD 处理器 + * 512 MB 内存 + * 5 GB 硬盘空间 + * 扬声器,AC97 或 HDA-compatible 声卡 + * 作为一个 LiveUSB 使用,需要 4 GB 空间 + +### 安装 + +MX Linux 安装程序使安装 Linux 变得轻而易举。虽然它可能不是外观最现代化的安装工具,但也已经差不多了。安装的要点是从选择磁盘和选择安装类型开始的(图 1)。 + +![install][6] + +*图 1:MX Linux 的安装程序截图之一* + +下一个重要的界面(图 2)要求你设置一个计算机名称、域名和(如果需要的话,为微软网络设置)工作组。 + +![network][8] + +*图 2:设置网络名称* + +配置工作组的能力是第一个真正值得称赞的。这是我记忆中第一款在安装期间提供此选项的发行版。它还应该提示你,MX Linux 提供了开箱即用的共享目录功能。它做到了,而且深藏功与名。它并不完美,但它可以在不需要安装任何额外包的情况下工作(稍后将详细介绍)。 + +最后一个重要的安装界面(需要用户交互)是创建用户帐户和 root 权限的密码(图 3)。 + +![user][9] + +*图 3:设置用户帐户详细信息和 root 用户密码* + +最后一个界面设置完成后,安装将完成并要求重新启动。重启后,你将看到登录屏幕。登录并享受 MX Linux 带来的体验。 + +### 使用 + +Xfce 桌面是一个非常容易上手的界面。默认设置将面板位于屏幕的左边缘(图 4)。 + +![desktop][11] + +*图 4:MX Linux 的默认桌面* + +如果你想将面板移动到更传统的位置,右键单击面板上的空白点,然后单击“面板”>“面板首选项”。在显示的窗口中(图 5),单击样式下拉菜单,在桌面栏、垂直栏或水平栏之间进行选择你想要的模式。 + +![panel][13] + +*图 5:配置 MX Linux 面板* + +桌面栏和垂直选项的区别在于,在桌面栏模式下,面板垂直对齐,就像在垂直模式下一样,但是插件是水平放置的。这意味着你可以创建更宽的面板(用于宽屏布局)。如果选择水平布局,它将默在顶部,然后你必须取消锁定面板,单击关闭,然后(使用面板左侧边缘的拖动手柄)将其拖动到底部。你可以回到面板设置窗口并重新锁定面板。 + +除此之外,使用 Xfce 桌面对于任何级别的用户来说都是无需动脑筋的事情……就是这么简单。你会发现很多涵盖了生产力(LibreOffice、Orage Calendar、PDF-Shuffler)、图像(GIMP)、通信(Firefox、Thunderbird、HexChat)、多媒体(Clementine、guvcview SMTube、VLC媒体播放器)的软件,和一些 MX Linux 专属的工具(称为 MX 工具,涵盖了 live-USB 驱动器制作工具、网络助手、包管理工具、仓库管理工具、live ISO 快照工具等等)。 + +### Samba + +让我们讨论一下如何将文件夹共享到你的网络。正如我所提到的,你不需要安装任何额外的包就可以使其正常工作。只需打开文件管理器,右键单击任何位置,并选择网络上的共享文件夹。系统将提示你输入管理密码(已在安装期间设置)。验证成功之后,Samba 服务器配置工具将打开(图 6)。 + +![sharing][15] + +*图 6:向网络共享一个目录* + +单击“+”按钮配置你的共享。你将被要求指定一个目录,为共享提供一个名称/描述,然后决定该共享是否可写和可见(图 7)。 + +![sharing][17] + +*图 7:在 MX Linux 上配置共享* + +当你单击 Access 选项时,你可以选择是让每个人都访问共享,还是限于特定的用户。问题就出在这里。此时,没有用户可以共享。为什么?因为它们还没有被添加。有两种方法可以把它们添加到共享:从命令行或使用我们已经打开的工具。让我们用一种更为简单的方法。在 Samba 服务器配置工具的主窗口中,单击“首选项” > “Samba 用户”。在弹出的窗口中,单击“添加用户”。 + +将出现一个新窗口(图 8),你需要从下拉框中选择用户,输入 Windows 用户名,并为用户键入/重新键入密码。 + +![Samba][19] + +*图 8:向 Samba 添加用户* + +一旦你单击“确定”,这用户就会被添加,并且基于你的网络的对用户的共享功能也随之启用。创建 Samba 共享从未变得如此容易。 + +### 结论 + +MX Linux 使任何从桌面操作系统转到 Linux 都变得非常简单。尽管有些人可能会觉得桌面界面不太现代,但发行版的主要关注点不是美观,而是简洁。为此,MX Linux 以出色的方式取得了成功。Linux 的这个特色发行版可以让任何人在使用 Linux 的过程中感到宾至如归。尝试这一中等体量的发行版,看看它能否作为你的日常系统。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/intro-to-linux/2018/4/mx-linux-mid-weight-distro-focused-simplicity + +作者:[JACK WALLEN][a] +译者:[qfzy1233](https://github.com/qfzy1233) +校对:[wxy](https://github.com/wxy) +选题:[lujun9972](https://github.com/lujun9972) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/users/jlwallen +[1]:https://antixlinux.com/ +[2]:https://en.wikipedia.org/wiki/MEPIS +[3]:https://lxde.org/ +[4]:https://mxlinux.org/download-links +[5]:/files/images/mxlinux1jpg +[6]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_1.jpg?itok=i9bNScjH (install) +[7]:/licenses/category/used-permission +[8]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_2.jpg?itok=72nWxkGo +[9]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_3.jpg?itok=ppf2l_bm (user) +[10]:/files/images/mxlinux4jpg +[11]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_4.jpg?itok=mS1eBy9m (desktop) +[12]:/files/images/mxlinux5jpg +[13]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_5.jpg?itok=wsN1hviN (panel) +[14]:/files/images/mxlinux6jpg +[15]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_6.jpg?itok=vw8mIp9T (sharing) +[16]:/files/images/mxlinux7jpg +[17]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_7.jpg?itok=tRIWdcEk (sharing) +[18]:/files/images/mxlinux8jpg +[19]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_8.jpg?itok=ZS6lhZN2 (Samba) +[20]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/translated/talk/20190211 Introducing kids to computational thinking with Python.md b/published/20190211 Introducing kids to computational thinking with Python.md similarity index 54% rename from translated/talk/20190211 Introducing kids to computational thinking with Python.md rename to published/20190211 Introducing kids to computational thinking with Python.md index f9f5406615..17c062ad8e 100644 --- a/translated/talk/20190211 Introducing kids to computational thinking with Python.md +++ b/published/20190211 Introducing kids to computational thinking with Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (WangYueScream) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11116-1.html) [#]: subject: (Introducing kids to computational thinking with Python) [#]: via: (https://opensource.com/article/19/2/break-down-stereotypes-python) [#]: author: (Don Watkins https://opensource.com/users/don-watkins) @@ -11,40 +11,37 @@ 利用 Python 引导孩子的计算机思维 ======================== -编程可以给低收入家庭的学生提供足够的技能,信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。 +> 编程可以给低收入家庭的学生提供足够的技能、信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。 -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_kid_education.png?itok=3lRp6gFa) +![](https://img.linux.net.cn/data/attachment/album/201907/17/231228k3t9skntnlst59h9.jpg) 尽管暑假期间底特律公共图书馆的[帕克曼分部][1]挤满了无聊的孩子并且占用了所有的电脑,图书馆工作人员并不觉得这会是个问题,反而更多是一个机会。他们成立一个名为 [Parkman Coders][2] 的编程社团,社团以 [Qumisha Goss][3] 为首,她是图书管理员,也负责利用 Python 的魔力引导弱势儿童的计算机思维。 -四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q” 并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和 Raspberry Pi 认证讲师。 +四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q”(代表她)并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和树莓派认证讲师。 社团最开始采用 [Scratch][4] 教学,但很快学生就对这种图形化的块编程感到乏味,他们觉得这就是个“婴儿玩具”。Q 坦言,“我们意识到是时候需要在课程内容这方面做些改变了,如果是为了维持课程内容对初学者的友好性继续选择 Scratch 教学,这无疑会影响孩子们后期继续保持对编程的关注。”因此,她开始教授孩子们 Python。 -Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 [Python Programming: An Introduction to Computer Science][6] 和 [Python for Kids][7] 这两本书学习 Python。她也推荐 [Automate the Boring Stuff with Python][8] 和 [Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9] 这两本书。 +Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 《[Python Programming: An Introduction to Computer Science][6]》 和 《[Python for Kids][7]》 这两本书学习的 Python。她也推荐 《[Automate the Boring Stuff with Python][8]》 和 《[Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9]》 这两本书。 +### 建立一个基于树莓派的创客空间 -### 建立一个基于 Raspberry Pi 的创客空间 +Q 决定使用[树莓派][10]电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[树莓派][10]的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。 +虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间,进而维持图书馆的平和,但社区发展的很快,很受大家欢迎,以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台[树莓派][10]来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft、4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。 -Q 决定使用 [Raspberry Pi][10] 电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[Raspberry Pi][10] 的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。 +目前,每节课程大概有 40 个孩子参加,而且图书馆也有了足够的[树莓派][10]让参与者人手一台设备甚至还可以送出去一些。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。 -虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间进而维持图书馆的平和,但社区发展的很快,很受大家欢迎以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台 [Raspberry Pi][10] 来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft,4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。 - -目前,大概有 40 个孩子参加了每节课程而且图书馆也有了足够的 [Raspberry Pi][10] 让参与者人手一台设备甚至还可以分发出去。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。 - -Q 说,“当孩子们的表现可以证明他们能够很好的使用 [Raspberry Pi][10] 或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器,键盘,鼠标等外设。” +Q 说,“当孩子们的表现可以证明他们能够很好的使用[树莓派][10]或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器、键盘、鼠标等外设。” ### 利用 Python 学习生存技能,打破束缚 - -Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。” +Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈、很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。” 她继续分享道,“在学习编程的过程中,你不得不对单词的拼写和大小写高度警惕。受限于孩子年龄,有时候阅读认知会是个大问题。为了确保课程受众的包容性,我们会在授课过程中大声拼读,同样我们也会极力鼓励孩子们大声说出他们不知道的或者不能正确拼写的单词,以便我们纠正。” -Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想到帮助到他们而不是让他们因为挫败而沮丧的不在参与进来。” +Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想帮助到他们而不是让他们因为挫败而沮丧的不再参与进来。” -最重要的是, [Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。” +最重要的是,[Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。” Q 和 [Parkman Coders][2] 计划所营造的环境氛围能够帮助到参与者摆脱低家庭收入带来的劣势。如果说社区能够发展壮大到今天的规模真有什么独特秘诀的话,那大概就是,Q 解释道,“确保你有一个令人舒适的空间,充满了理解与宽容,这样大家才会被吸引过来。让来的人不忘初心,做好传道受业解惑的准备;当大家参与进来并感觉到充实愉悦,自然而然会想要留下来。” @@ -56,7 +53,7 @@ via: https://opensource.com/article/19/2/break-down-stereotypes-python 作者:[Don Watkins][a] 选题:[lujun9972][b] 译者:[WangYueScream](https://github.com/WangYueScream) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md new file mode 100644 index 0000000000..8d60619efc --- /dev/null +++ b/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md @@ -0,0 +1,54 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11141-1.html) +[#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) +[#]: via: (https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10) +[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) + +使用 ImageGlass 以幻灯片形式快速查看 JPG 图像 +====== + +> 想要在 Windows 10 中以幻灯片形式逐个查看文件夹中的图像么?开源软件可以做到。 + +![Looking back with binoculars][1] + +欢迎阅读今天的系列文章 “我该如何让它实现?”就我而言,我试图在 Windows 10 上以幻灯片形式查看 JPG 图像的文件夹。像往常一样,我转向开源来解决这个问题。 + +在 Mac 上,以幻灯片形式查看 JPG 图像文件夹只需选择文件夹中的所有图像(`Command-A`),然后按 `Option-Command-Y` 即可。之后,你可以使用箭头键向前翻动。当然,在 Windows 中,你可以通过选择第一个图像,然后单击窗口中黄色的**管理**栏,然后选择**幻灯片**来执行类似的操作。在那里,你可以控制速度,但只能做到:慢、中、快。 + +我希望像在 Windows 中能像 Mac 一样翻下一张图片。自然地,我 Google 搜索了一下并找到了一个方案。我发现了 [ImageGlass][2] 这个开源应用,其许可证是 [GPL 3.0][3],并且它完美地做到了。这是它的样子: + +![Viewing an image in ImageGlass.][4] + +### 关于 ImageGlass + +ImageGlass 是由 Dương Diệu Pháp 开发的,根据他的网站,他是一名越南开发人员,在 Chainstack 负责前端。他与在美国的 [Kevin Routley][5] 协作,后者“为 ImageGlass 开发新功能”。源代码可以在 [GitHub][6] 上找到。 + +ImageGlass 支持最常见的图像格式,包括 JPG、GIF、PNG、WEBP、SVG 和 RAW。用户可以轻松自定义扩展名列表。 + +我遇到的具体问题是需要找到一张用于目录封面的图像。不幸的是,它在一个包含数十张照片的文件夹中。在 ImageGlass 中以幻灯片浏览照片,在我想要的照片前停止,并将其下载到我的项目文件夹中变得很容易。开源再次帮助了我,该应用只花了很短的时间下载和使用。 + +在 2016 年 3 月 10 日,Jason Baker 在他的文章 [9 款 Picasa 的开源替代品][7] 中将 ImageGlass 列为其中之一。如果你有需求,里面还有一些其他有趣的图像相关工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10 + +作者:[Jeff Macharyas][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jeffmacharyas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) +[2]: https://imageglass.org/ +[3]: https://github.com/d2phap/ImageGlass/blob/master/LICENSE +[4]: https://opensource.com/sites/default/files/uploads/imageglass-screenshot.png (Viewing an image in ImageGlass.) +[5]: https://github.com/fire-eggs +[6]: https://github.com/d2phap/ImageGlass +[7]: https://opensource.com/alternatives/picasa diff --git a/sources/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md b/published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md similarity index 80% rename from sources/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md rename to published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md index b1f92c921f..600598ce4c 100644 --- a/sources/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md +++ b/published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md @@ -1,48 +1,44 @@ [#]: collector: (lujun9972) [#]: translator: (hopefully2333) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11132-1.html) [#]: subject: (How to Manually Install Security Updates on Debian/Ubuntu?) [#]: via: (https://www.2daygeek.com/manually-install-security-updates-ubuntu-debian/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -How to Manually Install Security Updates on Debian/Ubuntu? +如何在 Debian/Ubuntu 上手动安装安全更新? ====== -Installing a package in Linux from command line is a simple task. +在 Linux 上通过命令行安装一个包程序是一件简单的事。在一行命令中组合使用多个命令能让你更加简单地完成任务。 -In a single command or combining of multiple commands could make you to complete your task easily. +安全更新也同样如此。 -The same can be done for security updates as well. +在这个教程里面,我们会向你展示如何查看可用的安全更新,以及如何在 Ubuntu、LinuxMint 等等这些基于 Debian 的系统中安装它们。 -In this tutorial, we will show you how to check available security update and install them on Debian based systems such as Ubuntu, LinuxMint, etc,. +有三种方法可以完成这件事,下面会详细地描述这三种方法。 -It can be done using three methods. All these methods are described in this article in details. +作为一个 Linux 管理员,你应该让你的系统保持为最新,这会让你的系统更安全,保护你的系统抵抗意想不到的攻击。 -As a Linux administrator, you should keep your system up-to-date, that makes your system more secure. It protects your system against unwanted attack. +如果你因为一些应用的依赖问题不能解决,导致不能给所有的系统进行全部更新。那至少,你应该打上安全补丁来让你的系统 100% 符合要求。 -If you are not able to patch entire system with all updates due to some application dependency. At-least, you should install only security patches to make your system 100% compliance. +### 方法一:如何检查 Debian/Ubuntu 中是否有任何可用的安全更新? -### How to Install unattended-upgrades package in Debian/Ubuntu? +在进行补丁安装之前,检查可用安全更新列表始终是一个好习惯。它会为你提供将在你的系统中进行更新的软件包的列表。 -By default `unattended-upgrades` package should be installed on your system. But in case if it’s not installed use the following command to install it. +默认情况下,你的系统上应该是已经安装了 `unattended-upgrades` 包的。但是如果你的系统没有装这个包,那么请使用下面的命令来安装它。 -Use **[APT-GET Command][1]** or **[APT Command][2]** to install unattended-upgrades package. +使用 [APT-GET 命令][1] 或者 [APT 命令][2] 来安装 `unattended-upgrades` 包。 ``` $ sudo apt-get install unattended-upgrades -or +或 $ sudo apt install unattended-upgrades ``` -### Method-1: How to Check if any Security Updates are available in Debian/Ubuntu? +**什么是试运行?** 大多数的 Linux 命令都有一个试运行选项,它会给出实际的输出但不会下载或安装任何东西。 -It’s always a good practice to check list of available security updates before performing the patch installation. It will give you the list of packages that are going to be updated in your system. - -**What’s dry run?** Most of the Linux commands have a dry run option, which stimulate the actual output but nothing will be downloaded or installed. - -To do so, you need to add `--dry-run` option with unattended-upgrades command. +为此,你需要在 `unattended-upgrades` 命令中添加 `--dry-run` 选项。 ``` $ sudo unattended-upgrade --dry-run -d @@ -101,21 +97,21 @@ vim-tiny xxd ``` -If the above command output says **“No packages found that can be upgraded unattended and no pending auto-removals”** in the Terminal, this implies your System is up-to-date. +如果在终端里,上面的命令输出说 “No packages found that can be upgraded unattended and no pending auto-removals”,这意味着你的系统已经是最新的了。 -### How to Install available Security Updates in Debian/Ubuntu? +#### 如何在 Debian/Ubuntu 中安装可用的安全更新? -If your got any package updates in the above command output. Then run the following command to install them. +如果你在上面的命令输出中获得了任意的软件包更新,就运行下面的命令来安装它们。 ``` $ sudo unattended-upgrade -d ``` -Alternatively this can be done from apt-get command. It’s bit tricky. However, i would suggest users to go with first option. +除此之外,你也可以使用 `apt-get` 命令来进行安装。但是这个方法有点棘手,我会建议用户用第一个选项。 -### Method-2: How to Check if any Security Updates are available in Debian/Ubuntu Using apt-get Command? +### 方法二:如何使用 apt-get 命令在 Debian/Ubuntu 中检查是否有可用的安全更新? -Run the following command to check list of available security updates in your Debian/Ubuntu system +在你的 Debian/Ubuntu 系统中运行下面的命令来查看可用安全更新的列表。 ``` $ sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi @@ -160,19 +156,19 @@ Inst gcc [4:7.3.0-3ubuntu2.1] (4:7.4.0-1ubuntu2.3 Ubuntu:18.04/bionic-updates, U Inst g++ [4:7.3.0-3ubuntu2.1] (4:7.4.0-1ubuntu2.3 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64]) ``` -### How to Install available Security Updates in Debian/Ubuntu Using apt-get Command? +#### 如何使用 apt-get 命令在 Debian/Ubuntu 系统中安装可用的安全更新? -If you found any package updates in the above output. Finally run the following command to install them. +如果你在上面命令的输出中发现任何的软件包更新。就运行下面的命令来安装它们。 ``` $ sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs apt-get install ``` -Alternatively this can be done from apt command. It’s bit tricky. However, i would suggest users to go with first option. +除此之外,也可以使用 `apt` 命令来完成。但是这个方法有点棘手,我会建议用户用第一个方式。 -### Method-3: How to Check if any Security Updates are available in Debian/Ubuntu Using apt Command? +### 方法三:如何使用 apt 命令在 Debian/Ubuntu 系统中检查是否有可用的安全更新? -Run the following command to check list of available security updates in your Debian/Ubuntu system +在 Debian/Ubuntu 系统中运行下面的命令来查看可用安全更新的列表。 ``` $ sudo apt list --upgradable | grep -e "-security" @@ -217,15 +213,15 @@ vim-tiny/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 [upgradable xxd/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 [upgradable from: 2:8.0.1453-1ubuntu1] ``` -### How to Install available Security Updates in Debian/Ubuntu Using apt Command? +#### 如何在 Debian/Ubuntu 系统中使用 apt 命令来安装可用的安全更新? -If you found any package updates in the above output. Finally run the following command to install them. +如果你在上面命令的输出中发现任何的软件包更新。就运行下面的命令来安装它们。 ``` $ sudo apt list --upgradable | grep -e "-security" | awk -F "/" '{print $1}' | xargs apt install ``` -Also, the following file will give you the packages update count. +同样,下面的文件也会告诉你更新包的总数。 ``` $ sudo cat /var/lib/update-notifier/updates-available @@ -240,8 +236,8 @@ via: https://www.2daygeek.com/manually-install-security-updates-ubuntu-debian/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[hopefully2333](https://github.com/hopefully2333) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md b/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md new file mode 100644 index 0000000000..896f70428d --- /dev/null +++ b/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md @@ -0,0 +1,136 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11115-1.html) +[#]: subject: (How To Delete A Repository And GPG Key In Ubuntu) +[#]: via: (https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +如何在 Ubuntu 中删除仓库及其 GPG 密钥 +====== + +![Delete A Repository And GPG Key In Ubuntu][1] + +前几天我们讨论了如何在基于 RPM 和 DEB 的系统中[列出已安装的仓库][2]。今天,我们将学习如何在 Ubuntu 中删除仓库及其 GPG 密钥。对于不知道仓库的人,仓库(简称 repo)是开发人员存储软件包的地方。仓库的软件包经过全面测试,并由 Ubuntu 开发人员专门为每个版本构建。用户可以使用 Apt 包管理器在他们的 Ubuntu 系统上下载和安装这些包。Ubuntu 有四个官方仓库,即 Main、Universe、Restricted 和 Multiverse。 + +除了官方仓库外,还有许多由开发人员(或软件包维护人员)维护的非官方仓库。非官方仓库通常有官方仓库中不可用的包。所有包都由包维护者用一对密钥(公钥和私钥)签名。如你所知,公钥是发给用户的,私钥必须保密。每当你在源列表中添加新的仓库时,如果 Apt 包管理器想要信任新添加的仓库,你还应该添加仓库密钥(公钥)。使用仓库密钥,你可以确保从正确的人那里获得包。到这里希望你对软件仓库和仓库密钥有了一个基本的了解。现在让我们继续看看如果在 Ubuntu 系统中不再需要仓库及其密钥,那么该如何删除它。 + +### 在 Ubuntu 中删除仓库 + +每当使用 `add-apt-repository` 命令添加仓库时,它都将保存在 `/etc/apt/sources.list` 中。 + +要从 Ubuntu 及其衍生版中删除软件仓库,只需打开 `/etc/apt/sources.list` 文件并查找仓库名字并将其删除即可。 + +``` +$ sudo nano /etc/apt/sources.list +``` + +正如你在下面的截图中看到的,我在我的 Ubuntu 系统中添加了 [Oracle Virtualbox][3] 仓库。 + +![][4] + +*virtualbox 仓库* + +要删除此仓库,只需删除该条目即可。保存并关闭文件。 + +如果你已添加 PPA 仓库,请查看 `/etc/apt/sources.list.d/` 目录并删除相应的条目。 + +或者,你可以使用 `add-apt-repository` 命令删除仓库。例如,我要删除 [Systemback][5] 仓库,如下所示。 + +``` +$ sudo add-apt-repository -r ppa:nemh/systemback +``` + +最后,使用以下命令更新软件源列表: + +``` +$ sudo apt update +``` + +### 删除仓库密钥 + +我们使用 `apt-key` 命令添加仓库密钥。首先,让我们使用命令列出添加的密钥: + +``` +$ sudo apt-key list +``` + +此命令将列出所有添加的仓库密钥。 + +``` +/etc/apt/trusted.gpg +-------------------- +pub rsa1024 2010-10-31 [SC] +3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B +uid [ unknown] Launchpad PPA for Kendek + + +pub rsa4096 2016-04-22 [SC] +B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF +uid [ unknown] Oracle Corporation (VirtualBox archive signing key) <[email protected]> +sub rsa4096 2016-04-22 [E] + + +/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg +------------------------------------------------------ +pub rsa4096 2012-05-11 [SC] +790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32 +uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <[email protected]> + + +/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg +------------------------------------------------------ +pub rsa4096 2012-05-11 [SC] +8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 +uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <[email protected]> + + +/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg +------------------------------------------------------ +pub rsa4096 2018-09-17 [SC] +F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C +uid [ unknown] Ubuntu Archive Automatic Signing Key (2018) <[email protected]> +``` + +正如你在上面的输出中所看到的,那串长的(40 个字符)十六进制值是仓库密钥。如果你希望 APT 包管理器停止信任该密钥,只需使用以下命令将其删除: + +``` +$ sudo apt-key del "3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B" +``` + +或者,仅指定最后 8 个字符: + +``` +$ sudo apt-key del 73C62A1B +``` + +完成!仓库密钥已被删除。运行以下命令更新仓库列表: + +``` +$ sudo apt update +``` + +资源: + + * [软件仓库 – Ubuntu 社区 Wiki][6] + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Delete-a-repository-in-ubuntu-720x340.png +[2]: https://www.ostechnix.com/find-list-installed-repositories-commandline-linux/ +[3]: https://www.ostechnix.com/install-oracle-virtualbox-ubuntu-16-04-headless-server/ +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/virtualbox-repository.png +[5]: https://www.ostechnix.com/systemback-restore-ubuntu-desktop-and-server-to-previous-state/ +[6]: https://help.ubuntu.com/community/Repositories/Ubuntu diff --git a/published/20190708 10 ways to get started with Linux.md b/published/20190708 10 ways to get started with Linux.md new file mode 100644 index 0000000000..49ba29a574 --- /dev/null +++ b/published/20190708 10 ways to get started with Linux.md @@ -0,0 +1,184 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11124-1.html) +[#]: subject: (10 ways to get started with Linux) +[#]: via: (https://opensource.com/article/19/7/ways-get-started-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/seth/users/don-watkins) + +Linux 入门十法 +====== + +> 想要进入 Linux 之门,试试这十个方法。 + +![](https://img.linux.net.cn/data/attachment/album/201907/20/061809wwkmb51vqookoqq5.jpg) + +文章《[什么是 Linux 用户?][2]》的作者 Anderson Silva 明确表示,现今人们使用 Linux(在某种程度上)就像使用 Windows 一样,只要你对“使用 Linux”这个事情定义得足够广义。尽管如此,如果你的生活中没有太多的使用 Linux 的机会,现在正是以前所未有的方式尝试 Linux 的好时机。 + +以下是 Linux 入门的十种方法。你可以试试其中一个或者全部试试。 + +### 1、加入免费 shell 计划 + +![Free shell screenshot][3] + +有很多人在用不上的服务器上运行 Linux (请记住,“Linux 服务器”可以是从最新的超级计算机到丢弃的、已经用了 12 年的笔记本电脑中的任何一个)。为了充分利用多余的计算机,许多管理员用这些备用的机器提供了免费的 shell 帐户。 + +如果你想要登录到 Linux 终端中学习命令、shell 脚本、Python 以及 Web 开发的基础知识,那么免费的 shell 帐户是一种简单、免费的入门方式。下面是一个可以体验一下的简短列表: + +* [Freeshell.de][4] 是一个自 2002 年以来一直在线服务的公用 Linux 系统。你可以通过 SSH、IPv6 和 OpenSSL 进行访问,以获得 Linux shell 体验,并且可以使用 MySQL 数据库。 +* [Blinkenshell][5] 提供了一个学习 Unix、使用 IRC、托管简单网站和共享文件的 Linux shell。它自 2006 年以来一直在线服务。 +* [SDF 公用 Unix 系统][6]成立于 1987 年,提供了免费的 NetBSD 账户。当然,NetBSD 不是 Linux,但它是开源的 Unix,因此它提供了类似的体验。它也有几个自制应用程序,因此它不但有普通的免费 shell,还提供了老派 BBS。 + +免费 shell 帐户常会受到滥用,因此你表现出的可信程度和积极参与协作的意愿越多,你的体验就越好。你可以通过专门请求或小额捐赠来证明你的诚意,通常可以访问数据库引擎、编译器和高级编程语言。你还可以要求安装其他软件或库,但需经管理员批准。 + +#### 如何使用 + +公用 shell 帐户是尝试真正的 Linux 系统的好方法。你无法获得 root 权限这一事实意味着你可以学习本地软件管理,而无需做更多的维护工作。你可以做很多实际操作,以完成真正的工作,尽管它们对于学习关键任务还不够。 + +### 2、试试 Windows WSL 2 里面的 Linux + +不管你信不信,微软从 2019 年 6 月开始在 Windows 里面带上了 Linux,这意味着你可以从 Windows 运行 Linux 应用程序,这是 [Windows 里的 Linux 子系统][7]的第二版(WSL 2)。虽然它主要针对开发人员,但 Windows 用户可以发现 WSL 2 是一个来自于他们熟悉的桌面上的 Linux 环境,而没有被任何虚拟化占用额外资源。这是一个以进程方式运行在 Windows 机器上的 Linux。现阶段,它仍然是一个新的动向和正在进行中的工作,因此它可能会发生变化。如果你试图用它承担重任,你可能会遇到一两个错误,但是如果你只是想入门 Linux、学习一些命令,并感受在基于文本的环境如何完成工作,那么 WSL 2 可能正是你所需要的。 + +#### 如何使用 + +WSL 还没有明确的用途或目的,但它在 Windows 机器上提供了 Linux 环境。你可以获得 root 访问权限,并可以运行 Linux 发行版和应用程序,因此这是一种简单而无缝的学习方式。但是,即使 WSL *是Linux*,它也不能给你典型的 Linux 体验。它是由 Windows 提供的 Linux,而这不太会是你在现实世界中遇到的情况。WSL 是一个开发和教育工具,但如果你可以使用它,那么你应该试试它。 + +### 3、把 Linux 放到可启动的 U 盘上 + +![Porteus Linux][8] + +便携 Linux 可以安装到 U 盘上随身携带,并用该 U 盘启动你遇到的任何计算机。你可以获得个性化的 Linux 桌面,而无需担心所用于启动的主机上的数据。该计算机上原有的系统不会与你的 Linux 系统相接触,并且你的 Linux 操作系统也不会影响计算机。它非常适合酒店商务中心、图书馆、学校的公共计算机,或者只是给自己一个不时启动 Linux 的借口。 + +与许多其他快速获得的 Linux shell 不同,此方法为你提供了一个完整而强大的 Linux 系统,包括桌面环境,可访问你需要的任何软件以及持久的数据存储。 + +这个系统永远不会改变。你要保存的任何数据都将写入压缩的文件系统中,然后在引导时将其作为覆盖层应用于该系统。这种灵活性允许你选择是以持久模式启动,将所有数据保存回 U 盘;还是以临时模式启动,以便一旦关闭电源,你所做的一切都会消失。换句话说,你可以将其用作不受信任的计算机上的安全信息亭或你信任的计算机上的便携式操作系统。 + +你可以尝试很多 [U 盘发行版][9],有些带有精简的桌面环境,适用于低功耗计算机,而另一些带有完整的桌面环境。我偏爱 [Porteus][10] Linux。在过去的八年里,我每天都把它放在我的钥匙链上,在商务旅行中使用它作为我的主要计算平台,如果在工作场所或家中计算机发生问题,它也会用作工具盘。它是一个可靠而稳定的操作系统,有趣且易于使用。 + +在 Mac 或 Windows 上,下载 [Fedora Media Writer][11] 以创建你下载的任何便携式发行版的可启动 U 盘。 + +#### 如何使用 + +从 U 盘启动一个 “实时 Linux” 可提供完整的 Linux 发行版环境。虽然数据存储与你安装到硬盘驱动器的系统略有不同,但其它的所有内容都与你在 Linux 桌面上所期望的一样。在便携式 Linux 操作系统上你几乎没有什么不能做的,所以在你的钥匙串上挂上一个以解锁你遇到的每台计算机的全部潜力吧。 + +### 4、在线游览 + +![Linux tour screenshot][12] + +Ubuntu 的某个人想到了在浏览器中托管 Ubuntu GNOME 桌面的好主意。如果想要自己尝试一下,可以打开 Web 浏览器并导航到 [tour.ubuntu.com][13]。你可以选择要演示的活动,也可以跳过单个课程并单击 “四处看看Show Yourself Around” 按钮。 + +即使你是 Linux 桌面的新用户,你也可能会发现“四处看看”功能比你想象的更还简单。在线游览中,你可以四处看看,查看可用的应用程序,以及查看典型的默认 Linux 桌面。你不能在 Firefox 中调整设置或启动另一个在线游览(这是我尝试过的第一件事),虽然你可以完成安装应用程序的动作,但你无法启动它们。但是,如果你之前从未使用过 Linux 桌面,并且想要看到各种新奇的东西,那这就是一场旋风之旅。 + +#### 如何使用 + +在线游览真的只是一次旅行。如果你从未见过 Linux 桌面,那么这是一个了解它的情况的机会。这不是一个正式的使用,而是一个吸引过客的展示。 + +### 5、在浏览器中用 JavaScript 运行 Linux + +![JSLinux][14] + +就在不久之前,虚拟化的计算成本还很高,还仅限于使用先进的硬件的用户。而现在虚拟化已被优化到可以由 JavaScript 引擎执行的程度,这要归功于 Fabrice Bellard,它是优秀的开源 [QEMU][15] 机器仿真器和虚拟器的创建者。 + +Bellard 还启动了 JSLinux 项目,该项目允许你在浏览器中运行 Linux 和其他操作系统,这算是闲暇时间的一个乐趣。它仍然是一个实验性项目,但它是一个技术奇迹。打开 Web 浏览器导航到 [JSLinux][16] 页面,你可以启动基于文本的 Linux shell 或精简的图形 Linux 环境。你可以上传和下载文件到 JSLinux 主机上或(在理论上可以)将文件发送到一个网络备份位置,因为 JSLinux 可以通过 VPN 套接字访问互联网(尽管上限速度取决于 VPN 服务)。 + +#### 如何使用 + +你不会在 JSLinux 上正经使用多少时间,这个环境可能太不寻常了,无法学习 Linux 正常工作的广泛课程。但是,如果你厌倦了在一台普通的 PC 上运行 Linux 并想在一个真正独特的平台上试用 Linux,那么 JSLinux 就属于这种。 + +### 6、阅读关于它的书 + +并非每种 Linux 体验都要用到计算机。也许你是那种喜欢在开始新事物之前保持距离先观察和研究的人,或者你可能还不清楚 “Linux” 所包含的内容,或者你喜欢全情投入其中。关于 Linux 如何工作、运行 Linux 的方式以及 Linux 世界中有什么,有很多书可以读。 + +你越熟悉开源世界,就越容易理解常用术语,将城市神话与实际经验区分开来。我们不时会发布[图书清单] [17],但我的最爱之一是 Hazel Russman 的《[The Charm of Linux][18]》。这是一个从不同角度巡览 Linux 的过程,是由一位独立作者在发现 Linux 时兴奋之余写作的。 + +#### 如何使用 + +没有什么能比一本好书更好。这是体验 Linux 的最不传统的方法,但对于喜欢印刷文字的人来说,它既舒适又有效。 + +### 7、弄块树莓派 + +![Raspberry Pi 4][19] + +如果你正在使用[树莓派][20],那么你就正在运行 Linux。Linux 和低功耗计算很容易上手。关于树莓派的好处,除了价格低于 100 美元之外,它的[网站][21]是专为教育而设计的。你可以了解树莓派所能做的一切,当你了解之后,就知道了 Linux 可以为你做些什么。 + +#### 如何使用 + +树莓派被设计为低功耗计算机。这意味着你不能像过去那样做那么多的多任务处理,但这是一种避免不堪重负的方便方法。树莓派是学习 Linux 及其附带的所有可能性的好方法,它是发现环保、小型、简化计算能力的有趣方式。并且一定要关注 Opensource.com 上的[提示][22]、[技巧][23]和[有趣的][24][活动] [25],特别是在每年三月份的树莓派之周的期间。 + +### 8、赶上容器热潮 + +如果你从事于神话般的[云服务][26]的后端工作,那么你已经听说过容器热潮。虽然你可以在 Windows、Azure、Mac 和 Linux 上运行 Docker 和 Kubernetes,但你可能不知道容器本身就是 Linux。云计算应用和基础设施实际上是精简的 Linux 系统,部分虚拟化,部分基于裸机。如果启动容器,则会启动微型的超特定的 Linux 发行版。 + +容器与虚拟机或物理服务器[不同][27]。它们不打算用作通用操作系统。但是,如果你在容器中进行开发,你可以停下来四处打量一下,你将了解到 Linux 系统的结构、保存重要文件的位置以及最常见的命令。你甚至可以[在线尝试容器][28],你可以在我的文章中[深入到 Linux 容器的背后][29]了解它们如何工作的。 + +#### 如何使用 + +根据设计,容器特定于一个单一任务,但它们是 Linux,因此它们非常灵活。你可以如你预期的使用它们,也可以在你的 Linux 实验当中将容器构建到大部分完整系统中。它虽然不提供桌面 Linux 体验,但它是完整的 Linux 体验。 + +### 9、以虚拟机方式安装 Linux + +虚拟化是尝试操作系统的简便方法,[VirtualBox][30] 是一种很好的开源虚拟化方法。VirtualBox 可以在 Windows 和 Mac 上运行,因此你可以将 Linux 安装为虚拟机(VM)并使用它,就好像它只是一个应用程序一样。如果你不习惯安装操作系统,VirtualBox 也是一种尝试 Linux 的非常安全的方式,而不会意外地将其安装覆盖在你通常的操作系统上。 + +#### 如何使用 + +将 Linux 作为虚拟机运行既方便又简单,既可以作为试运行使用,也可以在需要 Linux 环境时进行双启动或重启进入。它功能齐全,因为它使用虚拟硬件,宿主操作系统负责驱动你的外围设备。将 Linux 作为虚拟机运行的唯一缺点主要是心理上的。如果你打算使用 Linux 作为主要操作系统,但最终默认在宿主操作系统上做除了特定于 Linux 的大多数任务,那么虚拟机就会让你失望。否则,虚拟机是现代技术的胜利,在 VirtualBox 中使用 Linux 可以为你提供 Linux 所提供的所有最佳功能。 + +### 10、安装一个 Linux + +![Fedora Silverblue][31] + +如果对上述方式有疑问,那么总会有传统的方式。如果你想给予 Linux 应有的关注,你可以下载 Linux,将安装程序刻录到 U 盘(或 DVD,如果你更喜欢光学介质的话),并将其安装在你的计算机上。Linux 是开源的,所以任何想要花时间打包 Linux 的人都可以分发 Linux,并且可以将所有可用的部分分配到通常称为发行版的内容中。无论问哪一个 Linux 用户什么发行版是“最好的”,你必然都会得到一个不同的答案(主要是因为这个术语“最佳”通常是尚未定义的)。大多数人都认可:你应该使用适合你的 Linux 发行版,这意味着你应该测试一些流行的发行版,并坚持使你的计算机按照你期望的行为行事。这是一种务实和功能性的方法。例如,如果发行版无法识别你的网络摄像头而你希望它可以正常工作,则可以使用一个可识别该网络摄像头的发行版。 + +如果你之前从未安装过操作系统,你会发现大多数 Linux 发行版都包含一个友好且简单的安装程序。只需下载一个发行版(它们以 ISO 文件提供),然后下载 [Fedora Media Writer][11] 来创建一个可启动的安装 U 盘。 + +#### 如何使用 + +安装 Linux 并将其用作操作系统是迈向熟悉它的一步。怎么使用它都可以。你可能会发现一些你从未了解过的所需的必备功能,你可能会比你想象的更多地了解计算机,并且可能会改变你的世界观。你使用一个 Linux 桌面,或者是因为它易于下载和安装,或者是因为你想要削弱公司中某些人的霸主地位,或者只是因为它可以帮助你完成工作。 + +无论你的原因是什么,只需尝试使用上面这些任何(或所有)这些方式。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/ways-get-started-linux + +作者:[Seth Kenlon][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://opensource.com/users/seth/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png?itok=p7cWyQv9 (Penguins gathered together in the Artic) +[2]: https://opensource.com/article/19/6/what-linux-user +[3]: https://opensource.com/sites/default/files/uploads/freeshell.png (Free shell screenshot) +[4]: https://freeshell.de +[5]: https://blinkenshell.org/wiki/Start +[6]: https://sdf.org/ +[7]: https://devblogs.microsoft.com/commandline/wsl-2-is-now-available-in-windows-insiders/ +[8]: https://opensource.com/sites/default/files/uploads/porteus.jpg (Porteus Linux) +[9]: https://linux.cn/article-11040-1.html +[10]: http://porteus.org +[11]: https://getfedora.org/en/workstation/download/ +[12]: https://opensource.com/sites/default/files/uploads/linux_tour.jpg (Linux tour screenshot) +[13]: http://tour.ubuntu.com/en/# +[14]: https://opensource.com/sites/default/files/uploads/jslinux.jpg (JSLinux) +[15]: https://www.qemu.org +[16]: https://bellard.org/jslinux/ +[17]: https://opensource.com/article/19/1/tech-books-new-skils +[18]: http://www.lulu.com/shop/hazel-russman/the-charm-of-linux/paperback/product-21229401.html +[19]: https://opensource.com/sites/default/files/uploads/raspberry-pi-4-case.jpg (Raspberry Pi 4) +[20]: https://opensource.com/resources/raspberry-pi +[21]: https://www.raspberrypi.org/ +[22]: https://opensource.com/article/19/3/raspberry-pi-projects +[23]: https://opensource.com/article/19/3/piflash +[24]: https://opensource.com/article/19/3/gamepad-raspberry-pi +[25]: https://opensource.com/life/16/3/make-music-raspberry-pi-milkytracker +[26]: https://opensource.com/resources/cloud +[27]: https://opensource.com/article/19/6/how-ssh-running-container +[28]: https://linuxcontainers.org/lxd/try-it/ +[29]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[30]: https://virtualbox.org +[31]: https://opensource.com/sites/default/files/uploads/fedora-silverblue.png (Fedora Silverblue) diff --git a/published/20190708 Command line quick tips- Permissions.md b/published/20190708 Command line quick tips- Permissions.md new file mode 100644 index 0000000000..028916247a --- /dev/null +++ b/published/20190708 Command line quick tips- Permissions.md @@ -0,0 +1,126 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11123-1.html) +[#]: subject: (Command line quick tips: Permissions) +[#]: via: (https://fedoramagazine.org/command-line-quick-tips-permissions/) +[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) + +命令行快速提示:权限 +====== + +![][1] + +Fedora 与所有基于 Linux 的系统一样,它提供了一组强大的安全特性。其中一个基本特性是文件和文件夹上的*权限*。这些权限保护文件和文件夹免受未经授权的访问。本文将简要介绍这些权限,并向你展示如何使用它们共享对文件夹的访问。 + +### 权限基础 + +Fedora 本质上是一个多用户操作系统,它也有*组*,用户可以是其成员。但是,想象一下一个没有权限概念的多用户系统,不同的登录用户可以随意阅读彼此的内容。你可以想象到这对隐私或安全性并不是很好。 + +Fedora 上的任何文件或文件夹都分配了三组权限。第一组用于拥有文件或文件夹的*用户*,第二组用于拥有它的*组*,第三组用于其他人,即既不是该文件的用户也不是拥有该文件的组中的用户。有时这被称为*全世界*。 + +### 权限意味着什么 + +每组权限都有三种形式:*读*、*写*和*执行*。其中每个都可以用首字母来代替,即 `r`、`w`、`x`。 + +#### 文件权限 + +对于*文件*,权限的含义如下所示: + + * 读(`r`):可以读取文件内容 + * 写(`w`):可以更改文件内容 + * 执行(`x`):可以执行文件 —— 这主要用于打算直接运行的程序或脚本 + +当你对任何文件进行详细信息列表查看时,可以看到这三组权限。尝试查看系统上的 `/etc/services` 文件: + +``` +$ ls -l /etc/services +-rw-r--r--. 1 root root 692241 Apr 9 03:47 /etc/services +``` + +注意列表左侧的权限组。如上所述,这些表明三种用户的权限:拥有该文件的用户,拥有该文件的组以及其他人。用户所有者是 `root`,组所有者是 `root` 组。用户所有者具有对文件的读写权限,`root` 组中的任何人都只能读取该文件。最后,其他任何人也只能读取该文件。(最左边的 `-` 显示这是一个常规文件。) + +顺便说一下,你通常会在许多(但不是所有)系统配置文件上发现这组权限,它们只由系统管理员而不是普通用户更改。通常,普通用户需要读取其内容。 + +#### 文件夹(目录)权限 + +对于文件夹,权限的含义略有不同: + + * 读(`r`):可以读取文件夹内容(例如 `ls` 命令) + * 写(`w`):可以更改文件夹内容(可以在此文件夹中创建或删除文件) + * 执行(`x`):可以搜索文件夹,但无法读取其内容。(这听起来可能很奇怪,但解释起来需要更复杂的文件系统细节,这超出了本文的范围,所以现在就这样吧。) + +看一下 `/etc/grub.d` 文件夹的例子: + +``` +$ ls -ld /etc/grub.d +drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d +``` + +注意最左边的 `d`,它显示这是一个目录或文件夹。权限显示用户所有者(`root`)可以读取、更改和 `cd` 到此文件夹中。但是,没有其他人可以这样做 —— 无论他们是否是 `root` 组的成员。注意,你不能 `cd` 进入该文件夹。 + +``` +$ cd /etc/grub.d +bash: cd: /etc/grub.d: Permission denied +``` + +注意你自己的主目录是如何设置的: + +``` +$ ls -ld $HOME +drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul +``` + +现在,注意除了作为所有者之外,没有人可以访问此文件夹中的任何内容。这是特意的!你不希望其他人能够在共享系统上读取你的私人内容。 + +### 创建共享文件夹 + +你可以利用此权限功能轻松创建一个文件夹以在组内共享。假设你有一个名为 `finance` 的小组,其中有几个成员需要共享文档。因为这些是用户文档,所以将它们存储在 `/home` 文件夹层次结构中是个好主意。 + +首先,[使用 sudo][2] 创建一个共享文件夹,并将其设置为 `finance` 组所有: + +``` +$ sudo mkdir -p /home/shared/finance +$ sudo chgrp finance /home/shared/finance +``` + +默认情况下,新文件夹具有这些权限。注意任何人都可以读取或搜索它,即使他们无法创建或删除其中的文件: + +``` +drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance +``` + +对于金融数据来说,这似乎不是一个好主意。接下来,使用 `chmod` 命令更改共享文件夹的模式(权限)。注意,使用 `g` 更改所属组的权限,使用 `o` 更改其他用户的权限。同样,`u` 会更改用户所有者的权限: + +``` +$ sudo chmod g+w,o-rx /home/shared/finance +``` + +生成的权限看起来更好。现在,`finance` 组中的任何人(或用户所有者 `root`)都可以完全访问该文件夹及其内容: + +``` +drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance +``` + +如果其他用户尝试访问共享文件夹,他们将无法执行此操作。太棒了!现在,我们的金融部门可以将文档放在一个共享的地方。 + +### 其他说明 + +还有其他方法可以操作这些权限。例如,你可能希望将此文件夹中的任何文件设置为 `finance` 组所拥有。这需要本文未涉及的其他设置,但请继续关注我们,以了解关于该主题的更多信息。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/command-line-quick-tips-permissions/ + +作者:[Paul W. Frields][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/pfrields/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg +[2]: https://fedoramagazine.org/howto-use-sudo/ diff --git a/published/20190709 Sysadmin vs SRE- What-s the difference.md b/published/20190709 Sysadmin vs SRE- What-s the difference.md new file mode 100644 index 0000000000..8bbd02d67a --- /dev/null +++ b/published/20190709 Sysadmin vs SRE- What-s the difference.md @@ -0,0 +1,62 @@ +[#]: collector: (lujun9972) +[#]: translator: (vizv) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11113-1.html) +[#]: subject: (Sysadmin vs SRE: What's the difference?) +[#]: via: (https://opensource.com/article/19/7/sysadmins-vs-sres) +[#]: author: (Vince Power https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish) + +系统管理员与网站可靠性工程师(SRE)对比:区别在那儿? +====== + +> 系统管理员和网站可靠性工程师(SRE,下同)对于任何组织来讲都很重要。本篇将介绍下两者的不同之处。 + +![](https://img.linux.net.cn/data/attachment/album/201907/17/214505qgk19kjuvzb2m1m4.jpg) + +在 IT 行业,成为多面手或是专家的争议一直存在。99% 的传统系统管理员都被归到了多面手这类。[网站可靠性工程师][2]site reliability engineer(SRE)的角色则更加专精,并且在如 Google 般有着一定规模的头部公司中对其的需求不断增加。但总的来说这两者对于跑着应用的基础设施有着同样的目标:为应用的消费者提供良好的体验。然而两者的出发点却截然不同。 + +### 系统管理员:中立善良的化身 + +系统管理员一般都是从基础的桌面或网络支持成长过来的,并一路习得大多数系统管理员都会掌握的广泛的技能。此时这些系统管理员会对他们所负责的系统和应用了如指掌。他们会知道一号服务器上的应用每隔一个星期二就需要重启一次,或是九号服务器周三会静默的崩溃。他们会对服务器的监视作出微调以忽略无关紧要的信息,尽管那个被标记为致命fatal的错误信息每个月第三个周日都会显示。 + +总的来讲,系统管理员了解如何照料那些跑着你核心业务的服务器。这些系统管理员已经成长到开始使用自动化工具去处理所有归他们管的服务器上的例行任务。他们虽然喜欢使用模板、黄金镜像golden images、以及标准,但同时也有着足够的灵活度去修改一个服务器上的参数以解决错误,并注释为什么那个服务器的配置与众不同。 + +尽管系统管理员很伟大,但他们也有着一些怪癖。其中一项就是没有他们神圣的授权你永远也获取不了系统的 root 访问权限,另一项则是任何不是出于他们的主意的变更都要在文档中被记录为应用提供方的要求,并仍然需要再次核对。 + +他们所管理的服务器是他们的地盘,没有人可以随意干涉。 + +### SRE:灭霸将为之自豪 + +与成为系统管理员的道路相反,从开发背景和从系统管理员背景成长为 SRE 的可能性相近。SRE 的职位出现的时长与应用开发环境的生命周期相近。 + +随着一个组织的发展而引入的类似于[持续集成][4]和[持续发布][5] (CI/CD) 的 [DevOps][3] 概念,通常会出现技能空缺,以让这些不可变immutable的应用部署到多个环境并随着业务需求进行扩展。这将是 SRE 的舞台。的确,一个系统管理员可以学习额外的工具,但大体上成为一个全职的职位更容易跟的上发展。一个专精的专家更有意义。 + +SRE 使用如[代码即基础设施][6]infrastructure-as-code的概念去制作模板,然后调用它们来部署用以运行应用的环境,并以使用一键完整重现每个应用和它们的环境作为目标。因此会出现这样的情况:测试环境中一号服务器里的一号应用的二进制文件与生产环境中十五号服务器的完全一致,仅环境相关的变量如密码和数据库链接字串有所不同。 + +SRE 也会在配置发生改变时完全销毁一个环境并重新构建它。对于任何系统他们都不带一点感情。每个系统只是个被打了标记和安排了生命周期的数字而已,甚至连例行的对服务器打补丁也要重新部署整个应用栈application stack + +### 总结 + +对于一些情况,尤其是运维一些大型的基于 DevOps 的环境时,一个 SRE 所能提供的用于处理各种规模的业务的专业技能当然更具优势。但每次他们在运气不好走入死胡同时都会去寻求他的系统管理员友人或是 [来自地狱的混蛋运维(BOFH)][7] ,得到他那身经百战的故障排除技能,和那些用于给组织提供价值的丰富经验的帮助。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/sysadmins-vs-sres + +作者:[Vince Power][a] +选题:[lujun9972][b] +译者:[vizv](https://github.com/vizv) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) +[2]: https://en.wikipedia.org/wiki/Site_Reliability_Engineering +[3]: https://opensource.com/resources/devops +[4]: https://en.wikipedia.org/wiki/Continuous_integration +[5]: https://en.wikipedia.org/wiki/Continuous_delivery +[6]: https://en.wikipedia.org/wiki/Infrastructure_as_code +[7]: http://www.bofharchive.com/BOFH.html diff --git a/published/20190710 32-bit life support- Cross-compiling with GCC.md b/published/20190710 32-bit life support- Cross-compiling with GCC.md new file mode 100644 index 0000000000..df71c9b3cd --- /dev/null +++ b/published/20190710 32-bit life support- Cross-compiling with GCC.md @@ -0,0 +1,178 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11120-1.html) +[#]: subject: (32-bit life support: Cross-compiling with GCC) +[#]: via: (https://opensource.com/article/19/7/cross-compiling-gcc) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +32 位支持:使用 GCC 交叉编译 +====== + +> 使用 GCC 在单一的构建机器上来为不同的 CPU 架构交叉编译二进制文件。 + +![](https://img.linux.net.cn/data/attachment/album/201907/19/054242nwhludz9tm2lwd8t.jpg) + +如果你是一个开发者,要创建二进制软件包,像一个 RPM、DEB、Flatpak 或 Snap 软件包,你不得不为各种不同的目标平台编译代码。典型的编译目标包括 32 位和 64 位的 x86 和 ARM。你可以在不同的物理或虚拟机器上完成你的构建,但这需要你为何几个系统。作为代替,你可以使用 GNU 编译器集合 ([GCC][2]) 来交叉编译,在单一的构建机器上为几个不同的 CPU 架构产生二进制文件。 + +假设你有一个想要交叉编译的简单的掷骰子游戏。在大多数系统上,以 C 语言来编写这个相对简单,出于给添加现实的复杂性的目的,我以 C++ 语言写这个示例,所以程序依赖于一些不在 C 语言中东西 (具体来说就是 `iostream`)。 + +``` +#include +#include + +using namespace std; + +void lose (int c); +void win (int c); +void draw (); + +int main() { + int i; + do { + cout << "Pick a number between 1 and 20: \n"; + cin >> i; + int c = rand ( ) % 21; + if (i > 20) lose (c); + else if (i < c ) lose (c); + else if (i > c ) win (c); + else draw (); + } + while (1==1); + } + +void lose (int c ) + { + cout << "You lose! Computer rolled " << c << "\n"; + } + +void win (int c ) + { + cout << "You win!! Computer rolled " << c << "\n"; + } + +void draw ( ) + { + cout << "What are the chances. You tied. Try again, I dare you! \n"; + } +``` + +在你的系统上使用 `g++` 命令编译它: + +``` +$ g++ dice.cpp -o dice +``` + +然后,运行它来确认其工作: + +``` +$ ./dice +Pick a number between 1 and 20: +[...] +``` + +你可以使用 `file` 命令来查看你刚刚生产的二进制文件的类型: + +``` +$ file ./dice +dice: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically +linked (uses shared libs), for GNU/Linux 5.1.15, not stripped +``` + +同样重要,使用 `ldd` 命令来查看它链接哪些库: + +``` +$ ldd dice +linux-vdso.so.1 => (0x00007ffe0d1dc000) +libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 +(0x00007fce8410e000) +libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 +(0x00007fce83d4f000) +libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 +(0x00007fce83a52000) +/lib64/ld-linux-x86-64.so.2 (0x00007fce84449000) +libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 +(0x00007fce8383c000) +``` + +从这些测试中,你已经确认了两件事:你刚刚运行的二进制文件是 64 位的,并且它链接的是 64 位库。 + +这意味着,为实现 32 位交叉编译,你必需告诉 `g++` 来: + + 1. 产生一个 32 位二进制文件 + 2. 链接 32 位库,而不是 64 位库 + +### 设置你的开发环境 + +为编译成 32 位二进制,你需要在你的系统上安装 32 位的库和头文件。如果你运行一个纯 64 位系统,那么,你没有 32 位的库或头文件,并且需要安装一个基础集合。最起码,你需要 C 和 C++ 库(`glibc` 和 `libstdc++`)以及 GCC 库(`libgcc`)的 32 位版本。这些软件包的名称可能在每个发行版中不同。在 Slackware 系统上,一个纯 64 位的带有 32 位兼容的发行版,可以从 [Alien BOB][3] 提供的 `multilib` 软件包中获得。在 Fedora、CentOS 和 RHEL 系统上: + +``` +$ yum install libstdc++-*.i686 +$ yum install glibc-*.i686 +$ yum install libgcc.i686 +``` + +不管你正在使用什么系统,你同样必须安装一些你工程使用的 32 位库。例如,如果你在你的工程中包含 `yaml-cpp`,那么,在编译工程前,你必需安装 `yaml-cpp` 的 32 位版本,或者,在很多系统上,安装 `yaml-cpp` 的开发软件包(例如,在 Fedora 系统上的 `yaml-cpp-devel`)。 + +一旦这些处理好了,编译是相当简单的: + +``` +$ g++ -m32 dice.cpp -o dice32 -L /usr/lib -march=i686 +``` + +`-m32` 标志告诉 GCC 以 32 位模式编译。`-march=i686` 选项进一步定义来使用哪种最优化类型(参考 `info gcc` 了解选项列表)。`-L` 标志设置你希望 GCC 来链接的库的路径。对于 32 位来说通常是 `/usr/lib`,不过,这依赖于你的系统是如何设置的,它可以是 `/usr/lib32`,甚至 `/opt/usr/lib`,或者任何你知道存放你的 32 位库的地方。 + +在代码编译后,查看你的构建的证据: + +``` +$ file ./dice32 +dice: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), +dynamically linked (uses shared libs) [...] +``` + +接着,当然, `ldd ./dice32` 也会指向你的 32 位库。 + +### 不同的架构 + +在 64 位相同的处理器家族上允许 GCC 做出很多关于如何编译代码的假设来编译 32 位软件。如果你需要为完全不同的处理器编译,你必需安装适当的交叉构建实用程序。安装哪种实用程序取决于你正在编译的东西。这个过程比为相同的 CPU 家族编译更复杂一点。 + +当你为相同处理器家族交叉编译时,你可以期待找到与 32 位库集的相同的 64 位库集,因为你的 Linux 发行版是同时维护这二者的。当为一个完全不同的架构编译时,你可能不得不穷追你的代码所需要的库。你需要的版本可能不在你的发行版的存储库中,因为你的发行版可能不为你的目标系统提供软件包,或者它不在容易到达的位置提供所有的软件包。如果你正在编译的代码是你写的,那么你可能非常清楚它的依赖关系是什么,并清楚在哪里找到它们。如果代码是你下载的,并需要编译,那么你可能不熟悉它的要求。在这种情况下,研究正确编译代码需要什么(它们通常被列在 `README` 或 `INSTALL` 文件中,当然也出现在源文件代码自身之中),然后收集需要的组件。 + +例如,如果你需要为 ARM 编译 C 代码,你必须首先在 Fedora 或 RHEL 上安装 `gcc-arm-linux-gnu`(32 位)或 `gcc-aarch64-linux-gnu`(64 位);或者,在 Ubuntu 上安装 `arm-linux-gnueabi-gcc` 和 `binutils-arm-linux-gnueabi`。这提供你需要用来构建(至少)一个简单的 C 程序的命令和库。此外,你需要你的代码使用的任何库。你可以在惯常的位置(大多数系统上在 `/usr/include`)放置头文件,或者,你可以放置它们在一个你选择的目录,并使用 `-I` 选项将 GCC 指向它。 + +当编译时,不使用标准的 `gcc` 或 `g++` 命令。作为代替,使用你安装的 GCC 实用程序。例如: + +``` +$ arm-linux-gnu-g++ dice.cpp \ + -I/home/seth/src/crossbuild/arm/cpp \ + -o armdice.bin +``` + +验证你构建的内容: + +``` +$ file armdice.bin +armdice.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV) [...] +``` + +### 库和可交付结果 + +这是一个如何使用交叉编译的简单的示例。在真实的生活中,你的源文件代码可能产生的不止于一个二进制文件。虽然你可以手动管理,在这里手动管理可能不是好的正当理由。在我接下来的文章中,我将说明 GNU 自动工具,GNU 自动工具做了使你的代码可移植的大部分工作。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/cross-compiling-gcc + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [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/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools) +[2]: https://gcc.gnu.org/ +[3]: http://www.slackware.com/~alien/multilib/ diff --git a/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md b/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md new file mode 100644 index 0000000000..cda9f2c351 --- /dev/null +++ b/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md @@ -0,0 +1,256 @@ +[#]: collector: (lujun9972) +[#]: translator: (0x996) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11118-1.html) +[#]: subject: (Test 200+ Linux And Unix Operating Systems Online For Free) +[#]: via: (https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +在线试用 200 多种 Linux 和 Unix 操作系统 +====== + +![DistroTest——在线试用200多种Linux和Unix操作系统][1] + +不久前我们介绍过[OSBoxes][2],该网站提供了一系列免费且开箱即用的 Linux 和 Unix 虚拟机。你可以在你的 Linux 系统中下载这些虚拟机并用 VirtualBox 或 VMWare workstation 试用。今天,我偶然发现一个名叫 “DistroTest” 的类似服务。与 OSBoxes 不同之处在于 DistroTest 让你免费试用现场版 Linux 和 Unix 操作系统。你可以在线试用 200 多种 Linux 和 Unix 操作系统而无需在本地安装它们。只要打开该网站,选择你需要的 Linux/Unix 发行版,然后开始试用! + +两个名为 Klemann Andy 和 Forster Tobias 的好心人用 Qemu 在 Debian 上运行了这项网络服务。这里列出的公开发行版在使用上没有任何限制。你可以象使用本地系统一样使用系统的所有功能。你可以安装和卸载软件。你可以测试安装的程序,甚至删除或格式化硬盘,删除系统文件。简而言之,DistroTest让喜欢尝试不同发行版的的人自行决定: + + * 最适合他们的发行版 + * 想要哪种图形界面 + * 他们可以选择哪些配置 + +本文撰写之时,DistroTest 提供了 227 种操作系统的 711 个版本。我已经使用 Linux 很多年,但我从未听说过这里列出的一些发行版。说实话我甚至不知道 Linux 操作系统有如此之多的版本。 + +DistroTest 网站提供的 Linux 发行版的列表如下。(LCTT 译注:其中也包括部分非 Linux 的操作系统如 FreeBSD 和 FreeDOS,或是分区工具如 Gparted) + + * 4mLinux + * AbsoluteLinux + * AlpineLinux + * Antergos + * antiX Linux + * Aptosid + * ArchBang + * ArchLabs + * ArchLinux + * Archman + * ArchStrike + * ArtixLinux + * AryaLinux + * AvLinux + * BackBoxLinux + * BigLinux + * Bio-Linux + * BlackArch + * BlackLab + * BlackPantherOS + * blag + * BlankOn + * Bluestar + * Bodhi + * BunsenLabs + * Caine + * Calculate Linux Desktop + * CentOS 7 + * Chakra + * ChaletOS + * ClearOS + * Clonezilla + * ConnochaetOS + * Cucumber + * Damn Small Linux + * Debian + * Devil-Linux + * Devuan + * DragonFly BSD + * Dragora + * Dyne:bolic + * Edubuntu + * elementaryOS + * Elive Linux + * Emmabuntüs + * Emmabuntüs + * Endless OS + * EnsoOS + * Exe GNU/Linux + * ExTiX + * Fatdog64 + * Fedora + * FerenOS + * FreeBSD + * FreeDOS + * Frugalware + * Frugalware + * G4L + * GeckoLinux + * Gentoo + * GNewSense + * GoboLinux + * Gparted + * GreenieLinux + * GRML + * GuixSD + * Haiku + * Heads + * Kali Linux + * Kanotix + * KaOS + * Knoppix + * Kodachi + * KolibriOS + * Korora + * Kwort + * Linux Lite + * Linux Mint + * LiveRaizo + * LMDE + * LXLE OS + * Macpup + * Mageia + * MakuluLinux + * Manjaro + * MauiLinux + * MenuetOS + * MiniNo + * Modicia + * Musix + * MX Linux + * Nas4Free + * Neptune + * NetBSD + * Netrunner + * NixOs + * NuTyX + * OpenIndiana + * OpenMandriva + * openSUSE + * OracleLinux + * OSGeo live + * OviOS + * Parabola + * Pardus + * Parrot + * Parsix + * PCLinuxOS + * PeachOSI + * Peppermint + * Pinguy + * PinguyOS + * plopLinux + * PointLinux + * Pop!_OS + * PORTEUS + * Puppy Linux + * PureOS + * Q4OS + * QubesOS + * Quirky + * ReactOS + * Redcore + * Rescatux + * RevengeOS + * RoboLinux + * Rockstor + * ROSA + * Runtu + * Sabayon + * SalentOS + * Salix + * ScientificLinux + * Siduction + * Slax + * SliTaz + * Solus + * SolydK + * SparkyLinux + * Springdale + * Stresslinux + * SubgraphOS + * SwagArch (18.03) + * Tails + * Tanglu + * Tiny Core + * Trisquel + * TrueOS + * TurnKey Linux + * Ubuntu及其官方衍生版本 + * Uruk + * VectorLinux + * VineLinux + * VoidLinux + * Voyager + * VyOS + * WattOs + * Zentyal + * Zenwalk + * Zevenet + * Zorin OS + +### 如何使用? + +要试用任何操作系统,点击下面的链接: https://distrotest.net/ + +在这个网站,你会看到可用的操作系统列表。单击你想了解的发行版名称即可。 + +![1][4] + +用 DistroTest 试用 200 多种Linux和Unix操作系统 + +本文中我会试用 Arch Linux。 + +单击发行版链接后,在跳转到的页面单击 “System start” 按钮即可启动所选操作系统。 + +![1][5] + +此现场版操作系统会在新浏览器窗口中启动。你可以通过内建的 noVNC viewer 访问它。请在浏览器中启用/允许 DistroTest 网站的弹出窗口,否则无法看到弹出的 noVNC 窗口。 + +按回车启动现场版系统。 + +![1][6] + +这就是 Arch Linux 现场版系统: + +![1][7] + +你可以免费使用这个系统 1 小时。你可以试用该现场版操作系统、安装应用、卸载应用、删除或修改系统文件、测试配置或脚本。每次关机后,一切都会恢复成默认配置。 + +一旦试用结束,回到 DistroTest 页面并停止你试用的系统。如果你不想启用 DistroTest 页面的弹出窗口,用你本地系统安装的任意 VNC 客户端也可以。VNC 登录信息可在同一页面找到。 + +![1][8] + +DistroTest 服务对两类用户比较实用:想在线试用 Linux/Unix 系统,或是没有喜欢的操作系统现场版 ISO 镜像文件的人。我在 4G 网络上测试的结果一切正常。 + +### 实际上,我没法在这个虚拟机里安装新软件 + +试用期间我注意到的一个问题是这个虚拟机没有联网。除了本地环回接口之外没有其他网络接口。没有联网也没有本地镜像源的情况下我没法下载和安装新软件。我不知道为何网站声称可以安装软件。也许在这点上我遗漏了什么。我在 DistroTest 上能做的只是看看现成的系统,试用现场版而不能安装任何软件。 + +推荐阅读: + + * [免费在线学习和练习 Linux命令!][9] + * [在浏览器中运行 Linux 和其他操作系统][10] + +暂时就这样了。我不知道 DistroTest 团队如何设法托管了这么多操作系统。我肯定这会花不少时间。这的确是件值得称赞的工作。我非常感激项目成员的无私行为。荣誉归于你们。加油! + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[0x996](https://github.com/0x996) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2018/07/test-Linux-and-Unix-online-686x340.jpg +[2]: https://www.ostechnix.com/osboxes-free-unixlinux-virtual-machines-for-vmware-and-virtualbox/ +[3]: https://distrotest.net/ +[4]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-5.png +[5]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-1.png +[6]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-2.png +[7]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-3.png +[8]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-4-1.png +[9]: https://www.ostechnix.com/learn-and-practice-linux-commands-online-for-free/ +[10]: https://www.ostechnix.com/run-linux-operating-systems-browser/ diff --git a/published/20190711 How to install Elasticsearch on MacOS.md b/published/20190711 How to install Elasticsearch on MacOS.md new file mode 100644 index 0000000000..b213d2bcd8 --- /dev/null +++ b/published/20190711 How to install Elasticsearch on MacOS.md @@ -0,0 +1,144 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11125-1.html) +[#]: subject: (How to install Elasticsearch on MacOS) +[#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins) + +如何在 MacOS 上安装 Elasticsearch +====== + +> 安装 Elasticsearch 很复杂!以下是如何在 Mac 上安装。 + +![](https://img.linux.net.cn/data/attachment/album/201907/20/064958dnnwvp8wqzqq4fm2.jpg) + +[Elasticsearch][2] 是一个用 Java 开发的开源全文搜索引擎。用户上传 JSON 格式的数据集。然后,Elasticsearch 在向集群索引中的文档添加可搜索的引用之前先保存原始文档。 + +Elasticsearch 创建还不到九年,但它是最受欢迎的企业搜索引擎。Elastic 在 2019 年 6 月 25 日发布了最新的更新版本 7.2.0。 + +[Kibana][3] 是 Elasticsearch 的开源数据可视化工具。此工具可帮助用户在 Elasticsearch 集群的内容索引之上创建可视化。 + +[Sunbursts][4]、[地理空间数据地图][5]、[关系分析][6]和实时数据面板只是其中几个功能。并且由于 Elasticsearch 的机器学习能力,你可以了解哪些属性可能会影响你的数据(如服务器或 IP 地址)并查找异常模式。 + +在上个月的 [DevFest DC][7] 中,Booz Allen Hamilton 的首席数据科学家 [Summer Rankin 博士][8]将 TED Talk 的内容数据集上传到了 Elasticsearch,然后使用 Kibana 快速构建了面板。出于好奇,几天后我去了一个 Elasticsearch 聚会。 + +由于本课程针对的是新手,因此我们从第一步开始:在我们的笔记本上安装 Elastic 和 Kibana。如果没有安装这两个包,我们无法将莎士比亚的文本数据集作为测试 JSON 文件创建可视化了。 + +接下来,我将分享在 MacOS 上下载、安装和运行 Elasticsearch V7.1.1 的分步说明。这是我在 2019 年 6 月中旬参加 Elasticsearch 聚会时的最新版本。 + +### 下载适合 MacOS 的 Elasticsearch + +1、进入 ,你会看到下面的页面: + +![The Elasticsearch download page.][9] + +2、在**下载**区,单击 **MacOS**,将 Elasticsearch TAR 文件(例如,`elasticsearch-7.1.1-darwin-x86_64.tar`)下载到 `Downloads` 文件夹。 +  +3、双击此文件并解压到自己的文件夹中(例如,`elasticsearch-7.1.1`),这其中包含 TAR 中的所有文件。 + +**提示**:如果你希望 Elasticsearch 放在另一个文件夹中,现在可以移动它。 + +### 在 MacOS 命令行中运行 Elasticsearch + +如果你愿意,你可以只用命令行运行 Elasticsearch。只需遵循以下流程: + +1、[打开终端窗口][10]。 + +2、在终端窗口中,输入你的 Elasticsearch 文件夹。例如(如果你移动了程序,请将 `Downloads` 更改为正确的路径): + +``` +$ cd ~Downloads/elasticsearch-1.1.0 +``` + +3、切换到 Elasticsearch 的 `bin` 子文件夹,然后启动该程序。例如: + +``` +$ cd bin +$ ./elasticsearch +``` + +这是我启动 Elasticsearch 1.1.0 时命令行终端显示的一些输出: + +![Terminal output when running Elasticsearch.][11] + +**注意**:默认情况下,Elasticsearch 在前台运行,这可能会导致计算机速度变慢。按 `Ctrl-C` 可以阻止 Elasticsearch 运行。 + +### 使用 GUI 运行 Elasticsearch + +如果你更喜欢点击操作,你可以像这样运行 Elasticsearch: + +1、打开一个新的 **Finder** 窗口。 + +2、在左侧 Finder 栏中选择 `Downloads`(如果你将 Elasticsearch 移动了另一个文件夹,请进入它)。 + +3、打开名为 `elasticsearch-7.1.1` 的文件夹(对于此例)。出现了八个子文件夹。 + +![The elasticsearch/bin menu.][12] + +4、打开 `bin` 子文件夹。如上面的截图所示,此子文件夹中有 20 个文件。 +  +5、单击第一个文件,即 `elasticsearch`。 + +请注意,你可能会收到安全警告,如下所示: + +![The security warning dialog box.][13] + +这时候要打开程序需要: + +1. 在警告对话框中单击 **OK**。 +2. 打开**系统偏好**。 +3. 单击**安全和隐私**,打开如下窗口: + + ![Where you can allow your computer to open the downloaded file.][14] +4. 单击**永远打开**,打开如下所示的确认对话框: + + ![Security confirmation dialog box.][15] +5. 单击**打开**。会打开一个终端窗口并启动 Elasticsearch。 + +启动过程可能需要一段时间,所以让它继续运行。最终,它将完成,你最后将看到类似这样的输出: + +![Launching Elasticsearch in MacOS.][16] + +### 了解更多 + +安装 Elasticsearch 之后,就可以开始探索了! + +该工具的 [Elasticsearch:开始使用][17]指南会根据你的目标指导你。它的介绍视频介绍了在 [Elasticsearch Service][18] 上启动托管集群,执行基本搜索查询,通过创建、读取、更新和删除(CRUD)REST API 等方式操作数据的步骤。 + +本指南还提供文档链接,开发控制台命令,培训订阅以及 Elasticsearch Service 的免费试用版。此试用版允许你在 AWS 和 GCP 上部署 Elastic 和 Kibana 以支持云中的 Elastic 集群。 + +在本文的后续内容中,我们将介绍在 MacOS 上安装 Kibana 所需的步骤。此过程将通过不同的数据可视化将你的 Elasticsearch 查询带到一个新的水平。 敬请关注! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/installing-elasticsearch-macos + +作者:[Lauren Maffeo][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lmaffeo/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) +[2]: https://www.getapp.com/it-management-software/a/qbox-dot-io-hosted-elasticsearch/ +[3]: https://www.elastic.co/products/kibana +[4]: https://en.wikipedia.org/wiki/Pie_chart#Ring +[5]: https://en.wikipedia.org/wiki/Spatial_analysis +[6]: https://en.wikipedia.org/wiki/Correlation_and_dependence +[7]: https://www.devfestdc.org/ +[8]: https://www.summerrankin.com/about +[9]: https://opensource.com/sites/default/files/uploads/wwa1f3_600px_0.png (The Elasticsearch download page.) +[10]: https://support.apple.com/en-ca/guide/terminal/welcome/mac +[11]: https://opensource.com/sites/default/files/uploads/io6t1a_600px.png (Terminal output when running Elasticsearch.) +[12]: https://opensource.com/sites/default/files/uploads/o43yku_600px.png (The elasticsearch/bin menu.) +[13]: https://opensource.com/sites/default/files/uploads/elasticsearch_security_warning_500px.jpg (The security warning dialog box.) +[14]: https://opensource.com/sites/default/files/uploads/the_general_tab_of_the_system_preferences_security_and_privacy_window.jpg (Where you can allow your computer to open the downloaded file.) +[15]: https://opensource.com/sites/default/files/uploads/confirmation_dialog_box.jpg (Security confirmation dialog box.) +[16]: https://opensource.com/sites/default/files/uploads/y5dvtu_600px.png (Launching Elasticsearch in MacOS.) +[17]: https://www.elastic.co/webinars/getting-started-elasticsearch?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch&gclid=EAIaIQobChMImdbvlqOP4wIVjI-zCh3P_Q9mEAAYASABEgJuAvD_BwE +[18]: https://info.elastic.co/elasticsearch-service-gaw-v10-nav.html?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch%20service&gclid=EAIaIQobChMI_MXHt-SZ4wIVJBh9Ch3wsQfPEAAYASAAEgJo9fD_BwE diff --git a/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md new file mode 100644 index 0000000000..b59148825d --- /dev/null +++ b/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md @@ -0,0 +1,106 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11128-1.html) +[#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) +[#]: via: (https://itsfoss.com/electronmail/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +ElectronMail:ProtonMail 和 Tutanota 的桌面客户端 +====== + +互联网上的大多数人都拥有来自 Google 等大公司的电子邮件帐户,但这些帐户不尊重你的隐私。值得庆幸的是,目前有 [Tutanota][1] 和 [ProtonMail][2] 等具有隐私意识的替代品。问题是并非所有人都有桌面客户端。今天,我们将研究一个为你解决该问题的项目。我们来看看 ElectronMail 吧。 + +> ‘Electron’ 警告! + +> 以下应用是使用 Electron 构建的(也就是名为 ElectronMail 的原因之一)。如果使用 Electron 让你感到不安,请将此视为触发警告。 + +### ElectronMail:Tutanota 和 ProtonMail 的桌面客户端 + +![Electron Mail About][3] + +[ElectronMail][4] 可以简单地视作 ProtonMail 和 Tutanota 的电子邮件客户端。它使用三大技术构建:[Electron][5]、[TypeScript][6] 和 [Angular][7]。它包括以下功能: + +* 针对每个电子邮件提供商提供多帐户支持 +* 加密本地存储 +* 适用于 Linux、Windows、macOS 和 FreeBSD +* 原生通知系统 +* 带有未读消息总数的系统托盘图标 +* 用主密码保护帐户信息 +* 可切换的视图布局 +* 可离线访问电子邮件 +* 电子邮件在本地加密存储 +* 批量导出电子邮件为 EML 文件 +* 全文搜索 +* 内置/预打包的 Web 客户端 +* 可以为每个帐户配置代理 +* 拼写检查 +* 支持双因素身份验证,以提高安全性 + +目前,ElectronMail 仅支持 Tutanota 和 ProtonMail。我觉得他们将来会增加更多。根据 [GitHub 页面][4]:“多电子邮件提供商支持。目前支持 ProtonMail 和 Tutanota。” + +ElectronMail 目前是 MIT 许可证。 + +#### 如何安装 ElectronMail + +目前,有几种方法可以在 Linux 上安装 ElectronMail。对于Arch 和基于 Arch 的发行版,你可以从[Arch 用户仓库][8]安装它。ElectrionMail 还有一个 Snap 包。要安装它,只需输入 `sudo snap install electron-mail` 即可。 + +对于所有其他 Linux 发行版,你可以[下载][9] `.deb` 或 `.rpm` 文件。 + +![Electron Mail Inbox][10] + +你也可以[下载][9]用于 Windows 中的 `.exe` 安装程序或用于 macOS 的 `.dmg` 文件。甚至还有给 FreeBSD 用的文件。 + +#### 删除 ElectronMail + +如果你安装了 ElectronMail 并确定它不适合你,那么[开发者][12]建议采用几个步骤。 **在卸载应用之前,请务必遵循以下步骤。** + +如果你使用了“保持登录”功能,请单击菜单上的“注销”。这将删除本地保存的主密码。卸载 ElectronMail 后也可以删除主密码,但这涉及编辑系统密钥链。 + +你还需要手动删除设置文件夹。在系统托盘中选择应用图标后,单击“打开设置文件夹”可以找到它。 + +![Electron Mail Setting][13] + +### 我对 ElectronMail 的看法 + +我通常不使用电子邮件客户端。事实上,我主要依赖于 Web 客户端。所以,这个应用对我没太大用处。 + +话虽这么说,但是 ElectronMail 看着不错,而且很容易设置。它有大量开箱即用的功能,并且高级功能并不难使用。 + +我遇到的一个问题与搜索有关。根据功能列表,ElectronMail 支持全文搜索。但是,Tutanota 的免费版本仅支持有限的搜索。我想知道 ElectronMail 如何处理这个问题。 + +最后,ElectronMail 只是一个基于 Web Email 的一个 Electron 封装。我宁愿在浏览器中打开它们,而不是将单独的系统资源用于运行 Electron。如果你只[使用 Tutanota,他们有自己官方的 Electron 桌面客户端][14]。你可以尝试一下。 + +我最大的问题是安全性。这是两个非常安全的电子邮件应用的非官方应用。如果有办法捕获你的登录信息或阅读你的电子邮件怎么办?比我聪明的人必须通过源代码才能确定。这始终是一个安全项目的非官方应用的问题。 + +你有没有使用过 ElectronMail?你认为是否值得安装 ElectronMail?你最喜欢的邮件客户端是什么?请在下面的评论中告诉我们。 + +如果你发现这篇文章很有趣,请花一点时间在社交媒体、Hacker News 或 [Reddit][15] 上分享它。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/electronmail/ + +作者:[John Paul][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/john/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/tutanota-review/ +[2]: https://itsfoss.com/protonmail/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-about.jpg?resize=800%2C500&ssl=1 +[4]: https://github.com/vladimiry/ElectronMail +[5]: https://electronjs.org/ +[6]: http://www.typescriptlang.org/ +[7]: https://angular.io/ +[8]: https://aur.archlinux.org/packages/electronmail-bin +[9]: https://github.com/vladimiry/ElectronMail/releases +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1 +[12]: https://github.com/vladimiry +[14]: https://linux.cn/article-10688-1.html +[15]: http://reddit.com/r/linuxusersgroup diff --git a/published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md b/published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md new file mode 100644 index 0000000000..d52412c511 --- /dev/null +++ b/published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md @@ -0,0 +1,79 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11110-1.html) +[#]: subject: (Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore]) +[#]: via: (https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +好消息!Ubuntu LTS 用户不需要 PPA 也可以获得最新的 Nvidia 驱动更新 +====== + +> 要在 Ubuntu LTS 上获得的最新 Nvidia 驱动程序,你不必再使用 PPA 了。最新的驱动程序现在将在 Ubuntu LTS 版本的存储库中提供。 + +![][1] + +你可能已经注意到在 Ubuntu 上安装最新和最好的 Nvidia 二进制驱动程序更新的麻烦。 + +默认情况下,Ubuntu 提供开源的 [Nvidia Nouveau 驱动程序][2],这有时会导致 Ubuntu 卡在启动屏幕上。 + +你也可以轻松地[在 Ubuntu 中安装专有的 Nvidia 驱动程序][3]。问题是默认 [Ubuntu 存储库][4]中的 Nvidia 驱动程序不是最新的。为此,几年前 [Ubuntu 引入了一个专门的 PPA][5]以解决这个问题。 + +[使用官方 PPA][6] 仍然是安装闭源图形驱动程序的一个不错的解决方法。但是,它绝对不是最方便的选择。 + +但是,现在,Ubuntu 同意将最新的 Nvidia 驱动程序更新作为 SRU([StableReleaseUpdates][7])的一部分提供。所以,你将在使用 Ubuntu LTS 版本时也拥有 Nvidia 驱动程序了。 + +好吧,这意味着你不再需要在 Ubuntu LTS 版本上单独下载/安装 Nvidia 图形驱动程序。 + +就像你会获得浏览器或核心操作系统更新(或安全更新)的更新包一样,你将获得所需的 Nvidia 二进制驱动程序的更新包。 + +### 这个最新的 Nvidia 显卡驱动程序可靠吗? + +SRU 字面上指的是 Ubuntu(或基于 Ubuntu 的发行版)的稳定更新。因此,要获得最新的图形驱动程序,你应该等待它作为稳定更新释出,而不是选择预先发布的更新程序。 + +当然,没有人能保证它能在所有时间内都正常工作 —— 但安装起来比预先发布的更安全。 + +### 怎样获得最新的 Nvidia 驱动程序? + +![Software Updates Nvidia][8] + +你只需从软件更新选项中的其他驱动程序部分启用“使用 NVIDIA 驱动程序元数据包……”。 + +最初,[The Linux Experiment][10] 通过视频分享了这个消息 —— 然后 Ubuntu 的官方 Twitter 作为公告重新推送了它。你可以观看下面的视频以获取更多详细信息: + +- [https://youtu.be/NFdeWTQIpjo](https://youtu.be/NFdeWTQIpjo) + +### 支持哪些 Ubuntu LTS 版本? + +目前,Ubuntu 18.04 LTS 已经可用了,它也将很快在 Ubuntu 16.04 LTS 上可用(随后的 LTS 也将次第跟上)。 + +### 总结 + +现在你可以安装最新的 Nvidia 二进制驱动程序更新了,你认为这有何帮助? + +如果你已经测试了预先发布的软件包,请在下面的评论中告诉我们你对此的看法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/ + +作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/nvidia-ubuntu-logo.png?resize=800%2C450&ssl=1 +[2]: https://nouveau.freedesktop.org/wiki/ +[3]: https://itsfoss.com/install-additional-drivers-ubuntu/ +[4]: https://itsfoss.com/ubuntu-repositories/ +[5]: https://itsfoss.com/ubuntu-official-ppa-graphics/ +[6]: https://itsfoss.com/ppa-guide/ +[7]: https://wiki.ubuntu.com/StableReleaseUpdates +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/software-updates-nvidia.jpg?fit=800%2C542&ssl=1 +[9]: https://itsfoss.com/ubuntu-17-04-release-features/ +[10]: https://twitter.com/thelinuxEXP diff --git a/published/20190716 Become a lifelong learner and succeed at work.md b/published/20190716 Become a lifelong learner and succeed at work.md new file mode 100644 index 0000000000..c9906592db --- /dev/null +++ b/published/20190716 Become a lifelong learner and succeed at work.md @@ -0,0 +1,72 @@ +[#]: collector: (lujun9972) +[#]: translator: (heguangzhi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11130-1.html) +[#]: subject: (Become a lifelong learner and succeed at work) +[#]: via: (https://opensource.com/open-organization/19/7/informal-learning-adaptability) +[#]: author: (Colin Willis https://opensource.com/users/colinwillishttps://opensource.com/users/marcobravo) + + +成为终身学习者,并在工作中取得成功 +====== + +> 在具有适应性文化的开放组织中,学习应该一直持续 —— 但不会总是出现在正式场合。我们真的明白它是如何工作的吗? + +![Writing in a notebook][1] + +持续学习是指人们为发展自己而进行的持续的、职业驱动的、有意识的学习过程。对于那些自认是持续学习者的人来说,学习从未停止 —— 这些人从日常经历中看到学习机会。与同事进行辩论、反思反馈、在互联网上寻找问题的解决方案、尝试新事物或冒险都是一个人在工作中可以进行的非正式学习活动的例子。 + +持续学习是开放组织中任何人的核心能力。毕竟,开放的组织是建立在同行相互思考、争论和行动的基础上的。在开放组织的模棱两可、话语驱动的世界中茁壮成长,每天都需要员工具备这些技能。 + +不幸的是,科学文献在传播我们在工作中学习的知识方面、帮助个人欣赏和发展自己的学习能力方面,做得很差。因此,在本文系列中,我将向你介绍非正式学习,并帮助你理解将学习视为一种技能会如何帮助你在任何组织中茁壮成长,尤其是在开放式组织中。 + +### 为什么这么正式? + +迄今为止,对组织中学习的科学研究主要集中在正式学习而不是非正式学习的设计、交付和评估上。 + +投资于员工知识、技能和能力的发展是一个组织保持其相对于竞争对手优势的重要方式。组织通过创建或购买课程、在线课程、研讨会等来使学习机会正规化。这些课程旨在像个人传授与工作相关的内容,就像学校里的班级一样。对于一个组织来说,提供一门课程是一种简单(如果成本高昂的话)的方法,可以确保其员工的技能或知识保持最新。同样,教室环境是研究人员的天然实验室,使得基于培训的研究和工作不仅可能,而且强大。 + +当然,有些东西人们不需要培训来学习;通常,人们通过研究答案、与同事交谈、思考、实验或适应变化来学习。事实上,[最近的评估表明][2] 70% 到 80% 的与工作相关的知识不是在培训中学到的,而是在工作中非正式学到的。这并不是说正规的培训无效;培训可能非常有效,但它是一种精确的干预方式。在工作的大部分方面正式培训一个人是不现实的,尤其是当这些工作变得更加复杂的时候。 + +因此,非正式学习,或者任何发生在结构化学习环境之外的学习,对工作场所来说是极其重要的。事实上,[最近的科学证据][3]表明,非正式学习比正式培训更能预测工作表现。 + +那么,为什么机构和科学界如此关注培训呢? + +### 循环过程 + +除了我前面提到的原因,研究非正式学习可能非常困难。与正式学习不同,非正式学习发生在非结构化环境中,高度依赖于个人,很难或不可能观察到。 + +直到最近,大多数关于非正式学习的研究都集中在定义非正式学习的合格特征和确定非正式学习在理论上是如何与工作经验联系在一起的。研究人员描述了一个[动态的周期性过程][4],通过这个过程,个人可以在组织中非正式地学习。 + +与正式学习一样,非正式学习发生在非结构化环境中,高度依赖于个人,很难或不可能观察。 + +在这个过程中,个人和组织都有创造学习机会的机构。例如,一个人可能对学习某样东西感兴趣,并为此表现出学习行为。组织以向个人提供反馈的形式,可能表明需要学习。这可能是一个糟糕的绩效评估、一个在项目中发表的评论、或者一个不是个人指导的组织环境的更广泛的变化。这些力量在组织环境中(例如,有人尝试了一个新想法,他或她的同事认识到并奖励了这种行为)或者通过在个人的头脑中反思(例如,有人反思了关于他或她的表现的,并决定在学习工作中付出更多的努力)。与培训不同,非正式学习不遵循正式的线性过程。个人可以随时体验过程的任何部分,同时体验过程的多个部分。 + +### 开放组织中的非正式学习 + +具体而言,在开放组织中,既减少了对等级制度的重视程度,又更加注重对参与式文化的重视程度,这两者都推动了这种非正式的学习。简而言之,开放式组织只是为个人和组织环境提供了更多互动和激发学习的机会。此外,想法和变革需要开放式组织中员工给予更广泛的认同 —— 而认同需要对他人的适应性和洞察力的欣赏。 + +也就是说,仅仅增加学习机会并不能保证学习会发生或成功。有人甚至可能会说,开放式组织中常见的模糊性和公开性话语可能会阻止不擅长持续学习的人——同样,随着时间的推移学习的习惯和开放式组织的核心能力——尽可能有效地为组织做出贡献。 + +解决这些问题需要一种以一致的方式跟踪非正式学习。最近,科学界呼吁创造衡量非正式学习的方法,这样就可以进行系统的研究来解决非正式学习的前因后果的问题。我自己的研究集中在这一呼吁上,我花了几年时间发展和完善我们对非正式学习行为的理解,以便可以衡量它们。 + +在本文系列的第二部分,我将重点介绍我最近在一个开放式组织中进行的一项研究的成果,在该研究中,我测试了我对非正式学习行为的研究,并将它们与更广泛的工作环境和个人工作成果联系起来。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/19/7/informal-learning-adaptability + +作者:[Colin Willis][a] +选题:[lujun9972][b] +译者:[heguangzhi](https://github.com/heguangzhi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/colinwillishttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/notebook-writing-pen.jpg?itok=uA3dCfu_ (Writing in a notebook) +[2]: https://www.groupoe.com/images/Accelerating_On-the-Job-Learning_-_White_Paper.pdf +[3]: https://www.researchgate.net/publication/316490244_Antecedents_and_Outcomes_of_Informal_Learning_Behaviors_a_Meta-Analysis +[4]: https://psycnet.apa.org/record/2008-13469-009 diff --git a/published/20190716 Save and load Python data with JSON.md b/published/20190716 Save and load Python data with JSON.md new file mode 100644 index 0000000000..a716d958c4 --- /dev/null +++ b/published/20190716 Save and load Python data with JSON.md @@ -0,0 +1,128 @@ +[#]: collector: (lujun9972) +[#]: translator: (HankChow) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11133-1.html) +[#]: subject: (Save and load Python data with JSON) +[#]: via: (https://opensource.com/article/19/7/save-and-load-data-python-json) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +使用 Python 处理 JSON 格式的数据 +====== + +> 如果你不希望从头开始创造一种数据格式来存放数据,JSON 是一个很好的选择。如果你对 Python 有所了解,就更加事半功倍了。下面就来介绍一下如何使用 Python 处理 JSON 数据。 + +![Cloud and databsae incons][1] + +[JSON][2] 的全称是 JavaScript 对象表示法JavaScript Object Notation。这是一种以键值对的形式存储数据的格式,并且很容易解析,因而成为了一种被广泛使用的数据格式。另外,不要因为 JSON 名称而望文生义,JSON 并不仅仅在 JavaScript 中使用,它也可以在其它语言中使用。下文会介绍它是如何在 Python 中使用的。 + +首先我们给出一个 JSON 示例: + +``` +{ + "name":"tux", + "health":"23", + "level":"4" +} +``` + +上面是一个和编程语言无关的原生 JSON 数据。熟悉 Python 的人会看出来这个 JSON 数据跟 Python 中的字典dictionary长得很像。而这两者之间确实非常相似,如果你对 Python 中的列表和字典数据结构有一定的理解,那么 JSON 理解起来也不难。 + +### 使用字典存放数据 + +如果你的应用需要存储一些结构复杂的数据,不妨考虑使用 JSON 格式。对比你可能曾经用过的自定义格式的文本配置文件,JSON 提供了更加结构化的可递归的存储格式。同时,Python 自带的 `json` 模块已经提供了可以将 JSON 数据导入/导出应用时所需的所有解析库。因此,你不需要针对 JSON 自行编写代码进行解析,而其他开发人员在与你的应用进行数据交互的时候也不需要去解析新的数据格式。正是这个原因,JSON 在数据交换时被广泛地采用了。 + +以下是一段在 Python 中使用嵌套字典的代码: + +``` +#!/usr/bin/env python3 + +import json + +# instantiate an empty dict +team = {} + +# add a team member +team['tux'] = {'health': 23, 'level': 4} +team['beastie'] = {'health': 13, 'level': 6} +team['konqi'] = {'health': 18, 'level': 7} +``` + +这段代码声明了一个名为 `team` 的字典,并初始化为一个空字典。 + +如果要给这个字典添加内容,首先需要创建一个键,例如上面示例中的 `tux`、`beastie`、`konqi`,然后为这些键一一提供对应的值。上面示例中的值由一个个包含游戏玩家信息的字典充当。 + +字典是一种可变的变量。字典中的数据可以随时添加、删除或更新。这样的特性使得字典成为了应用程序存储数据的极好选择。 + +### 使用 JSON 格式存储数据 + +如果存放在字典中的数据需要持久存储,这些数据就需要写到文件当中。这个时候就需要用到 Python 中的 `json` 模块了: + +``` +with open('mydata.json', 'w') as f: + json.dump(team, f) +``` + +上面的代码首先创建了一个名为 `mydata.json` 的文件,然后以写模式打开了这个文件,这个被打开的文件以变量 `f` 表示(当然也可以用任何你喜欢的名称,例如 `file`、`output` 等)。而 `json` 模块中的 `dump()` 方法则是用于将一个字典输出到一个文件中。 + +从应用中导出数据就是这么简单,同时这些导出的数据是结构化的、可理解的。现在可以查看导出的数据: + +``` +$ cat mydata.json +{"tux": {"health": 23, "level": 4}, "beastie": {"health": 13, "level": 6}, "konqi": {"health": 18, "level": 7}} +``` + +### 从 JSON 文件中读取数据 + +如果已经将数据以 JSON 格式导出到文件中了,也有可能需要将这些数据读回到应用中去。这个时候,可以使用 Python `json` 模块中的 `load()` 方法: + +``` +#!/usr/bin/env python3 + +import json + +f = open('mydata.json') +team = json.load(f) + +print(team['tux']) +print(team['tux']['health']) +print(team['tux']['level']) + +print(team['beastie']) +print(team['beastie']['health']) +print(team['beastie']['level']) + +# when finished, close the file +f.close() +``` + +这个方法实现了和保存文件大致相反的操作。使用一个变量 `f` 来表示打开了的文件,然后使用 `json` 模块中的 `load()` 方法读取文件中的数据并存放到 `team` 变量中。 + +其中的 `print()` 展示了如何查看读取到的数据。在过于复杂的字典中迭代调用字典键的时候有可能会稍微转不过弯来,但只要熟悉整个数据的结构,就可以慢慢摸索出其中的逻辑。 + +当然,这里使用 `print()` 的方式太不灵活了。你可以将其改写成使用 `for` 循环的形式: + +``` +for i in team.values(): + print(i) +``` + +### 使用 JSON + +如上所述,在 Python 中可以很轻松地处理 JSON 数据。因此只要你的数据符合 JSON 的模式,就可以选择使用 JSON。JSON 非常灵活易用,下次使用 Python 的时候不妨尝试一下。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/save-and-load-data-python-json + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[HankChow](https://github.com/HankChow) +校对:[wxy](https://github.com/wxy) + +本文由 [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/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) +[2]: https://json.org diff --git a/published/20190717 How to install Kibana on MacOS.md b/published/20190717 How to install Kibana on MacOS.md new file mode 100644 index 0000000000..a4495adc46 --- /dev/null +++ b/published/20190717 How to install Kibana on MacOS.md @@ -0,0 +1,113 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11135-1.html) +[#]: subject: (How to install Kibana on MacOS) +[#]: via: (https://opensource.com/article/19/7/installing-kibana-macos) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) + +如何在 MacOS 上安装 Kibana +====== + +> Elasticsearch 当安装好了之后,Kibana 插件可以为这个功能强大的搜索工具添加可视化功能。 + +![](https://img.linux.net.cn/data/attachment/album/201907/22/204048vl8t88y6q8988229.jpg) + +在我之前的文章中,我向 Mac 用户介绍了[安装 Elasticsearch][2] 的步骤,这是世界上最受欢迎的企业级搜索引擎。(这里有一篇针对 Linux 用户的[单独文章][3]。)其自然语言处理能力使得 Elasticsearch 在数据集中查找细节方面表现出色。一旦你发现了你需要的数据,如果你已经安装了 [Kibana][4],你可以将它提升到一个新的水平。 + +Kibana 是 Elasticsearch 的开源的数据可视化插件。当你在 Elasticsearch 中找到了数据,Kibana 就会帮助你将其放入折线图、[时间序列查询][5]、地理空间地图等。该工具非常适合于必须展示其研究成果的数据科学家,尤其是那些使用开源数据的人。 + +### 安装 Kibana + +你需要在 Elasticsearch 之外单独安装 Kibana。因为我安装了 Elasticsearch 7.1.1,所以我将安装 Kibana 1.1。版本的匹配非常重要,Kibana 需要针对相同版本的 Elasticsearch 节点运行。 (Kibana 运行在 node.js 上。) + +以下是我为 MacOS 安装 Kibana 7.1.1 时所遵循的步骤: + +1、确保 Elasticsearch 已下载并运行。如果需要,请参阅上一篇文章。 + +**注意**:你至少需要先安装 Elasticsearch 1.4.4 或更高版本才能使用 Kibana。这是因为你需要向 Kibana 提供要连接的 Elasticsearch 实例的 URL 以及你要搜索的 Elasticsearch 索引。通常,最好安装两者的最新版本。 + +2、单击[此处][6]下载 Kibana。你将看到如下的网页,它会提示你在**下载**部分的右上角下载 Kibana for Mac: + +![Download Kibana here.][7] + +3、在你的 `Downloads` 文件夹中,打开 .tar 文件以展开它。此操作将创建一个具有相同名称的文件夹(例如,`kibana-7.1.1-darwin-x86_64`)。 + +4、如果你希望 Kibana 放在另一个文件夹中,请立即移动它。 + +仔细检查 Elasticsearch 是否正在运行,如果没有,请在继续之前启动它。(如果你需要说明,请参阅上一篇文章。) + +### 打开 Kibana 插件 + +Elasticsearch 运行起来后,你现在可以启动 Kibana 了。该过程类似于启动 Elasticsearch: + +1、从 Mac 的 `Downloads` 文件夹(或 Kibana 移动到的新文件夹)里,打开 Kibana 文件夹(即 `~Downloads/kibana-7.1.1-darwin-x86_64`)。 + +2、打开 `bin` 子文件夹。 + +![The Kibana bin folder.][8] + +3、运行 `kibana-plugin`。你可能会遇到上一篇文章中出现的相同安全警告: +   +![Security warning][9] + +通常,如果收到此警告,请按照那篇文章中的说明清除警告并打开 Kibana。请注意,如果我在终端中没有运行 Elasticsearch 的情况下打开该插件,我会收到相同的安全警告。要解决此问题,如上一篇文章中所述,打开 Elasticsearch 并在终端中运行它。使用 GUI 启动 Elasticsearch 也应该打开终端。 + +然后,我右键单击 `kibana-plugin` 并选择“打开”。这个解决方案对我有用,但你可能需要尝试几次。 我的 Elasticsearch 聚会中的几个人在他们的设备上打开 Kibana 时遇到了一些麻烦。 + +### 更改 Kibana 的主机和端口号 + +Kibana 的默认设置将其配置为在 `localhost:5601` 上运行。你需要更新文件(在这个例子的情况下)`~Downloads/kibana-7.1.1-darwin-x86_64/config/kibana.yml` 以在运行 Kibana 之前更改主机或端口号。 + +![The Kibana config directory.][10] + +以下是我的 Elasticsearch 聚会组里配置 Kibana 时终端的样子,因此默认为 `http://localhost:9200`,这是查询 Elasticsearch 实例时使用的 URL: + +![Configuring Kibana's host and port connections.][11] + +### 从命令行运行 Kibana + +打开插件后,可以从命令行或 GUI 运行 Kibana。这是终端连接到 Elasticsearch 后的样子: + +![Kibana running once it's connected to Elasticsearch.][12] + +与 Elasticsearch 一样,Kibana 默认在前台运行。你可以按 `Ctrl-C` 来停止它。 + +### 总结 + +Elasticsearch 和 Kibana 是占用大量存储空间的大型软件包。有这么多人一次下载这两个软件包,当我的Elasticsearch 会员和我下载它们两个时,我平均要下载几分钟。这可能是由于 WiFi 不佳和/或用户数量太多,但如果发生同样的事情,请记住这种可能性。 + +之后,由于我的笔记本电脑存储空间不足,我无法上传我们正在使用的 JSON 文件。我能够按照讲师的可视化进行操作,但无法实时使用 Kibana。因此,在下载 Elasticsearch 和 Kibana 之前,请确保设备上有足够的空间(至少几千兆字节)来上传和使用这些工具搜索文件。 + +要了解有关 Kibana 的更多信息,他们的用户指南[简介][13]是理想的。(你可以根据你正在使用的 Kibana 版本配置该指南。)他们的演示还向你展示了如何[在几分钟内构建仪表板][14],然后进行首次部署。 + +玩得开心! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/installing-kibana-macos + +作者:[Lauren Maffeo][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://opensource.com/users/lmaffeo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) +[2]: https://linux.cn/article-11125-1.html +[3]: https://opensource.com/article/19/7/installing-elasticsearch-and-kibana-linux +[4]: https://www.elastic.co/products/kibana +[5]: https://en.wikipedia.org/wiki/Time_series +[6]: https://www.elastic.co/downloads/kibana +[7]: https://opensource.com/sites/default/files/uploads/download_kibana.png (Download Kibana here.) +[8]: https://opensource.com/sites/default/files/uploads/kibana_bin_folder.png (The Kibana bin folder.) +[9]: https://opensource.com/sites/default/files/uploads/security_warning.png (Security warning) +[10]: https://opensource.com/sites/default/files/uploads/kibana_config_directory.png (The Kibana config directory.) +[11]: https://opensource.com/sites/default/files/uploads/kibana_host_port_config.png (Configuring Kibana's host and port connections.) +[12]: https://opensource.com/sites/default/files/uploads/kibana_running.png (Kibana running once it's connected to Elasticsearch.) +[13]: https://www.elastic.co/guide/en/kibana/7.2/introduction.html +[14]: https://www.elastic.co/webinars/getting-started-kibana?baymax=rtp&elektra=docs&storm=top-video&iesrc=ctr diff --git a/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md new file mode 100644 index 0000000000..268c9e16ca --- /dev/null +++ b/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11121-1.html) +[#]: subject: (Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants) +[#]: via: (https://itsfoss.com/epic-games-blender-grant/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Epic Games 给予 Blender 基金会 120 万美元的拨款支持 +====== + +[Epic MegaGrants][1] 是 [Epic Games][2] 的一个计划,用于支持游戏开发人员、企业专业人士、内容创建者和工具开发人员使用虚幻引擎Unreal Engine(UE)做出神奇的作品或增强 3D 图形社区的开源功能。 + +作为该计划的一部分,Epic Games 给予 [Blender 基金会][3] 120 万美元拨款以帮助改善他们的发展。如果你还不知道,Blender 是[最好的开源视频编辑][4]之一,特别是以创建专业的 3D 计算机图形而闻名。 + +**Tim Sweeney**(Epic Games 的创始人兼首席执行官)这样评论这笔授予: + +> “开放式工具、库和平台对数字内容生态系统的未来至关重要。……Blender 是艺术社区持久的资源,我们的目标是确保其进步,造福所有创作者。” + +即使这是个好消息,也有人对此不满意。在本文中,我们将看一下得到该拨款后的 Blender 基金会的计划,以及人们对此的看法。 + +### Blender 基金会的改进计划 + +![Image Credit : BlenderNation][5] + +在[新闻稿][6]当中,Blender 基金会提到了如何利用这笔资金以及用于何种目的: + +> “Epic MegaGrant 将在未来三年内逐步交付,并将为 Blender 的专业 Blender 发展计划Professionalizing Blender Development Initiative做出贡献。” + +所以,没错,这笔财务帮助将以现金提供 —— 但是,它要在 3 年内完成。也就是说,我们要期待 Blender 基金会及其软件质量得到重大改进还有很长时间。 + +这是 **Ton Roosendaal**(Blender 基金会的创始人)需要说明的它将如何被利用: + +> “Epic Games 的支持对 Blender 是一个重要里程碑,”Blender 基金会的创始人兼董事长 Ton Roosendaal 说道。“由于这项拨款,我们将对我们的项目组织进行大量投入,以改善支持、协作和代码质量实践。因此,我们期望更多来自该行业的贡献者加入我们的项目。” + +### 为什么人们对此不是很喜欢? + +让我澄清一下,就我个人而言,我不喜欢用 Epic Game 的市场或客户端玩游戏。 + +由于各种原因(功能、隐私等),我更喜欢 [Steam][7] 而不是 Epic Games。 + +Epic Games 被称为游戏社区中的坏人,因为它最近几款游戏专属于其平台 —— 尽管很多人警告用户该平台上的隐私问题。 + +不仅如此,Epic Games 的首席执行官在过去发过这样的推特: + +> 安装 Linux 相当于人们不喜欢美国的政治趋势时就搬到加拿大。 +> +> 不,我们必须为今天的自由而战,如今我们拥有自由。 +> +> - Tim Sweeney(@TimSweeneyEpic)[2018年2月15日][8] + +嗯,这并不直接暗示他讨厌 Linux 或者没有积极推动 Linux 的游戏开发 —— 但是只是因为很多历史情况,人们并不真正信任 Epic Games 的决策。所以,他们并不欣赏与 Blender 基金会的联系(即使这个财务帮助是积极的)。 + +这与财务帮助无关。但是,Epic Games 缺乏良好的声誉(当然是主观的),因此,人们对此的看法是消极的。看看拨款公告后的一些推文: + +> 希望不要走向排它……这可能会破坏你的声誉。 +> +> - Ray(@ Epicshadow1994)[2019年7月15日][9] + +> 我对将来会变成什么样感到怀疑。EPIC 最近一直在采取敌对战术。 +> +> - acrid Heartwood(@acrid_heartwood)[2019年7月15日][10] + +### 总而言之 + +你仍然可以[通过 Lutris 在 Linux 上运行 Epic Games][11],但这是很单薄的非官方尝试。Epic Games 没有表示有兴趣正式支持该项目。 + +所以,很明显不是每个人都信任 Epic Games。因此,这个消息带来了各种消极反应。 + +但是,这笔拨款肯定会帮助 Blender 基金会改善其组织和软件质量。 + +你怎么看待这件事?请在下面的评论中告诉我们您的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/epic-games-blender-grant/ + +作者:[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.unrealengine.com/en-US/megagrants +[2]: https://www.epicgames.com/store/en-US/ +[3]: https://www.blender.org/ +[4]: https://itsfoss.com/open-source-video-editors/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/epic-games-blender-megagrant.jpg?resize=800%2C450&ssl=1 +[6]: https://www.blender.org/press/epic-games-supports-blender-foundation-with-1-2-million-epic-megagrant/ +[7]: https://itsfoss.com/install-steam-ubuntu-linux/ +[8]: https://twitter.com/TimSweeneyEpic/status/964284402741149698?ref_src=twsrc%5Etfw +[9]: https://twitter.com/Epicshadow1994/status/1150787326626263042?ref_src=twsrc%5Etfw +[10]: https://twitter.com/acrid_heartwood/status/1150789691979030528?ref_src=twsrc%5Etfw +[11]: https://linux.cn/article-10968-1.html diff --git a/sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md b/sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md deleted file mode 100644 index 246ab1160d..0000000000 --- a/sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore]) -[#]: via: (https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore] -====== - -_**Brief: To get the latest Nvidia drivers in Ubuntu LTS versions, you don’t have to use PPA anymore. The latest drivers will now be available in the repositories of the Ubuntu LTS versions.**_ - -![][1] - -You might be aware of the troubles to install the latest and greatest Nvidia binary driver updates on Ubuntu. - -By default, Ubuntu provides the open source [Nvidia Nouveau drivers][2] that some time result in Ubuntu being stuck at boot screen. - -You can also [install the proprietary Nvidia driver in Ubuntu][3] easily. The problem is that the Nvidia drivers in the default [Ubuntu repositories][4] are not the latest one. To solve this problem, [Ubuntu introduced a dedicated PPA][5] a few years back. - -[Using the official PPA][6] is still a decent workaround for installing the closed source graphics driver. However, it is definitely not the most convenient option. - -But, now, Ubuntu agreed to include the latest Nvidia driver update as part of the SRU ([StableReleaseUpdates][7]). So, you will have Nvidia drivers baked in with Ubuntu LTS versions. - -Well, this means that you no longer have to separately download/install the Nvidia graphics drivers on Ubuntu LTS versions. - -Just like you get an update for your browser or the core OS updates (or the security updates), similarly, you will get the required Nvidia binary driver update packages. - -### Can We Rely on the Latest Nvidia Graphics Driver? - -SRU literally refers to stable updates for Ubuntu (or Ubuntu-based distros). So, instead of opting for the pre-released updates in order to get the latest graphics driver, you should wait for it to drop as a stable update. - -Of course, no one can guarantee that it will work 100% of the time – but it will be way more safe to install than the pre-released ones. - -### How Can I Get the latest Nvidia drivers? - -![Software Updates Nvidia][8] - -You just have to enable “Using NVIDIA driver meta package….” from the additional drivers section in the software update option. - -[][9] - -Suggested read  Ubuntu 17.04 Release Date, Features And Upgrade Procedure - -Originally, [The Linux Experiment][10] shared this news through a video – which then Ubuntu’s official Twitter handle re-tweeted as an announcement. You can watch the video below to get more details on it: - -### Which Ubuntu LTS Versions are Supported? - -For now, Ubuntu 18.04 LTS supports this out of the box. It will soon be available for Ubuntu 16.04 LTS (and later LTS versions will follow). - -**Wrapping Up** - -Now that you can install the latest Nvidia binary driver updates, how do you think will it help you? - -If you have tested a pre-released package, let us know your thoughts on that in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/ - -作者:[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/2019/07/nvidia-ubuntu-logo.png?resize=800%2C450&ssl=1 -[2]: https://nouveau.freedesktop.org/wiki/ -[3]: https://itsfoss.com/install-additional-drivers-ubuntu/ -[4]: https://itsfoss.com/ubuntu-repositories/ -[5]: https://itsfoss.com/ubuntu-official-ppa-graphics/ -[6]: https://itsfoss.com/ppa-guide/ -[7]: https://wiki.ubuntu.com/StableReleaseUpdates -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/software-updates-nvidia.jpg?fit=800%2C542&ssl=1 -[9]: https://itsfoss.com/ubuntu-17-04-release-features/ -[10]: https://twitter.com/thelinuxEXP diff --git a/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md deleted file mode 100644 index 31820a380b..0000000000 --- a/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md +++ /dev/null @@ -1,53 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) -[#]: via: (https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10) -[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) - -Use ImageGlass to quickly view JPG images as a slideshow -====== -Want to view images from a folder one-by-one in a slideshow on Windows -10? Open source to the rescue. -![Looking back with binoculars][1] - -Welcome to today’s episode of "How Can I Make This Work?" In my case, I was trying to view a folder of JPG images as a slideshow on Windows 10. As often happens, I turned to open source to solve the issue. - -On a Mac, viewing a folder of JPG images as a slideshow is a simple matter of selecting all the images in a folder ( **Command-A** ), and then pressing **Option-Command-Y**. From there, you can advance the images with the arrow key. Of course, you can do a similar thing on Windows by selecting the first image, then clicking on the window frame's yellow **Manage** bar, then selecting **Slide Show**. There, you can control the speed, but only to a point: slow, medium, and fast. - -I wanted to advance the images in Windows the same way I do it on a Mac. Naturally, I fired up the Googler and searched for a solution. There, I found the [ImageGlass][2] open source app, [licensed GPL 3.0][3], and it did the trick perfectly. Here's what it looks like: - -![Viewing an image in ImageGlass.][4] - -### About ImageGlass - -ImageGlass was developed by Dương Diệu Pháp, a Vietnamese developer who works on the front end for Chainstack, according to his website. He collaborates with US-based [Kevin Routley][5], who "develops new features for ImageGlass." The source code is available on [GitHub][6]. - -ImageGlass supports most common image formats, including JPG, GIF, PNG, WEBP, SVG, and RAW. Users can customize this extension list easily. - -My specific problem was needing to find an image for a catalog cover. Unfortunately, it was in a folder containing dozens of photos. Navigating through the slideshow in ImageGlass, stopping on the image I wanted, and downloading it into my project folder turned out to be easy. Open source to the rescue yet again, and the app took only seconds to download and use. - -ImageGlass was featured as a Picasa alternative in Jason Baker’s article [9 open source alternatives to][7] [Picasa][7] from March 10, 2016. There are some other interesting image-related open source tools in there as well if you are in need. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10 - -作者:[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/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) -[2]: https://imageglass.org/ -[3]: https://github.com/d2phap/ImageGlass/blob/master/LICENSE -[4]: https://opensource.com/sites/default/files/uploads/imageglass-screenshot.png (Viewing an image in ImageGlass.) -[5]: https://github.com/fire-eggs -[6]: https://github.com/d2phap/ImageGlass -[7]: https://opensource.com/alternatives/picasa diff --git a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md b/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md index fef21470c9..445075b49f 100644 --- a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md +++ b/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md @@ -1,11 +1,11 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Lessons in Vendor Lock-in: Google and Huawei) -[#]: via: (https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei) -[#]: author: (Kyle Rankin https://www.linuxjournal.com/users/kyle-rankin) +[#]: collector: "lujun9972" +[#]: translator: "acyanbird " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Lessons in Vendor Lock-in: Google and Huawei" +[#]: via: "https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei" +[#]: author: "Kyle Rankin https://www.linuxjournal.com/users/kyle-rankin" Lessons in Vendor Lock-in: Google and Huawei ====== @@ -43,7 +43,6 @@ What's more, the Google Apps suite isn't just a convenient way to load Gmail or Without access to these OS updates, Huawei now will have to decide whether to create its own LineageOS-style Android fork or a whole new phone OS of its own. In either case, it will have to abandon the Google Play Store ecosystem and use F-Droid-style app repositories, or if it goes 100% alone, it will need to create a completely new app ecosystem. If its engineers planned for this situation, then they likely are working on this plan right now; otherwise, they are all presumably scrambling to address an event that "should never happen". Here's hoping that if you find yourself in a similar case of vendor lock-in with an overseas company that's too big to fail, you never get caught in the middle of a trade war. - -------------------------------------------------------------------------------- via: https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei diff --git a/sources/talk/20190716 Server hardware makers shift production out of China.md b/sources/talk/20190716 Server hardware makers shift production out of China.md new file mode 100644 index 0000000000..be29283977 --- /dev/null +++ b/sources/talk/20190716 Server hardware makers shift production out of China.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Server hardware makers shift production out of China) +[#]: via: (https://www.networkworld.com/article/3409784/server-hardware-makers-shift-production-out-of-china.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Server hardware makers shift production out of China +====== +Tariffs on Chinese products and unstable U.S./China relations cause server makers to speed up their move out of China. +![Etereuti \(CC0\)][1] + +The supply chain of vendors that build servers and network communication devices is accelerating its shift of production out of China to Taiwan and North America, along with other nations not subject to the trade war between the U.S. and China. + +Last May, the Trump Administration levied tariffs on a number of imported Chinese goods, computer components among them. The tariffs ranged from 10-25%. Consumers were hit hardest, since they are more price sensitive than IT buyers. PC World said the [average laptop price could rise by $120][2] just for the tariffs. + +But since the tariff was based on the value of the product, that means server hardware prices could skyrocket, since servers cost much more than PCs. + +**[ Read also: [HPE’s CEO lays out his technology vision][3] ]** + +### Companies that are moving production out of China + +The Taiwanese tech publication DigiTimes reported (article now locked behind a paywall) that Mitac Computing Technology, a server ODM, reactivated an old production line at Hsinchu Science Park (HSP) in Taiwan at the end of 2018 and restarted another for motherboard SMT process in March 2019. The company plans to establish one more SMT production line prior to the end of 2019. + +It went on to say Mitac plans to produce all of its high-end U.S.-bound servers in Taiwan and is looking to move 30% of its overall server production lines back to Taiwan in the next three years. + +Wiwynn, a cloud computing server subsidiary of Wistron, is primarily assembling its U.S.-bound servers in Mexico and has also recently established a production site in southern Taiwan per clients' requests. + +Taiwan-based server chassis and assembly player AIC recently expanded the number of its factories in Taiwan to four and has been aggressively forming cooperation with its partners to expand its capacity. Many Taiwan-based component suppliers are also expanding their capacity in Taiwan. + +**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]** + +Several ODMs, such as Inventec, Wiwynn, Wistron, and Foxconn, all have plants in Mexico, while Quanta Computer has production lines in the U.S. Wiwynn also plans to open manufacturing facilities in eastern U.S. + +“This is not something that just happened overnight, it’s a process that started a few years ago. The tariffs just accelerated the desire of ODMs to do it,” said Ashish Nadkarni, group vice president for infrastructure systems, platforms and technologies at IDC. “Since [President] Trump has come into office there has been saber rattling about China and a trade war. There has also been a focus on margins.” + +He added that component makers are definitely moving out of China to other parts of Asia, like Korea, the Philippines, and Vietnam. + +### HPE, Dell and Lenovo should remain unaffected + +The big three branded server makers are all largely immunized against the tariffs. HP Enterprise, Dell, and Lenovo all have U.S.-based assemblies and their contract manufacturers are in Taiwan, said Nadkarni. So, their costs should remain unaffected by tariffs. + +The tariffs are not affecting sales as much as revenue for hyperscale whitebox vendors is being stressed. Hyperscale companies such as Amazon Web Services (AWS), Microsoft, Google, etc. have contracts with vendors such as Inspur and Super Micro, and if prices fluctuate, that’s not their problem. The hardware vendor is expected to deliver at the agreed cost. + +So margins, already paper thin, can’t be passed on to the customer, unlike the aforementioned laptop example. + +“It’s not the end customers who are affected by it, it’s the vendors who are affected by it. Certain things they can pass on, like component prices. But if the build value goes up, that’s not the customers problem, that’s the vendor’s problem,” said Nadkarni. + +So while it may cost you more to buy a laptop as this trade fracas goes on, it shouldn’t cost more to buy a server. + +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/3409784/server-hardware-makers-shift-production-out-of-china.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://images.idgesg.net/images/article/2018/07/asia_china_flag_grunge-stars_pixabay_etereuti-100763424-large.jpg +[2]: https://www.pcworld.com/article/3403405/trump-tariffs-on-chinese-goods-could-cost-you-120-more-for-notebook-pcs-say-dell-hp-and-cta.html +[3]: https://www.networkworld.com/article/3394879/hpe-s-ceo-lays-out-his-technology-vision.html +[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 How edge computing is driving a new era of CDN.md b/sources/talk/20190717 How edge computing is driving a new era of CDN.md new file mode 100644 index 0000000000..643d3aa713 --- /dev/null +++ b/sources/talk/20190717 How edge computing is driving a new era of CDN.md @@ -0,0 +1,107 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How edge computing is driving a new era of CDN) +[#]: via: (https://www.networkworld.com/article/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html) +[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) + +How edge computing is driving a new era of CDN +====== +A CDN is an edge application and an edge application is a superset of what your CDN is doing. +![geralt \(CC0\)][1] + +We are living in a hyperconnected world where anything can now be pushed to the cloud. The idea of having content located in one place, which could be useful from the management’s perspective, is now redundant. Today, the users and data are omnipresent. + +The customer’s expectations have up-surged because of this evolution. There is now an increased expectation of high-quality service and a decrease in customer’s patience. In the past, one could patiently wait 10 hours to download the content. But this is certainly not the scenario at the present time. Nowadays we have high expectations and high-performance requirements but on the other hand, there are concerns as well. The internet is a weird place, with unpredictable asymmetric patterns, buffer bloat and a list of other [performance-related problems][2] that I wrote about on Network Insight. _[Disclaimer: the author is employed by Network Insight.]_ + +Also, the internet is growing at an accelerated rate. By the year 2020, the internet is expected to reach 1.5 Gigabyte of traffic per day per person. In the coming times, the world of the Internet of Things (IoT) driven by objects will far supersede these data figures as well. For example, a connected airplane will generate around 5 Terabytes of data per day. This spiraling level of volume requires a new approach to data management and forces us to re-think how we delivery applications. + +[RELATED: How Notre Dame is going all in with Amazon’s cloud][3] + +Why? Because all this information cannot be processed by a single cloud or an on-premise location. Latency will always be a problem. For example, in virtual reality (VR) anything over 7 milliseconds will cause motion sickness. When decisions are required to be taken in real-time, you cannot send data to the cloud. You can, however, make use of edge computing and a multi-CDN design. + +### Introducing edge computing and multi-CDN + +The rate of cloud adoption, all-things-video, IoT and edge computing are bringing life back to CDNs and multi-CDN designs. Typically, a multi-CDN is an implementation pattern that includes more than one CDN vendor. The traffic direction is performed by using different metrics, whereby traffic can either be load balanced or failed across the different vendors. + +Edge computing moves actions as close as possible to the source. It is the point where the physical world interacts with the digital world. Logically, the decentralized approach of edge computing will not take over the centralized approach. They will be complementary to each other, so that the application can run at its peak level, depending on its position in the network. + +For example, in IoT, saving battery life is crucial. Let’s assume an IoT device can conduct the transaction in 10ms round trip time (RTT), instead of 100ms RTT. As a result, it can use 10 times less battery. + +### The internet, a performance bottleneck + +The internet is designed on the principle that everyone can talk to everyone, thereby providing universal connectivity whether required or not. There has been a number of design changes with network address translation (NAT) being the biggest. However, essentially the role of the internet has remained the same in terms of connectivity, regardless of location. + +With this type of connectivity model, distance is an important determinant for the application’s performance. Users on the other side of the planet will suffer regardless of buffer sizes or other device optimizations. Long RTT is experienced as packets go back and forth before the actual data transmission. Although caching and traffic redirection is being used but limited success has been achieved so far. + +### The principles of application delivery + +When transmission control protocol (TCP) starts, it thinks it is back in the late 1970s. It assumes that all services are on a local area network (LAN) and there is no packet loss. It then starts to work backward from there. Back when it was designed, we didn't have real-time traffic, such as voice and video that is latency and jitter sensitive. + +Ideally, TCP was designed for the ease of use and reliability, not to boost the performance. You actually need to optimize the TCP stack. And this is why CDNs are very good at performing such tasks. For example, if a connection is received from a mobile phone, a CDN will start with the assumption that there is going to be high jitter and packet loss. This allows them to size the TCP window correctly that accurately match network conditions. + +How do you magnify the performance, what options do you have? In a generic sense, many look to lowering the latency. However, with applications, such as video streaming, latency does not tell you if the video is going to buffer. One can only assume that lower latency will lead to less buffering. In such a scenario, measurement-based on throughput is a far better performance metric since will tell you how fast an object will load. + +We have also to consider the page load times. At the network level, it's the time to first byte (TTFB) and ping. However, these mechanisms don’t tell you much about the user experience as everything fits into one packet. Using ping will not inform you about the bandwidth problems. + +And if a web page goes slower by 25% once packet loss exceeds 5% and you are measuring time to the first byte which is the 4th packet - what exactly can you learn? TTFB is comparable to an internet control message protocol (ICMP) request just one layer up the stack. It's good if something is broken but not if there is underperformance issue. + +When you examine the history of TTFB measuring, you will find that it was deployed due to the lack of Real User Monitoring (RUM) measurements. Previously TTFB was as good in approximating how fast something was going to load, but we don't have to approximate anymore as we can measure it with RUM. RUM is measurements from the end-users. An example could be the metrics generated from a webpage that is being served to an actual user. + +Conclusively, TTFB, ping and page load times are not sophisticated measurements. We should prefer RUM time measurements as much as we can. This provides a more accurate picture of the user experience. This is something which has become critical over the last decade. + +Now we are living in a world of RUM which lets us build our network based on what matters to the business users. All CDNs should aim for RUM measurements. For this, they may need to integrate with traffic management systems that intelligently measure on what the end-user really sees. + +### The need for multi-CDN + +Primarily, the reasons one would opt for a multi-CDN environment are availability and performance. No single CDN can be the fastest to everyone and everywhere in the world. It is impossible due to the internet's connectivity model. However, combining the best of two or even more CDN providers will increase the performance. + +A multi-CDN will give a faster performance and higher availability than what can be achieved with a single CDN. A good design is what runs two availability zones. A better design is what runs two availability zones with a single CDN provider. However, superior design is what runs two availability zones in a multi-CDN environment. + +### Edge applications will be the new norm + +It’s not that long ago that there was a transition from the heavy physical monolithic architecture to the agile cloud. But all that really happened was the transition from the physical appliance to a virtual cloud-based appliance. Maybe now is the time that we should ask, is this the future that we really want? + +One of the main issues in introducing edge applications is the mindset. It is challenging to convince yourself or your peers that the infrastructure you have spent all your time working on and investing in is not the best way forward for your business.  + +Although the cloud has created a big buzz, just because you migrate to the cloud does not mean that your applications will run faster. In fact, all you are really doing is abstracting the physical pieces of the architecture and paying someone else to manage it. The cloud has, however, opened the door for the edge application conversation. We have already taken the first step to the cloud and now it's time to make the second move. + +Basically, when you think about edge applications: its simplicity is a programmable CDN. A CDN is an edge application and an edge application is a superset of what your CDN is doing. Edge applications denote cloud computing at the edge. It is a paradigm to distribute the application closer to the source for lower latency, additional resilience, and simplified infrastructure, where you still have control and privacy. + +From an architectural point of view, an edge application provides more resilience than deploying centralized applications. In today's world of high expectations, resilience is a necessity for the continuity of business. Edge applications allow you to collapse the infrastructure into an architecture that is cheaper, simpler and more attentive to the application. The less in the expanse of infrastructure, the more time you can focus on what really matters to your business - the customer. + +### An example of an edge architecture + +An example of edge architecture is within each PoP, every application has its own isolated JavaScript (JS) environment. JavaScript is great for security isolation and the performance guarantees scale. The JavaScript is a dedicated isolated instance that executes the code at the edge. + +Most likely, each JavaScript has its own virtual machine (VM). The sole operation that the VM is performing is the JavaScript runtime engine and the only thing it is running is the customer's code. One could use Google V8 open-source high-performance JavaScript and WebAssembly engine. + +Let’s face it, if you continue building more PoPs, you will hit the law of diminishing returns. When it comes to application such as mobile, you really are maxed out when throwing PoPs to form a solution. So we need to find another solution. + +In the coming times, we are going to witness a trend where most applications will become global, which means edge applications. It certainly makes little sense to place all the application in one location when your users are everywhere else. + +**This article is published as part of the IDG Contributor Network. [Want to Join?][4]** + +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/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html + +作者:[Matt Conran][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/Matt-Conran/ +[b]: https://github.com/lujun9972 +[1]: https://images.techhive.com/images/article/2017/02/network-traffic-100707086-large.jpg +[2]: https://network-insight.net/2016/12/buffers-packet-drops/ +[3]: https://www.networkworld.com/article/3014599/cloud-computing/how-notre-dame-is-going-all-in-with-amazon-s-cloud.html#tk.nww-fsb +[4]: https://www.networkworld.com/contributor-network/signup.html +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md b/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md new file mode 100644 index 0000000000..159c8598db --- /dev/null +++ b/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md @@ -0,0 +1,71 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (MPLS is hanging on in this SD-WAN world) +[#]: via: (https://www.networkworld.com/article/3409070/mpls-is-hanging-on-in-this-sd-wan-world.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +MPLS is hanging on in this SD-WAN world +====== +The legacy networking protocol is still viable and there is no need to replace it in certain use cases, argues one cloud provider. +![jamesteohart][1] + +The [SD-WAN networking market is booming and is expected to grow][2] to $17 billion by 2025, and no wonder. Software-defined wide-area networking eliminates the need for expensive routers and does all the network connectivity in the cloud. + +Among its advantages is the support for secure cloud connectivity, one area where multiprotocol label switching (MPLS) falls short. MPLS is a data protocol from before the internet took off and while ideal for communications within the corporate firewall, it doesn’t lend itself to cloud and outside communications well. + +You would think that would seal MPLS’s fate, but just like IPv6 is ever so slowly replacing IPv4, MPLS is hanging on and some IT pros are even increasing their investment. + +**[ Related: [MPLS explained – What you need to know about multi-protocol label switching][3] ]** + +Avant Communications, a cloud services provider that specializes in SD-WAN, recently issued a report entitled [State of Disruption][4] that found that 83% of enterprises that use or are familiar with MPLS plan to increase their MPLS network infrastructure this year, and 40% say they will “significantly increase” their use of it. + +The report did not find one protocol winning that the expense of another. Just as 83% plan to use MPLS, 78% acknowledged plans to use SD-WAN in their corporate networks by the end of the year. Although SD-WAN is on the rise, MPLS is clearly not going away anytime soon. Both SD-WAN and MPLS can live together in harmony, adding value to each other. + +“SD-WAN is the most disruptive technology in our study. It’s not surprising that adoption of new technologies is slowest among the largest companies. The wave of SD-WAN disruption has not fully hit larger companies yet, but our belief is that it is moving quickly upmarket,” the report stated. + +While SD-WAN is much better suited for the job of cloud connectivity, 50% of network traffic is still staying within the corporate firewall. So while SD-WAN can solve the connection issues, so can MPLS. And if you have it deployed, rip and replace makes no sense. + +“MPLS continues to have a strong role in modern networks, and we expect that to continue,” the report stated. “This is especially true among larger enterprises that have larger networks depending on MPLS. While you’ll find MPLS at the core for a long time to come, we expect to see a shared environment with SD-WAN at the edge, enabled by broadband Internet and other lower cost networks. “ + +And MPLS isn’t without its advantages, most notably it can [guarantee performance][5] while SD-WAN, at the mercy of the public internet, cannot. + +As broadband networks continue to improve in performance, SD-WAN will allow companies to reduce their reliance on MPLS, especially as equipment ages and is replaced. Avant expects that, for the foreseeable future, there will continue to be a very viable role for both. + +**More about SD-WAN:** + + * [How to buy SD-WAN technology: Key questions to consider when selecting a supplier][6] + * [How to pick an off-site data-backup method][7] + * [SD-Branch: What it is and why you’ll need it][8] + * [What are the options for security SD-WAN?][9] + + + +Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409070/mpls-is-hanging-on-in-this-sd-wan-world.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://images.idgesg.net/images/article/2019/07/the-latest-in-innovation-in-the-sd-wan-managed-services-market1400-100801684-large.jpg +[2]: https://www.prnewswire.com/news-releases/software-defined-wide-area-network-sd-wan-market-to-hit-17bn-by-2025-global-market-insights-inc-300795304.html +[3]: https://www.networkworld.com/article/2297171/sd-wan/network-security-mpls-explained.html +[4]: https://www.goavant.net/Disruption +[5]: https://www.networkworld.com/article/2297171/network-security-mpls-explained.html +[6]: https://www.networkworld.com/article/3323407/sd-wan/how-to-buy-sd-wan-technology-key-questions-to-consider-when-selecting-a-supplier.html +[7]: https://www.networkworld.com/article/3328488/backup-systems-and-services/how-to-pick-an-off-site-data-backup-method.html +[8]: https://www.networkworld.com/article/3250664/lan-wan/sd-branch-what-it-is-and-why-youll-need-it.html +[9]: https://www.networkworld.com/article/3285728/sd-wan/what-are-the-options-for-securing-sd-wan.html?nsdr=true +[10]: https://www.facebook.com/NetworkWorld/ +[11]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 Public internet should be all software-defined.md b/sources/talk/20190717 Public internet should be all software-defined.md new file mode 100644 index 0000000000..3b834bea66 --- /dev/null +++ b/sources/talk/20190717 Public internet should be all software-defined.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Public internet should be all software-defined) +[#]: via: (https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Public internet should be all software-defined +====== +Having a programmable public internet will correct inefficiencies in the current system, engineers at NOIA say. +![Thinkstock][1] + +The public internet should migrate to a programmable backbone-as-a-service architecture, says a team of network engineers behind NOIA, a startup promising to revolutionize global traffic. They say the internet will be more efficient if internet protocols and routing technologies are re-worked and then combined with a traffic-trading blockchain. + +It’s “impossible to use internet for modern applications,” the company says on its website. “Almost all global internet companies struggle to ensure uptime and reliable user experience.” + +That’s because modern techniques aren’t being introduced fully, NOIA says. The engineers say algorithms should be implemented to route traffic and that segment routing technology should be adopted. Plus, blockchain should be instigated to trade internet transit capacity. A “programmable internet solves the web’s inefficiencies,” a representative from NOIA told me. + +**[ Read also: [What is IPv6, and why aren’t we there yet?][2] ]** + +### Deprecate the public internet + +NOIA has started introducing a caching, distributed content delivery application to improve website loading times, but it wants to ultimately deprecate the existing internet completely. + +The company currently has 353 active cache nodes around the world, with a total 27 terabytes of storage for that caching system—NOIA clients contribute spare bandwidth and storage. It’s also testing a network backbone using four providers with European and American locations that it says will be the [development environment for its envisaged software-defined and radical internet replacement][3]. + +### The problem with today's internet + +The “internet is a mesh of tangled up cables,” [NOIA says][4]. “Thousands of physically connected networks” are involved. Any configuration alterations in any of the jumble of networks causes issues with the protocols, it explains. The company is referring to Border Gateway Protocol (BGP), which lets routers discover paths to IP addresses through the disparate network. Because BGP only forwards to a neighboring router, it doesn’t manage the entire route. That introduces “severe variability” or unreliability. + +“It is impossible to guarantee service reliability without using overlay networks. Low-latency, performance-critical applications, and games cannot operate on public Internet,” the company says. + +### How a software-defined internet works + +NOIA's idea is to use [IPv6][5], the latest internet protocol. IPv6 features an expanded packet size and allows custom headers. The company then adds segment routing to create Segment Routing over IPv6 (SRv6). That SRv6 combo adds routing information to each data packet sent—a packet-level programmable network, in other words. + +Segment routing, roughly, is an updated internet protocol that lets routers comprehend routing information in packet headers and then perform the routing. Cisco has been using it, too. + +NOIA’s network then adds the SRv6 amalgamation to distributed ledger technology (blockchain) in order to let ISPs and data centers buy and sell the routes—buyers can choose their routes in the exchange, too. + +In addition to trade, blockchain introduces security. It's worth noting that routings aren’t the only internet technologies that could be disrupted due to blockchain. In April I wrote about [organizations that propose moving data storage transactions over to distributed ledgers][6]. They say that will be more secure than anything seen before. [Ethernet’s lack of inherent security could be corrected by smart contract, trackable verifiable transactions][7], say some. And, of course, supply chain, the automotive vertical, and the selling of sensor data overall may emerge as [use-contenders for secure, blockchain in the internet of things][8]. + +In NOIA’s case, with SRv6 blended with distributed ledgers, the encrypted ledger holds the IP addresses, but it is architecturally decentralized—no one controls it. That’s one element of added security, along with the aforementioned trading, provided by the ledger. + +That trading could handle the question of who’s paying for all this. However, NOIA says current internet hardware will be able to understand the segment routings, so no new equipment investments are needed. + +Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.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://images.idgesg.net/images/article/2018/05/dns_browser_http_web_internet_thinkstock-100758191-large.jpg +[2]: https://www.networkworld.com/article/3254575/lan-wan/what-is-ipv6-and-why-aren-t-we-there-yet.html +[3]: https://medium.com/noia/development-update-06-20-07-04-2879f9fce3cb +[4]: https://noia.network/ +[5]: https://www.networkworld.com/article/3254575/what-is-ipv6-and-why-aren-t-we-there-yet.html +[6]: https://www.networkworld.com/article/3390722/how-data-storage-will-shift-to-blockchain.html +[7]: https://www.networkworld.com/article/3356496/how-blockchain-will-manage-networks.html +[8]: https://www.networkworld.com/article/3330937/how-blockchain-will-transform-the-iot.html +[9]: https://www.facebook.com/NetworkWorld/ +[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md b/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md new file mode 100644 index 0000000000..06b5726379 --- /dev/null +++ b/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Smart cities offer window into the evolution of enterprise IoT technology) +[#]: via: (https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html) +[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) + +Smart cities offer window into the evolution of enterprise IoT technology +====== +Smart-city technologies such as 0G networking hold clues for successful large-scale implementations of the internet of things in enterprise settings. +![Benjamin Hung modified by IDG Comm. \(CC0\)][1] + +Powering smart cities is one of the most ambitious use cases for the internet of things (IoT), combining a wide variety of IoT technologies to create coherent systems that span not just individual buildings or campuses but entire metropolises. As such, smart cities offer a window into the evolution of enterprise IoT technologies and implementations on the largest scale. + +And that’s why I connected with [Christophe Fourtet][2], CSO and co-founder of [Sigfox][3], a French global network operator, to learn more about using wireless networks to connect large numbers of low-power objects, ranging from smartwatches to electricity meters. (And I have to admit I was intrigued by the 0G network moniker, which conjured visions of weightless IoT devices floating in space, or maybe [OG-][4]style old-school authenticity. That’s not at all what it’s about, of course.) + +**[ Learns more: [Download a PDF bundle of five essential articles about IoT in the enterprise][5] ]** + +According to Fourtet, "Sigfox’s global 0G network specializes in inexpensively conveying small amounts of data over long ranges—without sacrificing quality. Whereas other networks aim to collect and transmit as much data as possible, as quickly as possible, we deliver small packets of information at regular intervals, giving customers only the critical information they need." + +The software-based wireless 0G network listens to devices without the need to establish and maintain network connection, eliminating signaling overhead. With network and computing complexity managed in the cloud, energy consumption and costs of connected devices are dramatically reduced, [the company says][6]. Just as important, the low power requirements can also dramatically cut battery requirements for IoT devices. + +Around the world, customers like Michelin, General Motors, and Airbus use the 0G networks to connect IoT devices, and the network is supported by more than 660 partner organizations, including device makers and service providers such as Urbansense and Bosch. Sigfox cited [0G-connected IoT devices enabling Danish cities][7] to monitor quality of life data, from detecting defects in buildings to tracking garbage collection. + +### 0G applications beyond smart cities + +In addition to smart cities applications, Sigfox serves several industry verticals, including manufacturing, agriculture, and retail. Common use cases include supply-chain management and asset tracking, both within factory/warehouse environments and between locations as containers/shipments move through the supply chain around the globe. The network is uniquely equipped for supply chain use cases due to its cost-efficiency, long-lasting batteries with totally predictable autonomy, and wide-range reach. + +In facilities management, the 0G network can connect IoT devices that track ambient factors such temperature, humidity, and occupancy. Doing so helps managers leverage occupancy data to adjust the amount of space a company needs to rent, reducing overhead costs. It can also help farmers optimize the planting, care, and harvesting of crops. + +Operating as a backup solution to ensure connectivity during a broadband network outage, 0G networking built into a cable box or router could allow service providers to access hardware even when the primary network is down, Fourtet said. + +“The 0G network does not promise a continuation of these services,” Fourtet noted, “but it can provide access to the necessary information to solve challenges associated with outages.” + +In a more dire example in the home and commercial building security market, sophisticated burglars could use cellular and Wi-Fi jammers to block a security system’s access to a network so even though alarms were issued, the service might never receive them, Fourtet said. But the 0G network can send an alert to the alarm system provider even if it has been jammed or blocked, he said. + +### How 0g networks are used today + +Current 0G implementations include helping [Louis Vuitton track luggage][8] for its traveling customers. Using a luggage tracker powered by by [Sigfox’s Monarch service][9], a suitcase can stay connected to the 0G network throughout a trip, automatically recognizing and adapting to local radio frequency standards. The idea is for travelers to track the location of their bags at major airports in multiple countries, Fourtet said, while low energy consumption promises a six-month battery life with a very small battery. + +At the Special Olympics World Games Abu Dhabi 2019, [iWire, LITE-ON and Sigfox worked together][10] to create a tracking solution designed to help safeguard 10,000 athletes and delegates. Sensors connected to the Sigfox 0G network and outfitted with Wi-Fi capabilities were equipped with tiny batteries designed to provide uninterrupted service throughout the weeklong event. The devices “periodically transmitted messages that helped to identify the location of athletes and delegates in case they went off course,” Fourtet said, while LITE-ON incorporated a panic button for use in case of emergencies. In fact, during the event, the system was used to locate a lost athlete and return them to the Games without incident, he said. + +French car manufacturer [Groupe PSA][11] uses the 0G network to optimize shipping container routes between suppliers and assembly plants. [Track&Trace][11] works with IBM’s cloud-based IoT technologies to track container locations and alert Groupe PSA when issues crop up, Fourtet said. + +### 0G is still growing + +“It takes time to build a new network,” Fourtet said. So while Sigfox has delivered 0G network coverage in 60 countries across five continents, covering 1 billion people  (including 51 U.S. metropolitan areas covering 30% of the population), Fourtet acknowledged, “[We] still have a ways to go to build our global network.” In the meantime, the company is expanding its Connectivity-as-a-Service (CaaS) solutions to enable coverage in areas where the 0G network does not yet exist. + +**More on IoT:** + + * [What is the IoT? How the internet of things works][12] + * [What is edge computing and how it’s changing the network][13] + * [Most powerful Internet of Things companies][14] + * [10 Hot IoT startups to watch][15] + * [The 6 ways to make money in IoT][16] + * [What is digital twin technology? [and why it matters]][17] + * [Blockchain, service-centric networking key to IoT success][18] + * [Getting grounded in IoT networking and security][5] + * [Building IoT-ready networks must become a priority][19] + * [What is the Industrial IoT? [And why the stakes are so high]][20] + + + +Join the Network World communities on [Facebook][21] and [LinkedIn][22] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html + +作者:[Fredric 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://www.networkworld.com/author/Fredric-Paul/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2018/07/tokyo_asia_smart-city_iot_networking_by-benjamin-hung-unsplash-100764249-large.jpg +[2]: https://www.sigfox.com/en/sigfox-story +[3]: https://www.sigfox.com/en +[4]: https://www.dictionary.com/e/slang/og/ +[5]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html +[6]: https://www.sigfox.com/en/sigfox-iot-technology-overview +[7]: https://www.youtube.com/watch?v=WXc722WGjnE&t=1s +[8]: https://www.sigfox.com/en/news/sigfox-and-louis-vuitton-partner-innovative-luggage-tracker +[9]: https://www.sigfox.com/en/solutions/sigfox-services +[10]: https://www.sigfox.com/en/news/case-study-special-olympics-2019 +[11]: https://www.sigfox.com/en/news/ibm-revolutionizes-container-tracking-groupe-psa-sigfox +[12]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html +[13]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html +[14]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html +[15]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html +[16]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html +[17]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html +[18]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html +[19]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html +[20]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[21]: https://www.facebook.com/NetworkWorld/ +[22]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md b/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md new file mode 100644 index 0000000000..b490eeeea1 --- /dev/null +++ b/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md @@ -0,0 +1,151 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Worst DNS attacks and how to mitigate them) +[#]: via: (https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Worst DNS attacks and how to mitigate them +====== +DNS threats, including DNS hijacking, tunneling, phishing, cache poisoning and DDoS attacks, are all on the rise. +![Max Bender \(CC0\)][1] + +The Domain Name System remains under constant attack, and there seems to be no end in sight as threats grow increasingly sophisticated. + +DNS, known as the internet’s phonebook, is part of the global internet infrastructure that translates between familiar names and the numbers computers need to access a website or send an email. While DNS has long been the target of assailants looking to steal all manner of corporate and private information, the threats in the [past year][2] or so indicate a worsening of the situation. + +**More about DNS:** + + * [DNS in the cloud: Why and why not][3] + * [DNS over HTTPS seeks to make internet use more private][4] + * [How to protect your infrastructure from DNS cache poisoning][5] + * [ICANN housecleaning revokes old DNS security key][6] + + + +IDC reports that 82% of companies worldwide have faced a DNS attack over the past year. The research firm recently published its fifth annual [Global DNS Threat Report][7], which is based on a survey IDC conducted on behalf of DNS security vendor EfficientIP of 904 organizations across the world during the first half of 2019. + +According to IDC's research, the average costs associated with a DNS attack rose by 49% compared to a year earlier. In the U.S., the average cost of a DNS attack tops out at more than $1.27 million. Almost half of respondents (48%) report losing more than $500,000 to a DNS attack, and nearly 10% say they lost more than $5 million on each breach. In addition, the majority of U.S. organizations say that it took more than one day to resolve a DNS attack. + +“Worryingly, both in-house and cloud applications were damaged, with growth of over 100% for in-house application downtime, making it now the most prevalent damage suffered,” IDC wrote. "DNS attacks are moving away from pure brute-force to more sophisticated attacks acting from the internal network. This will force organizations to use intelligent mitigation tools to cope with insider threats." + +### Sea Turtle DNS hijacking campaign + +An ongoing DNS hijacking campaign known as Sea Turtle is one example of what's occuring in today's DNS threat landscape. + +This month, [Cisco Talos][8] security researchers said the people behind the Sea Turtle campaign have been busy [revamping their attacks][9] with new infrastructure and going after new victims. + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]** + +In April, Talos released a [report detailing][11] Sea Turtle and calling it the “first known case of a domain name registry organization that was compromised for cyber espionage operations.” Talos says the ongoing DNS threat campaign is a state-sponsored attack that abuses DNS to harvest credentials to gain access to sensitive networks and systems in a way that victims are unable to detect, which displays unique knowledge on how to manipulate DNS. + +By obtaining control of victims’ DNS, the attackers can change or falsify any data on the Internet and illicitly modify DNS name records to point users to actor-controlled servers; users visiting those sites would never know, Talos reports.  + +The hackers behind Sea Turtle appear to have regrouped after the April report from Talos and are redoubling their efforts with new infrastructure – a move Talos researchers find to be unusual: “While many actors will slow down once they are discovered, this group appears to be unusually brazen, and will be unlikely to be deterred going forward,” Talos [wrote][9] in July. + +“Additionally, we discovered a new DNS hijacking technique that we assess with moderate confidence is connected to the actors behind Sea Turtle. This new technique is similar in that the threat actors compromise the name server records and respond to DNS requests with falsified A records,” Talos stated.  + +“This new technique has only been observed in a few highly targeted operations. We also identified a new wave of victims, including a country code top-level domain (ccTLD) registry, which manages the DNS records for every domain [that] uses that particular country code; that access was used to then compromise additional government entities. Unfortunately, unless there are significant changes made to better secure DNS, these sorts of attacks are going to remain prevalent,” Talos wrote. + +### DNSpionage attack upgrades its tools + +Another newer threat to DNS comes in the form of an attack campaign called [DNSpionage][12].  + +DNSpionage initially used two malicious websites containing job postings to compromise targets via crafted Microsoft Office documents with embedded macros. The malware supported HTTP and DNS communication with the attackers. And the attackers are continuing to develop new assault techniques. + +“The threat actor's ongoing development of DNSpionage malware shows that the attacker continues to find new ways to avoid detection. DNS tunneling is a popular method of exfiltration for some actors, and recent examples of DNSpionage show that we must ensure DNS is monitored as closely as an organization's normal proxy or weblogs,” [Talos wrote][13]. “DNS is essentially the phonebook of the internet, and when it is tampered with, it becomes difficult for anyone to discern whether what they are seeing online is legitimate.” + +The DNSpionage campaign targeted various businesses in the Middle East as well as United Arab Emirates government domains. + +“One of the biggest problems with DNS attacks or the lack of protection from them is complacency,” said Craig Williams, director of Talos outreach. Companies think DNS is stable and that they don’t need to worry about it. “But what we are seeing with attacks like DNSpionage and Sea Turtle are kind of the opposite, because attackers have figured out how to use it to their advantage – how to use it to do damage to credentials in a way, in the case of Sea Turtle, that the victim never even knows it happened. And that’s a real potential problem.” + +If you know, for example, your name server has been compromised, then you can force everyone to change their passwords. But if instead they go after the registrar and the registrar points to the bad guy’s name, you never knew it happened because nothing of yours was touched – that’s why these new threats are so nefarious, Williams said. + +“Once attackers start using it publicly, successfully, other bad guys are going to look at it and say, ‘Hey, why don't I use that to harvest a bunch of credentials from the sites I am interested in,’” Williams said. + +### **The DNS IoT risk** + +Another developing risk would be the proliferation of IoT devices.  The Internet Corporation for Assigned Names and Numbers (ICANN) recently wrote a [paper on the risk that IoT brings to DNS][14].  + +“The IoT is a risk to the DNS because various measurement studies suggest that IoT devices could stress the DNS infrastructure in ways that we have not seen before,” ICANN stated.   “For example, a software update for a popular IP-enabled IoT device that causes the device to use the DNS more frequently (e.g., regularly lookup random domain names to check for network availability) could stress the DNS in individual networks when millions of devices automatically install the update at the same time.” + +While this is a programming error from the perspective of individual devices, it could result in a significant attack vector from the perspective of DNS infrastructure operators. Incidents like this have already occurred on a small scale, but they may occur more frequently in the future due to the growth of heterogeneous IoT devices from manufacturers that equip their IoT devices with controllers that use the DNS, ICANN stated. + +ICANN also suggested that IoT botnets will represent an increased threat to DNS operators. “Larger DDoS attacks, partly because IoT bots are more difficult to eradicate. Current botnet sizes are on the order of hundreds of thousands. The most well-known example is the Mirai botnet, which involved 400K (steady-state) to 600K (peak) infected IoT devices.  The Hajime botnet hovers around 400K infected IoT devices, but has not launched any DDoS attacks yet. With the growth of the IoT, these attacks may grow to involve millions of bots and as a result larger DDoS attacks. + +### **DNS security warnings grow** + +The UK's [National Cyber Security Centre (NCSC)][15] issued a warning this month about ongoing DNS attacks, particularly focusing on DNS hijacking. It cited a number of risks associated with the uptick in DNS hijacking including: + +**Creating malicious DNS records.** A malicious DNS record could be used, for example, to create a phishing website that is present within an organization’s familiar domain. This may be used to phish employees or customers. + +**Obtaining SSL certificates.** Domain-validated SSL certificates are issued based on the creation of DNS records; thus an attacker may obtain valid SSL certificates for a domain name, which could be used to create a phishing website intended to look like an authentic website, for example. + +**Transparent proxying.** One serious risk employed recently involves transparently proxying traffic to intercept data. The attacker modifies an organization’s configured domain zone entries (such as “A” or “CNAME” records) to point traffic to their own IP address, which is infrastructure they manage. + +“An organization may lose total control of their domain and often the attackers will change the domain ownership details making it harder to recover,” the NCSC wrote. + +These new threats, as well as other dangers, led the U.S. government to issue a warning earlier this year about DNS attacks on federal agencies.  + +The Department of Homeland Security’s Cybersecurity and Infrastructure Security Agency (CISA) told all federal agencies to bolt down their DNS in the face of a series of global hacking campaigns. + +CISA said in its [Emergency Directive][16] that it was tracking a series of incidents targeting DNS infrastructure. CISA wrote that it “is aware of multiple executive branch agency domains that were impacted by the tampering campaign and has notified the agencies that maintain them.” + +CISA says that attackers have managed to intercept and redirect web and mail traffic and could target other networked services. The agency said the attacks start with compromising user credentials of an account that can make changes to DNS records.  Then the attacker alters DNS records, like Address, Mail Exchanger, or Name Server records, replacing the legitimate address of the services with an address the attacker controls. + +These actions let the attacker direct user traffic to their own infrastructure for manipulation or inspection before passing it on to the legitimate service, should they choose. This creates a risk that persists beyond the period of traffic redirection, CISA stated.  + +“Because the attacker can set DNS record values, they can also obtain valid encryption certificates for an organization’s domain names. This allows the redirected traffic to be decrypted, exposing any user-submitted data. Since the certificate is valid for the domain, end users receive no error warnings,” CISA stated. + +### **Get on the DNSSEC bandwagon** + +“Enterprises that are potential targets – in particular those that capture or expose user and enterprise data through their applications – should heed this advisory by the NSCS and should pressure their DNS and registrar vendors to make DNSSEC and other domain security best practices easy to implement and standardized,” said Kris Beevers, co-founder and CEO of DNS security vendor [NS1][17]. “They can easily implement DNSSEC signing and other domain security best practices with technologies in the market today. At the very least, they should work with their vendors and security teams to audit their implementations.” + +DNSSEC was in the news earlier this year when in response to increased DNS attacks, ICANN called for an intensified community effort to install stronger DNS security technology.  + +Specifically, ICANN wants full deployment of the Domain Name System Security Extensions ([DNSSEC][18]) across all unsecured domain names. DNSSEC adds a layer of security on top of DNS. Full deployment of DNSSEC ensures end users are connecting to the actual web site or other service corresponding to a particular domain name, ICANN said. “Although this will not solve all the security problems of the Internet, it does protect a critical piece of it – the directory lookup – complementing other technologies such as SSL (https:) that protect the ‘conversation’, and provide a platform for yet-to-be-developed security improvements,” ICANN stated. + +DNSSEC technologies have been around since about 2010 but are not widely deployed, with less than 20% of the world’s DNS registrars having deployed it, according to the regional internet address registry for the Asia-Pacific region ([APNIC][19]). + +DNSSEC adoption has been lagging because it was viewed as optional and can require a tradeoff between security and functionality, said NS1's Beevers. + +### **Traditional DNS threats** + +While DNS hijacking may be the front line attack method, other more traditional threats still exist.  + +The IDC/EfficientIP study found most popular DNS threats have changed compared with last year. Phishing (47%) is now more popular than last year’s favorite, DNS-based malware (39%), followed by DDoS attacks (30%), false positive triggering (26%), and lock-up domain attacks (26%). + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.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://images.idgesg.net/images/article/2018/08/anonymous_faceless_hooded_mand_in_scary_halloween_mask_finger_to_lips_danger_threat_stealth_attack_hacker_hush_silence_warning_by_max_bender_cc0_via_unsplash_1200x800-100766358-large.jpg +[2]: https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html +[3]: https://www.networkworld.com/article/3273891/hybrid-cloud/dns-in-the-cloud-why-and-why-not.html +[4]: https://www.networkworld.com/article/3322023/internet/dns-over-https-seeks-to-make-internet-use-more-private.html +[5]: https://www.networkworld.com/article/3298160/internet/how-to-protect-your-infrastructure-from-dns-cache-poisoning.html +[6]: https://www.networkworld.com/article/3331606/security/icann-housecleaning-revokes-old-dns-security-key.html +[7]: https://www.efficientip.com/resources/idc-dns-threat-report-2019/ +[8]: https://www.talosintelligence.com/ +[9]: https://blog.talosintelligence.com/2019/07/sea-turtle-keeps-on-swimming.html +[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[11]: https://blog.talosintelligence.com/2019/04/seaturtle.html +[12]: https://www.networkworld.com/article/3390666/cisco-dnspionage-attack-adds-new-tools-morphs-tactics.html +[13]: https://blog.talosintelligence.com/2019/04/dnspionage-brings-out-karkoff.html +[14]: https://www.icann.org/en/system/files/files/sac-105-en.pdf +[15]: https://www.ncsc.gov.uk/news/ongoing-dns-hijacking-and-mitigation-advice +[16]: https://cyber.dhs.gov/ed/19-01/ +[17]: https://ns1.com/ +[18]: https://www.icann.org/resources/pages/dnssec-qaa-2014-01-29-en +[19]: https://www.apnic.net/ diff --git a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md b/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md index 0fb3c6469d..5e5f4df763 100644 --- a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md +++ b/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (ninifly) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20171006 7 deadly sins of documentation.md b/sources/tech/20171006 7 deadly sins of documentation.md index 5f2005c764..2289481584 100644 --- a/sources/tech/20171006 7 deadly sins of documentation.md +++ b/sources/tech/20171006 7 deadly sins of documentation.md @@ -1,3 +1,4 @@ +leemeans translating 7 deadly sins of documentation ====== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-cat-writing-king-typewriter-doc.png?itok=afaEoOqc) diff --git a/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md deleted file mode 100644 index 6b98dbd30d..0000000000 --- a/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md +++ /dev/null @@ -1,242 +0,0 @@ -Top 10 Microsoft Visio Alternatives for Linux -====== -**Brief: If you are looking for a good Visio viewer in Linux, here are some alternatives to Microsoft Visio that you can use in Linux.** - -[Microsoft Visio][1] is a great tool for creating or generating mission-critical diagrams and vector representations. While it may be a good tool for making floor plans or other kinds of diagrams - it is neither free nor open source. - -Moreover, Microsoft Visio is not a standalone product. It comes bundled with Microsoft Office. We have already seen [open source alternatives to MS Office][2] in the past. Today we'll see what tools you can use in place of Visio on Linux. - -## Best Microsoft Visio alternatives for Linux - -![Microsoft Visio Alternatives for Linux][4] - -Mandatory disclaimer here. The list is not a ranking. The product at number three is not better than the one at number six on the list. - -I have also mentioned a couple of non open source Visio software that you can use from the web interface. - -| Software | Type | License Type | -| LibreOffice Draw | Desktop Software | Free and Open Source | -| OpenOffice Draw | Desktop Software | Free and Open Source | -| Dia | Desktop Software | Free and Open Source | -| yED Graph Editor | Desktop and web-based | Freemium | -| Inkscape | Desktop Software | Free and Open Source | -| Pencil | Desktop and web-based | Free and Open Source | -| Graphviz | Desktop Software | Free and Open Source | -| darw.io | Desktop and web-based | Free and Open Source | -| Lucidchart | Web-based | Freemium | -| Calligra Flow | Desktop Software | Free and Open Source | - - -### 1. LibreOffice Draw - -![][5] - -LibreOffice Draw module is one of the best open source alternatives to Microsoft Visio. With the help of it, you can either choose to make a quick sketch of an idea or a complex professional floor plan for presentation. Flowcharts, organization charts, network diagrams, brochures, posters, and what not! All that without even requiring to spend a penny. - -Good thing is that it comes bundled with LibreOffice which is installed in most Linux distributions by default. - -#### Overview of Key Features: - - * Style & Formatting tools to make Brochures/Posters - * Calc Data Visualization - * PDF-File editing capability - * Create Photo Albums by manipulating the pictures from Gallery - * Flexible Diagramming tools similar to the ones with Microsoft Visio (Smart Connectors, Dimension lines, etc.,) - * Supports .VSD files (to open) - - - -[LibreOffice Draw][6] - -### 2. Apache OpenOffice Draw - -![][7] - -A lot of people do know about OpenOffice (on which LibreOffice project was initially based on) but they don't really mention Apache OpenOffice Draw as an alternative to Microsoft Visio. But, for a fact - it is yet another amazing open-source diagramming software tool. Unlike LibreOffice Draw, it does not support editing PDF files but it does offer drawing tools for any type of diagram creation. - -Just a caveat here. Use this tool only if you have OpenOffice already on your system. This is because [installing OpenOffice][8] is a pain and it is [not properly developed anymore][9]. - -#### Overview of Key Features: - - * 3D Controller to create shapes quickly - * Create (.swf) flash versions of your work - * Style & Formatting tools - * Flexible Diagramming tools similar to the ones with Microsoft Visio (Smart Connectors, Dimension lines, etc.,) - - - -[Apache OpenOffice Draw][10] - -### 3. Dia - -![][11] - -Dia is yet another interesting open source tool. It may not seem to be under active development like the other ones mentioned. But, if you were looking for a free and open source alternative to Microsoft Visio for simple and decent diagrams - Dia could be your choice. The only let down of this tool for you could be its user interface. Apart from that, it does let you utilize powerful tools for a complex diagram (but it may not look great - so we recommend it for simpler diagrams). - -#### Overview of Key Features: - - * It can be used via command-line - * Styling & Formatting tools - * Shape Repository for custom shapes - * Diagramming tools similar to the ones with Microsoft Visio (Special Objects, Grid Lines, Layers, etc.,) - * Cross-platform - - - -[Dia][12] - -### 4. yED Graph Editor - -yED Graph editor is one of the most loved free Microsoft Visio alternative. If you worry about it being a freeware but not an open source project, you can still utilize [yED's live editor][13] via your web browser for free. It is one of the best recommendations if you want to make diagrams quickly with a very easy-to-use interface. - -#### Overview of Key Features: - - * Drag and drop feature for easy diagram making - * Supports importing external data for linking - - - -[yED Graph Editor][14] - -### 5. Inkscape - -![][15] - -Inkscape is a free and open source vector graphics editor. You get the basic functionalities of creating a flowchart or a data flow diagram. It does not offer advanced diagramming tools but the basic ones to create simpler diagrams. So, Inkscape could be your Visio alternative only if you are looking to generate basic diagrams with the help of diagram connector tool by utilizing the available symbols from the library. - -#### Overview of Key Features: - - * Connector Tool - * Flexible drawing tools - * Broad file format compatibility - - - -[Inkscape][16] - -### 6. Pencil Project - -![][17] - -Pencil Project is an impressive open source initiative that is available for both Windows and Mac along with Linux. It features an easy-to-use GUI which makes diagramming easier and convenient. A good collection of inbuilt shapes and symbols to make your diagrams look great. It also comes baked in with Android and iOS UI stencils to let you start prototyping apps when needed. - -You can also have it installed as a Firefox extension - but the extension does not utilize the latest build of the project. - -#### Overview of Key Features: - - * Browse cliparts easily (utilizing openclipart.org) - * Export as an ODT file / PDF file - * Diagram connector tool - * Cross-platform - - - -[Pencil Project][18] - -### 7. Graphviz - - -![][19] - -Graphviz is slightly different. It is not a drawing tool but a dedicated graph visualization tool. You should definitely utilize this tool if you are into network diagrams which require several designs to represent a node. Well, of course, you can't make a floor plan with this tool (it won't be easy at least). So, it is best-suited for network diagrams, bioinformatics, database connections, and similar stuff. - -#### Overview of Key Features: - - * Supports command-line usage - * Supports custom shapes & tabular node layouts - * Basic stying and formatting tools - - - -[Graphviz][20] - -### 8. Draw.io - -Draw.io is primarily a free web-based diagramming tool with powerful tools to make almost any type of diagrams. You just need to drag n drop and then connect them to create a flowchart, an E-R diagram, or anything relevant. Also, if you like the tool, you can try the [offline desktop version][21]. - -**Overview of Key Features:** - - * Direct uploads to a cloud storage service - * Custom Shapes - * Styling & Formatting tools - * Cross-platform - - - -[Draw.io][22] - -### 9. Lucidchart - -![][23] - -Lucidchart is a premium web-based diagramming tool which offers a free subscription with limited features. You can utilize the free subscription to create several types of diagrams and export them as an image or a PDF. However, the free version does not support data linking and Visio import/export functionality. If you do not need data linking -Lucidchart could prove to be a very good tool while generating beautiful diagrams. - -#### Overview of Key Features: - - * Integrations to Slack, Jira Core, Confluence - * Ability to make product mockups - * Import Visio files - - - -[Lucidchart][24] - -### 10. Calligra Flow - -![calligra flow][25] - -Calligra Flow is a part of [Calligra Project][26] which aims to provide free and open source software tools. With Calligra flow, you can easily create network diagrams, entity-relation diagrams, flowcharts, and more. - -#### Overview of Key Features: - - * Wide range of stencil boxes - * Styling and formatting tools - - - -[Calligra Flow][27] - -### Wrapping Up - -Now that you know about the best free and open source Visio alternatives, what do you think about them? - -Are they better than Microsoft Visio in any aspect of your requirements? Also, let us know in the comments below if we missed any of your favorite diagramming tools as an Linux alternative to Microsoft Visio. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/visio-alternatives-linux/ - -作者:[Ankush Das][a] -译者:[译者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/ -[1]:https://products.office.com/en/visio/flowchart-software -[2]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ -[3]:data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs= -[4]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png -[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg -[6]:https://www.libreoffice.org/discover/draw/ -[7]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg -[8]:https://itsfoss.com/install-openoffice-ubuntu-linux/ -[9]:https://itsfoss.com/openoffice-shutdown/ -[10]:https://www.openoffice.org/product/draw.html -[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/dia-screenshot.jpg -[12]:http://dia-installer.de/ -[13]:https://www.yworks.com/products/yed-live -[14]:https://www.yworks.com/products/yed -[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg -[16]:https://inkscape.org/en/ -[17]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/pencil-project.jpg -[18]:http://pencil.evolus.vn/Downloads.html -[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/graphviz.jpg -[20]:http://graphviz.org/ -[21]:https://about.draw.io/integrations/#integrations_offline -[22]:https://about.draw.io/ -[23]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg -[24]:https://www.lucidchart.com/ -[25]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/calligra-flow.jpg -[26]:https://www.calligra.org/ -[27]:https://www.calligra.org/flow/ diff --git a/sources/tech/20190703 Parse arguments with Python.md b/sources/tech/20190703 Parse arguments with Python.md index 73933c53ed..e84978cde9 100644 --- a/sources/tech/20190703 Parse arguments with Python.md +++ b/sources/tech/20190703 Parse arguments with Python.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md b/sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md deleted file mode 100644 index 14284c903a..0000000000 --- a/sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Delete A Repository And GPG Key In Ubuntu) -[#]: via: (https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -How To Delete A Repository And GPG Key In Ubuntu -====== - -![Delete A Repository And GPG Key In Ubuntu][1] - -The other day we discussed how to [**list the installed repositories**][2] in RPM and DEB-based systems. Today, we are going to learn how to delete a repository along with its GPG key in Ubuntu. For those wondering, a repository (shortly **repo** ) is a central place where the developers keep the software packages. The packages in the repositories are thoroughly tested and built specifically for each version by Ubuntu developers. The users can download and install these packages on their Ubuntu system using **Apt** **package manager**. Ubuntu has four official repositories namely **Main** , **Universe** , **Restricted** and **Multiverse**. - -Apart from the official repositories, there are many unofficial repositories maintained by developers (or package maintainers). The unofficial repositories usually have the packages which are not available in the official repositories. All packages are signed with pair of keys, a public and private key, by the package maintainer. As you already know, the public key is given out to the users and the private must be kept secret. Whenever you add a new repository in the sources list, you should also add the repository key if Apt package manager wants to trust the newly added repository. Using the repository keys, you can ensure that you’re getting the packages from the right person. Hope you got a basic idea about software repositories and repository keys. Now let us go ahead and see how to delete the repository and its key if it is no longer necessary in Ubuntu systems. - -### Delete A Repository In Ubuntu - -Whenever you add a repository using “add-apt-repository” command, it will be stored in **/etc/apt/sources.list** file. - -To delete a software repository from Ubuntu and its derivatives, just open the /etc/apt/sources.list file and look for the repository entry and delete it. - -``` -$ sudo nano /etc/apt/sources.list -``` - -As you can see in the below screenshot, I have added [**Oracle Virtualbox**][3] repository in my Ubuntu system. - -![][4] - -virtualbox repository - -To delete this repository, simply remove the entry. Save and close the file. - -If you have added PPA repositories, look into **/etc/apt/sources.list.d/** directory and delete the respective entry. - -Alternatively, you can delete the repository using “add-apt-repository” command. For example, I am deleting the [**Systemback**][5] repository like below. - -``` -$ sudo add-apt-repository -r ppa:nemh/systemback -``` - -Finally, update the software sources list using command: - -``` -$ sudo apt update -``` - -### Delete Repository keys - -We use “apt-key” command to add the repository keys. First, let us list the added keys using command: - -``` -$ sudo apt-key list -``` - -This command will list all added repository keys. - -``` -/etc/apt/trusted.gpg --------------------- -pub rsa1024 2010-10-31 [SC] -3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B -uid [ unknown] Launchpad PPA for Kendek - -pub rsa4096 2016-04-22 [SC] -B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF -uid [ unknown] Oracle Corporation (VirtualBox archive signing key) <[email protected]> -sub rsa4096 2016-04-22 [E] - -/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg ------------------------------------------------------- -pub rsa4096 2012-05-11 [SC] -790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32 -uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <[email protected]> - -/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg ------------------------------------------------------- -pub rsa4096 2012-05-11 [SC] -8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 -uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <[email protected]> - -/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg ------------------------------------------------------- -pub rsa4096 2018-09-17 [SC] -F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C -uid [ unknown] Ubuntu Archive Automatic Signing Key (2018) <[email protected]> -``` - -As you can see in the above output, the long (40 characters) hex value is the repository key. If you want APT package manager to stop trusting the key, simply delete it using command: - -``` -$ sudo apt-key del "3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B" -``` - -Or, specify the last 8 characters only: - -``` -$ sudo apt-key del 73C62A1B -``` - -Done! The repository key has been deleted. Run the following command to update the repository lists: - -``` -$ sudo apt update -``` - -**Resource:** - - * [**Software repositories – Ubuntu Community Wiki**][6] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Delete-a-repository-in-ubuntu-720x340.png -[2]: https://www.ostechnix.com/find-list-installed-repositories-commandline-linux/ -[3]: https://www.ostechnix.com/install-oracle-virtualbox-ubuntu-16-04-headless-server/ -[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/virtualbox-repository.png -[5]: https://www.ostechnix.com/systemback-restore-ubuntu-desktop-and-server-to-previous-state/ -[6]: https://help.ubuntu.com/community/Repositories/Ubuntu diff --git a/sources/tech/20190708 10 ways to get started with Linux.md b/sources/tech/20190708 10 ways to get started with Linux.md deleted file mode 100644 index d617eb559f..0000000000 --- a/sources/tech/20190708 10 ways to get started with Linux.md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (10 ways to get started with Linux) -[#]: via: (https://opensource.com/article/19/7/ways-get-started-linux) -[#]: author: (Seth Kenlon https://opensource.com/users/seth/users/don-watkins) - -10 ways to get started with Linux -====== -Ready to dive in and learn Linux? Try these 10 ways to get started. -![Penguins gathered together in the Artic][1] - -The article _[What is a Linux user?][2]_ by Anderson Silva made it clear that these days people are as likely to use Linux (in some way) as they are to use Windows, as long as your definition of "using Linux" is sufficiently broad. Still, if you don't have enough Linux in your life, now is a great time to try Linux in a way you've never tried before. - -Here are 10 ways to get started with Linux. Try one or try them all. - -### 1\. Join a free shell - -![Free shell screenshot][3] - -There are a lot of people running Linux with more Linux servers than they know what to do with (keep in mind that a "Linux server" can be anything from the latest supercomputer to a discarded 12-year-old laptop). To put excess computers to good use, many administrators open their spare boxes up for free shell accounts. - -If you want to log time in a Linux terminal to learn commands, shell scripting, Python, and the basics of web development, a free shell account is an easy, no-cost way to get started. Here's a short list to try: - - * [Freeshell.de][4] is a public access Linux system that's been online since 2002. You get SSH access (to experiment in a Linux shell), IPv6, and OpenSSL, and you can request a MySQL database. - * [Blinkenshell][5] provides a Linux shell to learn Unix, use IRC, host simple websites, and share files. It's been online since 2006. - * [SDF Public Access Unix System][6] was established in 1987 to offer free NetBSD accounts. NetBSD isn't Linux, of course, but it's open source Unix, so it offers a similar experience. It also has several homebrewed applications, so it straddles the line between old-school BBS and plain-old free shell. - - - -Free shell accounts are subject to a lot of abuse, so the more you demonstrate trustworthiness and willingness to participate in the goings-on of the collective, the better your experience. You can often gain access (through a special request or a small donation to demonstrate goodwill) to database engines, compilers, and advanced programming languages. You can also ask for additional software or libraries to be installed, subject to administrator approval. - -#### How to use it - -Public access shell accounts are a great way to try out a real Linux system. The fact that you don't get root access means you get to learn local software management without having to mow your own lawn or fix leaky faucets. You can do just enough real-life activities to make them viable for getting real work done, although they're not reliable enough to be mission critical. - -### 2\. Try Linux on Windows with WSL 2 - -Believe it or not, Microsoft started shipping Linux with Windows as of June 2019, meaning you can run Linux applications from Windows as the second iteration of the [Windows Subsystem for Linux][7] (WSL 2). While it's primarily aimed at developers, Windows users will find WSL 2 to be a Linux environment from the comfort of a familiar desktop without any virtualization taking up extra resources. This is Linux running as a process on your Windows machine. At this time, it's still a new initiative and a work in progress, so it's subject to change. If you try to push it too far too soon, you're likely to encounter a bug or two, but if you're just looking to get started with Linux, learn some commands, and get a feel for getting serious work done in a text-based environment, WSL 2 may be exactly what you need. - -#### How to use it - -WSL doesn't yet have a clear pathway or purpose, but it provides a Linux environment on your Windows machine. You get root access and can run Linux distributions and applications, so it's an easy and seamless way to learn. However, even though WSL _is Linux_, it's not exactly a typical Linux experience. It's Linux provided by Windows, and that's not what you're likely to encounter in the real world. WSL is a development and educational tool, but if it's available to you, then you should use it. - -### 3\. Carry Linux on a bootable thumb drive - -![Porteus Linux][8] - -Carry Linux, installed to a USB thumb drive, everywhere you go, and boot any computer you encounter from that thumb drive. You get a personalized Linux desktop, and you don't have to worry about the data on the host computer you've booted from. The computer doesn't touch your Linux OS, and your Linux OS doesn't affect the computer. It's ideal for public computers at hotel business centers, libraries, schools, or just to give yourself an excuse to boot into Linux from time to time. - -Unlike many other quick hacks to get to a Linux shell, this method offers you a full and robust Linux system, complete with a desktop, access to whatever software you need, and persistent data storage. - -The system never changes. Any data you want to save is written into a compressed filesystem, which is then applied as an overlay to the system when you boot. This flexibility allows you to choose whether to boot in persistent mode, saving all data back to the thumb drive, or in an ephemeral mode, so everything you do disappears once you power down. In other words, you can use this as a secure kiosk on an untrusted computer or as your portable OS on computers you trust. - -There are many [thumb drive distributions][9] you can try, some with minimal desktop environments for low-powered computers and others with a full desktop. I'm partial to [Porteus][10] Linux. I've carried it on my keychain every day for the past eight years, using it as my primary computing platform during business travel as well as a utility disk if computer problems strike at work or home. It's a reliable and stable operating system that's fun and easy to use. - -On Mac or Windows, download the [Fedora Media Writer][11] to create a bootable thumb drive of whatever portable distribution you download. - -#### How to use it - -Booting a "live Linux" from a USB thumb drive provides a complete Linux distribution. While data storage is done a little differently from a system you install to a hard drive, everything else is as you'd expect from a Linux desktop. There's little you can't do on a portable Linux OS, so install one on your keychain to unlock the full potential of every computer you encounter. - -### 4\. Take an online tour - -![Linux tour screenshot][12] - -Somebody over at Ubuntu thought up the brilliant idea of hosting an Ubuntu GNOME desktop in the browser. To try it out for yourself, open a web browser and navigate to [tour.ubuntu.com][13]. You can select which activity you want demonstrated, or you can skip individual lessons and click the Show Yourself Around button. - -Even if you're new to the Linux desktop, you might find showing yourself around is more familiar than you might expect. From the online tour, you can look around, see what applications are available, and view what a typical default Linux desktop is like. You can't adjust settings or launch another tour in Firefox (it was the first thing I tried, naturally), and while you can go through the motions of installing applications, you can't launch them. But if you've never used a Linux desktop before and you want to see what all the fuss is about, this is the whirlwind tour. - -#### How to use it - -An online tour is truly just a tour. If you've never seen a Linux desktop in action, this is an opportunity to get a glimpse of what it's like. Not intended for serious work, this is an attractive display to entice passers-by. - -### 5\. Run Linux in the browser with JavaScript - -![JSLinux][14] - -Not so long ago, virtualization used to be computationally expensive, limited to users with premium hardware. Now virtualization has been optimized to the point that it can be performed by a JavaScript engine, thanks to Fabrice Bellard, the creator of the excellent and open source [QEMU][15] machine emulator and virtualizer. - -Bellard also started the JSLinux project, which allows you to run Linux and other operating systems in a browser, in his spare time for fun. It's still an experimental project, but it's a technical marvel. Open a web browser to the [JSLinux][16] page, and you can boot a text-based Linux shell or a minimal graphical Linux environment. You can upload and download files to your JSLinux host or (theoretically) send your files to a network backup location, because JSLinux has access to the internet through a VPN socket (although at capped speeds, dependent upon the VPN service). - -#### How to use it - -You won't be doing serious work on JSLinux anytime soon, and the environment is arguably too unusual to learn broad lessons about how Linux normally works. If, however, you're bored of running Linux on a plain old PC and would like to try Linux on a truly distinctive platform, JSLinux is in a class all its own. - -### 6\. Read about it - -Not every Linux experience happens on the computer. Maybe you're the sort of person who likes to keep your distance, observe, and do your research before jumping into something new, or maybe you're just not clear yet on what "Linux" encompasses, or maybe you love full immersion. There's a wealth of information to read about how Linux works, what it's like to run Linux, and what's happening in the Linux world. - -The more you get familiar with the world of open source, the easier it is to understand the common lingo and to separate urban myth from actual experience. We publish [book lists][17] from time to time, but one of my favorites is [_The Charm of Linux_][18] by Hazel Russman. It's a tour through Linux from many different angles, written by an independent author out of excitement over discovering Linux. - -#### How to use it - -Nothing beats kicking back with a good book. This is the least traditional method of experiencing Linux, but for people who love the printed word, it's both comforting and effective. - -### 7\. Get a Raspberry Pi - -![Raspberry Pi 4][19] - -If you're using a [Raspberry Pi][20], you're running Linux. It's that easy to get started with Linux and low-powered computing. The great thing about the Pi, aside from it costing well under $100, is that its [website][21] is designed for education. You can learn all about what the Pi does, and while you're at it, all about what Linux can do for you. - -#### How to use it - -The Pi is, by design, a low-powered computer. That means you can't do as much multitasking as you might be used to, but that's a convenient way to keep yourself from getting overwhelmed. The Raspberry Pi is a great way to learn Linux and all of the possibilities that come with it, and it's a fun way to discover the power of eco-friendly, small-form-factor, simplified computing. And be sure to stay tuned to Opensource.com—especially during Pi Week every March—for [tips][22] and [tricks][23] and [fun][24] [activities][25]. - -### 8\. Climb aboard the container craze - -If you work near the back end of the mythical [cloud][26], then you've heard about the container craze. While you can run Docker and Kubernetes on Windows, Azure, Mac, and Linux, you may not know that the containers themselves are Linux. Cloud computing apps and infrastructure are literally minimal Linux systems that run partly virtualized and partly on bare metal. If you launch a container, you are launching a miniature, hyper-specific Linux distribution. - -Containers are [different][27] than virtual machines or physical servers. They're not intended to be used as a general-purpose operating system. However, if you are developing in a container, you might want to pause and have a look around. You'll get a glimpse of how a Linux system is structured, where important files are kept, and which commands are the most common. You can even [try a container online][28], and you can read all about how they work in my article about going [behind the scenes with Linux containers][29]. - -#### How to use it - -Containers are, by design, specific to a single task, but they're Linux, so they're extremely flexible. You can use them as they're intended, or you can build a container out into a mostly complete system for your Linux experiments. It's not a desktop Linux experience, but it's a full Linux experience. - -### 9\. Install Linux as a VM - -Virtualization is the easy way to try an operating system, and [VirtualBox][30] is a great open source way to virtualize. VirtualBox runs on Windows and Mac, so you can install Linux as a virtual machine (VM) and use it almost as if it were just another application. If you're not accustomed to installing an operating system, VirtualBox is also a very safe way to try Linux without accidentally installing it over your usual OS. - -#### How to use it - -Running Linux as a VM is convenient and easy, either as a trial run or an alternative to dual-booting or rebooting when you need a Linux environment. It's full-featured and, because it uses virtual hardware, the host operating system drives your peripherals. The only disadvantage to running Linux as a virtual machine is primarily psychological. If you intend to use Linux as your main OS, but end up defaulting to the host OS for all but the most Linux-specific tasks, then the VM has failed you. Otherwise, a VM is a triumph of modern technology, and using Linux in VirtualBox provides you with all the best features Linux has to offer. - -### 10\. Install it - -![Fedora Silverblue][31] - -When in doubt, there's always the traditional route. If you want to give Linux the attention it deserves, you can download Linux, burn the installer to a thumb drive (or a DVD, if you prefer optical media), and install it on your computer. Linux is open source, so it can be distributed by anyone who wants to take the time to bundle Linux—and all the bits and pieces that make it usable—into what is commonly called a _distribution_ (or "distro") for short. Ask any Linux user, and you're bound to get a different answer for which distribution is "best" (mostly because the term "best" is often left undefined). Most people admit that you should use the Linux distribution that works for you, meaning that you should test a few popular distros and settle on the one that makes your computer behave as you expect it to behave. This is a pragmatic and functional approach. For example, should a distribution fail to recognize your webcam and you want your webcam to work, then use a distribution that recognizes your webcam. - -If you've never installed an operating system before, you'll find most Linux distributions include a friendly and easy installer. Just download a distribution (they are delivered as ISO files), and download the [Fedora Media Writer][11] to create a bootable installation thumb drive. - -#### How to use it - -Installing Linux and using it as an operating system is a step toward becoming familiar and familial with it. There's no wrong way to use it. You might discover must-have features you never knew you needed, you might learn more about computers than you ever imagined you could, and you may shift in your worldview. Or you might use a Linux desktop because it was easy to download and install, or because you want to cut out the middleman of some corporate overlord, or because it helps you get your work done. - -Whatever your reason, just give Linux a try with any (or all) of these options. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/ways-get-started-linux - -作者:[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/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png?itok=p7cWyQv9 (Penguins gathered together in the Artic) -[2]: https://opensource.com/article/19/6/what-linux-user -[3]: https://opensource.com/sites/default/files/uploads/freeshell.png (Free shell screenshot) -[4]: https://freeshell.de -[5]: https://blinkenshell.org/wiki/Start -[6]: https://sdf.org/ -[7]: https://devblogs.microsoft.com/commandline/wsl-2-is-now-available-in-windows-insiders/ -[8]: https://opensource.com/sites/default/files/uploads/porteus.jpg (Porteus Linux) -[9]: https://opensource.com/article/19/6/tiny-linux-distros-you-have-try -[10]: http://porteus.org -[11]: https://getfedora.org/en/workstation/download/ -[12]: https://opensource.com/sites/default/files/uploads/linux_tour.jpg (Linux tour screenshot) -[13]: http://tour.ubuntu.com/en/# -[14]: https://opensource.com/sites/default/files/uploads/jslinux.jpg (JSLinux) -[15]: https://www.qemu.org -[16]: https://bellard.org/jslinux/ -[17]: https://opensource.com/article/19/1/tech-books-new-skils -[18]: http://www.lulu.com/shop/hazel-russman/the-charm-of-linux/paperback/product-21229401.html -[19]: https://opensource.com/sites/default/files/uploads/raspberry-pi-4-case.jpg (Raspberry Pi 4) -[20]: https://opensource.com/resources/raspberry-pi -[21]: https://www.raspberrypi.org/ -[22]: https://opensource.com/article/19/3/raspberry-pi-projects -[23]: https://opensource.com/article/19/3/piflash -[24]: https://opensource.com/article/19/3/gamepad-raspberry-pi -[25]: https://opensource.com/life/16/3/make-music-raspberry-pi-milkytracker -[26]: https://opensource.com/resources/cloud -[27]: https://opensource.com/article/19/6/how-ssh-running-container -[28]: https://linuxcontainers.org/lxd/try-it/ -[29]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[30]: https://virtualbox.org -[31]: https://opensource.com/sites/default/files/uploads/fedora-silverblue.png (Fedora Silverblue) diff --git a/sources/tech/20190708 Command line quick tips- Permissions.md b/sources/tech/20190708 Command line quick tips- Permissions.md deleted file mode 100644 index 2ebd6a9c69..0000000000 --- a/sources/tech/20190708 Command line quick tips- Permissions.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Command line quick tips: Permissions) -[#]: via: (https://fedoramagazine.org/command-line-quick-tips-permissions/) -[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) - -Command line quick tips: Permissions -====== - -![][1] - -Fedora, like all Linux based systems, comes with a powerful set of security features. One of the basic features is _permissions_ on files and folders. These permissions allow files and folders to be secured from unauthorized access. This article explains a bit about these permissions, and shows you how to share access to a folder using them. - -### Permission basics - -Fedora is by nature a multi-user operating system. It also has _groups_, which users can be members of. But imagine for a moment a multi-user system with no concept of permissions. Different logged in users could read each other’s content at will. This isn’t very good for privacy or security, as you can imagine. - -Any file or folder on Fedora has three sets of permissions assigned. The first set is for the _user_ who owns the file or folder. The second is for the _group_ that owns it. The third set is for everyone else who’s not the user who owns the file, or in the group that owns the file. Sometimes this is called the _world_. - -### What permissions mean - -Each set of permissions comes in three flavors — _read_, _write_, and _execute_. Each of these has an initial that stands for the permission, thus _r_, _w_, and _x_. - -#### File permissions - -For _files_, here’s what these permissions mean: - - * Read (r): the file content can be read - - * Write (w): the file content can be changed - - * Execute (x): the file can be executed — this is used primarily for programs or scripts that are meant to be run directly - - * - - -You can see the three sets of these permissions when you do a long listing of any file. Try this with the _/etc/services_ file on your system: - -``` -$ ls -l /etc/services --rw-r--r--. 1 root root 692241 Apr 9 03:47 /etc/services -``` - -Notice the groups of permissions at the left side of the listing. These are provided in three sets, as mentioned above — for the user who owns the file, for the group that owns the file, and for everyone else. The user owner is _root_ and the group owner is the _root_ group. The user owner has read and write access to the file. Anyone in the group _root_ can only read the file. And finally, anyone else can also only read the file. (The dash at the far left shows this is a regular file.) - -By the way, you’ll commonly find this set of permissions on many (but not all) system configuration files. They are only meant to be changed by the system administrator, not regular users. Often regular users need to read the content as well. - -#### Folder (directory) permissions - -For folders, the permissions have slightly different meaning: - - * Read (r): the folder contents can be read (such as the _ls_ command) - * Write (w): the folder contents can be changed (files can be created or erased in this folder) - * Execute (x): the folder can be searched, although its contents cannot be read. (This may sound strange, but the explanation requires more complex details of file systems outside the scope of this article. So just roll with it for now.) - - - -Take a look at the _/etc/grub.d_ folder for example: - -``` -$ ls -ld /etc/grub.d -drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d -``` - -Note the _d_ at the far left. It shows this is a directory, or folder. The permissions show the user owner (_root_) can read, change, and _cd_ into this folder. However, no one else can do so — whether they’re a member of the _root_ group or not. Notice you can’t _cd_ into the folder, either: - -``` -$ cd /etc/grub.d -bash: cd: /etc/grub.d: Permission denied -``` - -Notice how your own home directory is setup: - -``` -$ ls -ld $HOME -drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul -``` - -Now, notice how no one, other than you as the owner, can access anything in this folder. This is intentional! You wouldn’t want others to be able to read your private content on a shared system. - -### Making a shared folder - -You can exploit this permissions capability to easily make a folder to share within a group. Imagine you have a group called _finance_ with several members who need to share documents. Because these are user documents, it’s a good idea to store them within the _/home_ folder hierarchy. - -To get started, [use][2] _[sudo][2]_ to make a folder for sharing, and set it to be owned by the _finance_ group: - -``` -$ sudo mkdir -p /home/shared/finance -$ sudo chgrp finance /home/shared/finance -``` - -By default the new folder has these permissions. Notice how it can be read or searched by anyone, even if they can’t create or erase files in it: - -``` -drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance -``` - -That doesn’t seem like a good idea for financial data. Next, use the _chmod_ command to change the mode (permissions) of the shared folder. Note the use of _g_ to change the owning group’s permissions, and _o_ to change other users’ permissions. Similarly, _u_ would change the user owner’s permissions: - -``` -$ sudo chmod g+w,o-rx /home/shared/finance -``` - -The resulting permissions look better. Now, anyone in the _finance_ group (or the user owner _root_) have total access to the folder and its contents: - -``` -drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance -``` - -If any other user tries to access the shared folder, they won’t be able to do so. Great! Now our finance group can put documents in a shared place. - -### Other notes - -There are additional ways to manipulate these permissions. For example, you may want any files in this folder to be set as owned by the group _finance_. This requires additional settings not covered in this article, but stay tuned to the Magazine for more on that topic soon. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/command-line-quick-tips-permissions/ - -作者:[Paul W. Frields][a] -选题:[lujun9972][b] -译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/pfrields/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg -[2]: https://fedoramagazine.org/howto-use-sudo/ diff --git a/sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md b/sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md deleted file mode 100644 index 9e06d447f8..0000000000 --- a/sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md +++ /dev/null @@ -1,63 +0,0 @@ -Viz 开始翻译 (¯﹃¯) - -[#]: collector: (lujun9972) -[#]: translator: (vizv) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Sysadmin vs SRE: What's the difference?) -[#]: via: (https://opensource.com/article/19/7/sysadmins-vs-sres) -[#]: author: (Vince Power https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish) - -Sysadmin vs SRE: What's the difference? -====== -Both sysadmins and site reliability engineers are valuable parts of any -organization. Here's a look at each role differs. -![People work on a computer server with devices][1] - -In the IT world, there has always been a pull between generalist and specialist. The stereotypical sysadmin falls in the generalist category 99 times out of 100. The [site reliability engineer (SRE)][2] role is specialized, however, and grew out of the needs of one of the first companies to know real scale: Google. Ultimately, these two roles have the same goal for the applications whose infrastructure they operate: providing a good experience for the applications’ consumers. Yet, these roles have drastically different starting points. - -### Sysadmins: Neutral good incarnate - -Sysadmins typically grow into their position by starting as entry-level desktop and network support, and then over time acquiring the broad set of skills most sysadmins have in common. By that point, these sysadmins know all of the systems and applications they are responsible for. They know the app on server one needs to be restarted every other Tuesday, or the service on server nine will crash on Wednesday with no errors. They have fine-tuned their monitoring so it ignores what doesn’t matter, even that error that happens on the third Sunday of the month, despite the fact that it’s marked as fatal. - -In short, sysadmins know how to feed and care for the servers that run the core of your business. These sysadmins have grown to use automation to handle routine tasks across all the servers they manage. They love templates, golden images, and standards, but are flexible enough to make a parameter change on just the one server that has an error, and then make a note regarding why that server is now uniquely configured. - -Sysadmins are great, but they have a couple of quirks. The first being that you just do not get root access without divine intervention, and that any changes they make which were not their idea have to be documented as required by the application they are working with’s vendor, and then will still be double-checked. - -The servers are their domain, and no one messes with their stuff. - -### SREs: Thanos would be proud - -As opposed to the path to becoming a sysadmin, SREs are as likely to come from a development background as a sysadmin background. The SRE position is closer to the lifecycle you find in an application development environment. - -As an organization grows and introduces [DevOps][3] concepts like [continuous integration][4] and [continuous delivery][5] (CI/CD), there will often be a skills gap on how to run those immutable applications across multiple environments while having them scale to meet the business’s needs. This is the world of an SRE. Yes, a sysadmin can learn the additional tools, but at scale, this easily becomes a full-time position to keep up. A specialist makes sense. - -SREs use concepts like [infrastructure-as-code][6] to produce templates, which are called to deploy the environment an application will run in, with the goal of every application and its environment being completely reproducible with the push of a button. So, app one on server one in system testing will have the exact same binaries that will be used on server fifteen in production, with the exception of environment-specific variables like passwords and database connection strings. - -An SRE will also completely destroy an environment and rebuild it based on a configuration change. There is no emotional attachment to any system. Each system is just a number and is tagged and lifecycled accordingly, even to the point that routine server patching is done by redeploying the entire application stack. - -### Conclusion - -In certain situations, especially when operating in large DevOps-based environments, the specialized skills an SRE provides regarding how to handle any level of scale definitely offer an advantage. And every time they get stuck, they will seek out the help of their friendly neighborhood sysadmin—or [(BOFH)][7] on a bad day—for those well-honed troubleshooting skills, and the breadth of experiences which sysadmins rely on to provide value to any organization they are a part of. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/sysadmins-vs-sres - -作者:[Vince Power][a] -选题:[lujun9972][b] -译者:[vizv](https://github.com/vizv) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) -[2]: https://en.wikipedia.org/wiki/Site_Reliability_Engineering -[3]: https://opensource.com/resources/devops -[4]: https://en.wikipedia.org/wiki/Continuous_integration -[5]: https://en.wikipedia.org/wiki/Continuous_delivery -[6]: https://en.wikipedia.org/wiki/Infrastructure_as_code -[7]: http://www.bofharchive.com/BOFH.html diff --git a/sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md b/sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md deleted file mode 100644 index 4d01d8f08c..0000000000 --- a/sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md +++ /dev/null @@ -1,189 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (32-bit life support: Cross-compiling with GCC) -[#]: via: (https://opensource.com/article/19/7/cross-compiling-gcc) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -32-bit life support: Cross-compiling with GCC -====== -Use GCC to cross-compile binaries for different architectures from a -single build machine. -![Wratchet set tools][1] - -If you're a developer creating binary packages, like an RPM, DEB, Flatpak, or Snap, you have to compile code for a variety of different target platforms. Typical targets include 32-bit and 64-bit x86 and ARM. You could do your builds on different physical or virtual machines, but that means maintaining several systems. Instead, you can use the GNU Compiler Collection ([GCC][2]) to cross-compile, producing binaries for several different architectures from a single build machine. - -Assume you have a simple dice-rolling game that you want to cross-compile. Something written in C is relatively easy on most systems, so to add complexity for the sake of realism, I wrote this example in C++, so the program depends on something not present in C (**iostream**, specifically). - - -``` -#include <iostream> -#include <cstdlib> - -using namespace std; - -void lose (int c); -void win (int c); -void draw (); - -int main() { -  int i; -    do { -      cout << "Pick a number between 1 and 20: \n"; -      cin >> i; -      int c = rand ( ) % 21; -      if (i > 20) lose (c); -      else if (i < c ) lose (c); -      else if (i > c ) win (c); -      else draw (); -      } -      while (1==1); -      } - -void lose (int c ) -  { -    cout << "You lose! Computer rolled " << c << "\n"; -  } - -void win (int c ) -  { -    cout << "You win!! Computer rolled " << c << "\n"; -   } - -void draw ( ) -   { -     cout << "What are the chances. You tied. Try again, I dare you! \n"; -   } -``` - -Compile it on your system using the **g++** command: - - -``` -`$ g++ dice.cpp -o dice` -``` - -Then run it to confirm that it works: - - -``` -$ ./dice -Pick a number between 1 and 20: -[...] -``` - -You can see what kind of binary you just produced with the **file** command: - - -``` -$ file ./dice -dice: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically -linked (uses shared libs), for GNU/Linux 5.1.15, not stripped -``` - -And just as important, what libraries it links to with **ldd**: - - -``` -$ ldd dice -linux-vdso.so.1 => (0x00007ffe0d1dc000) -libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -(0x00007fce8410e000) -libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 -(0x00007fce83d4f000) -libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 -(0x00007fce83a52000) -/lib64/ld-linux-x86-64.so.2 (0x00007fce84449000) -libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 -(0x00007fce8383c000) -``` - -You have confirmed two things from these tests: The binary you just ran is 64-bit, and it is linked to 64-bit libraries. - -That means that, in order to cross-compile for 32-bit, you must tell **g++** to: - - 1. Produce a 32-bit binary - 2. Link to 32-bit libraries instead of the default 64-bit libraries - - - -### Setting up your dev environment - -To compile to 32-bit, you need 32-bit libraries and headers installed on your system. If you run a pure 64-bit system, then you have no 32-bit libraries or headers and need to install a base set. At the very least, you need the C and C++ libraries (**glibc** and **libstdc++**) along with 32-bit version of GCC libraries (**libgcc**). The names of these packages may vary from distribution to distribution. On Slackware, a pure 64-bit distribution with 32-bit compatibility is available from the **multilib** packages provided by [Alien BOB][3]. On Fedora, CentOS, and RHEL: - - -``` -$ yum install libstdc++-*.i686 -$ yum install glibc-*.i686 -$ yum install libgcc.i686 -``` - -Regardless of the system you're using, you also must install any 32-bit libraries your project uses. For instance, if you include **yaml-cpp** in your project, then you must install the 32-bit version of **yaml-cpp** or, on many systems, the development package for **yaml-cpp** (for instance, **yaml-cpp-devel** on Fedora) before compiling it. - -Once that's taken care of, the compilation is fairly simple: - - -``` -`$ g++ -m32 dice.cpp -o dice32 -L /usr/lib -march=i686` -``` - -The **-m32** flag tells GCC to compile in 32-bit mode. The **-march=i686** option further defines what kind of optimizations to use (refer to **info gcc** for a list of options). The **-L** flag sets the path to the libraries you want GCC to link to. This is usually **/usr/lib** for 32-bit, although, depending on how your system is set up, it could be **/usr/lib32** or even **/opt/usr/lib** or any place you know you keep your 32-bit libraries. - -After the code compiles, see proof of your build: - - -``` -$ file ./dice32 -dice: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), -dynamically linked (uses shared libs) [...] -``` - -And, of course, **ldd ./dice32** points to your 32-bit libraries. - -### Different architectures - -Compiling 32-bit on 64-bit for the same processor family allows GCC to make many assumptions about how to compile the code. If you need to compile for an entirely different processor, you must install the appropriate cross-build GCC utilities. Which utility you install depends on what you are compiling. This process is a little more complex than compiling for the same CPU family. - -When you're cross-compiling for the same family, you can expect to find the same set of 32-bit libraries as 64-bit libraries, because your Linux distribution is maintaining both. When compiling for an entirely different architecture, you may have to hunt down libraries required by your code. The versions you need may not be in your distribution's repositories because your distribution may not provide packages for your target system, or it may not mirror all packages in a convenient location. If the code you're compiling is yours, then you probably have a good idea of what its dependencies are and possibly where to find them. If the code is something you have downloaded and need to compile, then you probably aren't as familiar with its requirements. In that case, investigate what the code requires to build correctly (they're usually listed in the README or INSTALL files, and certainly in the source code itself), then go gather the components. - -For example, if you need to compile C code for ARM, you must first install **gcc-arm-linux-gnu** (32-bit) or **gcc-aarch64-linux-gnu** (64-bit) on Fedora or RHEL, or **arm-linux-gnueabi-gcc** and **binutils-arm-linux-gnueabi** on Ubuntu. This provides the commands and libraries you need to build (at least) a simple C program. Additionally, you need whatever libraries your code uses. You can place header files in the usual location (**/usr/include** on most systems), or you can place them in a directory of your choice and point GCC to it with the **-I** option. - -When compiling, don't use the standard **gcc** or **g++** command. Instead, use the GCC utility you installed. For example: - - -``` -$ arm-linux-gnu-g++ dice.cpp \ -  -I/home/seth/src/crossbuild/arm/cpp \ -  -o armdice.bin -``` - -Verify what you've built: - - -``` -$ file armdice.bin -armdice.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV) [...] -``` - -### Libraries and deliverables - -This was a simple example of how to use cross-compiling. In real life, your source code may produce more than just a single binary. While you can manage this manually, there's probably no good reason to do that. In my next article, I'll demonstrate GNU Autotools, which does most of the work required to make your code portable. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/cross-compiling-gcc - -作者:[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/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools) -[2]: https://gcc.gnu.org/ -[3]: http://www.slackware.com/~alien/multilib/ diff --git a/sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md b/sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md deleted file mode 100644 index 9399d39595..0000000000 --- a/sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md +++ /dev/null @@ -1,269 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (0x996 is translating) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Test 200+ Linux And Unix Operating Systems Online For Free) -[#]: via: (https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -Test 200+ Linux And Unix Operating Systems Online For Free -====== - -![DistroTest - Test 200+ Linux And Unix Operating Systems Online For Free][1] - -A while ago we have covered about [**OSBoxes**][2], a website that offers a collection of free, ready-to-use Linux and Unix VMs. You can download and try them on your Linux system using VirtualBox or VMWare workstation. Today, I stumbled upon a similar service named **“DistroTest”**. Unlike OSBoxes, DistroTest allows you to try the live Linux and Unix operating systems for free. You can test 200+ Linux and Unix operating systems online without having to install them locally. Just visit the website, choose the Linux/Unix distro of your choice and fire it up! - -Two good Samaritans named **Klemann Andy** and **Forster Tobias** have hosted this web service on **Debian** using **Qemu**. There is no restrictions to use the public distros listed here. You can use all functions of the system as the way you do in your local system. You can install and uninstall software. You can test installed programs and -even delete or format the hard disk or system files. In a nutshell, DistoTest lets the distro hoppers to decide; - - * Which distribution is the best for them, - * Which graphical interface they want, - * Which configuration options they have. - - - -As of writing this guide, DistroTest is hosting **711 versions with 227 operating systems**. I have been using Linux for years, however I never heard some of the Linux distros listed here. To be honest, I don’t even actually know this much of Linux operating systems exists. - -Here is the list of available Linux distributions in DistroTrest website. - - * 4mLinux - * AbsoluteLinux - * AlpineLinux - * Antergos - * antiX Linux - * Aptosid - * ArchBang - * ArchLabs - * ArchLinux - * Archman - * ArchStrike - * ArtixLinux - * AryaLinux - * AvLinux - * BackBoxLinux - * BigLinux - * Bio-Linux - * BlackArch - * BlackLab - * BlackPantherOS - * blag - * BlankOn - * Bluestar - * Bodhi - * BunsenLabs - * Caine - * Calculate Linux Desktop - * CentOS 7 - * Chakra - * ChaletOS - * ClearOS - * Clonezilla - * ConnochaetOS - * Cucumber - * Damn Small Linux - * Debian - * Devil-Linux - * Devuan - * DragonFly BSD - * Dragora - * Dyne:bolic - * Edubuntu - * elementaryOS - * Elive Linux - * Emmabuntüs - * Emmabuntüs - * Endless OS - * EnsoOS - * Exe GNU/Linux - * ExTiX - * Fatdog64 - * Fedora - * FerenOS - * FreeBSD - * FreeDOS - * Frugalware - * Frugalware - * G4L - * GeckoLinux - * Gentoo - * GNewSense - * GoboLinux - * Gparted - * GreenieLinux - * GRML - * GuixSD - * Haiku - * Heads - * Kali Linux - * Kanotix - * KaOS - * Knoppix - * Kodachi - * KolibriOS - * Korora - * Kwort - * Linux Lite - * Linux Mint - * LiveRaizo - * LMDE - * LXLE OS - * Macpup - * Mageia - * MakuluLinux - * Manjaro - * MauiLinux - * MenuetOS - * MiniNo - * Modicia - * Musix - * MX Linux - * Nas4Free - * Neptune - * NetBSD - * Netrunner - * NixOs - * NuTyX - * OpenIndiana - * OpenMandriva - * openSUSE - * OracleLinux - * OSGeo live - * OviOS - * Parabola - * Pardus - * Parrot - * Parsix - * PCLinuxOS - * PeachOSI - * Peppermint - * Pinguy - * PinguyOS - * plopLinux - * PointLinux - * Pop!_OS - * PORTEUS - * Puppy Linux - * PureOS - * Q4OS - * QubesOS - * Quirky - * ReactOS - * Redcore - * Rescatux - * RevengeOS - * RoboLinux - * Rockstor - * ROSA - * Runtu - * Sabayon - * SalentOS - * Salix - * ScientificLinux - * Siduction - * Slax - * SliTaz - * Solus - * SolydK - * SparkyLinux - * Springdale - * Stresslinux - * SubgraphOS - * SwagArch (18.03) - * Tails - * Tanglu - * Tiny Core - * Trisquel - * TrueOS - * TurnKey Linux - * Ubuntu and its official variants - * Uruk - * VectorLinux - * VineLinux - * VoidLinux - * Voyager - * VyOS - * WattOs - * Zentyal - * Zenwalk - * Zevenet - * Zorin OS - - - -### How does it work? - -To test any operating systems, head over to the following link: - -![1][3] - -In this website, you will see the list of available OSes. Click on the name of the distribution you want to explore. - -![1][4] - -Test 100+ Linux and Unix operating systems Using DistroTest - -For the purpose of this guide, I am going to test Arch Linux. - -Once you clicked on the distribution’s link, you will be then redirected to the next screen where you can start the OS by clicking on **System start** button. - -![1][5] - -Now, the live system will start in a new browser window and you can access it from the built-in **noVNC viewer**. Please enable/allow the pop-ups in your web browser for this site, otherwise you can’t see the noVNC application. - -Hit ENTER to boot into the live system. - -![1][6] - -Here is the Arch Linux live system: - -![1][7] - -You can **use this system for an hour** for free. You can now test the live OS, install applications, remove applications, delete or modify system files, and test a configuration or script. After every shutdown, everything is back to the default settings. - -Once you’re done, go back to the DistroTest page and stop your test system. If you don’t want to enable the pop-ups in DistroTest page, just use any locally installed VNC client applications in your system. The VNC client login details are given in the same page itself. - -![1][8] - -DistroTest service can be useful for those who wants to test a Linux/Unix operating system online or for those who don’t have the live ISO of the preferred OS. It works just fine as far as I tested in 4G Internet connection. - -### Actually, I can’t install new software in the VMs - -**One problem** I noticed while testing is the VMs are not connected to the network. There is no network interface available, except the loopback interface. I couldn’t figure it out how to download and install new software without connecting to Internet or local mirror. I don’t know why/how they claim we can install software. May be I am missing something here. All I can do at DistroTest is **take a look at the existing systems, test them live and without any installation**. - -* * * - -**Suggested read:** - - * [**Learn And Practice Linux Commands Online For FREE!**][9] - * [**Run Linux And Other Operating Systems In Your Browser**][10] - - - -* * * - -And, that’s all for now. I don’t know how the DistroTest team managed to host this much of operating systems. I am sure it would have taken a lot of time. It is really a commendable work. I really appreciate the self-less act of the project members. Kudos to you guys. More power to you! - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2018/07/test-Linux-and-Unix-online-686x340.jpg -[2]: https://www.ostechnix.com/osboxes-free-unixlinux-virtual-machines-for-vmware-and-virtualbox/ -[3]: https://distrotest.net/ -[4]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-5.png -[5]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-1.png -[6]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-2.png -[7]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-3.png -[8]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-4-1.png -[9]: https://www.ostechnix.com/learn-and-practice-linux-commands-online-for-free/ -[10]: https://www.ostechnix.com/run-linux-operating-systems-browser/ diff --git a/sources/tech/20190711 How to install Elasticsearch on MacOS.md b/sources/tech/20190711 How to install Elasticsearch on MacOS.md deleted file mode 100644 index 052e174832..0000000000 --- a/sources/tech/20190711 How to install Elasticsearch on MacOS.md +++ /dev/null @@ -1,154 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to install Elasticsearch on MacOS) -[#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins) - -How to install Elasticsearch on MacOS -====== -Installing Elasticsearch is complex! Here's how to do it on a Mac. -![magnifying glass on computer screen][1] - -[Elasticsearch][2] is an open source, full-text search engine developed in Java. Users upload datasets as JSON files. Then, Elasticsearch stores the original document before adding a searchable reference to the document in the cluster’s index. - -Less than nine years after its creation, Elasticsearch is the most popular enterprise search engine. Elastic released its latest update—version 7.2.0 —on June 25, 2019. - -[Kibana][3] is an open source data visualizer for Elasticsearch. This tool helps users create visualizations on top of content indexed in an Elasticsearch cluster. - -[Sunbursts][4], [geospatial data maps][5], [relationship analyses][6], and dashboards with live data are just a few options. And thanks to Elasticsearch’s machine learning prowess, you can learn which properties might influence your data (like servers or IP addresses) and find abnormal patterns. - -At [DevFest DC][7] last month, [Dr. Summer Rankin][8]—lead data scientist at Booz Allen Hamilton—uploaded a dataset of content from TED Talks to Elasticsearch, then used Kibana to quickly build a dashboard. Intrigued, I went to an Elasticsearch meetup days later. - -Since this course was for newbies, we started at Square One: Installing Elastic and Kibana on our laptops. Without both packages installed, we couldn’t create our own visualizations from the dataset of Shakespeare texts we were using as a dummy JSON file. - -Next, I will share step-by-step instructions for downloading, installing, and running Elasticsearch Version 7.1.1 on MacOS. This was the latest version when I attended the Elasticsearch meetup in mid-June 2019. - -### Downloading Elasticsearch for MacOS - - 1. Go to , which takes you to the webpage below: - - - -![The Elasticsearch download page.][9] - - 2. In the **Downloads** section, click **MacOS**, which downloads the Elasticsearch TAR file (for example, **elasticsearch-7.1.1-darwin-x86_64.tar**) into your **Downloads** folder. - 3. Double-click this file to unpack it into its own folder (for example, **elasticsearch-7.1.1**), which contains all of the files that were in the TAR. - - - -**Tip**: If you want Elasticsearch to live in another folder, now is the time to move this folder. - -### Running Elasticsearch from the MacOS command line - -You can run Elasticsearch only using the command line if you prefer. Just follow this process: - - 1. [Open a **Terminal** window][10]. - 2. In the terminal window, enter your Elasticsearch folder. For example (if you moved the program, change **Downloads** to the correct path): - - - -**$ cd ~Downloads/elasticsearch-1.1.0** - - 3. Change to the Elasticsearch **bin** subfolder, and start the program. For example: - - - -**$ cd bin $ ./elasticsearch** - -Here’s some of the output that my command line terminal displayed when I launched Elasticsearch 1.1.0: - -![Terminal output when running Elasticsearch.][11] - -**NOTE**: Elasticsearch runs in the foreground by default, which can cause your computer to slow down. Press **Ctrl-C to** stop Elasticsearch from running. - -### Running Elasticsearch using the GUI - -If you prefer your point-and-click environment, you can run Elasticsearch like so: - - 1. Open a new **Finder** window. - 2. Select **Downloads** in the left Finder sidebar (or, if you moved Elasticsearch to another folder, navigate to there). - 3. Open the folder called (for the sake of this example) **elasticsearch-7.1.1**. A selection of eight subfolders appears. - - - -![The elasticsearch/bin menu.][12] - - 4. Open the **bin** subfolder. As the screenshot above shows, this subfolder yields 20 assets. - 5. Click the first option, which is **elasticsearch**. - - - -Note that you may get a security warning, as shown below: - -![The security warning dialog box.][13] - -  - -In order to open the program in this case: - - 1. Click **OK** in the warning dialog box. - 2. Open **System Preferences**. - 3. Click **Security & Privacy**, which opens the window shown below: - - - -![Where you can allow your computer to open the downloaded file.][14] - - 4. Click **Open Anyway**, which opens the confirmation dialog box shown below: - - - -![Security confirmation dialog box.][15] - - 5. Click **Open**. A terminal window opens and launches Elasticsearch. - - - -The launch process can take a while, so let it run. Eventually, it will finish, and you will see output similar to this at the end: - -![Launching Elasticsearch in MacOS.][16] - -### Learning more - -Once you’ve installed Elasticsearch, it’s time to start exploring! - -The tool’s [Elasticsearch: Getting Started][17] guide directs you based on your goals. Its introductory video walks through steps to launch a hosted cluster on [Elasticsearch Service][18], perform basic search queries, play with data through create, read, update, and delete (CRUD) REST APIs, and more. - -This guide also offers links to documentation, dev console commands, training subscriptions, and a free trial of Elasticsearch Service. This trial lets you deploy Elastic and Kibana on AWS and GCP to support your Elastic clusters in the cloud. - -In the follow-up to this article, we’ll walk through the steps you’ll take to install Kibana on MacOS. This process will take your Elasticsearch queries to the next level via diverse data visualizations. Stay tuned! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/installing-elasticsearch-macos - -作者:[Lauren Maffeo][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/lmaffeo/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) -[2]: https://www.getapp.com/it-management-software/a/qbox-dot-io-hosted-elasticsearch/ -[3]: https://www.elastic.co/products/kibana -[4]: https://en.wikipedia.org/wiki/Pie_chart#Ring -[5]: https://en.wikipedia.org/wiki/Spatial_analysis -[6]: https://en.wikipedia.org/wiki/Correlation_and_dependence -[7]: https://www.devfestdc.org/ -[8]: https://www.summerrankin.com/about -[9]: https://opensource.com/sites/default/files/uploads/wwa1f3_600px_0.png (The Elasticsearch download page.) -[10]: https://support.apple.com/en-ca/guide/terminal/welcome/mac -[11]: https://opensource.com/sites/default/files/uploads/io6t1a_600px.png (Terminal output when running Elasticsearch.) -[12]: https://opensource.com/sites/default/files/uploads/o43yku_600px.png (The elasticsearch/bin menu.) -[13]: https://opensource.com/sites/default/files/uploads/elasticsearch_security_warning_500px.jpg (The security warning dialog box.) -[14]: https://opensource.com/sites/default/files/uploads/the_general_tab_of_the_system_preferences_security_and_privacy_window.jpg (Where you can allow your computer to open the downloaded file.) -[15]: https://opensource.com/sites/default/files/uploads/confirmation_dialog_box.jpg (Security confirmation dialog box.) -[16]: https://opensource.com/sites/default/files/uploads/y5dvtu_600px.png (Launching Elasticsearch in MacOS.) -[17]: https://www.elastic.co/webinars/getting-started-elasticsearch?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch&gclid=EAIaIQobChMImdbvlqOP4wIVjI-zCh3P_Q9mEAAYASABEgJuAvD_BwE -[18]: https://info.elastic.co/elasticsearch-service-gaw-v10-nav.html?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch%20service&gclid=EAIaIQobChMI_MXHt-SZ4wIVJBh9Ch3wsQfPEAAYASAAEgJo9fD_BwE diff --git a/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md deleted file mode 100644 index 0c06ba2489..0000000000 --- a/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) -[#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -Type Linux Commands In Capital Letters To Run Them As Sudo User -====== - -![Type Linux Commands In Capital Letters To Run Them As Sudo User][1] - -The reason I love Linux community a lot is they create so many FUN projects which you rarely find in any other propriety operating systems. A while ago, we looked at a fun project named [**“Hollywood”**][2] which turns the Terminal into a Hollywood technical melodrama hacker interface in Ubuntu-like systems. There are few other utilities available, for example **cowsay** , **fortune** , **sl** and **toilet** (!) etc., to kill your free time and keep you entertained! They may not be useful, but these utilities are really entertaining and fun to use. Today, I stumbled upon yet another similar utility named **“SUDO”**. As the name implies, whenever you type Linux commands in capital letters, the SUDO utility will run them as sudo user! Meaning, you need not to type “sudo” in-front of the Linux commands you about to run. Cool, yeah? - -### Install SUDO - -* * * - -**A word of caution:** - -Before installing this (or any utility), take a look at the source code (Link given at the end) and see if there are suspicious/malicious code included to harm your system. Test it in a VM. If you like or found it useful, you can use it in your personal/production systems. - -* * * - -Git clone the SUDO repository: - -``` -$ git clone https://github.com/jthistle/SUDO.git -``` - -This command will clone the contents of SUDO GIT repository and saves them in a directory named “SUDO” in your current working directory. - -``` -Cloning into 'SUDO'... -remote: Enumerating objects: 42, done. -remote: Counting objects: 100% (42/42), done. -remote: Compressing objects: 100% (29/29), done. -remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 -Unpacking objects: 100% (42/42), done. -``` - -Switch to SUDO directory: - -``` -$ cd SUDO/ -``` - -And, install it using command: - -``` -$ ./install.sh -``` - -The command will add the following entries in your **~/.bashrc** file: - -``` -[...] -# SUDO - shout at bash to su commands -# Distributed under GNU GPLv2, @jthistle on github - -shopt -s expand_aliases - -IFS_=${IFS} -IFS=":" read -ra PATHS <<< "$PATH" - -for i in "${PATHS[@]}"; do - for j in $( ls "$i" ); do - if [ ${j^^} != $j ] && [ $j != "sudo" ]; then - alias ${j^^}="sudo $j" - fi - done -done - -alias SUDO='sudo $(history -p !!)' - -IFS=${IFS_} - -# end SUDO -``` - -It will also take a backup of your **~/.bashrc** and save it as **~/.bashrc.old**. You can restore it if anything goes catastrophically wrong. - -Finally, update the changes using command: - -``` -$ source ~/.bashrc -``` - -### Now, type Linux Commands in Capital letters to run them as Sudo user - -Usually, we execute Linux commands that requires sudo/root privileges like below. - -``` -$ sudo mkdir /ostechnix -``` - -Right? Yes! The above command will create directory named “ostechnix” in root (/). Let us cancel this command using **Ctrl+c**. - -Once SUDO is installed, you can **type any Linux command in capital without sudo** and run them. So, you can run the above command like below: - -``` -$ MKDIR /ostechnix - -$ TOUCH /ostechnix/test.txt - -$ LS /ostechnix -``` - -![][3] - -Type Linux Commands In Capital Letters To Run Them As Sudo User - -Please note that **it will not bypass the sudo password**. You still need to type sudo password to execute the given command. It will only help to avoid typing “sudo” in-front of each command. - -* * * - -**Related read:** - - * [**How To Run Particular Commands Without Sudo Password In Linux**][4] - * [**How To Restore Sudo Privileges To A User**][5] - * [**How To Grant And Remove Sudo Privileges To Users On Ubuntu**][6] - * [**How To Find All Sudo Users In Your Linux System**][7] - * [**How To Display Asterisks When You Type Password In Terminal**][8] - * [**How To Change The Sudo Prompt In Linux**][9] - - - -* * * - -Of course, typing “sudo” will take only a few seconds, so it is not a big deal. I must tell this is just fun and USELESS project to pass time. If you don’t like it, go away and learn something useful. If you like it, give it a go and have fun! - -**Resource:** - - * [**SUDO GitHub Repository**][10] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/sudo-720x340.png -[2]: https://www.ostechnix.com/turn-ubuntu-terminal-hollywood-technical-melodrama-hacker-interface/ -[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/SUDO-in-action.gif -[4]: https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/ -[5]: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/ -[6]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/ -[7]: https://www.ostechnix.com/find-sudo-users-linux-system/ -[8]: https://www.ostechnix.com/display-asterisks-type-password-terminal/ -[9]: https://www.ostechnix.com/change-sudo-prompt-linux-unix/ -[10]: https://github.com/jthistle/SUDO diff --git a/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md deleted file mode 100644 index 07ddecc927..0000000000 --- a/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) -[#]: via: (https://itsfoss.com/electronmail/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -ElectronMail – a Desktop Client for ProtonMail and Tutanota -====== - -The majority of people on the internet have email accounts from big companies, such as Google, that do not respect your privacy. Thankfully, there are privacy conscience alternatives like [Tutanota][1] and [ProtonMail][2]. The problems is that not all of them have a desktop client. Today, we will look at a project that seeks to solve that problem for you. Let’s take a look at ElectronMail. - -‘Electron’-ic warning! - -The following app is built with Electron (the name is ElectronMail for a reason). If the use of Electron upsets you, please consider this a trigger warning. - -### ElectronMail: Desktop Client for Tutanota and ProtonMail - -![Electron Mail About][3] - -[ElectronMail][4] is simply put an email client for ProtonMail and Tutanota. It is built using three big technologies: [Electron][5], [TypeScript][6] and [Angular][7]. It includes the following features: - - * Multi accounts support per each email provider - * Encrypted local storage - * Available for Linux, Windows, macOS, and FreeBSD - * Native notifications - * System tray icon with a total number of unread messages - * Master password to protect account information - * Switchable view layouts - * Offline access to the emails - * Encrypted local storage for emails - * Batch emails export to EML files - * Full-text search - * Built-in/prepackaged web clients - * Configuring proxy per account - * Spell Checking - * Support for two-factor authentication for extra security - - - -Currently, ElectronMail only supports Tutanota and ProtonMail. I get the feeling that they will be adding more in the future. According to the [GitHub page][4]: “Multi email providers support. ProtonMail and Tutanota at the moment.” - -ElectronMail is licensed under the MIT license. - -#### How to install ElectronMail - -Currently, there are several options to install ElectronMail on Linux. for Arch and Arch-based distros, you can install it from the [Arch User Repository][8]. There is also a Snap available for ElectrionMail. To install it, just enter `sudo snap install electron-mail`. - -For all other Linux distros, you can [download][9] a `.deb` or `.rpm` file. - -![Electron Mail Inbox][10] - -You can also [download][9] an `.exe` installer for Windows or a `.dmg` file for macOS. There is even a file for FreeBSD. - -[][11] - -Suggested read  Zettlr - Markdown Editor for Writers and Researchers - -#### Removing ElectronMail - -If you install ElectronMail and decide that it is not for you, there are a couple steps that the [developer][12] recommends. **Be sure to follow these steps before you uninstall the application.** - -If you are using the “Keep Me Signed In” feature, click “Log out” on the menu. This will delete the locally stored master password. It is possible to delete the master password after uninstalling ElectronMail, but that would involve editing the system keychain. - -You will also need to delete the settings folder manually. You can find it by clicking “Open setting folder” after selecting the application’s icon in the system tray. - -![Electron Mail Setting][13] - -### My Thoughts on ElectronMail - -I don’t usually use email clients. In fact, I mostly depend on web clients. So, I don’t have much use for this application. - -That being said, ElectronMail has a nice feel to it and is easy to set up. It has a good number of features activated out of the box and the advanced features aren’t that hard to activate. - -The one question I have relates to search. According to the features list, ElectronMail supports full-text search. However, the free version of Tutanota only supports a limited search. I wonder how ElectronMail handles that. - -At the end of the day, ElectronMail is just an Electron wrapper for a couple of web-based emails. I would rather just have them open in my browser than dedicate separate system resources to running Electron. If you only [use Tutanota email, they have their own official Electron-based desktop client][14]. You may try that. - -My biggest issue is with security. This is an unofficial app for two very secure email apps. What if there is a way to capture your login info or read through your emails? Someone who is smarter than I would have to go through the source code to know for sure. That is always the issue with unofficial apps for a security project. - -[][14] - -Suggested read  Secure Email Service Tutanota Has a Desktop App Now - -Have you every used ElectronMail? Do you think it would be worthwhile to install ElectronMail? What is your favorite email client? Please let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][15]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/electronmail/ - -作者:[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://itsfoss.com/tutanota-review/ -[2]: https://itsfoss.com/protonmail/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-about.jpg?resize=800%2C500&ssl=1 -[4]: https://github.com/vladimiry/ElectronMail -[5]: https://electronjs.org/ -[6]: http://www.typescriptlang.org/ -[7]: https://angular.io/ -[8]: https://aur.archlinux.org/packages/electronmail-bin -[9]: https://github.com/vladimiry/ElectronMail/releases -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1 -[11]: https://itsfoss.com/zettlr-markdown-editor/ -[12]: https://github.com/vladimiry -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-setting.jpg?ssl=1 -[14]: https://itsfoss.com/tutanota-desktop/ -[15]: http://reddit.com/r/linuxusersgroup diff --git a/sources/tech/20190715 Understanding software design patterns.md b/sources/tech/20190715 Understanding software design patterns.md deleted file mode 100644 index 347fe5011b..0000000000 --- a/sources/tech/20190715 Understanding software design patterns.md +++ /dev/null @@ -1,364 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Understanding software design patterns) -[#]: via: (https://opensource.com/article/19/7/understanding-software-design-patterns) -[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson) - -Understanding software design patterns -====== -Design patterns help eliminate redundant coding. Learn how to use the -singleton pattern, factory pattern, and observer pattern using Java. -![clouds in the sky with blue pattern][1] - -If you are a programmer or a student pursuing computer science or a similar discipline, sooner or later, you will encounter the term "software design pattern." According to Wikipedia, _"a [software design pattern][2] is a general, reusable solution to a commonly occurring problem within a given context in software design."_ Here is my take on the definition: When you have been working on a coding project for a while, you often begin to think, "Huh, this seems redundant. I wonder if I can change the code to be more flexible and accepting of changes?" So, you begin to think about how to separate what stays the same from what needs to change often. - -> A **design pattern** is a way to make your code easier to change by separating the part that stays the same and the part that needs constant changes. - -Not surprisingly, everyone who has worked on a programming project has probably had the same thought. Especially for any industry-level project, where it's common to work with dozens or even hundreds of developers; the collaboration process suggests that there have to be some standards and rules to make the code more elegant and adaptable to changes. That is why we have [object-oriented programming][3] (OOP) and [software framework tools][4]. A design pattern is somewhat similar to OOP, but it goes further by considering changes as part of the natural development process. Basically, the design pattern leverages some ideas from OOP, like abstractions and interfaces, but focuses on the process of changes. - -When you start to work on a project, you often hear the term _refactoring_, which means _to change the code to be more elegant and reusable;_ this is where the design pattern shines. Whenever you're working on existing code (whether built by someone else or your past self), knowing the design patterns helps you begin to see things differently—you will discover problems and ways to improve the code. - -There are numerous design patterns, but three popular ones, which I'll present in this introductory article, are singleton pattern, factory pattern, and observer pattern. - -### How to follow this guide - -I want this tutorial to be as easy as possible for anyone to understand, whether you are an experienced programmer or a beginner to coding. The design pattern concept is not exactly easy to understand, and reducing the learning curve when you start a journey is always a top priority. Therefore, in addition to this article with diagrams and code pieces, I've also created a [GitHub repository][5] you can clone and run the code to implement the three design patterns on your own. You can also follow along with the following [YouTube video][6] I created. - -#### Prerequisites - -If you just want to get the idea of design patterns in general, you do not need to clone the sample project or install any of the tools. However, to run the sample code, you need to have the following installed: - - * **Java Development Kit (JDK):** I highly recommend [OpenJDK][7]. - * **Apache Maven:** The sample project is built using [Apache Maven][8]; fortunately, many IDEs come with Maven installed. - * **Interactive development editor (IDE):** I use [IntelliJ Community Edition][9], but you can use [Eclipse IDE][10] or any other Java IDE of your choice - * **Git:** If you want to clone the project, you need a [Git][11] client. - - - -To clone the project and follow along, run the following command after you install Git: - - -``` -`git clone https://github.com/bryantson/OpensourceDotComDemos.git` -``` - -Then, in your favorite IDE, you can import the code in the TopDesignPatterns repo as an Apache Maven project. - -I am using Java, but you can implement the design pattern using any programming language that supports the [abstraction principle][12]. - -### Singleton pattern: Avoid creating an object every single time - -The [singleton pattern][13] is a very popular design pattern that is also relatively simple to implement because you need just one class. However, many developers debate whether the singleton design pattern's benefits outpace its problems because it lacks clear benefits and is easy to abuse. Few developers implement singleton directly; instead, programming frameworks like Spring Framework and Google Guice have built-in singleton design pattern features. - -But knowing about singleton is still tremendously useful. The singleton pattern makes sure that a class is created only once and provides a global point of access to it. - -> **Singleton pattern:** Ensures that only one instantation is created and avoids creating multiple instances of the same object. - -The diagram below shows the typical process for creating a class object. When the client asks to create an object, the constructor creates, or instantiates, an object and returns to the class with the caller method. However, this happens every single time an object is requested—the constructor is called, a new object is created, and it returns with a unique object. I guess the creators of the OOP language had a reason behind creating a new object every single time, but the proponents of the singleton process say this is redundant and a waste of resources. - -![Normal class instantiation][14] - -The following diagram creates the object using the singleton pattern. Here, the constructor is called only when the object is requested the first time through a designated getInstance() method. This is usually done by checking the null value, and the object is saved inside the singleton class as a private field value. The next time the getInstance() is called, the class returns the object that was created the first time. No new object is created; it just returns the old one. - -![Singleton pattern instantiation][15] - -The following script shows the simplest possible way to create the singleton pattern: - - -``` -package org.opensource.demo.singleton; - -public class OpensourceSingleton { - -    private static OpensourceSingleton uniqueInstance; - -    private OpensourceSingleton() { -    } - -    public static OpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            uniqueInstance = new OpensourceSingleton(); -        } -        return uniqueInstance; -    } - -} -``` - -On the caller side, here is how the singleton class will be called to get an object: - - -``` -Opensource newObject = Opensource.getInstance(); -``` - -This code demonstrates the idea of a singleton well: - - 1. When getInstance() is called, it checks whether the object was already created by checking the null value. - 2. If the value is null, it creates a new object, saves it into the private field, and returns the object to the caller. Otherwise, it returns the object that was created previously. - - - -The main problem with this singleton implementation is its disregard for parallel processes. When multiple processes using threads access the resource simultaneously, a problem occurs. There is one solution to this, and it is called _double-checked locking_ for multithread safety, which is shown here: - - -``` -package org.opensource.demo.singleton; - -public class ImprovedOpensourceSingleton { - -    private volatile static ImprovedOpensourceSingleton uniqueInstance; - -    private ImprovedOpensourceSingleton() {} - -    public static ImprovedOpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            synchronized (ImprovedOpensourceSingleton.class) { -                if (uniqueInstance == null) { -                    uniqueInstance = new ImprovedOpensourceSingleton(); -                } -            } -        } -        return uniqueInstance; -    } - -} -``` - -Just to emphasize the previous point, make sure to implement your singleton directly only when you believe is a safe option to do so. The best way is to leverage the singleton feature is by using a well-made programming framework. - -### Factory pattern: Delegate object creation to the factory class to hide creation logic - -The [factory pattern][16] is another well-known design pattern, but it is a little more complex. There are several ways to implement the factory pattern, but the following sample code demonstrates the simplest possible way. The factory pattern defines an interface for creating an object but lets the subclasses decide which class to instantiate. - -> **Factory pattern:** Delegates object creation to the factory class so it hides the creation logic. - -The diagram below shows how the simplest factory pattern is implemented. - -![Factory pattern][17] - -Instead of the client directly calling the object creation, the client asks the factory class for a certain object, type x. Based on the type, the factory pattern decides which object to create and to return. - -In this code sample, OpensourceFactory is the factory class implementation that takes the _type_ from the caller and decides which object to create based on that input value: - - -``` -package org.opensource.demo.factory; - -public class OpensourceFactory { - -    public OpensourceJVMServers getServerByVendor([String][18] name) { -        if(name.equals("Apache")) { -            return new Tomcat(); -        } -        else if(name.equals("Eclipse")) { -            return new Jetty(); -        } -        else if (name.equals("RedHat")) { -            return new WildFly(); -        } -        else { -            return null; -        } -    } -} -``` - -And OpenSourceJVMServer is a 100% abstraction class (or an interface class) that indicates what to implement, not how: - - -``` -package org.opensource.demo.factory; - -public interface OpensourceJVMServers { -    public void startServer(); -    public void stopServer(); -    public [String][18] getName(); -} -``` - -Here is a sample implementation class for OpensourceJVMServers. When "RedHat" is passed as the type to the factory class, the WildFly server is created: - - -``` -package org.opensource.demo.factory; - -public class WildFly implements OpensourceJVMServers { -    public void startServer() { -        [System][19].out.println("Starting WildFly Server..."); -    } - -    public void stopServer() { -        [System][19].out.println("Shutting Down WildFly Server..."); -    } - -    public [String][18] getName() { -        return "WildFly"; -    } -} -``` - -### Observer pattern: Subscribe to topics and get notified about updates - -Finally, there is the [observer pattern][20]_._ Like the singleton pattern, few professional programmers implement the observer pattern directly. However, many messaging queue and data service implementations borrow the observer pattern concept. The observer pattern defines one-to-many dependencies between objects so that when one object changes state, all of its dependents are notified and updated automatically. - -> **Observer pattern:** Subscribe to the topics/subjects where the client can be notified if there is an update. - -The easiest way to think about the observer pattern is to imagine a mailing list where you can subscribe to any topic, whether it is open source, technologies, celebrities, cooking, or anything else that interests you. Each topic maintains a list of its subscribers, which is equivalent to an "observer" in the observer pattern. When a topic is updated, all of its subscribers (observers) are notified of the changes. And a subscriber can always unsubscribe from a topic. - -As the following diagram shows, the client can be subscribed to different topics and add the observer to be notified about new information. Because the observer listens continuously to the subject, the observer notifies the client about any change that occurs. - -![Observer pattern][21] - -Let's look at the sample code for the observer pattern, starting with the subject/topic class: - - -``` -package org.opensource.demo.observer; - -public interface Topic { - -    public void addObserver([Observer][22] observer); -    public void deleteObserver([Observer][22] observer); -    public void notifyObservers(); -} -``` - -This code describes an interface for different topics to implement the defined methods. Notice how an observer can be added, removed, or notified. - -Here is an example implementation of the topic: - - -``` -package org.opensource.demo.observer; - -import java.util.List; -import java.util.ArrayList; - -public class Conference implements Topic { -    private List<Observer> listObservers; -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; - -    public Conference() { -        listObservers = new ArrayList<Observer>(); -    } - -    public void addObserver([Observer][22] observer) { -        listObservers.add(observer); -    } - -    public void deleteObserver([Observer][22] observer) { -        int i = listObservers.indexOf(observer); -        if (i >= 0) { -            listObservers.remove(i); -        } -    } - -    public void notifyObservers() { -        for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { -            [Observer][22] observer = listObservers.get(i); -            observer.update(totalAttendees,totalSpeakers,nameEvent); -        } -    } - -    public void setConferenceDetails(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        notifyObservers(); -    } -} -``` - -This class defines the implementation of a particular topic. When a change happens, this implementation is where it is invoked. Notice that this takes the number of observers, which is stored as the list, and can both notify and maintain the observers. - -Here is an observer class: - - -``` -package org.opensource.demo.observer; - -public interface [Observer][22] { -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent); -} -``` - -This class defines an interface that different observers can implement to take certain actions. - -For example, the observer implementation can print out the number of attendees and speakers at a conference: - - -``` -package org.opensource.demo.observer; - -public class MonitorConferenceAttendees implements [Observer][22] { -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; -    private Topic topic; - -    public MonitorConferenceAttendees(Topic topic) { -        this.topic = topic; -        topic.addObserver(this); -    } - -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        printConferenceInfo(); -    } - -    public void printConferenceInfo() { -        [System][19].out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); -    } -} -``` - -### Where to go from here? - -Now that you've read this introductory guide to design patterns, you should be in a good place to pursue other design patterns, such as facade, template, and decorator. There are also concurrent and distributed system design patterns like the circuit breaker pattern and the actor pattern. - -However, I believe it's best to hone your skills first by implementing these design patterns in your side projects or just as practice. You can even begin to contemplate how you can apply these design patterns in your real projects. Next, I highly recommend checking out the [SOLID principles][23] of OOP. After that, you will be ready to look into the other design patterns. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/understanding-software-design-patterns - -作者:[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/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) -[2]: https://en.wikipedia.org/wiki/Software_design_pattern -[3]: https://en.wikipedia.org/wiki/Object-oriented_programming -[4]: https://en.wikipedia.org/wiki/Software_framework -[5]: https://github.com/bryantson/OpensourceDotComDemos/tree/master/TopDesignPatterns -[6]: https://www.youtube.com/watch?v=VlBXYtLI7kE&feature=youtu.be -[7]: https://openjdk.java.net/ -[8]: https://maven.apache.org/ -[9]: https://www.jetbrains.com/idea/download/#section=mac -[10]: https://www.eclipse.org/ide/ -[11]: https://git-scm.com/ -[12]: https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming) -[13]: https://en.wikipedia.org/wiki/Singleton_pattern -[14]: https://opensource.com/sites/default/files/uploads/designpatterns1_normalclassinstantiation.jpg (Normal class instantiation) -[15]: https://opensource.com/sites/default/files/uploads/designpatterns2_singletonpattern.jpg (Singleton pattern instantiation) -[16]: https://en.wikipedia.org/wiki/Factory_method_pattern -[17]: https://opensource.com/sites/default/files/uploads/designpatterns3_factorypattern.jpg (Factory pattern) -[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[20]: https://en.wikipedia.org/wiki/Observer_pattern -[21]: https://opensource.com/sites/default/files/uploads/designpatterns4_observerpattern.jpg (Observer pattern) -[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+observer -[23]: https://en.wikipedia.org/wiki/SOLID diff --git a/sources/tech/20190715 What is POSIX- Richard Stallman explains.md b/sources/tech/20190715 What is POSIX- Richard Stallman explains.md index c80b3ac266..b09db22275 100644 --- a/sources/tech/20190715 What is POSIX- Richard Stallman explains.md +++ b/sources/tech/20190715 What is POSIX- Richard Stallman explains.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (martin2011qi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20190716 Security scanning your DevOps pipeline.md b/sources/tech/20190716 Security scanning your DevOps pipeline.md new file mode 100644 index 0000000000..75017345d6 --- /dev/null +++ b/sources/tech/20190716 Security scanning your DevOps pipeline.md @@ -0,0 +1,488 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Security scanning your DevOps pipeline) +[#]: via: (https://opensource.com/article/19/7/security-scanning-your-devops-pipeline) +[#]: author: (Jessica Repka https://opensource.com/users/jrepkahttps://opensource.com/users/marcobravohttps://opensource.com/users/jrepka) + +Security scanning your DevOps pipeline +====== +A hands-on introduction to container security using Anchore with Jenkins +on Kubernetes. +![Target practice][1] + +Security is one of the most important considerations for running in any environment, and using open source software is a great way to handle security without going over budget in your corporate environment or for your home setup. It is easy to talk about the concepts of security, but it's another thing to understand the tools that will get you there. This tutorial explains how to set up security using [Jenkins][2] with [Anchore][3]. + +There are many ways to run [Kubernetes][4]. Using [Minikube][5], a prepackaged virtual machine (VM) environment designed for local testing, reduces the complexity of running an environment. + +Technology | What is it? +---|--- +[Jenkins][2] | An open source automation server +[Anchore][3] | A centralized service for inspection, analysis, and certification of container images +[Minikube][5] | A single-node Kubernetes cluster inside a VM + +In this tutorial, you'll learn how to add Jenkins and Anchore to Kubernetes and configure a scanning pipeline for new container images and registries. + +_Note: For best performance in this tutorial, Minikube requires at least four CPUs._ + +### Basic requirements + +#### Knowledge + + * Docker (including a [Docker Hub][6] account) + * Minikube + * Jenkins + * Helm + * Kubectl + + + +#### Software + + * Minikube + * Helm + * Kubectl client + * Anchore CLI installed locally + + + +### Set up the environment + +[Install Minikube][7] in whatever way that makes sense for your environment. If you have enough resources, I recommend giving a bit more than the default memory and CPU power to your VM: + + +``` +$ minikube config set memory 8192 +⚠️  These changes will take effect upon a minikube delete and then a minikube start +$ minikube config set cpus 4 +⚠️  These changes will take effect upon a minikube delete and then a minikube start +``` + +If you are already running a Minikube instance, you must delete it using **minikube delete** before continuing. + +Next, [install Helm][8], the standard Kubernetes package manager, in whatever way makes sense for your operating system. + +Now you're ready to install the applications. + +### Install and configure Anchore and Jenkins + +To begin, start Minikube and its dashboard. + + +``` +$ minikube start +😄  minikube v1.1.0 on darwin (amd64) +💡  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one. +🔄  Restarting existing virtualbox VM for "minikube" ... +⌛  Waiting for SSH access ... +🐳  Configuring environment for Kubernetes v1.14.2 on Docker 18.09.6 +🔄  Relaunching Kubernetes v1.14.2 using kubeadm ... +⌛  Verifying: apiserver proxy etcd scheduler controller dns +🏄  Done! kubectl is now configured to use "minikube" + +$ minikube dashboard +🔌  Enabling dashboard ... +🤔  Verifying dashboard health ... +🚀  Launching proxy ... +🤔  Verifying proxy health ... +🎉  Opening in your default browser... +``` + +As long as you stay connected to this terminal session, you will have access to a visual dashboard for Minikube at **127.0.0.1:52646**. + +![Minikube dashboard][9] + +  + +### Create namespace and install Jenkins + +The next step is to get the Jenkins build environment up and running. To start, ensure your storage is configured for persistence so you can reuse it later. Set the storage class for **Persistent Volumes** before you install Helm, so its installation will be persistent across reboots. + +Either exit the dashboard using CTRL+C or open a new terminal to run: + + +``` +$ minikube addons enable default-storageclass +✅  default-storageclass was successfully enabled +``` + +**Using namespaces** + +I test quite a few different applications, and I find it incredibly helpful to use [namespaces][10] in Kubernetes. Leaving everything in the default namespace can overcrowd it and make it challenging to uninstall a Helm-installed application. If you stick to this for Jenkins, you can remove it by running **helm del --purge jenkins --namespace jenkins** then **kubectl delete ns jenkins**. This is much easier than manually hunting and pecking through a long list of containers. + +### Install Helm + +To use Helm, Kubernetes' default package manager, initialize an environment and install Jenkins. + + +``` +$ kubectl create ns jenkins +namespace "jenkins" created +$ helm init +helm init +Creating /Users/alleycat/.helm +Creating /Users/alleycat/.helm/repository +Creating /Users/alleycat/.helm/repository/cache +Creating /Users/alleycat/.helm/repository/local +Creating /Users/alleycat/.helm/plugins +Creating /Users/alleycat/.helm/starters +Creating /Users/alleycat/.helm/cache/archive +Creating /Users/alleycat/.helm/repository/repositories.yaml +Adding stable repo with URL: +Adding local repo with URL: +$HELM_HOME has been configured at /Users/alleycat/.helm. + +Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster. + +Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy. +To prevent this, run `helm init` with the --tiller-tls-verify flag. +For more information on securing your installation see: +$ helm install --name jenkins stable/jenkins --namespace jenkins +NAME:   jenkins +LAST DEPLOYED: Tue May 28 11:12:39 2019 +NAMESPACE: jenkins +STATUS: DEPLOYED + +RESOURCES: +==> v1/ConfigMap +NAME           DATA  AGE +jenkins        5     0s +jenkins-tests  1     0s + +==> v1/Deployment +NAME     READY  UP-TO-DATE  AVAILABLE  AGE +jenkins  0/1    1           0          0s + +==> v1/PersistentVolumeClaim +NAME     STATUS   VOLUME    CAPACITY  ACCESS MODES  STORAGECLASS  AGE +jenkins  Pending  standard  0s + +==> v1/Pod(related) +NAME                      READY  STATUS   RESTARTS  AGE +jenkins-7565554b8f-cvhbd  0/1    Pending  0         0s + +==> v1/Role +NAME                     AGE +jenkins-schedule-agents  0s + +==> v1/RoleBinding +NAME                     AGE +jenkins-schedule-agents  0s + +==> v1/Secret +NAME     TYPE    DATA  AGE +jenkins  Opaque  2     0s + +==> v1/Service +NAME           TYPE          CLUSTER-IP    EXTERNAL-IP  PORT(S)         AGE +jenkins        LoadBalancer  10.96.90.0    <pending>    8080:32015/TCP  0s +jenkins-agent  ClusterIP     10.103.85.49  <none>       50000/TCP       0s + +==> v1/ServiceAccount +NAME     SECRETS  AGE +jenkins  1        0s + +NOTES: +1\. Get your 'admin' user password by running: +  printf $(kubectl get secret --namespace jenkins jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo +2\. Get the Jenkins URL to visit by running these commands in the same shell: +  NOTE: It may take a few minutes for the LoadBalancer IP to be available. +        You can watch the status of by running 'kubectl get svc --namespace jenkins -w jenkins' +  export SERVICE_IP=$(kubectl get svc --namespace jenkins jenkins --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}") +  echo http://$SERVICE_IP:8080/login + +3\. Login with the password from step 1 and the username: admin + +For more information on running Jenkins on Kubernetes, visit: + +``` + +Note the Bash one-liner above that begins with **printf**; it allows you to query for the Jenkins password and it can be challenging to find your [default Jenkins password][11] without it. Take note of it and save it for later. + +### Set up port forwarding to log into the UI + +Now that you've installed Minikube and Jenkins, log in to configure Jenkins. You'll need the Pod name for port forwarding: + + +``` +$ kubectl get pods --namespace jenkins +NAME                       READY     STATUS    RESTARTS   AGE +jenkins-7565554b8f-cvhbd   1/1       Running   0          9m +``` + +Run the following to set up port forwarding (using your Jenkins pod name, which will be different from mine below): + + +``` +# verify your pod name from the namespace named jenkins +kubectl get pods --namespace jenkins +NAME                       READY     STATUS    RESTARTS   AGE +jenkins-7565554b8f-cvhbd   1/1       Running   0          37m +# then forward it +$ kubectl port-forward jenkins-7565554b8f-cvhbd 8088:8080 -n jenkins +Forwarding from 127.0.0.1:8088 -> 8080 +Forwarding from [::1]:8088 -> 8080 +``` + +Note that you will need multiple tabs in your terminal once you run the port-forwarding command. + +Leave this tab open going forward to maintain your port-forwarding session. + +Navigate to Jenkins in your preferred browser by going to **localhost:8088**. The default username is **admin** and the password is stored in Kubernetes Secrets. Use the command at the end of the **helm install jenkins** step: + + +``` +$ printf $(kubectl get secret --namespace jenkins jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo +Jfstacz2vy +``` + +After logging in, the UI will display **Welcome to Jenkins!** + +![Jenkins UI][12] + +From here we'll have to install some plugins to Jenkins for our pipeline to work properly. From the main page choose **Manage Jenkins **on the left-hand side. + +![][13] + +  + +Then choose **Manage Plugins** + +![][14] + +Then choose **Available ** + +**![][15]** + +Then choose the checkboxes beside these plugins shown below + +![][16] + +![][17] + +Once you have checked the boxes scroll to the bottom of the page and choose **Install without Restart**. +  + +![][18] + +  + +  + +#### Deploy Anchore + +[Anchore Engine][19] "is an open source project that provides a centralized service for inspection, analysis, and certification of container images." Deploy it within Minikube to do some security inspection on your Jenkins pipeline. Add a security namespace for the Helm install, then run an installation: + + +``` +$ kubectl create ns security +namespace "security" created +$ helm install --name anchore-engine stable/anchore-engine --namespace security +NAME:   anchore-engine +LAST DEPLOYED: Wed May 29 12:22:25 2019 +NAMESPACE: security +STATUS: DEPLOYED +## And a lot more output +``` + +Confirm that the service is up and running with this command: + + +``` +kubectl run -i --tty anchore-cli --restart=Always --image anchore/engine-cli --env ANCHORE_CLI_USER=admin --env ANCHORE_CLI_PASS=${ANCHORE_CLI_PASS} --env ANCHORE_CLI_URL= +If you don't see a command prompt, try pressing enter. +[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ +``` + +If you are logged into an Anchore container (similar to above), then the system is online. The default password for Anchore is **admin/foobar**. Type **exit** to leave the terminal. + +Use port forwarding again to access the Anchore Engine API from your host system: + + +``` +$ kubectl get pods --namespace security +NAME                                                         READY     STATUS    RESTARTS   AGE +anchore-engine-anchore-engine-analyzer-7cf5958795-wtw69      1/1       Running   0          3m +anchore-engine-anchore-engine-api-5c4cdb5587-mxkd7           1/1       Running   0          3m +anchore-engine-anchore-engine-catalog-648fcf54fd-b8thl       1/1       Running   0          3m +anchore-engine-anchore-engine-policy-7b78dd57f4-5dwsx        1/1       Running   0          3m +anchore-engine-anchore-engine-simplequeue-859c989f99-5dwgf   1/1       Running   0          3m +anchore-engine-postgresql-844dfcc468-s92c5                   1/1       Running   0          3m +# Find the API pod name above and add it to the command below +$ kubectl port-forward anchore-engine-anchore-engine-api-5c4cdb5587-mxkd7 8228:8228 --namespace security +``` + +### Join Anchore and Jenkins + +Go back to the Jenkins UI at ****. On the main menu, click **Manage Jenkins > Manage Plugins**. Choose the **Available** tab, then scroll down or search for the **Anchore Container Image Scanner Plugin**. Check the box next to the plugin and choose **Install without restart**. + +![Jenkins plugin manager][20] + +Once the installation completes, go back to the main menu in Jenkins and choose **Manage Jenkins**, then **Configure System**. Scroll down to **Anchore Configuration**. Confirm **Engine Mode** is selected and a URL is entered, which is output from the Helm installation. Add the username and password (default **admin/foobar**). For debugging purposes, check **Enable DEBUG logging**. + +![Anchore plugin mode][21] + +Now that the plugin is configured, you can set up a Jenkins pipeline to scan your container builds. + +### Jenkins pipeline and Anchore scanning + +The purpose of this setup is to be able to inspect container images on the fly to ensure they meet security requirements. To do so, use Anchore Engine and give it permission to access your images. In this example, they are on Docker Hub, but they could also be on Quay or any other [container registry supported by Anchore][22].  + +In order to run the necessary commands on the command line, we need to find our Anchore pod name, then SSH into it using **kubectl exec**: + + +``` +$ kubectl get all +NAME                               READY     STATUS    RESTARTS   AGE +pod/anchore-cli-86d7fd9568-rmknw   1/1       Running   2          2d + +NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE +service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   7d + +NAME                          DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE +deployment.apps/anchore-cli   1         1         1            1           2d + +NAME                                     DESIRED   CURRENT   READY     AGE +replicaset.apps/anchore-cli-86d7fd9568   1         1         1         2d +# Let’s connect to our anchore-cli pod +$ kubectl exec -it anchore-cli-86d7fd9568-rmknw -i -t -- bash +[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ anchore-cli --u admin  --p foobar  registry add index.docker.io <username> <password> +Registry: index.docker.io +User: jrepka +Type: docker_v2 +Verify TLS: True +Created: 2019-05-14T22:37:59Z +Updated: 2019-05-14T22:37:59Z +``` + +Anchore Engine is now ready to work with your registry. There are [several ways][23] it can do so, including: + + * Analyzing images + * Inspecting image content + * Scanning repositories + * Viewing security vulnerabilities + + + +Point Anchore Engine toward an image to analyze it against your policy. For our testing, we'll use the publicly available [Cassandra][24] image: + + +``` +[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ anchore-cli --u admin  --p foobar   image add +docker.io/library/cassandra:latest + +Image Digest: sha256:7f7afff84384e36593b085d62e087674029de9aced4482c7780f155d8ee55fad +Parent Digest: sha256:800084987d58c2a62daeea4662ecdd79fd4928d449279bd410ef7690ef482469 +Analysis Status: not_analyzed +Image Type: docker +Analyzed At: None +Image ID: a34c036183d18527684cdb613fbb1c806c7e1bc26f6911dcc25e918aa7b093fc +Dockerfile Mode: None +Distro: None +Distro Version: None +Size: None +Architecture: None +Layer Count: None + +Full Tag: docker.io/library/cassandra:latest +Tag Detected At: 2019-07-09T17:44:45Z +``` + +You will also need to grab a default policy ID to test against for your pipeline. (In a future article, I will go into customizing policy and whitelist rules.) + +Run the following command to get the policy ID: + + +``` +[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ anchore-cli --u admin  --p foobar policy list + +Policy ID                                   Active        Created                     Updated                     +2c53a13c-1765-11e8-82ef-23527761d060        True          2019-05-14T22:12:05Z        2019-05-14T22:12:05Z +``` + +Now that you have added a registry and the image you want, you can build a pipeline to scan it continuously. + +Scanning works in this order: **Build, push, scan.** To prevent images that do not meet security requirements from making it into production, I recommend a tiered approach to security scanning: promote a container image to a separate development environment and promote it to production only once it passes the Anchore Engine's scan. + +We can't do anything too exciting until we configure our custom policy, so we will make sure a scan completes successfully by running a Hello World version of it. Below is an example workflow written in Groovy: + + +``` +node { +   echo 'Hello World' +} +``` + +To run this code, log back into the Jenkins UI at **localhost:8088**, choose New Item, Pipeline, then place this code block into the Pipeline Script area. + +![The "Hello World" of Jenkins][25] + +It will take some time to complete since we're building the entire Cassandra image added above. You will see a blinking red icon in the meantime.  + +![Jenkins building][26] + +And it will eventually finish and pass. That means we have set everything up correctly. + +### That's a wrap + +If you made it this far, you have a running Minikube configuration with Jenkins and Anchore Engine. You also have one or more images hosted on a container registry service and a way for Jenkins to show errors when images don't meet the default policy. In the next article, we will build a custom pipeline that verifies security policies set by Anchore Engine. + +Anchore can also be used to scan large-scale Amazon Elastic Container Registries (ECRs), as long as the credentials are configured properly in Jenkins. + +### Other resources + +This is a lot of information for one article. If you'd like more details, the following links (which include my GitHub for all the examples in this tutorial) may help: + + * [Anchore scan example][27] + * [Anchore Engine][28] + * [Running Kubernetes locally via Minikube][5] + * [Jenkins Helm Chart][29] + + + +Are there any specific pipelines you want me to build in the next tutorial? Let me know in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/security-scanning-your-devops-pipeline + +作者:[Jessica Repka][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/jrepkahttps://opensource.com/users/marcobravohttps://opensource.com/users/jrepka +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/target-security.png?itok=Ca5-F6GW (Target practice) +[2]: https://jenkins.io/ +[3]: https://anchore.com/ +[4]: https://opensource.com/resources/what-is-kubernetes +[5]: https://kubernetes.io/docs/setup/minikube/ +[6]: https://hub.docker.com/ +[7]: https://kubernetes.io/docs/tasks/tools/install-minikube/ +[8]: https://helm.sh/docs/using_helm/#installing-helm +[9]: https://opensource.com/sites/default/files/uploads/minikube-dashboard.png (Minikube dashboard) +[10]: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ +[11]: https://opensource.com/article/19/6/jenkins-admin-password-helm-kubernetes +[12]: https://opensource.com/sites/default/files/uploads/welcometojenkins.png (Jenkins UI) +[13]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_4.52.06_pm.png +[14]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_4.52.30_pm.png +[15]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_4.59.20_pm.png +[16]: https://opensource.com/sites/default/files/resize/lead-images/screen_shot_2019-06-14_at_8.26.55_am-500x288.png +[17]: https://opensource.com/sites/default/files/resize/lead-images/screen_shot_2019-06-14_at_8.26.25_am-500x451.png +[18]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_5.05.10_pm.png +[19]: https://github.com/anchore/anchore-engine +[20]: https://opensource.com/sites/default/files/uploads/jenkins-install-without-restart.png (Jenkins plugin manager) +[21]: https://opensource.com/sites/default/files/uploads/anchore-configuration.png (Anchore plugin mode) +[22]: https://github.com/anchore/enterprise-docs/blob/master/content/docs/using/ui_usage/registries/_index.md +[23]: https://docs.anchore.com/current/docs/using/cli_usage/ +[24]: http://cassandra.apache.org/ +[25]: https://opensource.com/sites/default/files/articles/jenkins_hello_world_pipeline_opensourcecom.png (The "Hello World" of Jenkins) +[26]: https://opensource.com/sites/default/files/jenkins_build_opensourcecom.png (Jenkins building) +[27]: https://github.com/Alynder/anchore_example +[28]: https://github.com/anchore/anchore-engine/wiki +[29]: https://github.com/helm/charts/tree/master/stable/jenkins diff --git a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md new file mode 100644 index 0000000000..4eeabbeeb6 --- /dev/null +++ b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md @@ -0,0 +1,126 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bond WiFi and Ethernet for easier networking mobility) +[#]: via: (https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/) +[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) + +Bond WiFi and Ethernet for easier networking mobility +====== + +![][1] + +Sometimes one network interface isn’t enough. Network bonding allows multiple network connections to act together with a single logical interface. You might do this because you want more bandwidth than a single connection can handle. Or maybe you want to switch back and forth between your wired and wireless networks without losing your network connection. + +The latter applies to me. One of the benefits to working from home is that when the weather is nice, it’s enjoyable to work from a sunny deck instead of inside. But every time I did that, I lost my network connections. IRC, SSH, VPN — everything goes away, at least for a moment while some clients reconnect. This article describes how I set up network bonding on my Fedora 30 laptop to seamlessly move from the wired connection my laptop dock to a WiFi connection. + +In Linux, interface bonding is handled by the bonding kernel module. Fedora does not ship with this enabled by default, but it is included in the kernel-core package. This means that enabling interface bonding is only a command away: + +``` +sudo modprobe bonding +``` + +Note that this will only have effect until you reboot. To permanently enable interface bonding, create a file called _bonding.conf_ in the _/etc/modules-load.d_ directory that contains only the word “bonding”. + +Now that you have bonding enabled, it’s time to create the bonded interface. First, you must get the names of the interfaces you want to bond. To list the available interfaces, run: + +``` +sudo nmcli device status +``` + +You will see output that looks like this: + +``` +DEVICE TYPE STATE CONNECTION +enp12s0u1 ethernet connected Wired connection 1 +tun0 tun connected tun0 +virbr0 bridge connected virbr0 +wlp2s0 wifi disconnected -- +p2p-dev-wlp2s0 wifi-p2p disconnected -- +enp0s31f6 ethernet unavailable -- +lo loopback unmanaged -- +virbr0-nic tun unmanaged -- +``` + +In this case, there are two (wired) Ethernet interfaces available. _enp12s0u1_ is on a laptop docking station, and you can tell that it’s connected from the _STATE_ column. The other, _enp0s31f6_, is the built-in port in the laptop. There is also a WiFi connection called _wlp2s0_. _enp12s0u1_ and _wlp2s0_ are the two interfaces we’re interested in here. (Note that it’s not necessary for this exercise to understand how network devices are named, but if you’re interested you can see the [systemd.net-naming-scheme man page][2].) + +The first step is to create the bonded interface: + +``` +sudo nmcli connection add type bond ifname bond0 con-name bond0 +``` + +In this example, the bonded interface is named _bond0_. The “_con-name bond0_” sets the connection name to _bond0_; leaving this off would result in a connection named _bond-bond0_. You can also set the connection name to something more human-friendly, like “Docking station bond” or “Ben” + +The next step is to add the interfaces to the bonded interface: + +``` +sudo nmcli connection add type ethernet ifname enp12s0u1 master bond0 con-name bond-ethernet +sudo nmcli connection add type wifi ifname wlp2s0 master bond0 ssid Cotton con-name bond-wifi +``` + +As above, the connection name is specified to be [more descriptive][3]. Be sure to replace _enp12s0u1_ and _wlp2s0_ with the appropriate interface names on your system. For the WiFi interface, use your own network name (SSID) where I use “Cotton”. If your WiFi connection has a password (and of course it does!), you’ll need to add that to the configuration, too. The following assumes you’re using [WPA2-PSK][4] authentication + +``` +sudo nmcli connection modify bond-wifi wifi-sec.key-mgmt wpa-psk +sudo nmcli connection edit bond-wif +``` + +The second command will bring you into the interactive editor where you can enter your password without it being logged in your shell history. Enter the following, replacing _password_ with your actual password + +``` +set wifi-sec.psk password +save +quit +``` + +Now you’re ready to start your bonded interface and the secondary interfaces you created + +``` +sudo nmcli connection up bond0 +sudo nmcli connection up bond-ethernet +sudo nmcli connection up bond-wifi +``` + +You should now be able to disconnect your wired or wireless connections without losing your network connections. + +### A caveat: using other WiFi networks + +This configuration works well when moving around on the specified WiFi network, but when away from this network, the SSID used in the bond is not available. Theoretically, one could add an interface to the bond for every WiFi connection used, but that doesn’t seem reasonable. Instead, you can disable the bonded interface: + +``` +sudo nmcli connection down bond0 +``` + +When back on the defined WiFi network, simply start the bonded interface as above. + +### Fine-tuning your bond + +By default, the bonded interface uses the “load balancing (round-robin)” mode. This spreads the load equally across the interfaces. But if you have a wired and a wireless connection, you may want to prefer the wired connection. The “active-backup” mode enables this. You can specify the mode and primary interface when you are creating the interface, or afterward using this command (the bonded interface should be down): + +``` +sudo nmcli connection modify bond0 +bond.options "mode=active-backup,primary=enp12s0u1" +``` + +The [kernel documentation][5] has much more information about bonding options. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/ + +作者:[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://fedoramagazine.org/author/bcotton/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/networkingmobility-816x345.jpg +[2]: https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html +[3]: https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns +[4]: https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#Target_users_(authentication_key_distribution) +[5]: https://www.kernel.org/doc/Documentation/networking/bonding.txt diff --git a/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md b/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md new file mode 100644 index 0000000000..8836995311 --- /dev/null +++ b/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md @@ -0,0 +1,130 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get going with EtherCalc, a web-based alternative to Google Sheets) +[#]: via: (https://opensource.com/article/19/7/get-going-ethercalc) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-phttps://opensource.com/users/marcobravo) + +Get going with EtherCalc, a web-based alternative to Google Sheets +====== +EtherCalc is an open source spreadsheet that makes it easy to work +remotely and collaborate with others. +![Open data brain][1] + +Spreadsheets can be very useful—and not just for [managing your finances][2]. That said, desktop spreadsheets have their limitations. The biggest is that you need to be at your computer to use one. On top of that, collaborating on a spreadsheet can quickly become a messy affair. + +Enter [EtherCalc][3], an open source, web-based spreadsheet. While not as fully featured as a desktop spreadsheet, EtherCalc packs enough features for most people. + +Let's take a look at how to get started using it. + +### Getting EtherCalc + +If you're self-hosting, you can [download the code][4], get it through [Sandstorm.io][5], or use npm (the Node.js package manager) to install it on a server. + +But what if you don't have a server? You can use one of the many hosted instances of EtherCalc—for example, at [EtherCalc.org][6], the [instance hosted][7] by the folks at [Framasoft][8], or use it through [Sandstorm Oasis][9]. + +### What can you use EtherCalc for? + +Just about everything you'd use a desktop spreadsheet for. That could be to balance your budget, track your savings, record your income, schedule meetings, or take an inventory of your possessions. + +I've used EtherCalc to track time on freelance projects, to create invoices for those projects, and even to share article ideas with my fellow [Opensource.com community moderators][10]. How you use EtherCalc is up to your needs and your imagination. + +### Working with EtherCalc + +The first step is to create a spreadsheet. + +![Empty EtherCalc spreadsheet][11] + +If you've used a desktop or web-based spreadsheet before, EtherCalc will look somewhat familiar. As with any spreadsheet, you type what you need to type in the cells on the sheet. The includes column headings, labels, and functions (more on those in a moment). + +Before you do anything else, bookmark the URL to your spreadsheet. EtherCalc uses randomly generated URLs—for example, —which aren't easy to remember. + +### Formatting your spreadsheet + +To add formatting to your spreadsheet, highlight the cell or cells that you want to format and click the **Format** menu. + +![EtherCalc's Format menu][12] + +You can add borders and padding, change fonts and their attributes, align text, and change the format of numbers, for example to dates or currency formats. When you're done, click the **Save to:** button to apply the formatting. + +### Adding functions + +_Functions_ enable you to add data, manipulate data, and make calculations in a spreadsheet. They can do a lot more, too. + +To add a function to your spreadsheet, click a cell. Then, click the **Function** button on the toolbar. + +![EtherCalc Function button][13] + +That opens a list all of the functions EtherCalc supports, along with a short description of what each function does. + +![EtherCalc Functions list][14] + +Select the function you want to use, then click **Paste**. EtherCalc adds the function, along with an opening parenthesis, to the cell. Type what you need to after the parenthesis, then type a closing parenthesis. For example, if you want to total up all the numbers in column B in the spreadsheet using the _=SUM()_ function, type _B1:B21_ and close the parenthesis. + +![Entering a function in EtherCalc ][15] + +You can also add functions by double-clicking in a cell and typing them. There's no reference in the documentation for EtherCalc's functions. However, it does support [OpenFormula][16] (a standard for math formulas that spreadsheets support). If you're not familiar with spreadsheet functions, you can look up what you need in the [OpenFormula specification][17] or this handy dandy [reference to LibreOffice Calc's functions][18]. + +### Collaborating with others + +Earlier this year, I worked with two friends on a content strategy project. I'm in New Zealand, one friend is in British Columbia, and the other is in Toronto. Since we were working across time zones, each of us needed access to the spreadsheet we were using to track and coordinate our work. Emailing a LibreOffice Calc file wasn't an option. Instead, we turned to EtherCalc, and it worked very well. + +Collaborating with EtherCalc starts with sharing your spreadsheet's URL with your collaborators. You can tell when someone else is working on the spreadsheet by the blue border that appears around one or more cells. + +![Collaborating in EtherCalc][19] + +You and your collaborators can enter information into the spreadsheet simultaneously. All you need to remember is to respect the sanctity of those blue borders. + +The **Comment** tab comes in handy when you need to ask a question, include additional information, or make a note to follow up on something. To add a comment, click the tab, and type what you need to type. When you're finished, click **Save**. + +![Adding a comment in EtherCalc][20] + +You can tell when a cell has a comment by the small red triangle in the top-right corner of the cell. Hold your mouse pointer over it to view the comment. + +![Viewing a comment in EtherCalc][21] + +### Final thoughts + +EtherCalc doesn't do everything that, say, [LibreOffice Calc][22] or [Gnumeric][23] can do. And there's nothing wrong with that. In this case, the [80/20 rule][24] applies. + +If you need a simple spreadsheet and one that you can work on with others, EtherCalc is a great choice. It takes a bit of getting used to, but once you do, you'll have no problems using EtherCalc. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/get-going-ethercalc + +作者:[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/scottnesbitthttps://opensource.com/users/greg-phttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opendata_0613mm.png?itok=UIjD_jhK (Open data brain) +[2]: https://opensource.com/article/17/8/budget-libreoffice-calc +[3]: https://ethercalc.net/ +[4]: https://github.com/audreyt/ethercalc +[5]: https://sandstorm.io +[6]: https://ethercalc.org +[7]: https://accueil.framacalc.org/en/ +[8]: https://opensource.com/article/18/8/framasoft +[9]: https://oasis.sandstorm.io/ +[10]: https://opensource.com/community-moderator-program +[11]: https://opensource.com/sites/default/files/uploads/ethercalc-empty-spreadsheet.png (Empty EtherCalc spreadsheet) +[12]: https://opensource.com/sites/default/files/uploads/ethercalc-formatting.png (EtherCalc's Format menu) +[13]: https://opensource.com/sites/default/files/uploads/ethercalc-function.png (EtherCalc Function button) +[14]: https://opensource.com/sites/default/files/uploads/ethercalc-function-list.png (EtherCalc Functions list) +[15]: https://opensource.com/sites/default/files/uploads/ethercalc-function-example.png (Entering a function in EtherCalc ) +[16]: https://en.wikipedia.org/wiki/OpenFormula +[17]: https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html +[18]: https://help.libreoffice.org/Calc/Functions_by_Category +[19]: https://opensource.com/sites/default/files/uploads/ethercalc-collaborators.png (Collaborating in EtherCalc) +[20]: https://opensource.com/sites/default/files/uploads/ethercalc-add-comment.png (Adding a comment in EtherCalc) +[21]: https://opensource.com/sites/default/files/uploads/ethercalc-view-comment.png (Viewing a comment in EtherCalc) +[22]: https://www.libreoffice.org/discover/calc/ +[23]: http://www.gnumeric.org/ +[24]: https://en.wikipedia.org/wiki/Pareto_principle diff --git a/sources/tech/20190717 Mastering user groups on Linux.md b/sources/tech/20190717 Mastering user groups on Linux.md new file mode 100644 index 0000000000..82f9cca815 --- /dev/null +++ b/sources/tech/20190717 Mastering user groups on Linux.md @@ -0,0 +1,225 @@ +[#]: collector: (lujun9972) +[#]: translator: (0x996) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Mastering user groups on Linux) +[#]: via: (https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Mastering user groups on Linux +====== +Managing user groups on Linux systems is easy, but the commands can be more flexible than you might be aware. +![Scott 97006 \(CC BY 2.0\)][1] + +User groups play an important role on Linux systems. They provide an easy way for a select groups of users to share files with each other. They also allow sysadmins to more effectively manage user privileges, since they can assign privileges to groups rather than individual users. + +While a user group is generally created whenever a user account is added to a system, there’s still a lot to know about how they work and how to work with them. + +**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** + +### One user, one group? + +Most user accounts on Linux systems are set up with the user and group names the same. The user "jdoe" will be set up with a group named "jdoe" and will be the only member of that newly created group. The user’s login name, user id, and group id will be added to the **/etc/passwd** and **/etc/group** files when the account is added, as shown in this example: + +``` +$ sudo useradd jdoe +$ grep jdoe /etc/passwd +jdoe:x:1066:1066:Jane Doe:/home/jdoe:/bin/sh +$ grep jdoe /etc/group +jdoe:x:1066: +``` + +The values in these files allow the system to translate between the text (jdoe) and numeric (1066) versions of the user id — jdoe is 1066 and 1066 is jdoe. + +The assigned UID (user id) and GID (group id) for each user are generally the same and configured sequentially. If Jane Doe in the above example were the most recently added user, the next new user would likely be assigned 1067 as their user and group IDs. + +### GID = UID? + +UIDs and GIDs can get of out sync. For example, if you add a group using the **groupadd** command without specifying a group id, your system will assign the next available group id (in this case, 1067). The next user to be added to the system would then get 1067 as a UID but 1068 as a GID. + +You can avoid this issue by specifying a smaller group id when you add a group rather than going with the default. In this command, we add a new group and provide a GID that is smaller than the range used for user accounts. + +``` +$ sudo groupadd -g 500 devops +``` + +If it works better for you, you can specify a shared group when you create accounts. For example, you might want to assign new development staff members to a devops group instead of putting each one in their own group. + +``` +$ sudo useradd -g staff bennyg +$ grep bennyg /etc/passwd +bennyg:x:1064:50::/home/bennyg:/bin/sh +``` + +### Primary and secondary groups + +There are actually two types of groups — primary and secondary. + +The **primary group** is the one that’s recorded in the **/etc/passwd** file, configured when an account is set up. When a user creates a file, it’s their primary group that is associated with it. + +``` +$ whoami +jdoe +$ grep jdoe /etc/passwd +jdoe:x:1066:1066:John Doe:/home/jdoe:/bin/bash + ^ + | + +-------- primary group +$ touch newfile +$ ls -l newfile +-rw-rw-r-- 1 jdoe jdoe 0 Jul 16 15:22 newfile + ^ + | + +-------- primary group +``` + +**Secondary groups** are those that users might be added to once they already have accounts. Secondary group memberships show up in the /etc/group file. + +``` +$ grep devops /etc/group +devops:x:500:shs,jadep + ^ + | + +-------- secondary group for shs and jadep +``` + +The **/etc/group** file assigns names to user groups (e.g., 500 = devops) and records secondary group members. + +### Preferred convention + +The convention of having each user a member of their own group and optionally a member of any number of secondary groups allows users to more easily separate files that are personal from those they need to share with co-workers. When a user creates a file, members of the various user groups they belong to don't necessarily have access. A user will have to use the **chgrp** command to associate a file with a secondary group. + +### There’s no place like /home + +One important detail when adding a new account is that the **useradd** command does not necessarily add a home directory for a new user. If you want this step to be taken only some of the time, you can add **-m** (think of this as the “make home” option) with your useradd commands. + +``` +$ sudo useradd -m -g devops -c "John Doe" jdoe2 +``` + +The options in this command: + + * **-m** creates the home directory and populates it with start-up files + * **-g** specifies the group to assign the user to + * **-c** adds a descriptor for the account (usually the person’s name) + + + +If you want a home directory to be created _all_ of the time, you can change the default behavior by editing the **/etc/login.defs** file. Change or add a setting for the CREATE_HOME variable and set it to “yes”: + +``` +$ grep CREATE_HOME /etc/login.defs +CREATE_HOME yes +``` + +Another option is to set yourself up with an alias so that **useradd** always uses the -m option. + +``` +$ alias useradd=’useradd -m’ +``` + +Make sure you add the alias to your ~/.bashrc or similar start-up file to make it permanent. + +### Looking into /etc/login.defs + +Here’s a command to list all the setting in the /etc/login.defs file. The **grep** commands are hiding comments and blank lines. + +``` +$ cat /etc/login.defs | grep -v "^#" | grep -v "^$" +MAIL_DIR /var/mail +FAILLOG_ENAB yes +LOG_UNKFAIL_ENAB no +LOG_OK_LOGINS no +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes +FTMP_FILE /var/log/btmp +SU_NAME su +HUSHLOGIN_FILE .hushlogin +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +TTYGROUP tty +TTYPERM 0600 +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 +UID_MIN 1000 +UID_MAX 60000 +GID_MIN 1000 +GID_MAX 60000 +LOGIN_RETRIES 5 +LOGIN_TIMEOUT 60 +CHFN_RESTRICT rwh +DEFAULT_HOME yes +CREATE_HOME yes <=== +USERGROUPS_ENAB yes +ENCRYPT_METHOD SHA512 +``` + +Notice the various settings in this file determine the range of user ids to be used along with password aging and other setting (e.g., umask). + +### How to display a user’s groups + +Users can be members of multiple groups for various reasons. Group membership gives a user access to group-owned files and directories, and sometimes this behavior is critical. To generate a list of the groups that some user belongs to, use the **groups** command. + +``` +$ groups jdoe +jdoe : jdoe adm admin cdrom sudo dip plugdev lpadmin staff sambashare +``` + +You can list your own groups by typing “groups” without an argument. + +### How to add users to groups + +If you want to add an existing user to another group, you can do that with a command like this: + +``` +$ sudo usermod -a -G devops jdoe +``` + +You can also add a user to multiple groups by specifying the groups in a comma-separated list: + +``` +$ sudo usermod -a -G devops,mgrs jdoe +``` + +The **-a** argument means “add” while **-G** lists the groups. + +You can remove a user from a group by editing the **/etc/group** file and removing the username from the list. The usermod command may also have an option for removing a member from a group. + +``` +fish:x:16:nemo,dory,shark + | + V +fish:x:16:nemo,dory +``` + +### Wrap-up + +Adding and managing user groups isn't particularly difficult, but consistency in how you configure accounts can make it easier in the long run. + +**[ Now see: [Must-know Linux Commands][3] ]** + +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/3409781/mastering-user-groups-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://images.idgesg.net/images/article/2019/07/carrots-100801917-large.jpg +[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua +[3]: https://www.networkworld.com/article/3391029/must-know-linux-commands.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md b/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md new file mode 100644 index 0000000000..718bc8fca3 --- /dev/null +++ b/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Start tinkering with the Circuit Playground Express) +[#]: via: (https://opensource.com/article/19/7/circuit-playground-express) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +Start tinkering with the Circuit Playground Express +====== +Learn what you can do with these tiny gadgets and a bit of Python code. +![Tools in a cloud][1] + +I've been a gadget person as long as I can remember, so I was delighted when I discovered an Adafruit [Circuit Playground Express][2] (CPX) in the swag bag I got at [PyConUS][3] in May. I became fascinated with these little devices last year, when Nina Zakharenko highlighted them in her All Things Open presentation, [Five Things You Didn't Know Python Could Do][4], with Python-powered earrings. + +After finding one in my PyCon bag, I set out to learn more about these mesmerizing little devices. First, I attended a "how-to" session at one of the Open Spaces meetups at PyCon. But learning always requires hands-on practice, and that's what I did when I got home. I connected the CPX device to my Linux laptop with a USB-to-MicroUSB cable. The unit mounts just like any standard USB drive, listed as CIRCUITPY. + +![Circuit Playground Express mounted as USB drive][5] + +The CPX works on MacOS, [Windows][6], and Linux (including [Chromebooks][7]). The device comes pre-loaded with code and some sound files. [Adafruit][8]'s extremely well-written documentation answered most of my questions. I discovered the unit can be programmed on Linux three different ways: [MakeCode][9], the [Arduino IDE][10], and the Python-based [CircuitPython][11], which I chose. + +Adafruit provides excellent documentation for [creating and editing CircuitPython code][12], which I found helpful. You can use a variety of editors (e.g., Emacs, Visual Studio Code, gedit), but Adafruit recommends the [Mu Python editor][13], which I [wrote about][14] last year. I [installed Mu][15] on my system with **pip3 install --user mu-editor**. Then I opened a terminal and entered **mu-editor**. It asked me how to run Mu, and I chose Adafruit Circuit Python. Then I was able to look at the code that powers the CPX. + +![Selecting CircuitPython mode to run Mu][16] + +To open a connection between Mu and the CPX connected to your computer, press the Serial button in Mu. Then you can see any serial data from the CPX and edit it using Python's REPL shell. + +Adafruit's programmers have written a library called **adafruit_circuitplayground.express** that enables CircuitPython to interact with the CPX board. To use it, add **import adafruit.circuitplayground.express** to your code. Or, to make it simpler, you can use the acronym **cpx**, shortening the code (as shown below) to **from adafruit_circuitplayground.express import cpx**. + +![Importing Adafruit's CPX library][17] + +The way you name your file is essential. The four options are code.txt, code.py, main.txt, and main.py. CircuitPython looks for the code files in that order and runs the first one it finds. Save the code to your CIRCUITPY drive each time you change it. + +The main.py code included with a new CPX offers an example of the device's capabilities. + +![CPX's default main.py][18] + +When you execute this code, the CPX displays beautiful, brightly colored LEDs whirling in a rainbow of colors. With my rudimentary knowledge, I could tweak a few settings, like increasing the brightness and turning on the TOUCH_PIANO capability, but other modifications were beyond my coding ability at this point. + +Eager to do more, I wanted to find code snippets I could use as building blocks to learn. First, I reached out to [Nina Zakharenko][19] on Twitter and asked for some help. She recommended I contact [Kattni Rembor][20], who pointed me to her GitHub repo and some [code examples][21] she wrote for the Chicago Linux User Group. + +Each of these simple building blocks left me more confident in my Python journey. In addition to making lights blink, the CPX can also function as a sensor, and I wanted to try that. Here is code for a simple light sensor: + +![CPX code for a blinking LED][22] + +And here is the CPX with the D13 LED blinking: + +![CPX with a blinking LED][23] + +I also discovered a way to create some fun for my grandson by making the CPX "come to life." I recorded a couple of .wav files with Audacity and saved them to the device. Then I wrote some simple code that utilized the A and B buttons on the device to make the CPX "talk" to him: + +![Code to play a sound when a button is pressed on CPX][24] + +I've really enjoyed tinkering with the code to explore the CPX's capabilities. I am always looking for ways to make Python code come alive for students I teach. The CPX is a great way to help new users learn and enjoy coding and digital making. Another excellent resource for new users is Mike Barela's book _[Getting Started with Adafruit Circuit Playground Express][25]_. I found its information and examples very helpful as I was learning. + +Get a [Circuit Playground Express][2] and start writing your own code. And then please share how you are using it in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/circuit-playground-express + +作者:[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/cloud_tools_hardware.png?itok=PGjJenqT (Tools in a cloud) +[2]: https://www.adafruit.com/product/3333 +[3]: https://us.pycon.org/2019/ +[4]: https://youtu.be/WlGkBqBRsik +[5]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_mounted.png (Circuit Playground Express mounted as USB drive) +[6]: https://learn.adafruit.com/adafruit-circuit-playground-express/adafruit2-windows-driver-installation +[7]: https://learn.adafruit.com/using-circuit-playground-express-makecode-circuitpython-on-a-chromebook/overview +[8]: https://learn.adafruit.com/adafruit-circuit-playground-express +[9]: https://makecode.adafruit.com/ +[10]: https://learn.adafruit.com/adafruit-circuit-playground-express/arduino +[11]: https://circuitpython.org/ +[12]: https://learn.adafruit.com/adafruit-circuit-playground-express/creating-and-editing-code +[13]: https://codewith.mu/en/ +[14]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners +[15]: https://codewith.mu/en/howto/1.0/install_with_python +[16]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_mu.png (Selecting CircuitPython mode to run Mu) +[17]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_import-cpx.png (Importing Adafruit's CPX library) +[18]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_main-py.png (CPX's default main.py) +[19]: https://twitter.com/nnja +[20]: https://learn.adafruit.com/users/kattni +[21]: https://github.com/kattni/ChiPy_2018 +[22]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_simpleblinkingled.png (CPX code for a blinking LED) +[23]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_d13blinking.jpg (CPX with a blinking LED) +[24]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_talking.png (Code to play a sound when a button is pressed on CPX) +[25]: https://www.adafruit.com/product/3944 diff --git a/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md b/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md new file mode 100644 index 0000000000..4a16a41058 --- /dev/null +++ b/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md @@ -0,0 +1,110 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to apply 'release early, release often' to build a better brand) +[#]: via: (https://opensource.com/article/19/7/build-better-brand) +[#]: author: (Alex Kimball https://opensource.com/users/alex-kimballhttps://opensource.com/users/marcobravo) + +How to apply 'release early, release often' to build a better brand +====== +Try this faster, more collaborative process to promote your project. +![][1] + +The importance of open source—and specifically the maxim "release early, release often" (RERO)—can hardly be overstated.  + +This approach born at the command line has impacted the world as organizations of every shape and size discover what open, collaborative processes can do. Look around. The evidence is everywhere: on our phones, in our cars, in schools and hospitals. + +If we still built software the way we used to, innovations across these and countless other areas may never have seen the light of day. + +The worlds of marketing and brand development are no different. In today's fast-moving tech industry, marketers and strategists are taking a page out of the dev team's playbook, applying more agile methods to creating brand messaging and visual identities. + +Why? For the same reasons cathedral-style development is no longer the best way to build apps: it's too isolated, too slow, and too disconnected from the reality of how the rest of the world works. + +Fans of the TV series _Mad Men_ will be familiar with how marketing used to be done, especially within an agency. Marketing messages—taglines, slogans, jingles, and the like—developed by creative powerhouses with a unique gift they (and only they) seemed to truly understand. + +A typical project would go something like this: + + * The client hires the agency. Much excitement as the journey sets off; after a very brief introductory meeting, the client sends along a few existing materials. + * The agency retreats to its creative confines to wait for divine inspiration to strike. + * Many weeks and months later, the agency returns with—_**eureka!**_—the answer! + + + +Why these antiquated processes don't work: + + * They allow little room for the voice of the customer. + * They allow little room for the voice of those within the company who know it best and care about it most. + * They hold precious the final product until the very end, increasing the likelihood that bugs in the creative code will survive until it's too late. All destination. No journey. + + + +That's not how today's most agile, most innovative companies build their software. It shouldn't be how they build their brands. + +### 3 simple steps to begin your RERO journey + +Applying RERO to your brand projects is simple. Start with these three steps: + +#### 1\. Set clear expectations + +As the well-known African proverb cautions: "If you want to go fast, go alone; if you want to go far, go together." When it comes to projects guided by RERO principles, setting clear expectations early can be the key to going farther, faster. + +At any project's outset, gather your working team, partners, clients, or anyone else expected to contribute, and make sure everyone is prepared to adopt an agile mindset. Progress will be measured in speedy steps, not big leaps. In a room packed with perfectionists, some will likely bristle at this new approach—don't worry. + +Don't forget the logistics, either. Share the project schedule, clearly outlining the milestones where all are expected to participate, as well as windows of working time where individual progress should be made. + +#### 2\. Share silly first drafts + +Ideas, especially rough ones, should be welcomed with open arms. We call these early explorations Silly First Drafts. The SFD is a crucial piece of our creative puzzle. Naming it makes it less scary. An open invitation to share with the team even the smallest seed of an idea without fear of ridicule or rejection. + +Easier said than done, for sure. As a writer, I struggle to take this advice more than I'd care to admit. Putting something you've created out there before it's ready for primetime feels like a mortal sin. Not so in the RERO world. The goal of the SFD is to create more, more quickly — and get what you create in front of users and customers who can help you make it even better. To dive in, get messy and create in the open for more eyes to see and help improve. + +Some content creators will bristle at this approach initially. Encourage them to embrace this discomfort with a more curious, growth-oriented mindset. Apply what the improv world calls a "Yes, and…" mindset, which emphasizes additive contributions not subtractive naysaying. + +Emphasize the journey _and_ the destination. Not a simple binary of success or failure, but rather an opportunity for continuous development. At the project level, this approach helps combat progress-killing factors like the dreaded "paralysis by analysis." How much time have we all lost to hand-wringing indecision and over-thinking? + +Gather input on anything you've created—whether lines of code or lines of copy—and your final product will thank you. Just make sure these "fresh eyes" know what to look for. Equip your team to understand how they can be most helpful. Highlight specific areas where feedback is most needed (and by contrast, where things are feeling pretty good). + +#### 3\. Embrace technology + +This last step is probably the easiest but worth mentioning, as it's overlooked more often than you might expect. Collaboration software has made life a lot easier for all of us lately and can be a crucial strategy to implement a RERO approach for your next project effectively. + +##### Team communication + +Today's crop of online messaging platforms is well-suited to match the pace of a RERO-guided process. Provide all project contributors—especially those who work remotely—with a single, always-available venue for productive discussions. For our money, the best open source option of the bunch is [Mattermost][2]. It does just about everything Slack can do—file sharing, real-time chat, robust integrations—while also letting you access the source code. + +Set a few parameters for the team around best practices to keep the channel positive and productive. Without at least a few rules in place, channels and threads can quickly become side-tracked and GIF-overloaded. Describe the purpose of each channel when it's created so that everyone knows why it exists and what you're there to do. + +##### Content creation + +For content-related tasks that require word processing, spreadsheets, and presentations, open source alternatives to the Microsoft Office suite of products have been available for decades—chief among them was the now-defunct OpenOffice. Since its final release in 2011, a handful of other providers have picked up the torch. + +LibreOffice is a good option, but by the development team's own admission, it may not be the best choice for enterprise deployments. For business-critical applications, check out [Collabora Online][3]. This hosted solution offers a full suite of office applications with powerful team tools for live collaborative editing, support for all major file formats, and data security protections. + +With project files accessible to anyone with a modern browser, you won't have to worry about "I can't open it" issues that arise when your PC-loving executive goes to review work from the Mac-loving design team. And when revision histories are updated automatically, it's easy to revisit previous drafts and chronicle the journey you've taken. + +Just be sure to set some ground rules as all your cooks enter the content kitchen at once. Allow one content creator to retain editing permissions while granting other team members comment-only or view-only permissions. This helps keep revisions to the core piece of content firmly within the realm of the person who created it and helps ensure all reviewers are reacting to the same version. + +### How the future of business is built + +Release early, release often is more relevant to our world than ever. This faster, more collaborative process is the way businesses of all kinds must create their futures. + +Follow the steps outlined above, and you and your team will be well on your way to applying the principles of agile development, rapid iteration, and continuous innovation to your next brand development project. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/build-better-brand + +作者:[Alex Kimball][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/alex-kimballhttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/branding_opensource_intersection.png?itok=4lf-f5NB +[2]: https://mattermost.com/ +[3]: https://www.collaboraoffice.com/code/ diff --git a/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md b/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md new file mode 100644 index 0000000000..75c6dd9afe --- /dev/null +++ b/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Redirect a GitHub Pages site with this HTTP hack) +[#]: via: (https://opensource.com/article/19/7/permanently-redirect-github-pages) +[#]: author: (Oleksii Tsvietnov https://opensource.com/users/oleksii-tsvietnov) + +Redirect a GitHub Pages site with this HTTP hack +====== +Learn how to configure two repositories to serve as static websites with +custom domain names. +![computer servers processing data][1] + +I run a few static websites for my private projects on [GitHub Pages][2]. I'm absolutely happy with the service, as it supports custom domains, automatically redirects to HTTPS, and transparently installs SSL certificates (with automatic issuing via [Let's Encrypt][3]). It is very fast (thanks to [Fastly's][4] content delivery network) and is extremely reliable (I haven't had any issues for years). Taking into account the fact that I get all of this for free, it perfectly matches my needs at the moment. + +It has, however, one important limitation: because it serves static websites only, this means no query parameters, no dynamic content generated on the server side, no options for injecting any server-side configuration (e.g., .htaccess), and the only things I can push to the website's root directory are static assets (e.g., HTML, CSS, JS, JPEG, etc.). In general, this is not a big issue. There are a lot of open source [static site generators][5] available, such as [Jekyll][6], which is available by default from the dashboard, and [Pelican][7], which I prefer in most cases. Nevertheless, when you need to implement something that is traditionally solved on the server side, a whole new level of challenge begins.  + +For example, I recently had to change a custom domain name for one of my websites. Keeping the old one was ridiculously expensive, and I wasn't willing to continue wasting money. I found a cheaper alternative and immediately faced a bigger problem: all the search engines have the old name in their indexes. Updating indexes takes time, and until that happens, I would have to redirect all requests to the new location. Ideally, I would redirect each indexed resource to the equivalent on the new site, but at minimum, I needed to redirect requests to the new start page. I had access to the old domain name for enough time, and therefore, I could run the site separately on both domain names at the same time. + +There is one proper solution to this situation that should be used whenever possible: Permanent redirect, or the [301 Moved Permanently][8] status code, is the way to redirect pages implemented in the HTTP protocol. The only issue is that it's supposed to happen on the server side within a server response's HTTP header. But the only solution I could implement resides on a client side; that is, either HTML code or JavaScript. I didn't consider the JS variant because I didn't want to rely on the script's support in web browsers. Once I defined the task, I recalled a solution: the [**HTML <meta> tag**][9] **<meta http-equiv>** with the [**refresh**][10] [HTTP header][11]. Although it can be used to ask browsers to reload a page or jump to another URL after a specified number of seconds, after some research, I learned it is more complicated than I thought with some interesting facts and details. + +### The solution + +**TL;DR** (for anyone who isn't interested in all the details): In brief, this solution configures two repositories to serve as static websites with custom domain names. + +On the site with the old domain, I reconstructed the website's entire directory structure and put the following index.html (including the root) in each of them:  + + +``` +<!DOCTYPE HTML>                                                                 +<html lang="en">                                                                 +    <head>                                                                       +        <meta charset="utf-8"> +        <meta http-equiv="refresh" content="0;url={{THE_NEW_URL}}" />       +        <link rel="canonical" href="{{THE_NEW_URL}}" />                     +    </head>                                                                                                                                                                   +    <body>                                                                       +        <h1>                                                                     +            The page been moved to <a href="{{THE_NEW_URL}}">{{THE_NEW_URL}}</a> +        </h1>                                                                   +    </body>                                                                     +</html> +``` + +When someone opens a resource on the old domain, most web browsers promptly redirect to the same resource on the new website (thanks to **http-equiv="refresh"**). For any resources that were missed or nonexistent, it's helpful to create a **404.html** file in the old website's root directory with similar content, but without **rel="canonical"** (because there is no a canonical page, in this case). + +The last piece of the puzzle is the [canonical link relation][12] (**rel="canonical"**), which prevents duplicating content as long as the implemented redirect _is not permanent._ From the HTTP response's perspective, it happens when [the request has succeeded][13] and there is an indication for search engines that a resource has moved and should be associated with a new (preferred) location. + +I have learned a few interesting facts related to **http-equiv="refresh"** and **rel="canonical"**. The HTML metatag **http-equiv** is used to simulate the presence of an HTTP header in a server response. That is, web developers without access to the web server's configuration can get a similar result by "injecting" HTTP headers from an HTML document (the "body" of an HTTP response). It seems the **refresh** header, which has been used by all popular web browsers for many years, _doesn't really exist_. At least not as a standardized HTTP header. There was a plan to add it in the HTTP/1.1 specification that was [deferred to HTTP/1.2][14] (or later), but it never happened. + +### Summary + +The task of finding the real source URL for a resource is far from trivial. There are different scheme names (HTTP, HTTPS), multiple query parameters (page.html, page.html?a=1), various hostnames that resolve to the same IP address, etc. All of these options make a webpage look different to search engines, but the page is still the same. It gets even worse when the same content is published on independent web services. In 2009, Google, Yahoo, and Microsoft announced [support for a canonical link element][15] to clean up duplicate URLs on sites by allowing webmasters to choose a canonical (preferred) URL for a group of possible URLs for the same page. This helps search engines pick up the correct URL to associate with the content and can also improve [SEO for a site][16]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/permanently-redirect-github-pages + +作者:[Oleksii Tsvietnov][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/oleksii-tsvietnov +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/server_data_system_admin.png?itok=q6HCfNQ8 (computer servers processing data) +[2]: https://pages.github.com/ +[3]: https://letsencrypt.org/ +[4]: https://www.fastly.com/ +[5]: https://www.staticgen.com/ +[6]: https://jekyllrb.com/ +[7]: https://github.com/getpelican/pelican +[8]: https://tools.ietf.org/html/rfc2616#section-10.3.2 +[9]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta +[10]: http://www.otsukare.info/2015/03/26/refresh-http-header +[11]: https://tools.ietf.org/html/rfc2616#section-14 +[12]: https://tools.ietf.org/html/rfc6596 +[13]: https://tools.ietf.org/html/rfc2616#section-10.2.1 +[14]: https://lists.w3.org/Archives/Public/ietf-http-wg-old/1996MayAug/0594.html +[15]: https://www.mattcutts.com/blog/canonical-link-tag/ +[16]: https://yoast.com/rel-canonical/ diff --git a/sources/tech/20190718 What you need to know to be a sysadmin.md b/sources/tech/20190718 What you need to know to be a sysadmin.md new file mode 100644 index 0000000000..bd482f3ca4 --- /dev/null +++ b/sources/tech/20190718 What you need to know to be a sysadmin.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: (WangYueScream ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What you need to know to be a sysadmin) +[#]: via: (https://opensource.com/article/19/7/be-a-sysadmin) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/kimvila) + +What you need to know to be a sysadmin +====== +Kickstart your sysadmin career by gaining these minimum competencies. +![People work on a computer server with devices][1] + +The system administrator of yesteryear jockeyed users and wrangled servers all day, in between mornings and evenings spent running hundreds of meters of hundreds of cables. This is still true today, with the added complexity of cloud computing, containers, and virtual machines. + +Looking in from the outside, it can be difficult to pinpoint what exactly a sysadmin does, because they play at least a small role in so many places. Nobody goes into a career already knowing everything they need for a job, but everyone needs a strong foundation. If you're looking to start down the path of system administration, here's what you should be concentrating on in your personal or formal training. + +### Bash + +When you learn the Bash shell, you don't just learn the Bash shell. You learn a common interface to Linux systems, BSD, MacOS, and even Windows (under the right conditions). You learn the importance of syntax, so you can quickly adapt to systems like Cisco routers' command line or Microsoft's PowerShell, and eventually, you can even learn more powerful languages like Python or Go. And you also begin to think procedurally so you can analyze complex problems and break them down into individual components, which is key because _that's_ how systems, like the internet, or an organization's intranet, or a web server, or a backup solution, are designed. + +But wait. There's more. + +Knowing the Bash shell has become particularly important because of the recent trend toward DevOps and [containers][2]. Your career as a sysadmin may lead you into a world where infrastructure is treated like code, which usually means you'll have to know the basics of scripting, the structure of [YAML-based][3] configuration, and how to [interact][4] with [containers][5] (tiny Linux systems running inside a [sandboxed file][6]). Knowing Bash is the gateway to efficient management of the most exciting open source technology, so go get [Bourne Again][7]. + +#### Resources + +There are many ways to get practice in the Bash shell. + +Try a [portable Linux distribution][8]. You don't have to install Linux to use Linux, so grab a spare thumb drive and spend your evenings or weekends getting comfortable with a text-based interface. + +There are several excellent [Bash articles][9] available here on opensource.com as well as [on Enable SysAdmin][10]. + +The problem with telling someone to practice with Bash is that to practice, you must have something to do. And until you know how to use Bash, you probably won't be able to think of anything to do. If that's your situation, go to Over The Wire and play [Bandit][11]. It's a game aimed at absolute beginners, with 34 levels of interactive basic hacking to get you comfortable with the Linux shell. + +### Web server setup + +Once you're comfortable with Bash, you should try setting up a web server. Not all sysadmins go around setting up web servers or even maintain web servers, but the skills you acquire while installing and starting the HTTP daemon, configuring Apache or Nginx, setting up the [correct permissions][12], and [configuring a firewall][13], are the same skills you need on a daily basis. After a little bit of effort, you may start to notice certain patterns in your labor. There are concepts you probably took for granted before trying to administer production-ready software and hardware, and you're no longer shielded from them in your fledgling role as an administrator. It might be frustrating at first because everyone likes to be good at everything they do, but that's actually a good thing. Let yourself be bad at new skills. That's how you learn. + +And besides, the more you struggle through your first steps, the sweeter it is when you finally see that triumphant "it works!" default index.html. + +#### Resources + +David Both wrote an excellent article on [Apache web server][14] configuration. For extra credit, step through his follow-up article on how to [host multiple sites][15] on one machine. + +### DHCP + +The Dynamic Host Configuration Protocol (DHCP) is the system that assigns IP addresses to devices on a network. At home, the modem or router your ISP (internet service provider) supports probably has an embedded DHCP server in it, so it's likely out of your purview. If you've ever logged into your home router to adjust the IP address range or set up a static address for some of your network devices, then you're at least somewhat familiar with the concept. You may understand that devices on a network are assigned the equivalent of phone numbers in the form of IP addresses, and you may realize that computers communicate with one another by broadcasting messages addressed to a specific IP address. Message headers are read by routers along the path, each of which works to direct the message to the next most logical router along the path toward its ultimate goal. + +Even if you understand these concepts, the inevitable escalation of basic familiarity with DHCP is to set up a DHCP server. Installing and configuring your own DHCP server provides you the opportunity to introduce DHCP collisions on your home network (try to avoid that, if you can, as it will definitely kill your network until it's resolved), control the distribution of addresses, create subnets, and monitor connections and lease times. + +More importantly, setting up DHCP and experimenting with different configurations helps you understand inter-networking. You understand how networks represent "partitions" in data transference and what steps you have to take to pass information from one to the other. That's vital for a sysadmin to know because the network is easily one of the most important aspects of the job. + +#### Resources + +Before running your own DHCP server, ensure that the DHCP server in your home router (if you have one) is inactive. Once you have it up and running, read Archit Modi's [guide to network commands][16] for tips on how to explore your network. + +### Network cables + +It might sound mundane, but getting familiar with how network cables work not only makes for a really fun weekend but also gives you a whole new understanding of how data gets across the wires. The best way to learn is to go to your local hobby shop and purchase a Cat 5 cutter and crimper and a few Cat 5 terminators. Then head home, grab a spare Ethernet cable, and cut the terminators off. Spend whatever amount of time it takes to get that cable back in commission. + +Once you have solved that puzzle, do it again, this time creating a working [crossover cable][17]. + +You should also start obsessing _now_ about cable management. If you're not naturally inclined to run cables neatly along the floor molding or the edges of a desk or to bind cables together to keep them orderly, then make it a goal to permanently condition yourself with a phobia of messy cables. You won't understand why this is necessary at first, but the first time you walk into a server room, you will immediately know. + +### Ansible + +[Ansible][18] is configuration management software, and it's a bit of a bridge between sysadmin and DevOps. Sysadmins use Ansible to configure fresh installs of an operating system and to maintain specific states on machines. DevOps uses Ansible to reduce time and effort spent on tooling so that more time and effort gets spent on developing. You should learn Ansible as part of your sysadmin training, with an eye toward the practices of DevOps, because most of what DevOps is pioneering now will end up as part of your workflow in the system administration of the future. + +The good thing about Ansible is that you can start using it now. It's cross-platform, and it scales both up and down. Ansible may be overkill for a single-user computer, but then again, Ansible could change the way you spin up virtual machines, or it could help you synchronize the states of all the computers in your home or [home lab][19]. + +#### Resources + +Read "[How to manage your workstation configuration with Ansible][20]" by Jay LaCroix for the quintessential introduction to get started with Ansible on a casual basis. + +### Break stuff + +Problems arise on computers because of user error, buggy software, administrator (that's you!) error, and any number of other factors. There's no way to predict what's going to fail or why, so part of your personal sysadmin training regime should be to poke at the systems you set up until they fail. The worse you are to your own lab infrastructure, the more likely you are to find weak points. And the more often you repair those weak spots, the more confident you become in your problem-solving skills. + +Aside from the rigors of setting up all the usual software and hardware, your primary job as a sysadmin is to find solutions. There will be times when you encounter a problem outside your job description, and it may not even be possible for you to fix it, but it'll be up to you to find a workaround. + +The more you break stuff now and work to fix it, the better prepared you will be to work as a sysadmin. + +* * * + +Are you a working sysadmin? Are there tasks you wish you'd prepared better for? Add them in the comments below! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/be-a-sysadmin + +作者:[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/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/kimvila +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) +[2]: https://opensource.com/article/19/6/kubernetes-dump-truck +[3]: https://www.redhat.com/sysadmin/yaml-tips +[4]: https://opensource.com/article/19/6/how-ssh-running-container +[5]: https://opensource.com/resources/what-are-linux-containers +[6]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[7]: https://opensource.com/article/18/7/admin-guide-bash +[8]: https://opensource.com/article/19/6/linux-distros-to-try +[9]: https://opensource.com/tags/bash +[10]: https://www.redhat.com/sysadmin/managing-files-linux-terminal +[11]: http://overthewire.org/wargames/bandit +[12]: https://opensource.com/article/19/6/understanding-linux-permissions +[13]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[14]: https://opensource.com/article/18/2/how-configure-apache-web-server +[15]: https://opensource.com/article/18/3/configuring-multiple-web-sites-apache +[16]: https://opensource.com/article/18/7/sysadmin-guide-networking-commands +[17]: https://en.wikipedia.org/wiki/Ethernet_crossover_cable +[18]: https://opensource.com/sitewide-search?search_api_views_fulltext=ansible +[19]: https://opensource.com/article/19/6/create-centos-homelab-hour +[20]: https://opensource.com/article/18/3/manage-workstation-ansible diff --git a/sources/tech/20190719 Buying a Linux-ready laptop.md b/sources/tech/20190719 Buying a Linux-ready laptop.md new file mode 100644 index 0000000000..f63f9276e4 --- /dev/null +++ b/sources/tech/20190719 Buying a Linux-ready laptop.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Buying a Linux-ready laptop) +[#]: via: (https://opensource.com/article/19/7/linux-laptop) +[#]: author: (Ricardo Berlasso https://opensource.com/users/rgb-eshttps://opensource.com/users/greg-phttps://opensource.com/users/chrisodhttps://opensource.com/users/victorhckhttps://opensource.com/users/hankghttps://opensource.com/users/noplanman) + +Buying a Linux-ready laptop +====== +Tuxedo makes it easy to buy an out-of-the-box "penguin-ready" laptop. +![Penguin with green background][1] + +Recently, I bought and started using a Tuxedo Book BC1507, a Linux laptop computer. Ten years ago, if someone had told me that, by the end of the decade, I could buy top-quality, "penguin-ready" laptops from companies such as [System76][2], [Slimbook][3], and [Tuxedo][4], I probably would have laughed. Well, now I'm laughing, but with joy! + +Going beyond designing computers for free/libre open source software (FLOSS), all three companies recently [announced][5] they are trying to eliminate proprietary BIOS software by switching to [Coreboot][6]. + +### Buying it + +Tuxedo Computers is a German company that builds Linux-ready laptops. In fact, if you want a different operating system, it costs more. + +Buying the computer was incredibly easy. Tuxedo offers many payment methods: not only credit cards but also PayPal and even bank transfers. Just fill out the bank transfer form on Tuxedo's web page, and the company will send you the bank coordinates. + +Tuxedo builds every computer on demand, and picking exactly what you want is as easy as selecting the basic model and exploring the drop-down menus to select different components. There is a lot of information on the page to guide you in the purchase. + +If you pick a different Linux distribution from the recommended one, Tuxedo does a "net install," so have a network cable ready to finish the installation, or you can burn your preferred image onto a USB key. I used a DVD with the openSUSE Leap 15.1 installer through an external DVD reader instead, but you get the idea. + +The model I chose accepts up to two disks: one SSD and the other either an SSD or a conventional hard drive. As I was already over budget, I decided to pick a conventional 1TB disk and increase the RAM to 16GB. The processor is an 8th Generation i5 with four cores. I selected a back-lit Spanish keyboard, a 1920×1080/96dpi screen, and an SD card reader—all in all, a great system. + +If you're fine with the default English or German keyboard, you can even ask for a penguin icon on the Meta key! I needed a Spanish keyboard, which doesn't offer this option. + +### Receiving and using it + +The perfectly packaged computer arrived in total safety to my door just six working days after the payment was registered. After unpacking the computer and unlocking the battery, I was ready to roll. + +![Tuxedo Book BC1507][7] + +The new toy on top of my (physical) desktop. + +The computer's design is really nice and feels solid. Even though the chassis on this model is not aluminum, it stays cool. The fan is really quiet, and the airflow goes to the back edge, not to the sides, as in many other laptops. The battery provides several hours of autonomy from an electrical outlet. An option in the BIOS called FlexiCharger stops charging the battery after it reaches a certain percentage, so you don't need to remove the battery when you work for a long time while plugged in. + +The keyboard is really comfortable and surprisingly quiet. Even the touchpad keys are quiet! Also, you can easily adjust the light intensity on the back-lit keyboard. + +Finally, it's easy to access every component in the laptop so the computer can be updated or repaired without problems. Tuxedo even sends spare screws! + +### Conclusion + +After a month of heavy use, I'm really happy with the system. I got exactly what I asked for, and everything works perfectly. + +Because they are usually high-end systems, Linux-included computers tend to be on the expensive side of the spectrum. If you compare the price of a Tuxedo or Slimbook computer with something with similar specifications from a more established brand, the prices are not that different. If you are after a powerful system to use with free software, don't hesitate to support these companies: What they offer is worth the price. + +Let's us know in the comments about your experience with Tuxedo and other "penguin-friendly" companies. + +* * * + +_This article is based on "[My new 'penguin ready' laptop: Tuxedo-Book-BC1507][8]," published on Ricardo's blog, [From Mind to Type][9]._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/linux-laptop + +作者:[Ricardo Berlasso][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/rgb-eshttps://opensource.com/users/greg-phttps://opensource.com/users/chrisodhttps://opensource.com/users/victorhckhttps://opensource.com/users/hankghttps://opensource.com/users/noplanman +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_penguin_green.png?itok=ENdVzW22 (Penguin with green background) +[2]: https://system76.com/ +[3]: https://slimbook.es/en/ +[4]: https://www.tuxedocomputers.com/ +[5]: https://www.tuxedocomputers.com/en/Infos/News/Tuxedo-Computers-stands-for-Free-Software-and-Security-.tuxedo +[6]: https://coreboot.org/ +[7]: https://opensource.com/sites/default/files/uploads/tuxedo-600_0.jpg (Tuxedo Book BC1507) +[8]: https://frommindtotype.wordpress.com/2019/06/17/my-new-penguin-ready-laptop-tuxedo-book-bc1507/ +[9]: https://frommindtotype.wordpress.com/ diff --git a/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md b/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md new file mode 100644 index 0000000000..10d779fe6b --- /dev/null +++ b/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md @@ -0,0 +1,375 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Modifying Windows local accounts with Fedora and chntpw) +[#]: via: (https://fedoramagazine.org/modifying-windows-local-accounts-with-fedora-and-chntpw/) +[#]: author: (Shaun Assam https://fedoramagazine.org/author/sassam/) + +Modifying Windows local accounts with Fedora and chntpw +====== + +![][1] + +I recently encountered a problem at work where a client’s Windows 10 PC lost trust to the domain. The user is an executive and the hindrance of his computer can affect real-time mission-critical tasks. He gave me 30 minutes to resolve the issue while he attended a meeting. + +Needless to say, I’ve encountered this issue many times in my career. It’s an easy fix using the Windows 7/8/10 installation media to reset the Administrator password, remove the PC off the domain and rejoin it. Unfortunately it didn’t work this time. After 20 minutes of scouring the net and scanning through the Microsoft Docs with no success, I turned to my development machine running Fedora with hopes of finding a solution. + +With _dnf search_ I found a utility called **chntpw**: + +``` +$ dnf search windows | grep password +``` + +According to the summary, _chntpw_ will “change passwords in Windows SAM files.” + +Little did I know at the time there was more to this utility than explained in the summary. Hence, this article will go through the steps I used to successfully reset a Windows local user password using _chntpw_ and a Fedora Workstation Live boot USB. The article will also cover some of the features of _chntpw_ used for basic user administration. + +### Installation and setup + +If the PC can connect to the internet after booting the live media, install _chntpw_ from the official Fedora repository with: + +``` +$ sudo dnf install chntpw +``` + +If you’re unable to access the internet, no sweat! Fedora Workstation Live boot media has all the dependencies installed out-of-the-box, so all we need is the package. You can find the builds for your Fedora version from the [Fedora Project’s Koji][2] site. You can use another computer to download the utility and use a USB thumb drive, or other form of media to copy the package. + +First and foremost we need to create the Fedora Live USB stick. If you need instructions, the article on [How to make a Fedora USB stick][3] is a great reference. + +Once the key is created shut-down the Windows PC, insert the thumb drive if the USB key was created on another computer, and turn on the PC — be sure to boot from the USB drive. Once the live media boots, select “Try Fedora” and open the Terminal application. + +Also, we need to mount the Windows drive to access the files. Enter the following command to view all drive partitions with an NTFS filesystem: + +``` +$ sudo blkid | grep ntfs +``` + +Most hard drives are assigned to _/dev/sdaX_ where X is the partition number — virtual drives may be assigned to _/dev/vdX_, and some newer drives (like SSDs) use _/dev/nvmeX_. For this example the Windows C drive is assigned to _/dev/sda2_. To mount the drive enter: + +``` +$ sudo mount /dev/sda2 /mnt +``` + +Fedora Workstation contains the _ntfs-3g_ and _ntfsprogs_ packages out-of-the-box. If you’re using a spin that does not have NTFS working out of the box, you can install these two packages from the official Fedora repository with: + +``` +$ sudo dnf install ntfs-3g ntfsprogs +``` + +Once the drive is mounted, navigate to the location of the SAM file and verify that it’s there: + +``` +$ cd /mnt/Windows/System32/config +$ ls | grep SAM + SAM + SAM.LOG1 + SAM.LOG2 +``` + +### Clearing or resetting a password + +Now it’s time to get to work. The help flag **-h** provides everything we need to know about this utility and how to use it: + +``` +$ chntpw -h +chntpw: change password of a user in a Windows SAM file, +or invoke registry editor. Should handle both 32 and 64 bit windows and +all version from NT3.x to Win8.1 +chntpw [OPTIONS] [systemfile] [securityfile] [otherreghive] […] + -h This message + -u Username or RID (0x3e9 for example) to interactively edit + -l list all users in SAM file and exit + -i Interactive Menu system + -e Registry editor. Now with full write support! + -d Enter buffer debugger instead (hex editor), + -v Be a little more verbose (for debuging) + -L For scripts, write names of changed files to /tmp/changed + -N No allocation mode. Only same length overwrites possible (very safe mode) + -E No expand mode, do not expand hive file (safe mode) + +Usernames can be given as name or RID (in hex with 0x first) +See readme file on how to get to the registry files, and what they are. + Source/binary freely distributable under GPL v2 license. See README for details. + NOTE: This program is somewhat hackish! You are on your own! +``` + +Use the **-l** parameter to display a list of users it reads from the SAM file: + +``` +$ sudo chntpw -l SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +| RID -|---------- Username ------------| Admin? |- Lock? --| +| 01f4 | Administrator | ADMIN | dis/lock | +| 01f7 | DefaultAccount | | dis/lock | +| 03e8 | defaultuser0 | | dis/lock | +| 01f5 | Guest | | dis/lock | +| 03ea | sysadm | ADMIN | | +| 01f8 | WDAGUtilityAccount | | dis/lock | +| 03e9 | WinUser | | | +``` + +Now that we have a list of Windows users we can edit the account. Use the **-u** parameter followed by the username and the name of the SAM file. For this example, edit the _sysadm_ account: + +``` +$ sudo chntpw -u sysadm SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +================= USER EDIT ==================== + +RID : 1002 [03ea] +Username: sysadm +fullname: SysADM +comment : +homedir : + +00000220 = Administrators (which has 2 members) + +Account bits: 0x0010 = +[ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | +[ ] Temp. duplicate | [X] Normal account | [ ] NMS account | +[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | +[ ] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | +[ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) | + +Failed login count: 0, while max tries is: 0 +Total login count: 0 + +- - - User Edit Menu: +1 - Clear (blank) user password +(2 - Unlock and enable user account) [seems unlocked already] +3 - Promote user (make user an administrator) +4 - Add user to a group +5 - Remove user from a group +q - Quit editing user, back to user select +Select: [q] > +``` + +To clear the password press **1** and ENTER. If successful you will see the following message: + +``` +... +Select: [q] > 1 +Password cleared! +================= USER EDIT ==================== + +RID : 1002 [03ea] +Username: sysadm +fullname: SysADM +comment : +homedir : + +00000220 = Administrators (which has 2 members) + +Account bits: 0x0010 = +[ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | +[ ] Temp. duplicate | [X] Normal account | [ ] NMS account | +[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | +[ ] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | +[ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) | + +Failed login count: 0, while max tries is: 0 +Total login count: 0 +** No NT MD4 hash found. This user probably has a BLANK password! +** No LANMAN hash found either. Try login with no password! +... +``` + +Verify the change by repeating: + +``` +$ sudo chntpw -l SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +| RID -|---------- Username ------------| Admin? |- Lock? --| +| 01f4 | Administrator | ADMIN | dis/lock | +| 01f7 | DefaultAccount | | dis/lock | +| 03e8 | defaultuser0 | | dis/lock | +| 01f5 | Guest | | dis/lock | +| 03ea | sysadm | ADMIN | *BLANK* | +| 01f8 | WDAGUtilityAccount | | dis/lock | +| 03e9 | WinUser | | | + +... +``` + +The “Lock?” column now shows _BLANK_ for the sysadm user. Type **q** to exit and **y** to write the changes to the SAM file. Reboot the machine into Windows and login using the account (in this case _sysadm_) without a password. + +### Features + +Furthermore, _chntpw_ can perform basic Windows user administrative tasks. It has the ability to promote the user to the administrators group, unlock accounts, view and modify group memberships, and edit the registry. + +#### The interactive menu + +_chntpw_ has an easy-to-use interactive menu to guide you through the process. Use the **-i** parameter to launch the interactive menu: + +``` +$ chntpw -i SAM +chntpw version 1.00 140201, (c) Petter N Hagen +Hive name (from header): <\SystemRoot\System32\Config\SAM> +ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c +File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) +Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. + +<>========<> chntpw Main Interactive Menu <>========<> +Loaded hives: + 1 - Edit user data and passwords + 2 - List groups + - - - + 9 - Registry editor, now with full write support! + q - Quit (you will be asked if there is something to save) +``` + +#### Groups and account membership + +To display a list of groups and view its members, select option **2** from the interactive menu: + +``` +... +What to do? [1] -> 2 +Also list group members? [n] y +=== Group # 220 : Administrators + 0 | 01f4 | Administrator | + 1 | 03ea | sysadm | +=== Group # 221 : Users + 0 | 0004 | NT AUTHORITY\INTERACTIVE | + 1 | 000b | NT AUTHORITY\Authenticated Users | + 2 | 03e8 | defaultuser0 | + 3 | 03e9 | WinUser | +=== Group # 222 : Guests + 0 | 01f5 | Guest | +=== Group # 223 : Power Users +... +=== Group # 247 : Device Owners +``` + +#### Adding the user to the administrators group + +To elevate the user with administrative privileges press **1** to edit the account, then **3** to promote the user: + +``` +... +Select: [q] > 3 + +=== PROMOTE USER +Will add the user to the administrator group (0x220) +and to the users group (0x221). That should usually be +what is needed to log in and get administrator rights. +Also, remove the user from the guest group (0x222), since +it may forbid logins. + +(To add or remove user from other groups, please other menu selections) + +Note: You may get some errors if the user is already member of some +of these groups, but that is no problem. + +Do it? (y/n) [n] : y + +Adding to 0x220 (Administrators) … +sam_put_user_grpids: success exit +Adding to 0x221 (Users) … +sam_put_user_grpids: success exit +Removing from 0x222 (Guests) … +remove_user_from_grp: NOTE: group not in users list of groups, may mean user not member at all. Safe. Continuing. +remove_user_from_grp: NOTE: user not in groups list of users, may mean user was not member at all. Does not matter, continuing. +sam_put_user_grpids: success exit + +Promotion DONE! +``` + +#### Editing the Windows registry + +Certainly the most noteworthy, as well as the most powerful, feature of chntpw is the ability to edit the registry and write to it. Select **9** from the interactive menu: + +``` +... +What to do? [1] -> 9 +Simple registry editor. ? for help. + +> ? + Simple registry editor: + hive [] - list loaded hives or switch to hive number + cd - change current key + ls | dir [] - show subkeys & values, + cat | type - show key value + dpi - show decoded DigitalProductId value + hex - hexdump of value data + ck [] - Show keys class data, if it has any + nk - add key + dk - delete key (must be empty) + ed - Edit value + nv - Add value + dv - Delete value + delallv - Delete all values in current key + rdel - Recursively delete key & subkeys + ek - export key to (Windows .reg file format) + debug - enter buffer hexeditor + st [] - debug function: show struct info + q - quit +``` + +#### Finding help + +As we saw earlier, the **-h** parameter allows us to quickly access a reference guide to the options available with chntpw. The man page contains detailed information and can be accessed with: + +``` +$ man chntpw +``` + +Also, if you’re interested in a more hands-on approach, spin up a virtual machine. [Windows Server 2019][4] has an evaluation period of 180 days, and [Windows Hyper-V Server 2019][5] is unlimited. Creating a Windows guest VM will provide the basics to modify the Administrator account for testing and learning. For help with quickly creating a guest VM refer to the article [Getting started with virtualization in Gnome Boxes][6]. + +### Conclusion + +_chntpw_ is a hidden gem for Linux administrators and IT professionals alike. While a nifty tool to quickly reset Windows account passwords, it can also be used to troubleshoot and modify local Windows accounts with a no-nonsense feel that delivers. This is perhaps only one such tool for solving the problem, though. If you’ve experienced this issue and have an alternative solution, feel free to put it in the comments below. + +This tool, like many other “hacking” tools, holds with it an ethical responsibility. Even chntpw states: + +> NOTE: This program is somewhat hackish! You are on your own! + +When using such programs, we should remember the three edicts outlined in the message displayed when running **sudo** for the first time: + + 1. Respect the privacy of others. + 2. Think before you type. + 3. With great power comes great responsibility. + + + +* * * + +_Photo by _[_Silas Köhler_][7]_ on _[_Unsplash_][8]_,_ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/modifying-windows-local-accounts-with-fedora-and-chntpw/ + +作者:[Shaun Assam][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/sassam/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/chntpw-816x345.jpg +[2]: https://koji.fedoraproject.org/koji/packageinfo?packageID=6945 +[3]: https://fedoramagazine.org/make-fedora-usb-stick/ +[4]: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019 +[5]: https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019 +[6]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ +[7]: https://unsplash.com/@silas_crioco?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[8]: https://unsplash.com/search/photos/key-lock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md new file mode 100644 index 0000000000..6c28cfb644 --- /dev/null +++ b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md @@ -0,0 +1,165 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line) +[#]: via: (https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line +====== + +Hello All!!!, Good to See you! So we saw how to install [Debian 10(Buster)][1] in the previous article. Today, we are going to learn how to upgrade from Debian 9 to Debian 10. Since we have already seen about Debian 10 and its features, let’s not go deep into it. But readers who didn’t have the chance to read that article, let’s give a quick update about Debian 10 and its new features. + + + +After almost two years of development, the team at Debian has finally released a stable version of Buster, code name for Debian 10. Buster is a LTS (Long Term Support) version and hence will be supported for the next 5 years by Debian. + +### Debian 10 (Buster) – New Features + +Debian 10 (Buster) comes packed with a lot of new features which could be rewarding to most of the Debian fans out there. Some of the features include: + + * GNOME Desktop 3.30 + * AppArmor enabled by default + * Supports Linux Kernel 4.19.0-4 + * Supports OpenJDk 11.0 + * Moved from Nodejs 4-8 to Nodejs 10.15.2 + * Iptables replaced by NFTables + + + +and a lot more. + +### Step by Step Guide to Upgrade from Debian 9 to Debian 10 + +Before we start upgrading to Debian 10, let’s look at the prerequisites needed for the upgrade: + +### Step 1) Debian upgrade prerequisites + + * A good internet connection + * Root user permission + * Data backup + + + +It is extremely important to backup all your application code bases, data files, user account details, configuration files, so that you can always revert to the previous version if anything goes wrong during the upgrade. + +### Step 2) Upgrade Debian 9 Existing Packages + +Next step is to upgrade all your existing packages as any packages that are tagged as held back cannot be upgraded and there is a possibility the upgrade from Debian 9 to Debian 10 may fail or cause some issues. So, let’s not take any chances and better upgrade the packages. Use the following code to upgrade the packages: + +``` +root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y +``` + +### Step 3) Modify Package Repository file (/etc/sources.list) + +Next step is to modify package repository file “/etc/sources.list” where you need to replace the text “Stretch” with the text “Buster”. + +But before you change anything, make sure to create a backup of the sources.list file as shown below: + +``` +root@linuxtechi:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak +``` + +Now use below sed commands to replace the text ‘**stretch**‘ with ‘**buster**‘ in package repository file, example is shown below, + +``` +root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list +root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*.list +``` + +Once the text is updated, you need to update the package index like shown below: + +``` +root@linuxtechi:~$ sudo apt update +``` + +Before start upgrading  your existing Debian OS , let’s verify the current version using the following command, + +``` +root@linuxtechi:~$ cat /etc/*-release +PRETTY_NAME="Debian GNU/Linux 9 (stretch)" +NAME="Debian GNU/Linux" +VERSION_ID="9" +VERSION="9 (stretch)" +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" +root@linuxtechi:~$ +``` + +### Step 4) Upgrade from Debian 9 to Debian 10 + +Once you made all the changes, it is time to upgrade from Debian 9 – Debian 10. But before that, make sure to update your packages again as shown below: + +``` +root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y +``` + +During packages upgrade you will be prompted to start the services, so choose your preferred option + +Once all the packages are updated in your system, it is time to upgrade your distribution package. Use the following code to upgrade the distribution: + +``` +root@linuxtechi:~$ sudo apt dist-upgrade -y +``` + +The upgrade process may take a few minutes depending upon your internet connection. Remember during the upgrade process, you’ll also be asked a few questions whether you need to restart the services during the packages are upgraded and whether you need to keep the existing configurations files. If you don’t want to make any custom changes, simply type “Y” and let the upgrade process continue. + +### Step 5) Verify Upgrade + +Once the upgrade process is completed, reboot your machine and check the version using the following command: + +``` +root@linuxtechi:~$ lsb_release -a +``` + +If you get the output as shown below: + +``` +Distributor ID: Debian +Description: Debian GNU/Linux 10 (buster) +Release: 10 +Codename: buster +root@linuxtechi:~$ +``` + +Yes, you have successfully upgraded from Debian 9 to Debian 10. + +Alternate way to verify upgrade + +``` +root@linuxtechi:~$ cat /etc/*-release +PRETTY_NAME="Debian GNU/Linux 10 (buster)" +NAME="Debian GNU/Linux" +VERSION_ID="10" +VERSION="10 (buster)" +VERSION_CODENAME=buster +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" +root@linuxtechi:~$ +``` + +### Conclusion + +Hope the above step by step guide provided you with all the information needed to upgrade from Debian 9(Stretch) to Debian 10 (Buster) easily. Please give us your feedback, suggestions and your experiences with the all new Debian 10 in the comments section. For more such Linux tutorials and articles, keep visiting LinuxTechi.com every now and then. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/ + +作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ diff --git a/sources/tech/20190722 How to run virtual machines with virt-manager.md b/sources/tech/20190722 How to run virtual machines with virt-manager.md new file mode 100644 index 0000000000..8a2586ea25 --- /dev/null +++ b/sources/tech/20190722 How to run virtual machines with virt-manager.md @@ -0,0 +1,169 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to run virtual machines with virt-manager) +[#]: via: (https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/) +[#]: author: (Marco Sarti https://fedoramagazine.org/author/msarti/) + +How to run virtual machines with virt-manager +====== + +![][1] + +In the beginning there was dual boot, it was the only way to have more than one operating system on the same laptop. At the time, it was difficult for these operating systems to be run simultaneously or interact with each other. Many years passed before it was possible, on common PCs, to run an operating system inside another through virtualization. + +Recent PCs or laptops, including moderately-priced ones, have the hardware features to run virtual machines with performance close to the physical host machine. + +Virtualization has therefore become normal, to test operating systems, as a playground for learning new techniques, to create your own home cloud, to create your own test environment and much more. This article walks you through using Virt Manager on Fedora to setup virtual machines. + +### Introducing QEMU/KVM and Libvirt + +Fedora, like all other Linux systems, comes with native support for virtualization extensions. This support is given by KVM (Kernel based Virtual Machine) currently available as a kernel module. + +QEMU is a complete system emulator that works together with KVM and allows you to create virtual machines with hardware and peripherals. + +Finally [libvirt][2] is the API layer that allows you to administer the infrastructure, ie create and run virtual machines. + +The set of these three technologies, all open source, is what we’re going to install on our Fedora Workstation. + +### Installation + +#### Step 1: install packages + +Installation is a fairly simple operation. The Fedora repository provides the “virtualization” package group that contains everything you need. +``` + +``` + +sudo dnf install @virtualization +``` + +``` + +#### Step 2: edit the libvirtd configuration + +By default the system administration is limited to the root user, if you want to enable a regular user you have to proceed as follows. + +Open the /etc/libvirt/libvirtd.conf file for editing +``` + +``` + +sudo vi /etc/libvirt/libvirtd.conf +``` + +``` + +Set the domain socket group ownership to libvirt +``` + +``` + +unix_sock_group = "libvirt" +``` + +``` + +Adjust the UNIX socket permissions for the R/W socket +``` + +``` + +unix_sock_rw_perms = "0770" +``` + +``` + +#### Step 3: start and enable the libvirtd service +``` + +``` + +sudo systemctl start libvirtd +sudo systemctl enable libvirtd +``` + +``` + +#### Step 4: add user to group + +In order to administer libvirt with the regular user you must add the user to the libvirt group, otherwise every time you start virtual-manager you will be asked for the password for sudo. +``` + +``` + +sudo usermod -a -G libvirt $(whoami) +``` + +``` + +This adds the current user to the group. You must log out and log in to apply the changes. + +### Getting started with virt-manager + +The libvirt system can be managed either from the command line (virsh) or via the virt-manager graphical interface. The command line can be very useful if you want to do automated provisioning of virtual machines, for example with [Ansible][3], but in this article we will concentrate on the user-friendly graphical interface. + +The virt-manager interface is simple. The main form shows the list of connections including the local system connection. + +The connection settings include virtual networks and storage definition. it is possible to define multiple virtual networks and these networks can be used to communicate between guest systems and between the guest systems and the host. + +### Creating your first virtual machine + +To start creating a new virtual machine, press the button at the top left of the main form: + +![][4] + +The first step of the wizard requires the installation mode. You can choose between a local installation media, network boot / installation or an existing virtual disk import: + +![][5] + +Choosing the local installation media the next step will require the ISO image path: + +![ ][6] + +The subsequent two steps will allow you to size the CPU, memory and disk of the new virtual machine. The last step will ask you to choose network preferences: choose the default network if you want the virtual machine to be separated from the outside world by a NAT, or bridged if you want it to be reachable from the outside. Note that if you choose bridged the virtual machine cannot communicate with the host machine. + +Check “Customize configuration before install” if you want to review or change the configuration before starting the setup: + +![][7] + +The virtual machine configuration form allows you to review and modify the hardware configuration. You can add disks, network interfaces, change boot options and so on. Press “Begin installation” when satisfied: + +![][8] + +At this point you will be redirected to the console where to proceed with the installation of the operating system. Once the operation is complete, you will have the working virtual machine that you can access from the console: + +![][9] + +The virtual machine just created will appear in the list of the main form, where you will also have a graph of the CPU and memory occupation: + +![][10] + +libvirt and virt-manager is a powerful tool that allows great customization to your virtual machines with enterprise level management. If something even simpler is desired, note that Fedora Workstation comes with [GNOME Boxes pre-installed and can be sufficient for basic virtualization needs][11]. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ + +作者:[Marco Sarti][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/msarti/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/virt-manager-816x346.jpg +[2]: https://libvirt.org/ +[3]: https://fedoramagazine.org/get-the-latest-ansible-2-8-in-fedora/ +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-41-45.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-30-53.png +[6]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-42-39.png +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-43-21.png +[8]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-44-58.png +[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-55-35.png +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-11-09-22.png +[11]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ diff --git a/sources/tech/20190723 8 Best Open Source CRM Software.md b/sources/tech/20190723 8 Best Open Source CRM Software.md new file mode 100644 index 0000000000..89d0b977b4 --- /dev/null +++ b/sources/tech/20190723 8 Best Open Source CRM Software.md @@ -0,0 +1,230 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (8 Best Open Source CRM Software) +[#]: via: (https://itsfoss.com/best-open-source-crm/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +8 Best Open Source CRM Software +====== + +_**In this article, we list some of the best open source CRM software available for small and medium sized businesses.**_ + +### What is CRM? + +CRM stands for [Customer Relationship Management][1]. A CRM software enables the companies to interact with their potential and existing customers, understand and manage their requirement. This improved the relation of the organization with customer and you know that a happy customer brings profitability to the business. + +No matter how big your team is (small business or a big firm), a CRM software always comes in handy when you want to keep things organized in your business. + +You may avoid a CRM software for a couple of employees when you start a business. However, to streamline the process and make the work efficient and fast – you will eventually need a CRM software. + +But, what about the level of control (or security) in a CRM software? Do you want a transparent CRM software which you can take control of? + +Well, that is when an open source CRM software comes into play. You can host it yourself, and you can customize it as per your requirements. You may also opt for the hosted version where you don’t have to manage it yourself. + +In this article, we talk about some of the best open-source CRM software I have found. + +### Best Free and Open Source CRM Software + +![][2] + +Let me clarify something. CRM is intended for businesses and when there is a software created for business organizations, the developers would also like to make money. This is why almost all of the free and open source software also have their paid ‘enterprise versions’ available. + +While you can download the open source version and host it on your own Linux based server, the ‘enterprise versions’ are hosted by the developers themselves so that you don’t have to manage it. Some enterprise versions also provide premium features that are not available for the open source versions. Ticket support is also a feature available only for the enterprise versions. + +I have tried to highlight their ‘premium features’ in the list. Of course, t_he list below is in no particular order of ranking._ + +#### 1\. SuiteCRM + +![Suitecrm Hosting][3] + +Key Highlights: + + * Sever-basis charge instead of per-user subscription for hosted service + * Open-source + * Affordable managed hosting plans + * Supports third party integration + * 7-days free trial + + + +SuiteCRM was originally inspired (and forked) from SugarCRM’s open-source version. Well, that is no longer available. So, SuiteCRM is the open source alternative for organizations who utilized SugarCRM earlier. + +[][4] + +Suggested read  Use Do Not Disturb Mode in Ubuntu With NoNotifications + +In addition to all the essential features a CRM has to offer, SuiteCRM offers some great affordable managed hosting deals for organizations. With an impressive pricing plan (on server-basis with unlimited users), [SuiteCRM takes aim at Salesforce][5] – which is promising. + +[SuiteCRM][6] + +#### 2\. Odoo + +![][7] + +Key Highlights: + + * Open-source edition available + * Enterprise edition pricing on a per-user basis + * Wide variety of third party integrations + * 15-days free trial + + + +Odoo is yet another popular open-source CRM solution. However, in contrast to SuitCRM, you will observe the pricing plan per user. So, if you are just starting out with a lot of users – you might find it a bit pricey. + +The third-party integrations can be done easily and you can find the pricing for each app/integration when purchasing a subscription. You can either opt for the open source community edition or purchase the enterprise edition. + +[Odoo][8] + +#### 3\. Vtiger + +![][9] + +Key Highlights: + + * Open source edition based on SugarCRM + * Separate pricing plans for Marketing, Sales, Help desk or all-in-one + * Regional pricing available for some countries like India + * Per-user pricing + + + +Vtiger offers a cloud version and an open source version. Of course, if you opt for the open source version, you get to host it yourself and manage it all by yourself or hire a team. + +After observing the pricing plan, the managed cloud version obviously looks promising. – with separate pricing plans for sales, marketing, and help desk. However, if you have the required technical expertise, the open-source version is good enough as well. Also, it was interesting to see a regional pricing plan for India because they have an office here. + +[Vtiger][10] + +#### 4\. ConcourseSuite + +![][11] + +Key Highlights: + + * Offers a separate (but outdated) open source community edition + * Provides a 5-user trial plan for the latest version + + + +ConcourseSuite is a simple CRM which offers open-source version as well. The community edition (or the open-source version) is outdated – which you can still utilize as a basic CRM. + +In case you want the latest version (which is the enhanced version of the community edition), you will have to opt for a 5-user trial or purchase the enterprise/cloud version. I couldn’t find a clear pricing plan but its pricing page did mention $10,000 for unlimited users. So, you will probably find out about it after trying out the trial. + +[ConcourseSuite][12] + +#### 5\. EspoCRM + +![][13] + +Key Highlights: + + * The ability to switch to on-premise anytime. + * Actively maintained open source (self-hosted) package. + + + +EspoCRM is new to the scene and it is an impressive CRM software. You can download it for free and host it yourself or opt for the cloud solution where they do it for you. + +[][14] + +Suggested read  10 Amazing Websites Every Linux Gamer Must Follow + +They have got a detailed [documentation][15] – in case you want to try it yourself. Also, if you want to go with the cloud solution – you can always switch to on-premise anytime you want. I guess that makes it a bit more appealing. + +[EspoCRM][16] + +#### 6\. Axelor CRM + +![Axelor Crm][17] + +Key Highlights: + + * A complete suite of ERP, CRM, and BPM. + * Mobile apps for Android and iOS + + + +Axelor is normally a complete suite of ERP, CRM, and BPM. Here, we talk about the CRM which is an incredible open source CRM available out there. + +In addition to the web app, it also offers mobiles apps for Android and iOS. So, no matter you host it yourself or purchase a subscription for managed hosting – Axelor CRM is a great choice to keep up across multiple platforms. + +#### 7\. Crust CRM (Corteza) + +![][18] + +Key Highlights: + + * A unified open source solution + * Recently launched with latest features on board + + + +[Crust CRM][19] is one of the best enterprise-level Slack/Salesforce alternatives. Well, the primary aim of Crust CRM is to provide you a unified platform. + +Crust CRM offers a community edition “Corteza” which is open-source in nature with all the latest features that you get with Crust CRM. It has been recently launched – so you can expect it to be compatible with a lot of services. You need to go through the [technical documentation][20] to set it up. + +[Corteza][21] + +#### 8\. X2CRM + +![][22] + +Key Highlights: + + * The open-source package is no longer actively maintained – but available. + * On-premise and hosted options available + + + +X2CRM is yet another convincing open source solution. The open source package includes all the modules (Sales, Marketing, and Support). + +However, do note that the open source package isn’t actively maintained anymore – so if you want the latest and greatest features, you will have to purchase it. You can let them manage everything (hosted solution) or you get to manage everything and opt for their support and optimization services (on-premise). + +[X2CRM][23] + +### Wrapping Up + +I had made the [list of best open source CMS][24] earlier. You may read that to get some ideas about which open source technology to use for creating your business website. + +Coming back to CRM, if you would ever consider trying out an open source CRM, these are the best ones I would recommend. Did I miss one of your favorites? Let us know about it in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-open-source-crm/ + +作者:[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/Customer_relationship_management +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/open-source-crm-software.png?resize=800%2C450&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/suitecrm-hosting.jpg?resize=800%2C457&ssl=1 +[4]: https://itsfoss.com/do-not-disturb-mode-ubuntu/ +[5]: https://itsfoss.com/suitecrm-ondemand/ +[6]: https://suitecrm.com/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/odoocrm.jpg?fit=800%2C384&ssl=1 +[8]: https://www.odoo.com/page/crm +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/vtiger.jpg?fit=800%2C419&ssl=1 +[10]: https://www.vtiger.com/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/concoursesuite-crm.jpg?fit=800%2C629&ssl=1 +[12]: https://www.concursive.com/show/concoursesuite/wiki/How+to+Get+ConcourseSuite +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/espo-crm.jpg?ssl=1 +[14]: https://itsfoss.com/best-linux-gaming-websites/ +[15]: https://github.com/espocrm/documentation +[16]: https://www.espocrm.com/ +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/axelor-crm.jpg?fit=800%2C526&ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/corteza.jpg?resize=800%2C417&ssl=1 +[19]: https://www.crust.tech/products/crust-crm/ +[20]: https://github.com/cortezaproject/corteza-docs +[21]: https://cortezaproject.org/ +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/x2crm.png?ssl=1 +[23]: https://x2crm.com/download +[24]: https://itsfoss.com/open-source-cms/ diff --git a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md new file mode 100644 index 0000000000..2f8d92bb28 --- /dev/null +++ b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md @@ -0,0 +1,119 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Create a User Account Without useradd Command in Linux?) +[#]: via: (https://www.2daygeek.com/linux-user-account-creation-in-manual-method/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +How to Create a User Account Without useradd Command in Linux? +====== + +There are three commands are available in Linux to create an user account. + +Did you ever tried to create a user account in Linux using manual method? + +I mean to say without using an above three commands. + +If you don’t know how to do that? we are here to help you on this and will show you in details. + +Have you wondering, how it’s possible? If yes, don’t worry, as we have mentioned many times that anything can be done on Linux. It is one of the example. + +Yes, we can create it. Are you excited to know more it? + + * **[Three Methods To Create A User Account In Linux?][1]** + * **[Two Methods To Create Bulk Users In Linux][2]** + + + +I don’t want to you to wait any more. Let’s do it right away. + +To do so, first, we need to find out last created UID and GID information. Once you have these information handy then proceed to next step. + +``` +# cat /etc/passwd | tail -1 + +tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash +``` + +Based on the above output. Last created user UID is 1153 and GID is 1154. To experiment this, we are going to add `tuser2` in the system. + +Now, add an entry of user details in /etc/passwd. There are seven fields exist and you need to add required details. + +``` ++-----------------------------------------------------------------------+ +|username:password:UID:GID:Comments:User Home Directory:User Login Shell| ++-----------------------------------------------------------------------+ + | | | | | | | + 1 2 3 4 5 6 7 + +1- Username: This field indicates the User name. Characters length should be between 1 to 32. +2- Password (x): It indicates that encrypted password is stored at /etc/shadow file. +3- User ID: It indicates the user ID (UID) each user should be contain unique UID. UID (0-Zero) is reserved for root, UID (1-99) reserved for system users and UID (100-999) reserved for system accounts/groups +4- Group ID (GID): It indicates the group ID (GID) each group should be contain unique GID is stored at /etc/group file. +5- Comment/User ID Info: It indicates the command field. This field can be used to describe the user information. +6- Home directory (/home/$USER): It indicates the user's home directory. +7- shell (/bin/bash): It indicates the user's shell. +``` + +Add the user information in end of the file. + +``` +# vi /etc/passwd + +tuser2:x:1154:1155:Test User2:/home/tuser2:/bin/bash +``` + +You have to create a group with same name. So, add a group details in /etc/group file as well. + +``` +# vi /etc/group + +tuser2:x:1155: +``` + +Once you done the above two steps, then set a password for user. + +``` +# passwd tuser2 + +Changing password for user tuser2. +New password: +Retype new password: +passwd: all authentication tokens updated successfully. +``` + +Finally, try to login with newly created user. + +``` +# ssh [email protected] + +[email protected]'s password: +Creating directory '/home/tuser2'. + +$ls -la + +total 16 +drwx------. 2 tuser2 tuser2 59 Jun 17 09:46 . +drwxr-xr-x. 15 root root 4096 Jun 17 09:46 .. +-rw-------. 1 tuser2 tuser2 18 Jun 17 09:46 .bash_logout +-rw-------. 1 tuser2 tuser2 193 Jun 17 09:46 .bash_profile +-rw-------. 1 tuser2 tuser2 231 Jun 17 09:46 .bashrc +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-user-account-creation-in-manual-method/ + +作者:[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/linux-user-account-creation-useradd-adduser-newusers/ +[2]: https://www.2daygeek.com/linux-bulk-users-creation-useradd-newusers/ diff --git a/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md b/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md deleted file mode 100644 index c5ec0570fa..0000000000 --- a/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md +++ /dev/null @@ -1,139 +0,0 @@ -MX Linux: 一款专注于简洁性的发行版 -====== - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux.png?itok=OLjmCxT9) -Linux 有着如此多种的发型版。许多发行版为了使自己与众不同而做出了很多改变。另一方面,许多发行版之间的区别又是如此之小,你可能会问为什么有人还愿意不厌其烦的重复别人已经做过的工作呢?也正是基于这一疑惑,让我好奇为什么 [antiX][1] 和 [MEPIS][2]这两个社区要联合推出一个特殊的发行版,考虑到具体情况应该会是一个搭载 Xfce 桌面并基于 antiX 的版本,由 MEPIS 社区承担开发。 - -这一开发中的使用 Xfce 桌面的 antiX 系统是否会基于他之前的发行版呢?毕竟,antiX 旨在提供一个“快速、轻量级、易于安装的、支持linux live CD 且基于Debian Stable的发行版”。antiX 所搭载的桌面是 [LXDE][3],能够极好的满足关于轻量化系统的相关要求和特性。那究竟是什么原因使得 antiX 决定构建另一个轻量化发行版呢,仅仅是因为这次换成了 Xfce 吗?好吧,Linux 社区中的任何人都知道,差异之处体现了不同版本的特性,一个好的轻量级发行版是值得一试的(特别是可以使得我们的旧硬件摆脱进入垃圾填埋场的宿命)。当然,LXDE 和 Xfce 并不完全属于同一类别。LXDE应该被认为是一个真正的轻量级桌面,而 Xfce 应该被认为是一个中等重量的桌面。朋友们,这就是为什么 MX Linux 是 antiX 的一个重要迭代的关键。一个基于Debian的中等体量的发行版,它包含你完成工作所需的所有工具。 - -但是在 MX linux 中有一些直接从 antiX 借用来的非常有用的东西—那就是安装工具。当我第一次设置VirtualBox 的虚拟机来安装 MX Linux 时,我认为安装将是我已经习惯的典型的、非常简单的Linux安装。令我非常惊讶的是,MX Linux 使用的 antiX 安装程序打破了以往的痛点,特别是对于那些对尝试 Linux 持观望态度的人来说。 - -因此,甚至在我开始尝试 MX Linux 之前,我就对它有了深刻的印象。让我们来看看是什么让这个发行版的安装如此特别,最后再来看看桌面。 - -你可以从[这里][4]下载 MX Linux 17.1。系统的最低要求是: - - * CD/DVD驱动器(以及能够从该驱动器引导的BIOS)或活动USB(以及能够从USB引导的BIOS) - - * 英特尔 i486 或 AMD 处理器 - - * 512 MB 内存 - - * 5 GB 硬盘空间 - - * 扬声器,AC97 或 HDA-compatible 声卡 - - * 作为一个 LiveUSB 使用,需要 4 GB 空间 - -### 安装 - -MX Linux安装程序使安装 Linux 变得轻而易举。虽然它可能不是外观最现代化的安装工具,但也已经差不多了。安装的要点是从选择磁盘和选择安装类型开始的(图1)。 - -![install][6] - -图1:MX Linux 的安装程序截图之一。 - -[Used with permission][7] - -下一个重要的界面(图2)要求你为MS网络设置一个计算机名称、域名和(如果需要的话)工作组。 - -配置工作组的能力是真正值得称赞的第一项。这是我记忆中第一款在安装期间提供此选项的发行版。它还应该提示你,MX Linux 提供了开箱即用共享目录的功能。它做到了,而且深藏功与名。它并不完美,但它可以在不需要安装任何额外包的情况下工作(稍后将详细介绍)。 - -最后一个重要的安装界面(需要用户交互)是创建用户帐户和 root 权限的密码(图3)。 - -![user][9] - -图3:设置用户帐户详细信息和 root 用户密码。 - -[Used with permission][7] - -最后一个界面设置完成后,安装将完成并要求重新启动。重启后,你将看到登录屏幕。登录并享受MX Linux 带来的体验。 - -### 使用 - -Xfce桌面是一个非常容易上手的界面。默认设置将面板位于屏幕的左边缘(图4)。 - -![desktop ][11] - -图4: MX Linux 的默认桌面。 - -[Used with permission][7] - -如果你想将面板移动到更传统的位置,右键单击面板上的空白点,然后单击面板>面板首选项。在生成的窗口中(图5),单击样式下拉菜单,在桌面栏、垂直栏或水平栏之间进行选择你想要的模式。 - -![panel][13] - -图5:配置 MX Linux 面板。 - -[Used with permission][7] - -桌面栏和垂直选项的区别在于,在桌面栏模式下,面板垂直对齐,就像在垂直模式下一样,但是插件是水平放置的。这意味着你可以创建更宽的面板(用于宽屏布局)。如果选择水平布局,它将默在顶部,然后你必须取消锁定面板,单击关闭,然后(使用面板左侧边缘的拖动手柄)将其拖动到底部。你可以回到面板设置窗口并重新锁定面板。 - -除此之外,使用 Xfce 桌面对于任何级别的用户来说都是无需动脑筋的事情……就是这么简单。你会发现很多生产力代表的软件(LibreOffice, Orage日历,PDF-Shuffler)、图像软件(GIMP)、通信(Firefox,Thunderbird,HexChat),多媒体(Clementine、guvcview SMTube, VLC媒体播放器),和一些 MX Linux 专属的工具(称为MX工具,涵盖了 live-USB 驱动器制作工具,包管理工具,repo 管理工具,回购经理,live ISO 快照工具,等等)。 - -![sharing][15] - -图6:向网络共享一个目录。 -[Used with permission][7] - -### Samba - -让我们讨论一下如何将文件夹共享到你的网络。正如我所提到的,你不需要安装任何额外的包就可以使其正常工作。只需打开文件管理器,右键单击任何位置,并选择网络上的共享文件夹。系统将提示你输入管理密码(已在安装期间设置)。验证成功之后,Samba服务器配置工具将打开(图6)。 - -![sharing][17] - -图7:在MX Linux上配置共享。 - -[Used with permission][7] - -单击+按钮并配置你的共享。你将被要求指定一个目录,为共享提供一个名称/描述,然后决定该共享是否可写且可见(图7)。 - -当你单击 Access 选项时,你可以选择是让每个人都访问共享,还是限于特定的用户。问题就出在这里。此时,没有用户可以共享。为什么?因为它们还没有被添加。,有两种方法可以把它们添加到共享:从命令行或使用我们已经打开的工具。让我们用一种更为简单的方法。在Samba服务器配置工具的主窗口中,单击Preferences > Samba Users。在弹出的窗口中,单击 Add user。 - -将出现一个新窗口(图8),你需要从下拉框中选择用户,输入Windows用户名,并为用户键入/重新键入密码。 - -![Samba][19] - -图8:向 Samba 添加用户。 - -[Used with permission][7] - -一旦你单击确定,用户将被添加,并且基于你的网络的对用户的共享功能也随之启用。创建 Samba 共享从未变得如此容易。 - -### 结论 - -MX Linux 使任何从桌面操作系统转到 Linux 都变得非常简单。尽管有些人可能会觉得桌面界面不太现代,但发行版的主要关注点不是美观,而是简洁。为此,MX Linux 以出色的方式取得了成功。Linux 的这种特性可以让任何人在使用 Linux 的过程中感到宾至如归。尝试这一中等体量的发行版,看看它能否作为你的日常系统。 - -从Linux 基金会和 edX 的[“Linux入门”][20]课程了解更多关于Linux的知识。 - --------------------------------------------------------------------------------- - -via: https://www.linux.com/learn/intro-to-linux/2018/4/mx-linux-mid-weight-distro-focused-simplicity - -作者:[JACK WALLEN][a] -译者:[qfzy1233](https://github.com/qfzy1233) -校对:[校对者ID](https://github.com/校对者ID) -选题:[lujun9972](https://github.com/lujun9972) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/users/jlwallen -[1]:https://antixlinux.com/ -[2]:https://en.wikipedia.org/wiki/MEPIS -[3]:https://lxde.org/ -[4]:https://mxlinux.org/download-links -[5]:/files/images/mxlinux1jpg -[6]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_1.jpg?itok=i9bNScjH (install) -[7]:/licenses/category/used-permission -[8]:/files/images/mxlinux3jpg -[9]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_3.jpg?itok=ppf2l_bm (user) -[10]:/files/images/mxlinux4jpg -[11]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_4.jpg?itok=mS1eBy9m (desktop) -[12]:/files/images/mxlinux5jpg -[13]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_5.jpg?itok=wsN1hviN (panel) -[14]:/files/images/mxlinux6jpg -[15]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_6.jpg?itok=vw8mIp9T (sharing) -[16]:/files/images/mxlinux7jpg -[17]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_7.jpg?itok=tRIWdcEk (sharing) -[18]:/files/images/mxlinux8jpg -[19]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_8.jpg?itok=ZS6lhZN2 (Samba) -[20]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md new file mode 100644 index 0000000000..c321d5374d --- /dev/null +++ b/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md @@ -0,0 +1,163 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) +[#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 +====== + +![Type Linux Commands In Capital Letters To Run Them As Sudo User][1] + +我非常喜欢 Linux 社区的原因是他们创建了很多有趣的项目,你很少能在任何其他操作系统中找到它们。不久前,我们看了一个名为 [**“Hollywood”**][2] 的有趣项目,它在类 Ubuntu 系统将终端变成了好莱坞技术情景剧的黑客界面。还有一些其他工具,例如 **cowsay**、**fortune**、**sl** 和 **toilet** 等,用来打开时间和自娱自乐!它们可能没有用,但这些程序娱乐性不错并且使用起来很有趣。今天,我偶然发现了另一个名为 **“SUDO”** 的类似工具。正如名字暗示的那样,你无论何时用大写字母输入 Linux 命令,SUDO 程序都会将它们作为 sudo 用户运行!这意味着,你无需在要运行的 Linux 命令前面输入 “sudo”。很酷,不是么? + + +### 安装 SUDO + +* * * + +**提醒一句:** + +在安装(或任何程序)之前,请查看源代码(最后给出的链接),并查看是否包含会损害你的系统的可疑/恶意代码。在 VM中 测试它。如果你喜欢或觉得它很有用,你可以在个人/生产系统中使用它。 + +* * * + +用 Git 克隆 SUDO 仓库: + +``` +$ git clone https://github.com/jthistle/SUDO.git +``` + +此命令将克隆 SUDO GIT 仓库的内容,并将它们保存在当前目录下的 “SUDO” 的目录中。 + +``` +Cloning into 'SUDO'... +remote: Enumerating objects: 42, done. +remote: Counting objects: 100% (42/42), done. +remote: Compressing objects: 100% (29/29), done. +remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 +Unpacking objects: 100% (42/42), done. +``` + +切换到 SUDO 目录: + +``` +$ cd SUDO/ +``` + +并使用命令安装它: + +``` +$ ./install.sh +``` + +该命令将在 **~/.bashrc** 文件中添加以下行: + +``` +[...] +# SUDO - shout at bash to su commands +# Distributed under GNU GPLv2, @jthistle on github + +shopt -s expand_aliases + +IFS_=${IFS} +IFS=":" read -ra PATHS <<< "$PATH" + +for i in "${PATHS[@]}"; do + for j in $( ls "$i" ); do + if [ ${j^^} != $j ] && [ $j != "sudo" ]; then + alias ${j^^}="sudo $j" + fi + done +done + +alias SUDO='sudo $(history -p !!)' + +IFS=${IFS_} + +# end SUDO +``` + +它还会备份你的 **~/.bashrc** 并将其保存为 **~/.bashrc.old**。如果有重大错误,你可以恢复它。 + +最后,使用命令更新更改: + +``` +$ source ~/.bashrc +``` + +### 现在,用大写字母中输入 Linux 命令,将它们作为 Sudo 用户运行 + +通常我们像下面那样执行需要 sudo/root 权限的命令。 + +``` +$ sudo mkdir /ostechnix +``` + +对么?没错!上面的命令将在根目录(/)中创建名为 “ostechnix” 的目录。让我们使用 **Ctrl + c** 取消。 + +一旦安装了 SUDO,你就可以**在没有 sudo 的情况下输入任何大写 Linux 命令**并运行它们。因此,你可以像下面那样运行上面的命令: + +``` +$ MKDIR /ostechnix + +$ TOUCH /ostechnix/test.txt + +$ LS /ostechnix +``` + +![][3] + +用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 + +请注意**它无法绕过 sudo 密码**。你仍然需要键入 sudo 密码才能执行给定的命令。它只会有助于避免在每个命令前面输入“sudo”。 + +* * * + +**相关阅读:Related read:=** + + * [**如何在 Linux 中没有 Sudo 密码运行特定命令**][4] + * [**如何恢复用户的 Sudo 权限**][5] + * [**如何在 Ubuntu 上为用户授予和删除 Sudo 权限**][6] + * [**如何在 Linux 系统中查找所有 Sudo 用户**][7] + * [**如何在终端中输入密码时显示星号**][8] + * [**如何更改 Linux 中的 Sudo 提示符**][9] + + + +* * * + +当然,输入 “sudo” 只需几秒钟,所以这不是什么大问题。 我必须告诉这是一个用来消磨时间的有趣且无用的项目。 如果你不喜欢它,那就去学习一些有用的东西吧。 如果你喜欢它,试一试,玩得开心! + +**资源:** + + * [**SUDO GitHub 仓库**][10] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/sudo-720x340.png +[2]: https://www.ostechnix.com/turn-ubuntu-terminal-hollywood-technical-melodrama-hacker-interface/ +[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/SUDO-in-action.gif +[4]: https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/ +[5]: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/ +[6]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/ +[7]: https://www.ostechnix.com/find-sudo-users-linux-system/ +[8]: https://www.ostechnix.com/display-asterisks-type-password-terminal/ +[9]: https://www.ostechnix.com/change-sudo-prompt-linux-unix/ +[10]: https://github.com/jthistle/SUDO diff --git a/translated/tech/20190715 Understanding software design patterns.md b/translated/tech/20190715 Understanding software design patterns.md new file mode 100644 index 0000000000..9767669658 --- /dev/null +++ b/translated/tech/20190715 Understanding software design patterns.md @@ -0,0 +1,360 @@ +[#]: collector: (lujun9972) +[#]: translator: (arrowfeng) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Understanding software design patterns) +[#]: via: (https://opensource.com/article/19/7/understanding-software-design-patterns) +[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson) + +理解软件设计模式 +====== +设计模式可以帮助消除冗余代码。学习如何利用Java使用单例模式、工厂模式和观察者模式。 +![clouds in the sky with blue pattern][1] + +如果你是一名正在致力于计算机科学或者相关学科的程序员或者学生,很快,你将会遇到一条术语 “软件设计模式。” 根据维基百科,_" [软件设计模式][2]是在平常的软件设计工作中所遭遇的问题是一种通用的, 可重复使用的解决方案。“_ 这里是我对定义的理解:当你在编码项目上的同时,你经常会思考,“呵呵,这里貌似是冗余代码,我想是否我能改变代码使得更灵活并且这个改变是可接受的?”因此,你将开始思考怎样分割那些保持不变的内容和需要经常改变的内容。 + + +> 设计模式是一种通过分割那些保持不变的部分和经常变化的部分,让你的代码更容易修改的方法。 + +不出意外的话,每个从事编码工程的人都可能会有同样的思考。特别是那些工业级别的工程,在那里通常工作着数十甚至数百名开发者;协作过程表明必须有一些标准和规则来使代码更加优雅并适应变化。 这就是为什么我们有 [面向对象编程][3](OOP)和 [软件框架工具][4]。设计模式有点类似于OOP,但它通过将变化视为自然开发过程的一部分而进一步发展。基本上,设计模式利用了一些OOP的思想,比如抽象和接口,但是专注于改变的过程。 + + +当你开始开发项目时, 你经常会听到这样一个术语 _重构_,_意味着通过改变代码使它变得更优雅和可复用;_ 这就是设计模式耀眼的地方。 无论什么时候你处理现有代码时(无论是由其他人构建还是你自己过去构建的),了解设计模式可以帮助你以不同的方式看待事物,你将发现问题以及改进代码的方法。 + +那里有很多种设计模式,其中单例模式,工厂模式,和观察者模式三种最受欢迎,在这篇文章中我将会一一介绍它们。 + +### 如何遵循本指南 + +无论你是一位有经验的编程工作者还是一名刚刚接触的新手,我想让这篇教程很容易让每个人都可以理解。设计模式概念并不容易理解,减少开始旅程时的学习曲线始终是首要任务。因此,除了这篇带有图表和代码片段的文章外,我还创建了一个 [GitHub仓库][5],你可以克隆和在你的电脑上运行代码去实现这三种设计模式。你也可以观看我创建的 [YouTube视频][6]。 + + +#### 必要条件 + +如果你只是想了解一般的设计模式思想,则无需克隆示例项目或安装任何工具。但是,如果要运行示例代码,你需要安装以下工具: + + + * **Java Development Kit (JDK):** 我强烈建议 [OpenJDK][7]。 + * **Apache Maven:** 这个简单的工程使用 [Apache Maven][8] 构建; 幸好许多IDEs自带了Maven。 + * **Interactive development editor (IDE):** 我使用 [IntelliJ Community Edition][9], 但是你也可以使用 [Eclipse IDE][10] 或者其他你喜欢的 Java IDE。 + * **Git:** 如果你想克隆这个工程,你需要 [Git][11]客户端。 + + +安装好Git后运行下列命令克隆这个工程: + +``` +`git clone https://github.com/bryantson/OpensourceDotComDemos.git` +``` + +然后在你喜欢的IDE中,你可以将TopDesignPatterns仓库中的代码作为Apache Maven项目导入。 + +我正在使用Java,但你也可以使用支持 [抽象原理][12]的任何编程语言来实现设计模式。 + +### 单例模式:避免每次创建一个对象 + +[单例模式][13]是非常受欢迎的设计模式,它的实现相对来说很简单,因为你只需要一个类。然而,许多开发人员争论单例设计模式的是否利大于弊,因为它缺乏明显的好处并且容易被滥用。很少有开发人员直接实现单例;相反,像Spring Framework和Google Guice等编程框架内置了单例设计模式的特性。 + +但是了解单例模式仍然有巨大的用处。单例模式确保一个类仅创建一次且提供了一个对他的全局访问点。 + +> **Singleton pattern:** 确保仅有一个实例被创建且避免在同样的工程中创建多个实例。 + +下面这幅图展示了经典的类对象创建过程。当客户端请求创建一个对象时,构造函数会创建或者实例化一个对象并调用方法返回这个类。但是每次请求一个对象都会发生这样的情况——构造函数被调用,一个新的对象被创建并且它返回一个唯一的对象。我猜面向对象语言的创建者有每次都创建一个新对象的原因,但是单例过程的支持者说这是冗余的且浪费资源。 + +![Normal class instantiation][14] + +下面这幅图使用单例模式创建对象。这里,构造函数仅当对象首次通过调用预先设计好的 getInstance() 方法时才会被调用。这通常通过检查值是否为 null 来完成,并且这个对象被作为私有变量保存在单例类的内部。下次 getInstance() 被调用时,这个类会返回第一次被创建的对象。没有新的对象产生;它只是返回旧的那一个。 + +![Singleton pattern instantiation][15] + +下面这段代码展示了创建单例模式最简单的方法: + + +``` +package org.opensource.demo.singleton; + +public class OpensourceSingleton { + +    private static OpensourceSingleton uniqueInstance; + +    private OpensourceSingleton() { +    } + +    public static OpensourceSingleton getInstance() { +        if (uniqueInstance == null) { +            uniqueInstance = new OpensourceSingleton(); +        } +        return uniqueInstance; +    } + +} +``` + +在调用方, 这里展示了如何调用单例类来获取对象: + +``` +Opensource newObject = Opensource.getInstance(); +``` + +这段代码很好的验证了单例模式的思想: + + 1. 当 getInstance() 被调用时,它通过检查 null 值来见检查对象是否已经被创建。 + 2. 如果值为空,它会创建一个新对象并把它保存到私有域,返回这个对象给调用者。否则直接返回之前被创建的对象。 + + +单例模式实现的主要问题是它忽略了并行进程。当多个进程使用线程同时访问资源时,这个问题就产生了。对于这种情况有对应的解决方案,它被称为 _双重检查锁_ 用于多线程安全,如下所示: + +``` +package org.opensource.demo.singleton; + +public class ImprovedOpensourceSingleton { + +    private volatile static ImprovedOpensourceSingleton uniqueInstance; + +    private ImprovedOpensourceSingleton() {} + +    public static ImprovedOpensourceSingleton getInstance() { +        if (uniqueInstance == null) { +            synchronized (ImprovedOpensourceSingleton.class) { +                if (uniqueInstance == null) { +                    uniqueInstance = new ImprovedOpensourceSingleton(); +                } +            } +        } +        return uniqueInstance; +    } + +} +``` + +只是为了强调前一点,确保只有在你认为这是一个安全的选项时才能直接实现你的单例模式。最好的方法是通过使用一个制作精良的编程框架来利用单例功能。 + +### 工厂模式:将对象创建委派给工厂类以隐藏创建逻辑 + +[工厂模式][16] 是另一种众所周知的设计模式,但是有一小点复杂。实现工厂模式的方法有很多,而下列的代码示例为最简单的实现方式。为了创建对象,工厂模式定义了一个接口,让它的子类去决定哪一个子类实例化。 + +> **Factory pattern:** 将对象创建委派给工厂类,因此它能隐藏创建逻辑。 + +下列的图片展示了最简单的工厂模式是如何实现的? + +![Factory pattern][17] + +客户端请求工厂类创建某个对象,类型 x,而不是客户端直接调用对象创建。根据类型,工厂模式决定要创建和返回的对象。 + +在下列代码示例中,OpensourceFactory 是工厂类实现,它从调用者那里获取 _类型_ 并根据该输入值决定要创建和返回的对象: + +``` +package org.opensource.demo.factory; + +public class OpensourceFactory { + +    public OpensourceJVMServers getServerByVendor([String][18] name) { +        if(name.equals("Apache")) { +            return new Tomcat(); +        } +        else if(name.equals("Eclipse")) { +            return new Jetty(); +        } +        else if (name.equals("RedHat")) { +            return new WildFly(); +        } +        else { +            return null; +        } +    } +} +``` + +OpenSourceJVMServer 是一个100%的抽象类(或者一个接口类),它指示要实现的是什么,而不是怎样实现: + + +``` +package org.opensource.demo.factory; + +public interface OpensourceJVMServers { +    public void startServer(); +    public void stopServer(); +    public [String][18] getName(); +} +``` + +这是一个 OpensourceJVMServers 实现类示例。当 “RedHat” 被作为类型传递给工厂类,WildFly 服务器将被创建: + + +``` +package org.opensource.demo.factory; + +public class WildFly implements OpensourceJVMServers { +    public void startServer() { +        [System][19].out.println("Starting WildFly Server..."); +    } + +    public void stopServer() { +        [System][19].out.println("Shutting Down WildFly Server..."); +    } + +    public [String][18] getName() { +        return "WildFly"; +    } +} +``` + +### 观察者模式:订阅主题并获取相关更新的通知 + +最后是[观察者模式][20]。像单例模式那样,很少有专业的程序员直接实现观察者模式。但是,许多消息队列和数据服务实现都借用了观察者模式的概念。观察者模式在对象之间定义了一对多的依赖关系,当一个对象的状态发生改变时,所有依赖它的对象都将被自动地通知和更新。 + +> **Observer pattern:** 如果有更新,那么订阅了该话题/主题的客户端将被通知。 + +思考观察者模式的最简单方法是想象一个邮件列表,你可以在其中订阅任何主题,无论是开源,技术,名人,烹饪还是您感兴趣的任何其他内容。每个主题维护者一个它的订阅者列表,在观察者模式中它们相当于观察者。当某一个主题更新时,它所有的订阅者(观察者)都将被通知这次改变。并且订阅者总是能取消某一个主题的订阅。 + +如下图所示,客户端可以订阅不同的主题并添加观察者以获得最新信息的通知。因为观察者不断的监听着这个主题,这个观察者会通知客户端任何发生的改变。 + +![Observer pattern][21] + +让我们呢来看看观察者模式的代码示例,从主题/话题类开始: + + +``` +package org.opensource.demo.observer; + +public interface Topic { + +    public void addObserver([Observer][22] observer); +    public void deleteObserver([Observer][22] observer); +    public void notifyObservers(); +} +``` +这段代码描述了一个接口为不同的主题去实现已定义的方法。注意一个观察者如何被添加、移除和通知。 + +这是一个主题的实现示例: + +``` +package org.opensource.demo.observer; + +import java.util.List; +import java.util.ArrayList; + +public class Conference implements Topic { +    private List<Observer> listObservers; +    private int totalAttendees; +    private int totalSpeakers; +    private [String][18] nameEvent; + +    public Conference() { +        listObservers = new ArrayList<Observer>(); +    } + +    public void addObserver([Observer][22] observer) { +        listObservers.add(observer); +    } + +    public void deleteObserver([Observer][22] observer) { +        int i = listObservers.indexOf(observer); +        if (i >= 0) { +            listObservers.remove(i); +        } +    } + +    public void notifyObservers() { +        for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { +            [Observer][22] observer = listObservers.get(i); +            observer.update(totalAttendees,totalSpeakers,nameEvent); +        } +    } + +    public void setConferenceDetails(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { +        this.totalAttendees = totalAttendees; +        this.totalSpeakers = totalSpeakers; +        this.nameEvent = nameEvent; +        notifyObservers(); +    } +} +``` + +这段代码定义了一个特定主题的实现。当发生改变时,这个实现调用它自己的方法。 注意这将获取存储为列表的观察者的数量,并且可以通知和维护观察者。 + +这是一个观察者类: + +``` +package org.opensource.demo.observer; + +public interface [Observer][22] { +    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent); +} +``` + +这个类定义了一个接口,不同的观察者可以实现该接口以执行特定的操作。 + +例如,实现了该接口的观察者可以在会议上打印出与会者和发言人的数量: + + +``` +package org.opensource.demo.observer; + +public class MonitorConferenceAttendees implements [Observer][22] { +    private int totalAttendees; +    private int totalSpeakers; +    private [String][18] nameEvent; +    private Topic topic; + +    public MonitorConferenceAttendees(Topic topic) { +        this.topic = topic; +        topic.addObserver(this); +    } + +    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { +        this.totalAttendees = totalAttendees; +        this.totalSpeakers = totalSpeakers; +        this.nameEvent = nameEvent; +        printConferenceInfo(); +    } + +    public void printConferenceInfo() { +        [System][19].out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); +    } +} +``` + +### 之后去哪? + +现在你已经阅读了这篇对于设计模式的介绍引导,你应该去一个好地方寻求其他设计模式,例如外观模式,模版模式和装饰器模式。也有一些并发和分布式系统的设计模式如断路器模式和锚定模式。 + +可是,我相信最好的磨砺你的技能首先是通过在你的边缘工程或者练习中实现这些设计模式。你甚至可以开始考虑如何在实际项目中应用这些设计模式。接下来,我强烈建议您查看OOP的 [SOLID原则][23]。之后,你将准备好了解其他设计模式。 + +However, I believe it's best to hone your skills first by implementing these design patterns in your side projects or just as practice. You can even begin to contemplate how you can apply these design patterns in your real projects. Next, I highly recommend checking out the [SOLID principles][23] of OOP. After that, you will be ready to look into the other design patterns. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/understanding-software-design-patterns + +作者:[Bryant Son][a] +选题:[lujun9972][b] +译者:[arrowfeng](https://github.com/arrowfeng) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) +[2]: https://en.wikipedia.org/wiki/Software_design_pattern +[3]: https://en.wikipedia.org/wiki/Object-oriented_programming +[4]: https://en.wikipedia.org/wiki/Software_framework +[5]: https://github.com/bryantson/OpensourceDotComDemos/tree/master/TopDesignPatterns +[6]: https://www.youtube.com/watch?v=VlBXYtLI7kE&feature=youtu.be +[7]: https://openjdk.java.net/ +[8]: https://maven.apache.org/ +[9]: https://www.jetbrains.com/idea/download/#section=mac +[10]: https://www.eclipse.org/ide/ +[11]: https://git-scm.com/ +[12]: https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming) +[13]: https://en.wikipedia.org/wiki/Singleton_pattern +[14]: https://opensource.com/sites/default/files/uploads/designpatterns1_normalclassinstantiation.jpg (Normal class instantiation) +[15]: https://opensource.com/sites/default/files/uploads/designpatterns2_singletonpattern.jpg (Singleton pattern instantiation) +[16]: https://en.wikipedia.org/wiki/Factory_method_pattern +[17]: https://opensource.com/sites/default/files/uploads/designpatterns3_factorypattern.jpg (Factory pattern) +[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[20]: https://en.wikipedia.org/wiki/Observer_pattern +[21]: https://opensource.com/sites/default/files/uploads/designpatterns4_observerpattern.jpg (Observer pattern) +[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+observer +[23]: https://en.wikipedia.org/wiki/SOLID From db9d4b61751963d7580f6c71f17cee0935be4940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=E2=99=A1Adele?= Date: Wed, 24 Jul 2019 00:42:27 +0800 Subject: [PATCH 090/951] Revert "Merge (#3)" (#4) This reverts commit 38dd7895dd12909968c03743fe9436ef2ff06778. --- ... Microsoft Visio Alternatives for Linux.md | 227 -------- ...Mid-Weight Distro Focused on Simplicity.md | 126 ----- ... quickly view JPG images as a slideshow.md | 54 -- ...lete A Repository And GPG Key In Ubuntu.md | 136 ----- ...90708 10 ways to get started with Linux.md | 184 ------- ...08 Command line quick tips- Permissions.md | 126 ----- ... Sysadmin vs SRE- What-s the difference.md | 62 --- ... life support- Cross-compiling with GCC.md | 178 ------- ... Unix Operating Systems Online For Free.md | 256 --------- ...1 How to install Elasticsearch on MacOS.md | 144 ------ ...ktop Client for ProtonMail and Tutanota.md | 106 ---- ...a Driver Updates -No PPA Needed Anymore.md | 79 --- ... a lifelong learner and succeed at work.md | 72 --- ...716 Save and load Python data with JSON.md | 128 ----- ...20190717 How to install Kibana on MacOS.md | 113 ---- ...r Foundation with -1.2m Epic MegaGrants.md | 98 ---- ...a Driver Updates -No PPA Needed Anymore.md | 81 +++ ... quickly view JPG images as a slideshow.md | 53 ++ ...ns in Vendor Lock-in- Google and Huawei.md | 17 +- ...re makers shift production out of China.md | 73 --- ...e computing is driving a new era of CDN.md | 107 ---- ...MPLS is hanging on in this SD-WAN world.md | 71 --- ...internet should be all software-defined.md | 73 --- ... evolution of enterprise IoT technology.md | 102 ---- ...st DNS attacks and how to mitigate them.md | 151 ------ ...ojure - Modern dialect of Lisp (Part 1).md | 2 +- ...20171006 7 deadly sins of documentation.md | 1 - ... Microsoft Visio Alternatives for Linux.md | 242 +++++++++ ...stall Security Updates on Debian-Ubuntu.md | 70 +-- .../20190703 Parse arguments with Python.md | 2 +- ...lete A Repository And GPG Key In Ubuntu.md | 134 +++++ ...90708 10 ways to get started with Linux.md | 184 +++++++ ...08 Command line quick tips- Permissions.md | 133 +++++ ... Sysadmin vs SRE- What-s the difference.md | 63 +++ ... life support- Cross-compiling with GCC.md | 189 +++++++ ... Unix Operating Systems Online For Free.md | 269 ++++++++++ ...1 How to install Elasticsearch on MacOS.md | 154 ++++++ ...apital Letters To Run Them As Sudo User.md | 162 ++++++ ...ktop Client for ProtonMail and Tutanota.md | 118 +++++ ... Understanding software design patterns.md | 364 +++++++++++++ ...hat is POSIX- Richard Stallman explains.md | 2 +- ... Security scanning your DevOps pipeline.md | 488 ------------------ ...Ethernet for easier networking mobility.md | 126 ----- ... web-based alternative to Google Sheets.md | 130 ----- ...20190717 Mastering user groups on Linux.md | 225 -------- ...ing with the Circuit Playground Express.md | 96 ---- ... release often- to build a better brand.md | 110 ---- ...a GitHub Pages site with this HTTP hack.md | 85 --- ... What you need to know to be a sysadmin.md | 121 ----- .../20190719 Buying a Linux-ready laptop.md | 80 --- ...s local accounts with Fedora and chntpw.md | 375 -------------- ... to Debian 10 (Buster) via Command Line.md | 165 ------ ... run virtual machines with virt-manager.md | 169 ------ ...0190723 8 Best Open Source CRM Software.md | 230 --------- ...ccount Without useradd Command in Linux.md | 119 ----- ...s to computational thinking with Python.md | 35 +- ...Mid-Weight Distro Focused on Simplicity.md | 139 +++++ ...apital Letters To Run Them As Sudo User.md | 163 ------ ... Understanding software design patterns.md | 360 ------------- 59 files changed, 2353 insertions(+), 5769 deletions(-) delete mode 100644 published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md delete mode 100644 published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md delete mode 100644 published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md delete mode 100644 published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md delete mode 100644 published/20190708 10 ways to get started with Linux.md delete mode 100644 published/20190708 Command line quick tips- Permissions.md delete mode 100644 published/20190709 Sysadmin vs SRE- What-s the difference.md delete mode 100644 published/20190710 32-bit life support- Cross-compiling with GCC.md delete mode 100644 published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md delete mode 100644 published/20190711 How to install Elasticsearch on MacOS.md delete mode 100644 published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md delete mode 100644 published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md delete mode 100644 published/20190716 Become a lifelong learner and succeed at work.md delete mode 100644 published/20190716 Save and load Python data with JSON.md delete mode 100644 published/20190717 How to install Kibana on MacOS.md delete mode 100644 published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md create mode 100644 sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md create mode 100644 sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md delete mode 100644 sources/talk/20190716 Server hardware makers shift production out of China.md delete mode 100644 sources/talk/20190717 How edge computing is driving a new era of CDN.md delete mode 100644 sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md delete mode 100644 sources/talk/20190717 Public internet should be all software-defined.md delete mode 100644 sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md delete mode 100644 sources/talk/20190718 Worst DNS attacks and how to mitigate them.md create mode 100644 sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md rename {published => sources/tech}/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md (80%) create mode 100644 sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md create mode 100644 sources/tech/20190708 10 ways to get started with Linux.md create mode 100644 sources/tech/20190708 Command line quick tips- Permissions.md create mode 100644 sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md create mode 100644 sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md create mode 100644 sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md create mode 100644 sources/tech/20190711 How to install Elasticsearch on MacOS.md create mode 100644 sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md create mode 100644 sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md create mode 100644 sources/tech/20190715 Understanding software design patterns.md delete mode 100644 sources/tech/20190716 Security scanning your DevOps pipeline.md delete mode 100644 sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md delete mode 100644 sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md delete mode 100644 sources/tech/20190717 Mastering user groups on Linux.md delete mode 100644 sources/tech/20190717 Start tinkering with the Circuit Playground Express.md delete mode 100644 sources/tech/20190718 How to apply -release early, release often- to build a better brand.md delete mode 100644 sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md delete mode 100644 sources/tech/20190718 What you need to know to be a sysadmin.md delete mode 100644 sources/tech/20190719 Buying a Linux-ready laptop.md delete mode 100644 sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md delete mode 100644 sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md delete mode 100644 sources/tech/20190722 How to run virtual machines with virt-manager.md delete mode 100644 sources/tech/20190723 8 Best Open Source CRM Software.md delete mode 100644 sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md rename {published => translated/talk}/20190211 Introducing kids to computational thinking with Python.md (54%) create mode 100644 translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md delete mode 100644 translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md delete mode 100644 translated/tech/20190715 Understanding software design patterns.md diff --git a/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md deleted file mode 100644 index d146b9bd16..0000000000 --- a/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md +++ /dev/null @@ -1,227 +0,0 @@ -10 个 Linux 中最好的 Visio 替代品 -====== - -> 如果你正在 Linux 中寻找一个好的 Visio 查看器,这里有一些可以在 Linux 中使用的微软 Visio 的替代方案。 - -[微软 Visio][1] 是创建或生成关键任务图和矢量表示的绝佳工具。虽然它可能是制作平面图或其他类型图表的好工具 —— 但它既不是免费的,也不是开源的 - -此外,微软 Visio 不是一个独立的产品。它与微软 Office 捆绑在一起。我们过去已经看过 [MS Office 的开源替代品][2]。今天我们将看看你可以在 Linux 上使用哪些工具代替 Visio。 - -### 适用于 Linux 的最佳 微软 Visio 备选方案 - -![用于 Linux 的微软 Visio 备选方案][4] - -此处为强制性免责声明。该列表不是排名。排名第三的产品并不比排名第六的好。 - -我还提到了两个可以从 Web 界面使用的非开源 Visio 软件。 - -| 软件 | 类型 | 许可证类型 | -| --- | --- | --- | -| [LibreOffice Draw][6] | 桌面软件 | 自由开源 | -| [OpenOffice Draw][10] | 桌面软件 | 自由开源 | -| [Dia][12] | 桌面软件 | 自由开源 | -| [yED Graph Editor][14] | 桌面和基于 Web | 免费增值 | -| [Inkscape][16] | 桌面软件 | 自由开源 | -| [Pencil][18] | 桌面和基于 Web | 自由开源 | -| [Graphviz][20] | 桌面软件 | 自由开源 | -| [darw.io][22] | 桌面和基于 Web | 自由开源 | -| [Lucidchart][24] | 基于 Web | 免费增值 | -| [Calligra Flow][27] | 桌面软件 | 自由开源 | - - -### 1、LibreOffice Draw - -![][5] - -LibreOffice Draw 模块是微软 Visio 的最佳开源替代方案之一。在它的帮助下,你可以选择制作一个想法的速写或一个复杂的专业平面布置图来展示。流程图、组织结构图、网络图、小册子、海报等等!所有这些都不需要花一分钱。 - -好的是它与 LibreOffice 捆绑在一起,默认情况下安装在大多数 Linux 发行版中。 - -#### 主要功能概述: - - * 用于制作宣传册/海报的样式和格式工具 - * Calc 数据可视化 - * PDF 文件编辑功能 - * 通过操作图库中的图片来创建相册 - * 灵活的绘图工具类似于 微软 Visio (智能连接器,尺寸线等)的工具 - * 支持 .VSD 文件(打开) - -官网:[LibreOffice Draw][6] - -### 2、Apache OpenOffice Draw - -![][7] - -很多人都知道 OpenOffice(LibreOffice 项目最初就是基于它的),但他们并没有真正意识到 Apache OpenOffice Draw 可以作为微软 Visio 的替代方案。但事实上,它是另一个令人惊奇的开源图表软件工具。与 LibreOffice Draw 不同,它不支持编辑 PDF 文件,但它为任何类型的图表创建提供了绘图工具。 - -这只是个警告。仅当你的系统中已经有 OpenOffice 时才使用此工具。这是因为[安装 OpenOffice][8] 是一件痛苦的事情,而且它已经[不再继续开发][9]。 - -#### 主要功能概述: - - * 快速创建 3D 形状控制器 - * 创建作品的 flash 版本(.swf) - * 样式和格式工具 - * 与微软 Visio 类似的灵活绘图工具(智能连接器、尺寸线等) - -官网:[Apache OpenOffice Draw][10] - -### 3、Dia - -![][11] - -Dia 是另一个有趣的开源工具。它可能不像前面提到的那样处于积极开发之中。但是,如果你正在寻找一个自由而开源的替代微软 Visio 的简单而体面的图表,那么 Dia 可能是你的选择。这个工具可能唯一让你失望的地方就是它的用户界面。除此之外,它还允许你为复杂的图使用强大的工具(但它看起来可能不太好 —— 所以我们建议你用于更简单的图)。 - -#### 主要功能概述: - - * 它可以通过命令行使用 - * 样式和格式工具 - * 用于自定义形状的形状存储库 - * 与微软 Visio 类似的绘图工具(特殊对象、网格线、图层等) - * 跨平台 - -官网:[Dia][12] - -### 4、yED Graph Editor - -[视频](https://youtu.be/OmSTwKw7dX4) - -是最受欢迎的免费的微软 Visio 替代方案之一。如果你对它是一个免费软件而不是开源项目有些担心,你仍然可以通过 web 浏览器免费使用 [yED 的实时编辑器][13]。如果你想用一个非常易于使用的界面快速绘制图表,这是最好的建议之一。 - -#### 主要功能概述: - - * 拖放功能,方便图表制作 - * 支持导入外部数据进行链接 - -官网:[yED Graph Editor][14] - -### 5、Inkscape - -![][15] - -Inkscape 是一个自由开源的矢量图形编辑器。你将拥有创建流程图或数据流程图的基本功能。它不提供高级的图表绘制工具,而是提供创建更简单图表的基本工具。因此,当你希望通过使用图库中的可用符号,在图库连接器工具的帮助下生成基本图时,Inkscape 可能是你的 Visio 替代品。 - -#### 主要功能概述: - - * 连接器工具 - * 灵活的绘图工具 - * 广泛的文件格式兼容性 - -官网:[Inkscape][16] - -### 6、Pencil 项目 - -![][17] - -Pencil 项目是一个令人印象深刻的开源项目,适用于 Windows、Mac 以及 Linux。它具有易于使用的图形界面,使绘图更容易和方便。它有一个很好的内建形状和符号的集合,可以使你的图表看起来很棒。它还内置了 Android 和 iOS UI 模板,可以让你在需要时创建应用程序原型。 - -你也可以将其安装为 Firefox 扩展,但该扩展不能使用项目的最新版本。 - -#### 主要功能概述: - - * 轻松浏览剪贴画(使用 openclipart.org) - * 导出为 ODT 文件/PDF 文件 - * 图表连接工具 - * 跨平台 - -官网:[Pencil 项目][18] - -### 7、Graphviz - -![][19] - -Graphviz 略有不同。它不是绘图工具,而是专用的图形可视化工具。如果你在网络图中需要多个设计来表示一个节点,那么一定要使用这个工具。当然,你不能用这个工具做平面布置图(至少这不容易)。因此,它最适合于网络图、生物信息学、数据库连接和类似的东西。 - -#### 主要功能概述: - - * 支持命令行使用 - * 支持自定义形状和表格节点布局 - * 基本样式和格式设置工具 - -官网:[Graphviz][20] - -### 8、Draw.io - -[视频](https://youtu.be/Z0D96ZikMkc) - -Draw.io 主要是一个基于 Web 的免费图表工具,它的强大的工具几乎可以制作任何类型的图表。你只需要拖放然后连接它们以创建流程图、ER 图或任何相关的。此外,如果你喜欢该工具,则可以尝试[离线桌面版本][21]。 - -#### 主要功能概述: - - * 直接上传到云存储服务 - * 自定义形状 - * 样式和格式工具 - * 跨平台 - -官网:[Draw.io][22] - -### 9、Lucidchart - -![][23] - -Lucidchart 是一个基于 Web 的高级图表工具,它提供了一个具有有限功能的免费订阅。你可以使用免费订阅创建几种类型的图表,并将其导出为图像或 PDF。但是,免费版本不支持数据链接和 Visio 导入/导出功能。如果你不需要数据链接功能,Lucidchart 可以说是一个生成漂亮的图表的非常好的工具。 - -#### 主要功能概述: - - * 可以集成到 Slack、Jira 核心、Confluence - * 能够制作产品模型 - * 导入 Visio 文件 - -官网:[Lucidchart][24] - -### 10、Calligra Flow - -![calligra flow][25] - -Calligra Flow 是 [Calligra 项目][26]的一部分,旨在提供自由开源的软件工具。使用 Calligra flow 你可以轻松地创建网络图、实体关系图、流程图等 - -#### 主要功能概述: - - * 各种模具盒 - * 样式和格式工具 - -官网:[Calligra Flow][27] - -### 总结 - -既然你已经了解到了这些最好的自由开源的 Visio 替代方案,你对它们有什么看法? - -对于你任何方面的需求,它们是否优于 微软 Visio?另外,如果我们错过了你最喜欢的基于 Linux 的替代微软 Visio 的绘图工具,请在下面的评论中告诉我们。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/visio-alternatives-linux/ - -作者:[Ankush Das][a] -译者:[ZhiW5217](https://github.com/ZhiW5217) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://itsfoss.com/author/ankush/ -[1]:https://products.office.com/en/visio/flowchart-software -[2]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ -[3]:data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs= -[4]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png -[5]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg -[6]:https://www.libreoffice.org/discover/draw/ -[7]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg -[8]:https://itsfoss.com/install-openoffice-ubuntu-linux/ -[9]:https://itsfoss.com/openoffice-shutdown/ -[10]:https://www.openoffice.org/product/draw.html -[11]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/dia-screenshot.jpg -[12]:http://dia-installer.de/ -[13]:https://www.yworks.com/products/yed-live -[14]:https://www.yworks.com/products/yed -[15]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg -[16]:https://inkscape.org/en/ -[17]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/pencil-project.jpg -[18]:http://pencil.evolus.vn/Downloads.html -[19]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/graphviz.jpg -[20]:http://graphviz.org/ -[21]:https://about.draw.io/integrations/#integrations_offline -[22]:https://about.draw.io/ -[23]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg -[24]:https://www.lucidchart.com/ -[25]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/calligra-flow.jpg -[26]:https://www.calligra.org/ -[27]:https://www.calligra.org/flow/ diff --git a/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md b/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md deleted file mode 100644 index 4955a1d7cb..0000000000 --- a/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md +++ /dev/null @@ -1,126 +0,0 @@ -MX Linux:一款专注于简洁性的中等体量发行版 -====== - -> 这个发行版可以使任何人在 Linux 上如家一般。 - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux.png?itok=OLjmCxT9) - -Linux 有着如此多种的发行版。许多发行版为了使自己与众不同而做出了很多改变。另一方面,许多发行版之间的区别又是如此之小,你可能会问为什么有人还愿意不厌其烦的重复别人已经做过的工作呢?也正是基于这一疑惑,让我好奇为什么 [antiX][1] 和 [MEPIS][2]这两个社区要联合推出一个特殊的发行版,考虑到具体情况应该会是一个搭载 Xfce 桌面并基于 antiX 的版本,由 MEPIS 社区承担开发。 - -这一开发中的使用 Xfce 桌面的 antiX 系统是否会基于它之前的发行版呢?毕竟,antiX 旨在提供一个“基于 Debian 稳定版的快速、轻量级、易于安装的非 systemd 的 live CD 发行版”。antiX 所搭载的桌面是 [LXDE][3],能够极好的满足关于轻量化系统的相关要求和特性。那究竟是什么原因使得 antiX 决定构建另一个轻量化发行版呢,仅仅是因为这次换成了 Xfce 吗?好吧,Linux 社区中的任何人都知道,增加了不同风格的好的轻量级发行版是值得一试的(特别是可以使得我们的旧硬件摆脱进入垃圾填埋场的宿命)。当然,LXDE 和 Xfce 并不完全属于同一类别。LXDE 应该被认为是一个真正的轻量级桌面,而 Xfce 应该被认为是一个中等体量的桌面。朋友们,这就是为什么 MX Linux 是 antiX 的一个重要迭代的关键。一个基于 Debian 的中等体量的发行版,它包含你完成工作所需的所有工具。 - -但是在 MX Linux 中有一些直接从 antiX 借用来的非常有用的东西 —— 那就是安装工具。当我初次设置了 VirtualBox 虚拟机来安装 MX Linux 时,我认为安装的系统将是我已经习惯的典型的、非常简单的 Linux 系统。令我非常惊讶的是,MX Linux 使用的 antiX 安装程序打破了以往的痛点,特别是对于那些对尝试 Linux 持观望态度的人来说。 - -因此,甚至在我开始尝试 MX Linux 之前,我就对它有了深刻的印象。让我们来看看是什么让这个发行版的安装如此特别,最后再来看看桌面。 - -你可以从[这里][4]下载 MX Linux 17.1。系统的最低要求是: - - * CD/DVD驱动器(以及能够从该驱动器引导的 BIOS)或 live USB(以及能够从 USB 引导的 BIOS) - * 英特尔 i486 或 AMD 处理器 - * 512 MB 内存 - * 5 GB 硬盘空间 - * 扬声器,AC97 或 HDA-compatible 声卡 - * 作为一个 LiveUSB 使用,需要 4 GB 空间 - -### 安装 - -MX Linux 安装程序使安装 Linux 变得轻而易举。虽然它可能不是外观最现代化的安装工具,但也已经差不多了。安装的要点是从选择磁盘和选择安装类型开始的(图 1)。 - -![install][6] - -*图 1:MX Linux 的安装程序截图之一* - -下一个重要的界面(图 2)要求你设置一个计算机名称、域名和(如果需要的话,为微软网络设置)工作组。 - -![network][8] - -*图 2:设置网络名称* - -配置工作组的能力是第一个真正值得称赞的。这是我记忆中第一款在安装期间提供此选项的发行版。它还应该提示你,MX Linux 提供了开箱即用的共享目录功能。它做到了,而且深藏功与名。它并不完美,但它可以在不需要安装任何额外包的情况下工作(稍后将详细介绍)。 - -最后一个重要的安装界面(需要用户交互)是创建用户帐户和 root 权限的密码(图 3)。 - -![user][9] - -*图 3:设置用户帐户详细信息和 root 用户密码* - -最后一个界面设置完成后,安装将完成并要求重新启动。重启后,你将看到登录屏幕。登录并享受 MX Linux 带来的体验。 - -### 使用 - -Xfce 桌面是一个非常容易上手的界面。默认设置将面板位于屏幕的左边缘(图 4)。 - -![desktop][11] - -*图 4:MX Linux 的默认桌面* - -如果你想将面板移动到更传统的位置,右键单击面板上的空白点,然后单击“面板”>“面板首选项”。在显示的窗口中(图 5),单击样式下拉菜单,在桌面栏、垂直栏或水平栏之间进行选择你想要的模式。 - -![panel][13] - -*图 5:配置 MX Linux 面板* - -桌面栏和垂直选项的区别在于,在桌面栏模式下,面板垂直对齐,就像在垂直模式下一样,但是插件是水平放置的。这意味着你可以创建更宽的面板(用于宽屏布局)。如果选择水平布局,它将默在顶部,然后你必须取消锁定面板,单击关闭,然后(使用面板左侧边缘的拖动手柄)将其拖动到底部。你可以回到面板设置窗口并重新锁定面板。 - -除此之外,使用 Xfce 桌面对于任何级别的用户来说都是无需动脑筋的事情……就是这么简单。你会发现很多涵盖了生产力(LibreOffice、Orage Calendar、PDF-Shuffler)、图像(GIMP)、通信(Firefox、Thunderbird、HexChat)、多媒体(Clementine、guvcview SMTube、VLC媒体播放器)的软件,和一些 MX Linux 专属的工具(称为 MX 工具,涵盖了 live-USB 驱动器制作工具、网络助手、包管理工具、仓库管理工具、live ISO 快照工具等等)。 - -### Samba - -让我们讨论一下如何将文件夹共享到你的网络。正如我所提到的,你不需要安装任何额外的包就可以使其正常工作。只需打开文件管理器,右键单击任何位置,并选择网络上的共享文件夹。系统将提示你输入管理密码(已在安装期间设置)。验证成功之后,Samba 服务器配置工具将打开(图 6)。 - -![sharing][15] - -*图 6:向网络共享一个目录* - -单击“+”按钮配置你的共享。你将被要求指定一个目录,为共享提供一个名称/描述,然后决定该共享是否可写和可见(图 7)。 - -![sharing][17] - -*图 7:在 MX Linux 上配置共享* - -当你单击 Access 选项时,你可以选择是让每个人都访问共享,还是限于特定的用户。问题就出在这里。此时,没有用户可以共享。为什么?因为它们还没有被添加。有两种方法可以把它们添加到共享:从命令行或使用我们已经打开的工具。让我们用一种更为简单的方法。在 Samba 服务器配置工具的主窗口中,单击“首选项” > “Samba 用户”。在弹出的窗口中,单击“添加用户”。 - -将出现一个新窗口(图 8),你需要从下拉框中选择用户,输入 Windows 用户名,并为用户键入/重新键入密码。 - -![Samba][19] - -*图 8:向 Samba 添加用户* - -一旦你单击“确定”,这用户就会被添加,并且基于你的网络的对用户的共享功能也随之启用。创建 Samba 共享从未变得如此容易。 - -### 结论 - -MX Linux 使任何从桌面操作系统转到 Linux 都变得非常简单。尽管有些人可能会觉得桌面界面不太现代,但发行版的主要关注点不是美观,而是简洁。为此,MX Linux 以出色的方式取得了成功。Linux 的这个特色发行版可以让任何人在使用 Linux 的过程中感到宾至如归。尝试这一中等体量的发行版,看看它能否作为你的日常系统。 - --------------------------------------------------------------------------------- - -via: https://www.linux.com/learn/intro-to-linux/2018/4/mx-linux-mid-weight-distro-focused-simplicity - -作者:[JACK WALLEN][a] -译者:[qfzy1233](https://github.com/qfzy1233) -校对:[wxy](https://github.com/wxy) -选题:[lujun9972](https://github.com/lujun9972) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/users/jlwallen -[1]:https://antixlinux.com/ -[2]:https://en.wikipedia.org/wiki/MEPIS -[3]:https://lxde.org/ -[4]:https://mxlinux.org/download-links -[5]:/files/images/mxlinux1jpg -[6]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_1.jpg?itok=i9bNScjH (install) -[7]:/licenses/category/used-permission -[8]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_2.jpg?itok=72nWxkGo -[9]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_3.jpg?itok=ppf2l_bm (user) -[10]:/files/images/mxlinux4jpg -[11]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_4.jpg?itok=mS1eBy9m (desktop) -[12]:/files/images/mxlinux5jpg -[13]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_5.jpg?itok=wsN1hviN (panel) -[14]:/files/images/mxlinux6jpg -[15]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_6.jpg?itok=vw8mIp9T (sharing) -[16]:/files/images/mxlinux7jpg -[17]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_7.jpg?itok=tRIWdcEk (sharing) -[18]:/files/images/mxlinux8jpg -[19]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_8.jpg?itok=ZS6lhZN2 (Samba) -[20]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md deleted file mode 100644 index 8d60619efc..0000000000 --- a/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md +++ /dev/null @@ -1,54 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11141-1.html) -[#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) -[#]: via: (https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10) -[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) - -使用 ImageGlass 以幻灯片形式快速查看 JPG 图像 -====== - -> 想要在 Windows 10 中以幻灯片形式逐个查看文件夹中的图像么?开源软件可以做到。 - -![Looking back with binoculars][1] - -欢迎阅读今天的系列文章 “我该如何让它实现?”就我而言,我试图在 Windows 10 上以幻灯片形式查看 JPG 图像的文件夹。像往常一样,我转向开源来解决这个问题。 - -在 Mac 上,以幻灯片形式查看 JPG 图像文件夹只需选择文件夹中的所有图像(`Command-A`),然后按 `Option-Command-Y` 即可。之后,你可以使用箭头键向前翻动。当然,在 Windows 中,你可以通过选择第一个图像,然后单击窗口中黄色的**管理**栏,然后选择**幻灯片**来执行类似的操作。在那里,你可以控制速度,但只能做到:慢、中、快。 - -我希望像在 Windows 中能像 Mac 一样翻下一张图片。自然地,我 Google 搜索了一下并找到了一个方案。我发现了 [ImageGlass][2] 这个开源应用,其许可证是 [GPL 3.0][3],并且它完美地做到了。这是它的样子: - -![Viewing an image in ImageGlass.][4] - -### 关于 ImageGlass - -ImageGlass 是由 Dương Diệu Pháp 开发的,根据他的网站,他是一名越南开发人员,在 Chainstack 负责前端。他与在美国的 [Kevin Routley][5] 协作,后者“为 ImageGlass 开发新功能”。源代码可以在 [GitHub][6] 上找到。 - -ImageGlass 支持最常见的图像格式,包括 JPG、GIF、PNG、WEBP、SVG 和 RAW。用户可以轻松自定义扩展名列表。 - -我遇到的具体问题是需要找到一张用于目录封面的图像。不幸的是,它在一个包含数十张照片的文件夹中。在 ImageGlass 中以幻灯片浏览照片,在我想要的照片前停止,并将其下载到我的项目文件夹中变得很容易。开源再次帮助了我,该应用只花了很短的时间下载和使用。 - -在 2016 年 3 月 10 日,Jason Baker 在他的文章 [9 款 Picasa 的开源替代品][7] 中将 ImageGlass 列为其中之一。如果你有需求,里面还有一些其他有趣的图像相关工具。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10 - -作者:[Jeff Macharyas][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jeffmacharyas -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) -[2]: https://imageglass.org/ -[3]: https://github.com/d2phap/ImageGlass/blob/master/LICENSE -[4]: https://opensource.com/sites/default/files/uploads/imageglass-screenshot.png (Viewing an image in ImageGlass.) -[5]: https://github.com/fire-eggs -[6]: https://github.com/d2phap/ImageGlass -[7]: https://opensource.com/alternatives/picasa diff --git a/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md b/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md deleted file mode 100644 index 896f70428d..0000000000 --- a/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md +++ /dev/null @@ -1,136 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11115-1.html) -[#]: subject: (How To Delete A Repository And GPG Key In Ubuntu) -[#]: via: (https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -如何在 Ubuntu 中删除仓库及其 GPG 密钥 -====== - -![Delete A Repository And GPG Key In Ubuntu][1] - -前几天我们讨论了如何在基于 RPM 和 DEB 的系统中[列出已安装的仓库][2]。今天,我们将学习如何在 Ubuntu 中删除仓库及其 GPG 密钥。对于不知道仓库的人,仓库(简称 repo)是开发人员存储软件包的地方。仓库的软件包经过全面测试,并由 Ubuntu 开发人员专门为每个版本构建。用户可以使用 Apt 包管理器在他们的 Ubuntu 系统上下载和安装这些包。Ubuntu 有四个官方仓库,即 Main、Universe、Restricted 和 Multiverse。 - -除了官方仓库外,还有许多由开发人员(或软件包维护人员)维护的非官方仓库。非官方仓库通常有官方仓库中不可用的包。所有包都由包维护者用一对密钥(公钥和私钥)签名。如你所知,公钥是发给用户的,私钥必须保密。每当你在源列表中添加新的仓库时,如果 Apt 包管理器想要信任新添加的仓库,你还应该添加仓库密钥(公钥)。使用仓库密钥,你可以确保从正确的人那里获得包。到这里希望你对软件仓库和仓库密钥有了一个基本的了解。现在让我们继续看看如果在 Ubuntu 系统中不再需要仓库及其密钥,那么该如何删除它。 - -### 在 Ubuntu 中删除仓库 - -每当使用 `add-apt-repository` 命令添加仓库时,它都将保存在 `/etc/apt/sources.list` 中。 - -要从 Ubuntu 及其衍生版中删除软件仓库,只需打开 `/etc/apt/sources.list` 文件并查找仓库名字并将其删除即可。 - -``` -$ sudo nano /etc/apt/sources.list -``` - -正如你在下面的截图中看到的,我在我的 Ubuntu 系统中添加了 [Oracle Virtualbox][3] 仓库。 - -![][4] - -*virtualbox 仓库* - -要删除此仓库,只需删除该条目即可。保存并关闭文件。 - -如果你已添加 PPA 仓库,请查看 `/etc/apt/sources.list.d/` 目录并删除相应的条目。 - -或者,你可以使用 `add-apt-repository` 命令删除仓库。例如,我要删除 [Systemback][5] 仓库,如下所示。 - -``` -$ sudo add-apt-repository -r ppa:nemh/systemback -``` - -最后,使用以下命令更新软件源列表: - -``` -$ sudo apt update -``` - -### 删除仓库密钥 - -我们使用 `apt-key` 命令添加仓库密钥。首先,让我们使用命令列出添加的密钥: - -``` -$ sudo apt-key list -``` - -此命令将列出所有添加的仓库密钥。 - -``` -/etc/apt/trusted.gpg --------------------- -pub rsa1024 2010-10-31 [SC] -3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B -uid [ unknown] Launchpad PPA for Kendek - - -pub rsa4096 2016-04-22 [SC] -B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF -uid [ unknown] Oracle Corporation (VirtualBox archive signing key) <[email protected]> -sub rsa4096 2016-04-22 [E] - - -/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg ------------------------------------------------------- -pub rsa4096 2012-05-11 [SC] -790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32 -uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <[email protected]> - - -/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg ------------------------------------------------------- -pub rsa4096 2012-05-11 [SC] -8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 -uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <[email protected]> - - -/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg ------------------------------------------------------- -pub rsa4096 2018-09-17 [SC] -F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C -uid [ unknown] Ubuntu Archive Automatic Signing Key (2018) <[email protected]> -``` - -正如你在上面的输出中所看到的,那串长的(40 个字符)十六进制值是仓库密钥。如果你希望 APT 包管理器停止信任该密钥,只需使用以下命令将其删除: - -``` -$ sudo apt-key del "3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B" -``` - -或者,仅指定最后 8 个字符: - -``` -$ sudo apt-key del 73C62A1B -``` - -完成!仓库密钥已被删除。运行以下命令更新仓库列表: - -``` -$ sudo apt update -``` - -资源: - - * [软件仓库 – Ubuntu 社区 Wiki][6] - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Delete-a-repository-in-ubuntu-720x340.png -[2]: https://www.ostechnix.com/find-list-installed-repositories-commandline-linux/ -[3]: https://www.ostechnix.com/install-oracle-virtualbox-ubuntu-16-04-headless-server/ -[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/virtualbox-repository.png -[5]: https://www.ostechnix.com/systemback-restore-ubuntu-desktop-and-server-to-previous-state/ -[6]: https://help.ubuntu.com/community/Repositories/Ubuntu diff --git a/published/20190708 10 ways to get started with Linux.md b/published/20190708 10 ways to get started with Linux.md deleted file mode 100644 index 49ba29a574..0000000000 --- a/published/20190708 10 ways to get started with Linux.md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11124-1.html) -[#]: subject: (10 ways to get started with Linux) -[#]: via: (https://opensource.com/article/19/7/ways-get-started-linux) -[#]: author: (Seth Kenlon https://opensource.com/users/seth/users/don-watkins) - -Linux 入门十法 -====== - -> 想要进入 Linux 之门,试试这十个方法。 - -![](https://img.linux.net.cn/data/attachment/album/201907/20/061809wwkmb51vqookoqq5.jpg) - -文章《[什么是 Linux 用户?][2]》的作者 Anderson Silva 明确表示,现今人们使用 Linux(在某种程度上)就像使用 Windows 一样,只要你对“使用 Linux”这个事情定义得足够广义。尽管如此,如果你的生活中没有太多的使用 Linux 的机会,现在正是以前所未有的方式尝试 Linux 的好时机。 - -以下是 Linux 入门的十种方法。你可以试试其中一个或者全部试试。 - -### 1、加入免费 shell 计划 - -![Free shell screenshot][3] - -有很多人在用不上的服务器上运行 Linux (请记住,“Linux 服务器”可以是从最新的超级计算机到丢弃的、已经用了 12 年的笔记本电脑中的任何一个)。为了充分利用多余的计算机,许多管理员用这些备用的机器提供了免费的 shell 帐户。 - -如果你想要登录到 Linux 终端中学习命令、shell 脚本、Python 以及 Web 开发的基础知识,那么免费的 shell 帐户是一种简单、免费的入门方式。下面是一个可以体验一下的简短列表: - -* [Freeshell.de][4] 是一个自 2002 年以来一直在线服务的公用 Linux 系统。你可以通过 SSH、IPv6 和 OpenSSL 进行访问,以获得 Linux shell 体验,并且可以使用 MySQL 数据库。 -* [Blinkenshell][5] 提供了一个学习 Unix、使用 IRC、托管简单网站和共享文件的 Linux shell。它自 2006 年以来一直在线服务。 -* [SDF 公用 Unix 系统][6]成立于 1987 年,提供了免费的 NetBSD 账户。当然,NetBSD 不是 Linux,但它是开源的 Unix,因此它提供了类似的体验。它也有几个自制应用程序,因此它不但有普通的免费 shell,还提供了老派 BBS。 - -免费 shell 帐户常会受到滥用,因此你表现出的可信程度和积极参与协作的意愿越多,你的体验就越好。你可以通过专门请求或小额捐赠来证明你的诚意,通常可以访问数据库引擎、编译器和高级编程语言。你还可以要求安装其他软件或库,但需经管理员批准。 - -#### 如何使用 - -公用 shell 帐户是尝试真正的 Linux 系统的好方法。你无法获得 root 权限这一事实意味着你可以学习本地软件管理,而无需做更多的维护工作。你可以做很多实际操作,以完成真正的工作,尽管它们对于学习关键任务还不够。 - -### 2、试试 Windows WSL 2 里面的 Linux - -不管你信不信,微软从 2019 年 6 月开始在 Windows 里面带上了 Linux,这意味着你可以从 Windows 运行 Linux 应用程序,这是 [Windows 里的 Linux 子系统][7]的第二版(WSL 2)。虽然它主要针对开发人员,但 Windows 用户可以发现 WSL 2 是一个来自于他们熟悉的桌面上的 Linux 环境,而没有被任何虚拟化占用额外资源。这是一个以进程方式运行在 Windows 机器上的 Linux。现阶段,它仍然是一个新的动向和正在进行中的工作,因此它可能会发生变化。如果你试图用它承担重任,你可能会遇到一两个错误,但是如果你只是想入门 Linux、学习一些命令,并感受在基于文本的环境如何完成工作,那么 WSL 2 可能正是你所需要的。 - -#### 如何使用 - -WSL 还没有明确的用途或目的,但它在 Windows 机器上提供了 Linux 环境。你可以获得 root 访问权限,并可以运行 Linux 发行版和应用程序,因此这是一种简单而无缝的学习方式。但是,即使 WSL *是Linux*,它也不能给你典型的 Linux 体验。它是由 Windows 提供的 Linux,而这不太会是你在现实世界中遇到的情况。WSL 是一个开发和教育工具,但如果你可以使用它,那么你应该试试它。 - -### 3、把 Linux 放到可启动的 U 盘上 - -![Porteus Linux][8] - -便携 Linux 可以安装到 U 盘上随身携带,并用该 U 盘启动你遇到的任何计算机。你可以获得个性化的 Linux 桌面,而无需担心所用于启动的主机上的数据。该计算机上原有的系统不会与你的 Linux 系统相接触,并且你的 Linux 操作系统也不会影响计算机。它非常适合酒店商务中心、图书馆、学校的公共计算机,或者只是给自己一个不时启动 Linux 的借口。 - -与许多其他快速获得的 Linux shell 不同,此方法为你提供了一个完整而强大的 Linux 系统,包括桌面环境,可访问你需要的任何软件以及持久的数据存储。 - -这个系统永远不会改变。你要保存的任何数据都将写入压缩的文件系统中,然后在引导时将其作为覆盖层应用于该系统。这种灵活性允许你选择是以持久模式启动,将所有数据保存回 U 盘;还是以临时模式启动,以便一旦关闭电源,你所做的一切都会消失。换句话说,你可以将其用作不受信任的计算机上的安全信息亭或你信任的计算机上的便携式操作系统。 - -你可以尝试很多 [U 盘发行版][9],有些带有精简的桌面环境,适用于低功耗计算机,而另一些带有完整的桌面环境。我偏爱 [Porteus][10] Linux。在过去的八年里,我每天都把它放在我的钥匙链上,在商务旅行中使用它作为我的主要计算平台,如果在工作场所或家中计算机发生问题,它也会用作工具盘。它是一个可靠而稳定的操作系统,有趣且易于使用。 - -在 Mac 或 Windows 上,下载 [Fedora Media Writer][11] 以创建你下载的任何便携式发行版的可启动 U 盘。 - -#### 如何使用 - -从 U 盘启动一个 “实时 Linux” 可提供完整的 Linux 发行版环境。虽然数据存储与你安装到硬盘驱动器的系统略有不同,但其它的所有内容都与你在 Linux 桌面上所期望的一样。在便携式 Linux 操作系统上你几乎没有什么不能做的,所以在你的钥匙串上挂上一个以解锁你遇到的每台计算机的全部潜力吧。 - -### 4、在线游览 - -![Linux tour screenshot][12] - -Ubuntu 的某个人想到了在浏览器中托管 Ubuntu GNOME 桌面的好主意。如果想要自己尝试一下,可以打开 Web 浏览器并导航到 [tour.ubuntu.com][13]。你可以选择要演示的活动,也可以跳过单个课程并单击 “四处看看Show Yourself Around” 按钮。 - -即使你是 Linux 桌面的新用户,你也可能会发现“四处看看”功能比你想象的更还简单。在线游览中,你可以四处看看,查看可用的应用程序,以及查看典型的默认 Linux 桌面。你不能在 Firefox 中调整设置或启动另一个在线游览(这是我尝试过的第一件事),虽然你可以完成安装应用程序的动作,但你无法启动它们。但是,如果你之前从未使用过 Linux 桌面,并且想要看到各种新奇的东西,那这就是一场旋风之旅。 - -#### 如何使用 - -在线游览真的只是一次旅行。如果你从未见过 Linux 桌面,那么这是一个了解它的情况的机会。这不是一个正式的使用,而是一个吸引过客的展示。 - -### 5、在浏览器中用 JavaScript 运行 Linux - -![JSLinux][14] - -就在不久之前,虚拟化的计算成本还很高,还仅限于使用先进的硬件的用户。而现在虚拟化已被优化到可以由 JavaScript 引擎执行的程度,这要归功于 Fabrice Bellard,它是优秀的开源 [QEMU][15] 机器仿真器和虚拟器的创建者。 - -Bellard 还启动了 JSLinux 项目,该项目允许你在浏览器中运行 Linux 和其他操作系统,这算是闲暇时间的一个乐趣。它仍然是一个实验性项目,但它是一个技术奇迹。打开 Web 浏览器导航到 [JSLinux][16] 页面,你可以启动基于文本的 Linux shell 或精简的图形 Linux 环境。你可以上传和下载文件到 JSLinux 主机上或(在理论上可以)将文件发送到一个网络备份位置,因为 JSLinux 可以通过 VPN 套接字访问互联网(尽管上限速度取决于 VPN 服务)。 - -#### 如何使用 - -你不会在 JSLinux 上正经使用多少时间,这个环境可能太不寻常了,无法学习 Linux 正常工作的广泛课程。但是,如果你厌倦了在一台普通的 PC 上运行 Linux 并想在一个真正独特的平台上试用 Linux,那么 JSLinux 就属于这种。 - -### 6、阅读关于它的书 - -并非每种 Linux 体验都要用到计算机。也许你是那种喜欢在开始新事物之前保持距离先观察和研究的人,或者你可能还不清楚 “Linux” 所包含的内容,或者你喜欢全情投入其中。关于 Linux 如何工作、运行 Linux 的方式以及 Linux 世界中有什么,有很多书可以读。 - -你越熟悉开源世界,就越容易理解常用术语,将城市神话与实际经验区分开来。我们不时会发布[图书清单] [17],但我的最爱之一是 Hazel Russman 的《[The Charm of Linux][18]》。这是一个从不同角度巡览 Linux 的过程,是由一位独立作者在发现 Linux 时兴奋之余写作的。 - -#### 如何使用 - -没有什么能比一本好书更好。这是体验 Linux 的最不传统的方法,但对于喜欢印刷文字的人来说,它既舒适又有效。 - -### 7、弄块树莓派 - -![Raspberry Pi 4][19] - -如果你正在使用[树莓派][20],那么你就正在运行 Linux。Linux 和低功耗计算很容易上手。关于树莓派的好处,除了价格低于 100 美元之外,它的[网站][21]是专为教育而设计的。你可以了解树莓派所能做的一切,当你了解之后,就知道了 Linux 可以为你做些什么。 - -#### 如何使用 - -树莓派被设计为低功耗计算机。这意味着你不能像过去那样做那么多的多任务处理,但这是一种避免不堪重负的方便方法。树莓派是学习 Linux 及其附带的所有可能性的好方法,它是发现环保、小型、简化计算能力的有趣方式。并且一定要关注 Opensource.com 上的[提示][22]、[技巧][23]和[有趣的][24][活动] [25],特别是在每年三月份的树莓派之周的期间。 - -### 8、赶上容器热潮 - -如果你从事于神话般的[云服务][26]的后端工作,那么你已经听说过容器热潮。虽然你可以在 Windows、Azure、Mac 和 Linux 上运行 Docker 和 Kubernetes,但你可能不知道容器本身就是 Linux。云计算应用和基础设施实际上是精简的 Linux 系统,部分虚拟化,部分基于裸机。如果启动容器,则会启动微型的超特定的 Linux 发行版。 - -容器与虚拟机或物理服务器[不同][27]。它们不打算用作通用操作系统。但是,如果你在容器中进行开发,你可以停下来四处打量一下,你将了解到 Linux 系统的结构、保存重要文件的位置以及最常见的命令。你甚至可以[在线尝试容器][28],你可以在我的文章中[深入到 Linux 容器的背后][29]了解它们如何工作的。 - -#### 如何使用 - -根据设计,容器特定于一个单一任务,但它们是 Linux,因此它们非常灵活。你可以如你预期的使用它们,也可以在你的 Linux 实验当中将容器构建到大部分完整系统中。它虽然不提供桌面 Linux 体验,但它是完整的 Linux 体验。 - -### 9、以虚拟机方式安装 Linux - -虚拟化是尝试操作系统的简便方法,[VirtualBox][30] 是一种很好的开源虚拟化方法。VirtualBox 可以在 Windows 和 Mac 上运行,因此你可以将 Linux 安装为虚拟机(VM)并使用它,就好像它只是一个应用程序一样。如果你不习惯安装操作系统,VirtualBox 也是一种尝试 Linux 的非常安全的方式,而不会意外地将其安装覆盖在你通常的操作系统上。 - -#### 如何使用 - -将 Linux 作为虚拟机运行既方便又简单,既可以作为试运行使用,也可以在需要 Linux 环境时进行双启动或重启进入。它功能齐全,因为它使用虚拟硬件,宿主操作系统负责驱动你的外围设备。将 Linux 作为虚拟机运行的唯一缺点主要是心理上的。如果你打算使用 Linux 作为主要操作系统,但最终默认在宿主操作系统上做除了特定于 Linux 的大多数任务,那么虚拟机就会让你失望。否则,虚拟机是现代技术的胜利,在 VirtualBox 中使用 Linux 可以为你提供 Linux 所提供的所有最佳功能。 - -### 10、安装一个 Linux - -![Fedora Silverblue][31] - -如果对上述方式有疑问,那么总会有传统的方式。如果你想给予 Linux 应有的关注,你可以下载 Linux,将安装程序刻录到 U 盘(或 DVD,如果你更喜欢光学介质的话),并将其安装在你的计算机上。Linux 是开源的,所以任何想要花时间打包 Linux 的人都可以分发 Linux,并且可以将所有可用的部分分配到通常称为发行版的内容中。无论问哪一个 Linux 用户什么发行版是“最好的”,你必然都会得到一个不同的答案(主要是因为这个术语“最佳”通常是尚未定义的)。大多数人都认可:你应该使用适合你的 Linux 发行版,这意味着你应该测试一些流行的发行版,并坚持使你的计算机按照你期望的行为行事。这是一种务实和功能性的方法。例如,如果发行版无法识别你的网络摄像头而你希望它可以正常工作,则可以使用一个可识别该网络摄像头的发行版。 - -如果你之前从未安装过操作系统,你会发现大多数 Linux 发行版都包含一个友好且简单的安装程序。只需下载一个发行版(它们以 ISO 文件提供),然后下载 [Fedora Media Writer][11] 来创建一个可启动的安装 U 盘。 - -#### 如何使用 - -安装 Linux 并将其用作操作系统是迈向熟悉它的一步。怎么使用它都可以。你可能会发现一些你从未了解过的所需的必备功能,你可能会比你想象的更多地了解计算机,并且可能会改变你的世界观。你使用一个 Linux 桌面,或者是因为它易于下载和安装,或者是因为你想要削弱公司中某些人的霸主地位,或者只是因为它可以帮助你完成工作。 - -无论你的原因是什么,只需尝试使用上面这些任何(或所有)这些方式。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/ways-get-started-linux - -作者:[Seth Kenlon][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://opensource.com/users/seth/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png?itok=p7cWyQv9 (Penguins gathered together in the Artic) -[2]: https://opensource.com/article/19/6/what-linux-user -[3]: https://opensource.com/sites/default/files/uploads/freeshell.png (Free shell screenshot) -[4]: https://freeshell.de -[5]: https://blinkenshell.org/wiki/Start -[6]: https://sdf.org/ -[7]: https://devblogs.microsoft.com/commandline/wsl-2-is-now-available-in-windows-insiders/ -[8]: https://opensource.com/sites/default/files/uploads/porteus.jpg (Porteus Linux) -[9]: https://linux.cn/article-11040-1.html -[10]: http://porteus.org -[11]: https://getfedora.org/en/workstation/download/ -[12]: https://opensource.com/sites/default/files/uploads/linux_tour.jpg (Linux tour screenshot) -[13]: http://tour.ubuntu.com/en/# -[14]: https://opensource.com/sites/default/files/uploads/jslinux.jpg (JSLinux) -[15]: https://www.qemu.org -[16]: https://bellard.org/jslinux/ -[17]: https://opensource.com/article/19/1/tech-books-new-skils -[18]: http://www.lulu.com/shop/hazel-russman/the-charm-of-linux/paperback/product-21229401.html -[19]: https://opensource.com/sites/default/files/uploads/raspberry-pi-4-case.jpg (Raspberry Pi 4) -[20]: https://opensource.com/resources/raspberry-pi -[21]: https://www.raspberrypi.org/ -[22]: https://opensource.com/article/19/3/raspberry-pi-projects -[23]: https://opensource.com/article/19/3/piflash -[24]: https://opensource.com/article/19/3/gamepad-raspberry-pi -[25]: https://opensource.com/life/16/3/make-music-raspberry-pi-milkytracker -[26]: https://opensource.com/resources/cloud -[27]: https://opensource.com/article/19/6/how-ssh-running-container -[28]: https://linuxcontainers.org/lxd/try-it/ -[29]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[30]: https://virtualbox.org -[31]: https://opensource.com/sites/default/files/uploads/fedora-silverblue.png (Fedora Silverblue) diff --git a/published/20190708 Command line quick tips- Permissions.md b/published/20190708 Command line quick tips- Permissions.md deleted file mode 100644 index 028916247a..0000000000 --- a/published/20190708 Command line quick tips- Permissions.md +++ /dev/null @@ -1,126 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11123-1.html) -[#]: subject: (Command line quick tips: Permissions) -[#]: via: (https://fedoramagazine.org/command-line-quick-tips-permissions/) -[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) - -命令行快速提示:权限 -====== - -![][1] - -Fedora 与所有基于 Linux 的系统一样,它提供了一组强大的安全特性。其中一个基本特性是文件和文件夹上的*权限*。这些权限保护文件和文件夹免受未经授权的访问。本文将简要介绍这些权限,并向你展示如何使用它们共享对文件夹的访问。 - -### 权限基础 - -Fedora 本质上是一个多用户操作系统,它也有*组*,用户可以是其成员。但是,想象一下一个没有权限概念的多用户系统,不同的登录用户可以随意阅读彼此的内容。你可以想象到这对隐私或安全性并不是很好。 - -Fedora 上的任何文件或文件夹都分配了三组权限。第一组用于拥有文件或文件夹的*用户*,第二组用于拥有它的*组*,第三组用于其他人,即既不是该文件的用户也不是拥有该文件的组中的用户。有时这被称为*全世界*。 - -### 权限意味着什么 - -每组权限都有三种形式:*读*、*写*和*执行*。其中每个都可以用首字母来代替,即 `r`、`w`、`x`。 - -#### 文件权限 - -对于*文件*,权限的含义如下所示: - - * 读(`r`):可以读取文件内容 - * 写(`w`):可以更改文件内容 - * 执行(`x`):可以执行文件 —— 这主要用于打算直接运行的程序或脚本 - -当你对任何文件进行详细信息列表查看时,可以看到这三组权限。尝试查看系统上的 `/etc/services` 文件: - -``` -$ ls -l /etc/services --rw-r--r--. 1 root root 692241 Apr 9 03:47 /etc/services -``` - -注意列表左侧的权限组。如上所述,这些表明三种用户的权限:拥有该文件的用户,拥有该文件的组以及其他人。用户所有者是 `root`,组所有者是 `root` 组。用户所有者具有对文件的读写权限,`root` 组中的任何人都只能读取该文件。最后,其他任何人也只能读取该文件。(最左边的 `-` 显示这是一个常规文件。) - -顺便说一下,你通常会在许多(但不是所有)系统配置文件上发现这组权限,它们只由系统管理员而不是普通用户更改。通常,普通用户需要读取其内容。 - -#### 文件夹(目录)权限 - -对于文件夹,权限的含义略有不同: - - * 读(`r`):可以读取文件夹内容(例如 `ls` 命令) - * 写(`w`):可以更改文件夹内容(可以在此文件夹中创建或删除文件) - * 执行(`x`):可以搜索文件夹,但无法读取其内容。(这听起来可能很奇怪,但解释起来需要更复杂的文件系统细节,这超出了本文的范围,所以现在就这样吧。) - -看一下 `/etc/grub.d` 文件夹的例子: - -``` -$ ls -ld /etc/grub.d -drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d -``` - -注意最左边的 `d`,它显示这是一个目录或文件夹。权限显示用户所有者(`root`)可以读取、更改和 `cd` 到此文件夹中。但是,没有其他人可以这样做 —— 无论他们是否是 `root` 组的成员。注意,你不能 `cd` 进入该文件夹。 - -``` -$ cd /etc/grub.d -bash: cd: /etc/grub.d: Permission denied -``` - -注意你自己的主目录是如何设置的: - -``` -$ ls -ld $HOME -drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul -``` - -现在,注意除了作为所有者之外,没有人可以访问此文件夹中的任何内容。这是特意的!你不希望其他人能够在共享系统上读取你的私人内容。 - -### 创建共享文件夹 - -你可以利用此权限功能轻松创建一个文件夹以在组内共享。假设你有一个名为 `finance` 的小组,其中有几个成员需要共享文档。因为这些是用户文档,所以将它们存储在 `/home` 文件夹层次结构中是个好主意。 - -首先,[使用 sudo][2] 创建一个共享文件夹,并将其设置为 `finance` 组所有: - -``` -$ sudo mkdir -p /home/shared/finance -$ sudo chgrp finance /home/shared/finance -``` - -默认情况下,新文件夹具有这些权限。注意任何人都可以读取或搜索它,即使他们无法创建或删除其中的文件: - -``` -drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance -``` - -对于金融数据来说,这似乎不是一个好主意。接下来,使用 `chmod` 命令更改共享文件夹的模式(权限)。注意,使用 `g` 更改所属组的权限,使用 `o` 更改其他用户的权限。同样,`u` 会更改用户所有者的权限: - -``` -$ sudo chmod g+w,o-rx /home/shared/finance -``` - -生成的权限看起来更好。现在,`finance` 组中的任何人(或用户所有者 `root`)都可以完全访问该文件夹及其内容: - -``` -drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance -``` - -如果其他用户尝试访问共享文件夹,他们将无法执行此操作。太棒了!现在,我们的金融部门可以将文档放在一个共享的地方。 - -### 其他说明 - -还有其他方法可以操作这些权限。例如,你可能希望将此文件夹中的任何文件设置为 `finance` 组所拥有。这需要本文未涉及的其他设置,但请继续关注我们,以了解关于该主题的更多信息。 - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/command-line-quick-tips-permissions/ - -作者:[Paul W. Frields][a] -选题:[lujun9972][b] -译者:[MjSeven](https://github.com/MjSeven) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/pfrields/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg -[2]: https://fedoramagazine.org/howto-use-sudo/ diff --git a/published/20190709 Sysadmin vs SRE- What-s the difference.md b/published/20190709 Sysadmin vs SRE- What-s the difference.md deleted file mode 100644 index 8bbd02d67a..0000000000 --- a/published/20190709 Sysadmin vs SRE- What-s the difference.md +++ /dev/null @@ -1,62 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (vizv) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11113-1.html) -[#]: subject: (Sysadmin vs SRE: What's the difference?) -[#]: via: (https://opensource.com/article/19/7/sysadmins-vs-sres) -[#]: author: (Vince Power https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish) - -系统管理员与网站可靠性工程师(SRE)对比:区别在那儿? -====== - -> 系统管理员和网站可靠性工程师(SRE,下同)对于任何组织来讲都很重要。本篇将介绍下两者的不同之处。 - -![](https://img.linux.net.cn/data/attachment/album/201907/17/214505qgk19kjuvzb2m1m4.jpg) - -在 IT 行业,成为多面手或是专家的争议一直存在。99% 的传统系统管理员都被归到了多面手这类。[网站可靠性工程师][2]site reliability engineer(SRE)的角色则更加专精,并且在如 Google 般有着一定规模的头部公司中对其的需求不断增加。但总的来说这两者对于跑着应用的基础设施有着同样的目标:为应用的消费者提供良好的体验。然而两者的出发点却截然不同。 - -### 系统管理员:中立善良的化身 - -系统管理员一般都是从基础的桌面或网络支持成长过来的,并一路习得大多数系统管理员都会掌握的广泛的技能。此时这些系统管理员会对他们所负责的系统和应用了如指掌。他们会知道一号服务器上的应用每隔一个星期二就需要重启一次,或是九号服务器周三会静默的崩溃。他们会对服务器的监视作出微调以忽略无关紧要的信息,尽管那个被标记为致命fatal的错误信息每个月第三个周日都会显示。 - -总的来讲,系统管理员了解如何照料那些跑着你核心业务的服务器。这些系统管理员已经成长到开始使用自动化工具去处理所有归他们管的服务器上的例行任务。他们虽然喜欢使用模板、黄金镜像golden images、以及标准,但同时也有着足够的灵活度去修改一个服务器上的参数以解决错误,并注释为什么那个服务器的配置与众不同。 - -尽管系统管理员很伟大,但他们也有着一些怪癖。其中一项就是没有他们神圣的授权你永远也获取不了系统的 root 访问权限,另一项则是任何不是出于他们的主意的变更都要在文档中被记录为应用提供方的要求,并仍然需要再次核对。 - -他们所管理的服务器是他们的地盘,没有人可以随意干涉。 - -### SRE:灭霸将为之自豪 - -与成为系统管理员的道路相反,从开发背景和从系统管理员背景成长为 SRE 的可能性相近。SRE 的职位出现的时长与应用开发环境的生命周期相近。 - -随着一个组织的发展而引入的类似于[持续集成][4]和[持续发布][5] (CI/CD) 的 [DevOps][3] 概念,通常会出现技能空缺,以让这些不可变immutable的应用部署到多个环境并随着业务需求进行扩展。这将是 SRE 的舞台。的确,一个系统管理员可以学习额外的工具,但大体上成为一个全职的职位更容易跟的上发展。一个专精的专家更有意义。 - -SRE 使用如[代码即基础设施][6]infrastructure-as-code的概念去制作模板,然后调用它们来部署用以运行应用的环境,并以使用一键完整重现每个应用和它们的环境作为目标。因此会出现这样的情况:测试环境中一号服务器里的一号应用的二进制文件与生产环境中十五号服务器的完全一致,仅环境相关的变量如密码和数据库链接字串有所不同。 - -SRE 也会在配置发生改变时完全销毁一个环境并重新构建它。对于任何系统他们都不带一点感情。每个系统只是个被打了标记和安排了生命周期的数字而已,甚至连例行的对服务器打补丁也要重新部署整个应用栈application stack - -### 总结 - -对于一些情况,尤其是运维一些大型的基于 DevOps 的环境时,一个 SRE 所能提供的用于处理各种规模的业务的专业技能当然更具优势。但每次他们在运气不好走入死胡同时都会去寻求他的系统管理员友人或是 [来自地狱的混蛋运维(BOFH)][7] ,得到他那身经百战的故障排除技能,和那些用于给组织提供价值的丰富经验的帮助。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/sysadmins-vs-sres - -作者:[Vince Power][a] -选题:[lujun9972][b] -译者:[vizv](https://github.com/vizv) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) -[2]: https://en.wikipedia.org/wiki/Site_Reliability_Engineering -[3]: https://opensource.com/resources/devops -[4]: https://en.wikipedia.org/wiki/Continuous_integration -[5]: https://en.wikipedia.org/wiki/Continuous_delivery -[6]: https://en.wikipedia.org/wiki/Infrastructure_as_code -[7]: http://www.bofharchive.com/BOFH.html diff --git a/published/20190710 32-bit life support- Cross-compiling with GCC.md b/published/20190710 32-bit life support- Cross-compiling with GCC.md deleted file mode 100644 index df71c9b3cd..0000000000 --- a/published/20190710 32-bit life support- Cross-compiling with GCC.md +++ /dev/null @@ -1,178 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11120-1.html) -[#]: subject: (32-bit life support: Cross-compiling with GCC) -[#]: via: (https://opensource.com/article/19/7/cross-compiling-gcc) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -32 位支持:使用 GCC 交叉编译 -====== - -> 使用 GCC 在单一的构建机器上来为不同的 CPU 架构交叉编译二进制文件。 - -![](https://img.linux.net.cn/data/attachment/album/201907/19/054242nwhludz9tm2lwd8t.jpg) - -如果你是一个开发者,要创建二进制软件包,像一个 RPM、DEB、Flatpak 或 Snap 软件包,你不得不为各种不同的目标平台编译代码。典型的编译目标包括 32 位和 64 位的 x86 和 ARM。你可以在不同的物理或虚拟机器上完成你的构建,但这需要你为何几个系统。作为代替,你可以使用 GNU 编译器集合 ([GCC][2]) 来交叉编译,在单一的构建机器上为几个不同的 CPU 架构产生二进制文件。 - -假设你有一个想要交叉编译的简单的掷骰子游戏。在大多数系统上,以 C 语言来编写这个相对简单,出于给添加现实的复杂性的目的,我以 C++ 语言写这个示例,所以程序依赖于一些不在 C 语言中东西 (具体来说就是 `iostream`)。 - -``` -#include -#include - -using namespace std; - -void lose (int c); -void win (int c); -void draw (); - -int main() { - int i; - do { - cout << "Pick a number between 1 and 20: \n"; - cin >> i; - int c = rand ( ) % 21; - if (i > 20) lose (c); - else if (i < c ) lose (c); - else if (i > c ) win (c); - else draw (); - } - while (1==1); - } - -void lose (int c ) - { - cout << "You lose! Computer rolled " << c << "\n"; - } - -void win (int c ) - { - cout << "You win!! Computer rolled " << c << "\n"; - } - -void draw ( ) - { - cout << "What are the chances. You tied. Try again, I dare you! \n"; - } -``` - -在你的系统上使用 `g++` 命令编译它: - -``` -$ g++ dice.cpp -o dice -``` - -然后,运行它来确认其工作: - -``` -$ ./dice -Pick a number between 1 and 20: -[...] -``` - -你可以使用 `file` 命令来查看你刚刚生产的二进制文件的类型: - -``` -$ file ./dice -dice: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically -linked (uses shared libs), for GNU/Linux 5.1.15, not stripped -``` - -同样重要,使用 `ldd` 命令来查看它链接哪些库: - -``` -$ ldd dice -linux-vdso.so.1 => (0x00007ffe0d1dc000) -libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -(0x00007fce8410e000) -libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 -(0x00007fce83d4f000) -libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 -(0x00007fce83a52000) -/lib64/ld-linux-x86-64.so.2 (0x00007fce84449000) -libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 -(0x00007fce8383c000) -``` - -从这些测试中,你已经确认了两件事:你刚刚运行的二进制文件是 64 位的,并且它链接的是 64 位库。 - -这意味着,为实现 32 位交叉编译,你必需告诉 `g++` 来: - - 1. 产生一个 32 位二进制文件 - 2. 链接 32 位库,而不是 64 位库 - -### 设置你的开发环境 - -为编译成 32 位二进制,你需要在你的系统上安装 32 位的库和头文件。如果你运行一个纯 64 位系统,那么,你没有 32 位的库或头文件,并且需要安装一个基础集合。最起码,你需要 C 和 C++ 库(`glibc` 和 `libstdc++`)以及 GCC 库(`libgcc`)的 32 位版本。这些软件包的名称可能在每个发行版中不同。在 Slackware 系统上,一个纯 64 位的带有 32 位兼容的发行版,可以从 [Alien BOB][3] 提供的 `multilib` 软件包中获得。在 Fedora、CentOS 和 RHEL 系统上: - -``` -$ yum install libstdc++-*.i686 -$ yum install glibc-*.i686 -$ yum install libgcc.i686 -``` - -不管你正在使用什么系统,你同样必须安装一些你工程使用的 32 位库。例如,如果你在你的工程中包含 `yaml-cpp`,那么,在编译工程前,你必需安装 `yaml-cpp` 的 32 位版本,或者,在很多系统上,安装 `yaml-cpp` 的开发软件包(例如,在 Fedora 系统上的 `yaml-cpp-devel`)。 - -一旦这些处理好了,编译是相当简单的: - -``` -$ g++ -m32 dice.cpp -o dice32 -L /usr/lib -march=i686 -``` - -`-m32` 标志告诉 GCC 以 32 位模式编译。`-march=i686` 选项进一步定义来使用哪种最优化类型(参考 `info gcc` 了解选项列表)。`-L` 标志设置你希望 GCC 来链接的库的路径。对于 32 位来说通常是 `/usr/lib`,不过,这依赖于你的系统是如何设置的,它可以是 `/usr/lib32`,甚至 `/opt/usr/lib`,或者任何你知道存放你的 32 位库的地方。 - -在代码编译后,查看你的构建的证据: - -``` -$ file ./dice32 -dice: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), -dynamically linked (uses shared libs) [...] -``` - -接着,当然, `ldd ./dice32` 也会指向你的 32 位库。 - -### 不同的架构 - -在 64 位相同的处理器家族上允许 GCC 做出很多关于如何编译代码的假设来编译 32 位软件。如果你需要为完全不同的处理器编译,你必需安装适当的交叉构建实用程序。安装哪种实用程序取决于你正在编译的东西。这个过程比为相同的 CPU 家族编译更复杂一点。 - -当你为相同处理器家族交叉编译时,你可以期待找到与 32 位库集的相同的 64 位库集,因为你的 Linux 发行版是同时维护这二者的。当为一个完全不同的架构编译时,你可能不得不穷追你的代码所需要的库。你需要的版本可能不在你的发行版的存储库中,因为你的发行版可能不为你的目标系统提供软件包,或者它不在容易到达的位置提供所有的软件包。如果你正在编译的代码是你写的,那么你可能非常清楚它的依赖关系是什么,并清楚在哪里找到它们。如果代码是你下载的,并需要编译,那么你可能不熟悉它的要求。在这种情况下,研究正确编译代码需要什么(它们通常被列在 `README` 或 `INSTALL` 文件中,当然也出现在源文件代码自身之中),然后收集需要的组件。 - -例如,如果你需要为 ARM 编译 C 代码,你必须首先在 Fedora 或 RHEL 上安装 `gcc-arm-linux-gnu`(32 位)或 `gcc-aarch64-linux-gnu`(64 位);或者,在 Ubuntu 上安装 `arm-linux-gnueabi-gcc` 和 `binutils-arm-linux-gnueabi`。这提供你需要用来构建(至少)一个简单的 C 程序的命令和库。此外,你需要你的代码使用的任何库。你可以在惯常的位置(大多数系统上在 `/usr/include`)放置头文件,或者,你可以放置它们在一个你选择的目录,并使用 `-I` 选项将 GCC 指向它。 - -当编译时,不使用标准的 `gcc` 或 `g++` 命令。作为代替,使用你安装的 GCC 实用程序。例如: - -``` -$ arm-linux-gnu-g++ dice.cpp \ - -I/home/seth/src/crossbuild/arm/cpp \ - -o armdice.bin -``` - -验证你构建的内容: - -``` -$ file armdice.bin -armdice.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV) [...] -``` - -### 库和可交付结果 - -这是一个如何使用交叉编译的简单的示例。在真实的生活中,你的源文件代码可能产生的不止于一个二进制文件。虽然你可以手动管理,在这里手动管理可能不是好的正当理由。在我接下来的文章中,我将说明 GNU 自动工具,GNU 自动工具做了使你的代码可移植的大部分工作。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/cross-compiling-gcc - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[robsean](https://github.com/robsean) -校对:[wxy](https://github.com/wxy) - -本文由 [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/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools) -[2]: https://gcc.gnu.org/ -[3]: http://www.slackware.com/~alien/multilib/ diff --git a/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md b/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md deleted file mode 100644 index cda9f2c351..0000000000 --- a/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md +++ /dev/null @@ -1,256 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (0x996) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11118-1.html) -[#]: subject: (Test 200+ Linux And Unix Operating Systems Online For Free) -[#]: via: (https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -在线试用 200 多种 Linux 和 Unix 操作系统 -====== - -![DistroTest——在线试用200多种Linux和Unix操作系统][1] - -不久前我们介绍过[OSBoxes][2],该网站提供了一系列免费且开箱即用的 Linux 和 Unix 虚拟机。你可以在你的 Linux 系统中下载这些虚拟机并用 VirtualBox 或 VMWare workstation 试用。今天,我偶然发现一个名叫 “DistroTest” 的类似服务。与 OSBoxes 不同之处在于 DistroTest 让你免费试用现场版 Linux 和 Unix 操作系统。你可以在线试用 200 多种 Linux 和 Unix 操作系统而无需在本地安装它们。只要打开该网站,选择你需要的 Linux/Unix 发行版,然后开始试用! - -两个名为 Klemann Andy 和 Forster Tobias 的好心人用 Qemu 在 Debian 上运行了这项网络服务。这里列出的公开发行版在使用上没有任何限制。你可以象使用本地系统一样使用系统的所有功能。你可以安装和卸载软件。你可以测试安装的程序,甚至删除或格式化硬盘,删除系统文件。简而言之,DistroTest让喜欢尝试不同发行版的的人自行决定: - - * 最适合他们的发行版 - * 想要哪种图形界面 - * 他们可以选择哪些配置 - -本文撰写之时,DistroTest 提供了 227 种操作系统的 711 个版本。我已经使用 Linux 很多年,但我从未听说过这里列出的一些发行版。说实话我甚至不知道 Linux 操作系统有如此之多的版本。 - -DistroTest 网站提供的 Linux 发行版的列表如下。(LCTT 译注:其中也包括部分非 Linux 的操作系统如 FreeBSD 和 FreeDOS,或是分区工具如 Gparted) - - * 4mLinux - * AbsoluteLinux - * AlpineLinux - * Antergos - * antiX Linux - * Aptosid - * ArchBang - * ArchLabs - * ArchLinux - * Archman - * ArchStrike - * ArtixLinux - * AryaLinux - * AvLinux - * BackBoxLinux - * BigLinux - * Bio-Linux - * BlackArch - * BlackLab - * BlackPantherOS - * blag - * BlankOn - * Bluestar - * Bodhi - * BunsenLabs - * Caine - * Calculate Linux Desktop - * CentOS 7 - * Chakra - * ChaletOS - * ClearOS - * Clonezilla - * ConnochaetOS - * Cucumber - * Damn Small Linux - * Debian - * Devil-Linux - * Devuan - * DragonFly BSD - * Dragora - * Dyne:bolic - * Edubuntu - * elementaryOS - * Elive Linux - * Emmabuntüs - * Emmabuntüs - * Endless OS - * EnsoOS - * Exe GNU/Linux - * ExTiX - * Fatdog64 - * Fedora - * FerenOS - * FreeBSD - * FreeDOS - * Frugalware - * Frugalware - * G4L - * GeckoLinux - * Gentoo - * GNewSense - * GoboLinux - * Gparted - * GreenieLinux - * GRML - * GuixSD - * Haiku - * Heads - * Kali Linux - * Kanotix - * KaOS - * Knoppix - * Kodachi - * KolibriOS - * Korora - * Kwort - * Linux Lite - * Linux Mint - * LiveRaizo - * LMDE - * LXLE OS - * Macpup - * Mageia - * MakuluLinux - * Manjaro - * MauiLinux - * MenuetOS - * MiniNo - * Modicia - * Musix - * MX Linux - * Nas4Free - * Neptune - * NetBSD - * Netrunner - * NixOs - * NuTyX - * OpenIndiana - * OpenMandriva - * openSUSE - * OracleLinux - * OSGeo live - * OviOS - * Parabola - * Pardus - * Parrot - * Parsix - * PCLinuxOS - * PeachOSI - * Peppermint - * Pinguy - * PinguyOS - * plopLinux - * PointLinux - * Pop!_OS - * PORTEUS - * Puppy Linux - * PureOS - * Q4OS - * QubesOS - * Quirky - * ReactOS - * Redcore - * Rescatux - * RevengeOS - * RoboLinux - * Rockstor - * ROSA - * Runtu - * Sabayon - * SalentOS - * Salix - * ScientificLinux - * Siduction - * Slax - * SliTaz - * Solus - * SolydK - * SparkyLinux - * Springdale - * Stresslinux - * SubgraphOS - * SwagArch (18.03) - * Tails - * Tanglu - * Tiny Core - * Trisquel - * TrueOS - * TurnKey Linux - * Ubuntu及其官方衍生版本 - * Uruk - * VectorLinux - * VineLinux - * VoidLinux - * Voyager - * VyOS - * WattOs - * Zentyal - * Zenwalk - * Zevenet - * Zorin OS - -### 如何使用? - -要试用任何操作系统,点击下面的链接: https://distrotest.net/ - -在这个网站,你会看到可用的操作系统列表。单击你想了解的发行版名称即可。 - -![1][4] - -用 DistroTest 试用 200 多种Linux和Unix操作系统 - -本文中我会试用 Arch Linux。 - -单击发行版链接后,在跳转到的页面单击 “System start” 按钮即可启动所选操作系统。 - -![1][5] - -此现场版操作系统会在新浏览器窗口中启动。你可以通过内建的 noVNC viewer 访问它。请在浏览器中启用/允许 DistroTest 网站的弹出窗口,否则无法看到弹出的 noVNC 窗口。 - -按回车启动现场版系统。 - -![1][6] - -这就是 Arch Linux 现场版系统: - -![1][7] - -你可以免费使用这个系统 1 小时。你可以试用该现场版操作系统、安装应用、卸载应用、删除或修改系统文件、测试配置或脚本。每次关机后,一切都会恢复成默认配置。 - -一旦试用结束,回到 DistroTest 页面并停止你试用的系统。如果你不想启用 DistroTest 页面的弹出窗口,用你本地系统安装的任意 VNC 客户端也可以。VNC 登录信息可在同一页面找到。 - -![1][8] - -DistroTest 服务对两类用户比较实用:想在线试用 Linux/Unix 系统,或是没有喜欢的操作系统现场版 ISO 镜像文件的人。我在 4G 网络上测试的结果一切正常。 - -### 实际上,我没法在这个虚拟机里安装新软件 - -试用期间我注意到的一个问题是这个虚拟机没有联网。除了本地环回接口之外没有其他网络接口。没有联网也没有本地镜像源的情况下我没法下载和安装新软件。我不知道为何网站声称可以安装软件。也许在这点上我遗漏了什么。我在 DistroTest 上能做的只是看看现成的系统,试用现场版而不能安装任何软件。 - -推荐阅读: - - * [免费在线学习和练习 Linux命令!][9] - * [在浏览器中运行 Linux 和其他操作系统][10] - -暂时就这样了。我不知道 DistroTest 团队如何设法托管了这么多操作系统。我肯定这会花不少时间。这的确是件值得称赞的工作。我非常感激项目成员的无私行为。荣誉归于你们。加油! - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[0x996](https://github.com/0x996) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2018/07/test-Linux-and-Unix-online-686x340.jpg -[2]: https://www.ostechnix.com/osboxes-free-unixlinux-virtual-machines-for-vmware-and-virtualbox/ -[3]: https://distrotest.net/ -[4]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-5.png -[5]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-1.png -[6]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-2.png -[7]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-3.png -[8]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-4-1.png -[9]: https://www.ostechnix.com/learn-and-practice-linux-commands-online-for-free/ -[10]: https://www.ostechnix.com/run-linux-operating-systems-browser/ diff --git a/published/20190711 How to install Elasticsearch on MacOS.md b/published/20190711 How to install Elasticsearch on MacOS.md deleted file mode 100644 index b213d2bcd8..0000000000 --- a/published/20190711 How to install Elasticsearch on MacOS.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11125-1.html) -[#]: subject: (How to install Elasticsearch on MacOS) -[#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins) - -如何在 MacOS 上安装 Elasticsearch -====== - -> 安装 Elasticsearch 很复杂!以下是如何在 Mac 上安装。 - -![](https://img.linux.net.cn/data/attachment/album/201907/20/064958dnnwvp8wqzqq4fm2.jpg) - -[Elasticsearch][2] 是一个用 Java 开发的开源全文搜索引擎。用户上传 JSON 格式的数据集。然后,Elasticsearch 在向集群索引中的文档添加可搜索的引用之前先保存原始文档。 - -Elasticsearch 创建还不到九年,但它是最受欢迎的企业搜索引擎。Elastic 在 2019 年 6 月 25 日发布了最新的更新版本 7.2.0。 - -[Kibana][3] 是 Elasticsearch 的开源数据可视化工具。此工具可帮助用户在 Elasticsearch 集群的内容索引之上创建可视化。 - -[Sunbursts][4]、[地理空间数据地图][5]、[关系分析][6]和实时数据面板只是其中几个功能。并且由于 Elasticsearch 的机器学习能力,你可以了解哪些属性可能会影响你的数据(如服务器或 IP 地址)并查找异常模式。 - -在上个月的 [DevFest DC][7] 中,Booz Allen Hamilton 的首席数据科学家 [Summer Rankin 博士][8]将 TED Talk 的内容数据集上传到了 Elasticsearch,然后使用 Kibana 快速构建了面板。出于好奇,几天后我去了一个 Elasticsearch 聚会。 - -由于本课程针对的是新手,因此我们从第一步开始:在我们的笔记本上安装 Elastic 和 Kibana。如果没有安装这两个包,我们无法将莎士比亚的文本数据集作为测试 JSON 文件创建可视化了。 - -接下来,我将分享在 MacOS 上下载、安装和运行 Elasticsearch V7.1.1 的分步说明。这是我在 2019 年 6 月中旬参加 Elasticsearch 聚会时的最新版本。 - -### 下载适合 MacOS 的 Elasticsearch - -1、进入 ,你会看到下面的页面: - -![The Elasticsearch download page.][9] - -2、在**下载**区,单击 **MacOS**,将 Elasticsearch TAR 文件(例如,`elasticsearch-7.1.1-darwin-x86_64.tar`)下载到 `Downloads` 文件夹。 -  -3、双击此文件并解压到自己的文件夹中(例如,`elasticsearch-7.1.1`),这其中包含 TAR 中的所有文件。 - -**提示**:如果你希望 Elasticsearch 放在另一个文件夹中,现在可以移动它。 - -### 在 MacOS 命令行中运行 Elasticsearch - -如果你愿意,你可以只用命令行运行 Elasticsearch。只需遵循以下流程: - -1、[打开终端窗口][10]。 - -2、在终端窗口中,输入你的 Elasticsearch 文件夹。例如(如果你移动了程序,请将 `Downloads` 更改为正确的路径): - -``` -$ cd ~Downloads/elasticsearch-1.1.0 -``` - -3、切换到 Elasticsearch 的 `bin` 子文件夹,然后启动该程序。例如: - -``` -$ cd bin -$ ./elasticsearch -``` - -这是我启动 Elasticsearch 1.1.0 时命令行终端显示的一些输出: - -![Terminal output when running Elasticsearch.][11] - -**注意**:默认情况下,Elasticsearch 在前台运行,这可能会导致计算机速度变慢。按 `Ctrl-C` 可以阻止 Elasticsearch 运行。 - -### 使用 GUI 运行 Elasticsearch - -如果你更喜欢点击操作,你可以像这样运行 Elasticsearch: - -1、打开一个新的 **Finder** 窗口。 - -2、在左侧 Finder 栏中选择 `Downloads`(如果你将 Elasticsearch 移动了另一个文件夹,请进入它)。 - -3、打开名为 `elasticsearch-7.1.1` 的文件夹(对于此例)。出现了八个子文件夹。 - -![The elasticsearch/bin menu.][12] - -4、打开 `bin` 子文件夹。如上面的截图所示,此子文件夹中有 20 个文件。 -  -5、单击第一个文件,即 `elasticsearch`。 - -请注意,你可能会收到安全警告,如下所示: - -![The security warning dialog box.][13] - -这时候要打开程序需要: - -1. 在警告对话框中单击 **OK**。 -2. 打开**系统偏好**。 -3. 单击**安全和隐私**,打开如下窗口: - - ![Where you can allow your computer to open the downloaded file.][14] -4. 单击**永远打开**,打开如下所示的确认对话框: - - ![Security confirmation dialog box.][15] -5. 单击**打开**。会打开一个终端窗口并启动 Elasticsearch。 - -启动过程可能需要一段时间,所以让它继续运行。最终,它将完成,你最后将看到类似这样的输出: - -![Launching Elasticsearch in MacOS.][16] - -### 了解更多 - -安装 Elasticsearch 之后,就可以开始探索了! - -该工具的 [Elasticsearch:开始使用][17]指南会根据你的目标指导你。它的介绍视频介绍了在 [Elasticsearch Service][18] 上启动托管集群,执行基本搜索查询,通过创建、读取、更新和删除(CRUD)REST API 等方式操作数据的步骤。 - -本指南还提供文档链接,开发控制台命令,培训订阅以及 Elasticsearch Service 的免费试用版。此试用版允许你在 AWS 和 GCP 上部署 Elastic 和 Kibana 以支持云中的 Elastic 集群。 - -在本文的后续内容中,我们将介绍在 MacOS 上安装 Kibana 所需的步骤。此过程将通过不同的数据可视化将你的 Elasticsearch 查询带到一个新的水平。 敬请关注! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/installing-elasticsearch-macos - -作者:[Lauren Maffeo][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lmaffeo/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) -[2]: https://www.getapp.com/it-management-software/a/qbox-dot-io-hosted-elasticsearch/ -[3]: https://www.elastic.co/products/kibana -[4]: https://en.wikipedia.org/wiki/Pie_chart#Ring -[5]: https://en.wikipedia.org/wiki/Spatial_analysis -[6]: https://en.wikipedia.org/wiki/Correlation_and_dependence -[7]: https://www.devfestdc.org/ -[8]: https://www.summerrankin.com/about -[9]: https://opensource.com/sites/default/files/uploads/wwa1f3_600px_0.png (The Elasticsearch download page.) -[10]: https://support.apple.com/en-ca/guide/terminal/welcome/mac -[11]: https://opensource.com/sites/default/files/uploads/io6t1a_600px.png (Terminal output when running Elasticsearch.) -[12]: https://opensource.com/sites/default/files/uploads/o43yku_600px.png (The elasticsearch/bin menu.) -[13]: https://opensource.com/sites/default/files/uploads/elasticsearch_security_warning_500px.jpg (The security warning dialog box.) -[14]: https://opensource.com/sites/default/files/uploads/the_general_tab_of_the_system_preferences_security_and_privacy_window.jpg (Where you can allow your computer to open the downloaded file.) -[15]: https://opensource.com/sites/default/files/uploads/confirmation_dialog_box.jpg (Security confirmation dialog box.) -[16]: https://opensource.com/sites/default/files/uploads/y5dvtu_600px.png (Launching Elasticsearch in MacOS.) -[17]: https://www.elastic.co/webinars/getting-started-elasticsearch?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch&gclid=EAIaIQobChMImdbvlqOP4wIVjI-zCh3P_Q9mEAAYASABEgJuAvD_BwE -[18]: https://info.elastic.co/elasticsearch-service-gaw-v10-nav.html?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch%20service&gclid=EAIaIQobChMI_MXHt-SZ4wIVJBh9Ch3wsQfPEAAYASAAEgJo9fD_BwE diff --git a/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md deleted file mode 100644 index b59148825d..0000000000 --- a/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11128-1.html) -[#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) -[#]: via: (https://itsfoss.com/electronmail/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -ElectronMail:ProtonMail 和 Tutanota 的桌面客户端 -====== - -互联网上的大多数人都拥有来自 Google 等大公司的电子邮件帐户,但这些帐户不尊重你的隐私。值得庆幸的是,目前有 [Tutanota][1] 和 [ProtonMail][2] 等具有隐私意识的替代品。问题是并非所有人都有桌面客户端。今天,我们将研究一个为你解决该问题的项目。我们来看看 ElectronMail 吧。 - -> ‘Electron’ 警告! - -> 以下应用是使用 Electron 构建的(也就是名为 ElectronMail 的原因之一)。如果使用 Electron 让你感到不安,请将此视为触发警告。 - -### ElectronMail:Tutanota 和 ProtonMail 的桌面客户端 - -![Electron Mail About][3] - -[ElectronMail][4] 可以简单地视作 ProtonMail 和 Tutanota 的电子邮件客户端。它使用三大技术构建:[Electron][5]、[TypeScript][6] 和 [Angular][7]。它包括以下功能: - -* 针对每个电子邮件提供商提供多帐户支持 -* 加密本地存储 -* 适用于 Linux、Windows、macOS 和 FreeBSD -* 原生通知系统 -* 带有未读消息总数的系统托盘图标 -* 用主密码保护帐户信息 -* 可切换的视图布局 -* 可离线访问电子邮件 -* 电子邮件在本地加密存储 -* 批量导出电子邮件为 EML 文件 -* 全文搜索 -* 内置/预打包的 Web 客户端 -* 可以为每个帐户配置代理 -* 拼写检查 -* 支持双因素身份验证,以提高安全性 - -目前,ElectronMail 仅支持 Tutanota 和 ProtonMail。我觉得他们将来会增加更多。根据 [GitHub 页面][4]:“多电子邮件提供商支持。目前支持 ProtonMail 和 Tutanota。” - -ElectronMail 目前是 MIT 许可证。 - -#### 如何安装 ElectronMail - -目前,有几种方法可以在 Linux 上安装 ElectronMail。对于Arch 和基于 Arch 的发行版,你可以从[Arch 用户仓库][8]安装它。ElectrionMail 还有一个 Snap 包。要安装它,只需输入 `sudo snap install electron-mail` 即可。 - -对于所有其他 Linux 发行版,你可以[下载][9] `.deb` 或 `.rpm` 文件。 - -![Electron Mail Inbox][10] - -你也可以[下载][9]用于 Windows 中的 `.exe` 安装程序或用于 macOS 的 `.dmg` 文件。甚至还有给 FreeBSD 用的文件。 - -#### 删除 ElectronMail - -如果你安装了 ElectronMail 并确定它不适合你,那么[开发者][12]建议采用几个步骤。 **在卸载应用之前,请务必遵循以下步骤。** - -如果你使用了“保持登录”功能,请单击菜单上的“注销”。这将删除本地保存的主密码。卸载 ElectronMail 后也可以删除主密码,但这涉及编辑系统密钥链。 - -你还需要手动删除设置文件夹。在系统托盘中选择应用图标后,单击“打开设置文件夹”可以找到它。 - -![Electron Mail Setting][13] - -### 我对 ElectronMail 的看法 - -我通常不使用电子邮件客户端。事实上,我主要依赖于 Web 客户端。所以,这个应用对我没太大用处。 - -话虽这么说,但是 ElectronMail 看着不错,而且很容易设置。它有大量开箱即用的功能,并且高级功能并不难使用。 - -我遇到的一个问题与搜索有关。根据功能列表,ElectronMail 支持全文搜索。但是,Tutanota 的免费版本仅支持有限的搜索。我想知道 ElectronMail 如何处理这个问题。 - -最后,ElectronMail 只是一个基于 Web Email 的一个 Electron 封装。我宁愿在浏览器中打开它们,而不是将单独的系统资源用于运行 Electron。如果你只[使用 Tutanota,他们有自己官方的 Electron 桌面客户端][14]。你可以尝试一下。 - -我最大的问题是安全性。这是两个非常安全的电子邮件应用的非官方应用。如果有办法捕获你的登录信息或阅读你的电子邮件怎么办?比我聪明的人必须通过源代码才能确定。这始终是一个安全项目的非官方应用的问题。 - -你有没有使用过 ElectronMail?你认为是否值得安装 ElectronMail?你最喜欢的邮件客户端是什么?请在下面的评论中告诉我们。 - -如果你发现这篇文章很有趣,请花一点时间在社交媒体、Hacker News 或 [Reddit][15] 上分享它。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/electronmail/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/tutanota-review/ -[2]: https://itsfoss.com/protonmail/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-about.jpg?resize=800%2C500&ssl=1 -[4]: https://github.com/vladimiry/ElectronMail -[5]: https://electronjs.org/ -[6]: http://www.typescriptlang.org/ -[7]: https://angular.io/ -[8]: https://aur.archlinux.org/packages/electronmail-bin -[9]: https://github.com/vladimiry/ElectronMail/releases -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1 -[12]: https://github.com/vladimiry -[14]: https://linux.cn/article-10688-1.html -[15]: http://reddit.com/r/linuxusersgroup diff --git a/published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md b/published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md deleted file mode 100644 index d52412c511..0000000000 --- a/published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11110-1.html) -[#]: subject: (Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore]) -[#]: via: (https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -好消息!Ubuntu LTS 用户不需要 PPA 也可以获得最新的 Nvidia 驱动更新 -====== - -> 要在 Ubuntu LTS 上获得的最新 Nvidia 驱动程序,你不必再使用 PPA 了。最新的驱动程序现在将在 Ubuntu LTS 版本的存储库中提供。 - -![][1] - -你可能已经注意到在 Ubuntu 上安装最新和最好的 Nvidia 二进制驱动程序更新的麻烦。 - -默认情况下,Ubuntu 提供开源的 [Nvidia Nouveau 驱动程序][2],这有时会导致 Ubuntu 卡在启动屏幕上。 - -你也可以轻松地[在 Ubuntu 中安装专有的 Nvidia 驱动程序][3]。问题是默认 [Ubuntu 存储库][4]中的 Nvidia 驱动程序不是最新的。为此,几年前 [Ubuntu 引入了一个专门的 PPA][5]以解决这个问题。 - -[使用官方 PPA][6] 仍然是安装闭源图形驱动程序的一个不错的解决方法。但是,它绝对不是最方便的选择。 - -但是,现在,Ubuntu 同意将最新的 Nvidia 驱动程序更新作为 SRU([StableReleaseUpdates][7])的一部分提供。所以,你将在使用 Ubuntu LTS 版本时也拥有 Nvidia 驱动程序了。 - -好吧,这意味着你不再需要在 Ubuntu LTS 版本上单独下载/安装 Nvidia 图形驱动程序。 - -就像你会获得浏览器或核心操作系统更新(或安全更新)的更新包一样,你将获得所需的 Nvidia 二进制驱动程序的更新包。 - -### 这个最新的 Nvidia 显卡驱动程序可靠吗? - -SRU 字面上指的是 Ubuntu(或基于 Ubuntu 的发行版)的稳定更新。因此,要获得最新的图形驱动程序,你应该等待它作为稳定更新释出,而不是选择预先发布的更新程序。 - -当然,没有人能保证它能在所有时间内都正常工作 —— 但安装起来比预先发布的更安全。 - -### 怎样获得最新的 Nvidia 驱动程序? - -![Software Updates Nvidia][8] - -你只需从软件更新选项中的其他驱动程序部分启用“使用 NVIDIA 驱动程序元数据包……”。 - -最初,[The Linux Experiment][10] 通过视频分享了这个消息 —— 然后 Ubuntu 的官方 Twitter 作为公告重新推送了它。你可以观看下面的视频以获取更多详细信息: - -- [https://youtu.be/NFdeWTQIpjo](https://youtu.be/NFdeWTQIpjo) - -### 支持哪些 Ubuntu LTS 版本? - -目前,Ubuntu 18.04 LTS 已经可用了,它也将很快在 Ubuntu 16.04 LTS 上可用(随后的 LTS 也将次第跟上)。 - -### 总结 - -现在你可以安装最新的 Nvidia 二进制驱动程序更新了,你认为这有何帮助? - -如果你已经测试了预先发布的软件包,请在下面的评论中告诉我们你对此的看法。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/ - -作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/nvidia-ubuntu-logo.png?resize=800%2C450&ssl=1 -[2]: https://nouveau.freedesktop.org/wiki/ -[3]: https://itsfoss.com/install-additional-drivers-ubuntu/ -[4]: https://itsfoss.com/ubuntu-repositories/ -[5]: https://itsfoss.com/ubuntu-official-ppa-graphics/ -[6]: https://itsfoss.com/ppa-guide/ -[7]: https://wiki.ubuntu.com/StableReleaseUpdates -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/software-updates-nvidia.jpg?fit=800%2C542&ssl=1 -[9]: https://itsfoss.com/ubuntu-17-04-release-features/ -[10]: https://twitter.com/thelinuxEXP diff --git a/published/20190716 Become a lifelong learner and succeed at work.md b/published/20190716 Become a lifelong learner and succeed at work.md deleted file mode 100644 index c9906592db..0000000000 --- a/published/20190716 Become a lifelong learner and succeed at work.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (heguangzhi) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11130-1.html) -[#]: subject: (Become a lifelong learner and succeed at work) -[#]: via: (https://opensource.com/open-organization/19/7/informal-learning-adaptability) -[#]: author: (Colin Willis https://opensource.com/users/colinwillishttps://opensource.com/users/marcobravo) - - -成为终身学习者,并在工作中取得成功 -====== - -> 在具有适应性文化的开放组织中,学习应该一直持续 —— 但不会总是出现在正式场合。我们真的明白它是如何工作的吗? - -![Writing in a notebook][1] - -持续学习是指人们为发展自己而进行的持续的、职业驱动的、有意识的学习过程。对于那些自认是持续学习者的人来说,学习从未停止 —— 这些人从日常经历中看到学习机会。与同事进行辩论、反思反馈、在互联网上寻找问题的解决方案、尝试新事物或冒险都是一个人在工作中可以进行的非正式学习活动的例子。 - -持续学习是开放组织中任何人的核心能力。毕竟,开放的组织是建立在同行相互思考、争论和行动的基础上的。在开放组织的模棱两可、话语驱动的世界中茁壮成长,每天都需要员工具备这些技能。 - -不幸的是,科学文献在传播我们在工作中学习的知识方面、帮助个人欣赏和发展自己的学习能力方面,做得很差。因此,在本文系列中,我将向你介绍非正式学习,并帮助你理解将学习视为一种技能会如何帮助你在任何组织中茁壮成长,尤其是在开放式组织中。 - -### 为什么这么正式? - -迄今为止,对组织中学习的科学研究主要集中在正式学习而不是非正式学习的设计、交付和评估上。 - -投资于员工知识、技能和能力的发展是一个组织保持其相对于竞争对手优势的重要方式。组织通过创建或购买课程、在线课程、研讨会等来使学习机会正规化。这些课程旨在像个人传授与工作相关的内容,就像学校里的班级一样。对于一个组织来说,提供一门课程是一种简单(如果成本高昂的话)的方法,可以确保其员工的技能或知识保持最新。同样,教室环境是研究人员的天然实验室,使得基于培训的研究和工作不仅可能,而且强大。 - -当然,有些东西人们不需要培训来学习;通常,人们通过研究答案、与同事交谈、思考、实验或适应变化来学习。事实上,[最近的评估表明][2] 70% 到 80% 的与工作相关的知识不是在培训中学到的,而是在工作中非正式学到的。这并不是说正规的培训无效;培训可能非常有效,但它是一种精确的干预方式。在工作的大部分方面正式培训一个人是不现实的,尤其是当这些工作变得更加复杂的时候。 - -因此,非正式学习,或者任何发生在结构化学习环境之外的学习,对工作场所来说是极其重要的。事实上,[最近的科学证据][3]表明,非正式学习比正式培训更能预测工作表现。 - -那么,为什么机构和科学界如此关注培训呢? - -### 循环过程 - -除了我前面提到的原因,研究非正式学习可能非常困难。与正式学习不同,非正式学习发生在非结构化环境中,高度依赖于个人,很难或不可能观察到。 - -直到最近,大多数关于非正式学习的研究都集中在定义非正式学习的合格特征和确定非正式学习在理论上是如何与工作经验联系在一起的。研究人员描述了一个[动态的周期性过程][4],通过这个过程,个人可以在组织中非正式地学习。 - -与正式学习一样,非正式学习发生在非结构化环境中,高度依赖于个人,很难或不可能观察。 - -在这个过程中,个人和组织都有创造学习机会的机构。例如,一个人可能对学习某样东西感兴趣,并为此表现出学习行为。组织以向个人提供反馈的形式,可能表明需要学习。这可能是一个糟糕的绩效评估、一个在项目中发表的评论、或者一个不是个人指导的组织环境的更广泛的变化。这些力量在组织环境中(例如,有人尝试了一个新想法,他或她的同事认识到并奖励了这种行为)或者通过在个人的头脑中反思(例如,有人反思了关于他或她的表现的,并决定在学习工作中付出更多的努力)。与培训不同,非正式学习不遵循正式的线性过程。个人可以随时体验过程的任何部分,同时体验过程的多个部分。 - -### 开放组织中的非正式学习 - -具体而言,在开放组织中,既减少了对等级制度的重视程度,又更加注重对参与式文化的重视程度,这两者都推动了这种非正式的学习。简而言之,开放式组织只是为个人和组织环境提供了更多互动和激发学习的机会。此外,想法和变革需要开放式组织中员工给予更广泛的认同 —— 而认同需要对他人的适应性和洞察力的欣赏。 - -也就是说,仅仅增加学习机会并不能保证学习会发生或成功。有人甚至可能会说,开放式组织中常见的模糊性和公开性话语可能会阻止不擅长持续学习的人——同样,随着时间的推移学习的习惯和开放式组织的核心能力——尽可能有效地为组织做出贡献。 - -解决这些问题需要一种以一致的方式跟踪非正式学习。最近,科学界呼吁创造衡量非正式学习的方法,这样就可以进行系统的研究来解决非正式学习的前因后果的问题。我自己的研究集中在这一呼吁上,我花了几年时间发展和完善我们对非正式学习行为的理解,以便可以衡量它们。 - -在本文系列的第二部分,我将重点介绍我最近在一个开放式组织中进行的一项研究的成果,在该研究中,我测试了我对非正式学习行为的研究,并将它们与更广泛的工作环境和个人工作成果联系起来。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/19/7/informal-learning-adaptability - -作者:[Colin Willis][a] -选题:[lujun9972][b] -译者:[heguangzhi](https://github.com/heguangzhi) -校对:[wxy](https://github.com/wxy) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/colinwillishttps://opensource.com/users/marcobravo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/notebook-writing-pen.jpg?itok=uA3dCfu_ (Writing in a notebook) -[2]: https://www.groupoe.com/images/Accelerating_On-the-Job-Learning_-_White_Paper.pdf -[3]: https://www.researchgate.net/publication/316490244_Antecedents_and_Outcomes_of_Informal_Learning_Behaviors_a_Meta-Analysis -[4]: https://psycnet.apa.org/record/2008-13469-009 diff --git a/published/20190716 Save and load Python data with JSON.md b/published/20190716 Save and load Python data with JSON.md deleted file mode 100644 index a716d958c4..0000000000 --- a/published/20190716 Save and load Python data with JSON.md +++ /dev/null @@ -1,128 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (HankChow) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11133-1.html) -[#]: subject: (Save and load Python data with JSON) -[#]: via: (https://opensource.com/article/19/7/save-and-load-data-python-json) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -使用 Python 处理 JSON 格式的数据 -====== - -> 如果你不希望从头开始创造一种数据格式来存放数据,JSON 是一个很好的选择。如果你对 Python 有所了解,就更加事半功倍了。下面就来介绍一下如何使用 Python 处理 JSON 数据。 - -![Cloud and databsae incons][1] - -[JSON][2] 的全称是 JavaScript 对象表示法JavaScript Object Notation。这是一种以键值对的形式存储数据的格式,并且很容易解析,因而成为了一种被广泛使用的数据格式。另外,不要因为 JSON 名称而望文生义,JSON 并不仅仅在 JavaScript 中使用,它也可以在其它语言中使用。下文会介绍它是如何在 Python 中使用的。 - -首先我们给出一个 JSON 示例: - -``` -{ - "name":"tux", - "health":"23", - "level":"4" -} -``` - -上面是一个和编程语言无关的原生 JSON 数据。熟悉 Python 的人会看出来这个 JSON 数据跟 Python 中的字典dictionary长得很像。而这两者之间确实非常相似,如果你对 Python 中的列表和字典数据结构有一定的理解,那么 JSON 理解起来也不难。 - -### 使用字典存放数据 - -如果你的应用需要存储一些结构复杂的数据,不妨考虑使用 JSON 格式。对比你可能曾经用过的自定义格式的文本配置文件,JSON 提供了更加结构化的可递归的存储格式。同时,Python 自带的 `json` 模块已经提供了可以将 JSON 数据导入/导出应用时所需的所有解析库。因此,你不需要针对 JSON 自行编写代码进行解析,而其他开发人员在与你的应用进行数据交互的时候也不需要去解析新的数据格式。正是这个原因,JSON 在数据交换时被广泛地采用了。 - -以下是一段在 Python 中使用嵌套字典的代码: - -``` -#!/usr/bin/env python3 - -import json - -# instantiate an empty dict -team = {} - -# add a team member -team['tux'] = {'health': 23, 'level': 4} -team['beastie'] = {'health': 13, 'level': 6} -team['konqi'] = {'health': 18, 'level': 7} -``` - -这段代码声明了一个名为 `team` 的字典,并初始化为一个空字典。 - -如果要给这个字典添加内容,首先需要创建一个键,例如上面示例中的 `tux`、`beastie`、`konqi`,然后为这些键一一提供对应的值。上面示例中的值由一个个包含游戏玩家信息的字典充当。 - -字典是一种可变的变量。字典中的数据可以随时添加、删除或更新。这样的特性使得字典成为了应用程序存储数据的极好选择。 - -### 使用 JSON 格式存储数据 - -如果存放在字典中的数据需要持久存储,这些数据就需要写到文件当中。这个时候就需要用到 Python 中的 `json` 模块了: - -``` -with open('mydata.json', 'w') as f: - json.dump(team, f) -``` - -上面的代码首先创建了一个名为 `mydata.json` 的文件,然后以写模式打开了这个文件,这个被打开的文件以变量 `f` 表示(当然也可以用任何你喜欢的名称,例如 `file`、`output` 等)。而 `json` 模块中的 `dump()` 方法则是用于将一个字典输出到一个文件中。 - -从应用中导出数据就是这么简单,同时这些导出的数据是结构化的、可理解的。现在可以查看导出的数据: - -``` -$ cat mydata.json -{"tux": {"health": 23, "level": 4}, "beastie": {"health": 13, "level": 6}, "konqi": {"health": 18, "level": 7}} -``` - -### 从 JSON 文件中读取数据 - -如果已经将数据以 JSON 格式导出到文件中了,也有可能需要将这些数据读回到应用中去。这个时候,可以使用 Python `json` 模块中的 `load()` 方法: - -``` -#!/usr/bin/env python3 - -import json - -f = open('mydata.json') -team = json.load(f) - -print(team['tux']) -print(team['tux']['health']) -print(team['tux']['level']) - -print(team['beastie']) -print(team['beastie']['health']) -print(team['beastie']['level']) - -# when finished, close the file -f.close() -``` - -这个方法实现了和保存文件大致相反的操作。使用一个变量 `f` 来表示打开了的文件,然后使用 `json` 模块中的 `load()` 方法读取文件中的数据并存放到 `team` 变量中。 - -其中的 `print()` 展示了如何查看读取到的数据。在过于复杂的字典中迭代调用字典键的时候有可能会稍微转不过弯来,但只要熟悉整个数据的结构,就可以慢慢摸索出其中的逻辑。 - -当然,这里使用 `print()` 的方式太不灵活了。你可以将其改写成使用 `for` 循环的形式: - -``` -for i in team.values(): - print(i) -``` - -### 使用 JSON - -如上所述,在 Python 中可以很轻松地处理 JSON 数据。因此只要你的数据符合 JSON 的模式,就可以选择使用 JSON。JSON 非常灵活易用,下次使用 Python 的时候不妨尝试一下。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/save-and-load-data-python-json - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[HankChow](https://github.com/HankChow) -校对:[wxy](https://github.com/wxy) - -本文由 [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/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) -[2]: https://json.org diff --git a/published/20190717 How to install Kibana on MacOS.md b/published/20190717 How to install Kibana on MacOS.md deleted file mode 100644 index a4495adc46..0000000000 --- a/published/20190717 How to install Kibana on MacOS.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11135-1.html) -[#]: subject: (How to install Kibana on MacOS) -[#]: via: (https://opensource.com/article/19/7/installing-kibana-macos) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) - -如何在 MacOS 上安装 Kibana -====== - -> Elasticsearch 当安装好了之后,Kibana 插件可以为这个功能强大的搜索工具添加可视化功能。 - -![](https://img.linux.net.cn/data/attachment/album/201907/22/204048vl8t88y6q8988229.jpg) - -在我之前的文章中,我向 Mac 用户介绍了[安装 Elasticsearch][2] 的步骤,这是世界上最受欢迎的企业级搜索引擎。(这里有一篇针对 Linux 用户的[单独文章][3]。)其自然语言处理能力使得 Elasticsearch 在数据集中查找细节方面表现出色。一旦你发现了你需要的数据,如果你已经安装了 [Kibana][4],你可以将它提升到一个新的水平。 - -Kibana 是 Elasticsearch 的开源的数据可视化插件。当你在 Elasticsearch 中找到了数据,Kibana 就会帮助你将其放入折线图、[时间序列查询][5]、地理空间地图等。该工具非常适合于必须展示其研究成果的数据科学家,尤其是那些使用开源数据的人。 - -### 安装 Kibana - -你需要在 Elasticsearch 之外单独安装 Kibana。因为我安装了 Elasticsearch 7.1.1,所以我将安装 Kibana 1.1。版本的匹配非常重要,Kibana 需要针对相同版本的 Elasticsearch 节点运行。 (Kibana 运行在 node.js 上。) - -以下是我为 MacOS 安装 Kibana 7.1.1 时所遵循的步骤: - -1、确保 Elasticsearch 已下载并运行。如果需要,请参阅上一篇文章。 - -**注意**:你至少需要先安装 Elasticsearch 1.4.4 或更高版本才能使用 Kibana。这是因为你需要向 Kibana 提供要连接的 Elasticsearch 实例的 URL 以及你要搜索的 Elasticsearch 索引。通常,最好安装两者的最新版本。 - -2、单击[此处][6]下载 Kibana。你将看到如下的网页,它会提示你在**下载**部分的右上角下载 Kibana for Mac: - -![Download Kibana here.][7] - -3、在你的 `Downloads` 文件夹中,打开 .tar 文件以展开它。此操作将创建一个具有相同名称的文件夹(例如,`kibana-7.1.1-darwin-x86_64`)。 - -4、如果你希望 Kibana 放在另一个文件夹中,请立即移动它。 - -仔细检查 Elasticsearch 是否正在运行,如果没有,请在继续之前启动它。(如果你需要说明,请参阅上一篇文章。) - -### 打开 Kibana 插件 - -Elasticsearch 运行起来后,你现在可以启动 Kibana 了。该过程类似于启动 Elasticsearch: - -1、从 Mac 的 `Downloads` 文件夹(或 Kibana 移动到的新文件夹)里,打开 Kibana 文件夹(即 `~Downloads/kibana-7.1.1-darwin-x86_64`)。 - -2、打开 `bin` 子文件夹。 - -![The Kibana bin folder.][8] - -3、运行 `kibana-plugin`。你可能会遇到上一篇文章中出现的相同安全警告: -   -![Security warning][9] - -通常,如果收到此警告,请按照那篇文章中的说明清除警告并打开 Kibana。请注意,如果我在终端中没有运行 Elasticsearch 的情况下打开该插件,我会收到相同的安全警告。要解决此问题,如上一篇文章中所述,打开 Elasticsearch 并在终端中运行它。使用 GUI 启动 Elasticsearch 也应该打开终端。 - -然后,我右键单击 `kibana-plugin` 并选择“打开”。这个解决方案对我有用,但你可能需要尝试几次。 我的 Elasticsearch 聚会中的几个人在他们的设备上打开 Kibana 时遇到了一些麻烦。 - -### 更改 Kibana 的主机和端口号 - -Kibana 的默认设置将其配置为在 `localhost:5601` 上运行。你需要更新文件(在这个例子的情况下)`~Downloads/kibana-7.1.1-darwin-x86_64/config/kibana.yml` 以在运行 Kibana 之前更改主机或端口号。 - -![The Kibana config directory.][10] - -以下是我的 Elasticsearch 聚会组里配置 Kibana 时终端的样子,因此默认为 `http://localhost:9200`,这是查询 Elasticsearch 实例时使用的 URL: - -![Configuring Kibana's host and port connections.][11] - -### 从命令行运行 Kibana - -打开插件后,可以从命令行或 GUI 运行 Kibana。这是终端连接到 Elasticsearch 后的样子: - -![Kibana running once it's connected to Elasticsearch.][12] - -与 Elasticsearch 一样,Kibana 默认在前台运行。你可以按 `Ctrl-C` 来停止它。 - -### 总结 - -Elasticsearch 和 Kibana 是占用大量存储空间的大型软件包。有这么多人一次下载这两个软件包,当我的Elasticsearch 会员和我下载它们两个时,我平均要下载几分钟。这可能是由于 WiFi 不佳和/或用户数量太多,但如果发生同样的事情,请记住这种可能性。 - -之后,由于我的笔记本电脑存储空间不足,我无法上传我们正在使用的 JSON 文件。我能够按照讲师的可视化进行操作,但无法实时使用 Kibana。因此,在下载 Elasticsearch 和 Kibana 之前,请确保设备上有足够的空间(至少几千兆字节)来上传和使用这些工具搜索文件。 - -要了解有关 Kibana 的更多信息,他们的用户指南[简介][13]是理想的。(你可以根据你正在使用的 Kibana 版本配置该指南。)他们的演示还向你展示了如何[在几分钟内构建仪表板][14],然后进行首次部署。 - -玩得开心! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/installing-kibana-macos - -作者:[Lauren Maffeo][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://opensource.com/users/lmaffeo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) -[2]: https://linux.cn/article-11125-1.html -[3]: https://opensource.com/article/19/7/installing-elasticsearch-and-kibana-linux -[4]: https://www.elastic.co/products/kibana -[5]: https://en.wikipedia.org/wiki/Time_series -[6]: https://www.elastic.co/downloads/kibana -[7]: https://opensource.com/sites/default/files/uploads/download_kibana.png (Download Kibana here.) -[8]: https://opensource.com/sites/default/files/uploads/kibana_bin_folder.png (The Kibana bin folder.) -[9]: https://opensource.com/sites/default/files/uploads/security_warning.png (Security warning) -[10]: https://opensource.com/sites/default/files/uploads/kibana_config_directory.png (The Kibana config directory.) -[11]: https://opensource.com/sites/default/files/uploads/kibana_host_port_config.png (Configuring Kibana's host and port connections.) -[12]: https://opensource.com/sites/default/files/uploads/kibana_running.png (Kibana running once it's connected to Elasticsearch.) -[13]: https://www.elastic.co/guide/en/kibana/7.2/introduction.html -[14]: https://www.elastic.co/webinars/getting-started-kibana?baymax=rtp&elektra=docs&storm=top-video&iesrc=ctr diff --git a/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md deleted file mode 100644 index 268c9e16ca..0000000000 --- a/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11121-1.html) -[#]: subject: (Epic Games Backs Blender Foundation with $1.2m Epic MegaGrants) -[#]: via: (https://itsfoss.com/epic-games-blender-grant/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Epic Games 给予 Blender 基金会 120 万美元的拨款支持 -====== - -[Epic MegaGrants][1] 是 [Epic Games][2] 的一个计划,用于支持游戏开发人员、企业专业人士、内容创建者和工具开发人员使用虚幻引擎Unreal Engine(UE)做出神奇的作品或增强 3D 图形社区的开源功能。 - -作为该计划的一部分,Epic Games 给予 [Blender 基金会][3] 120 万美元拨款以帮助改善他们的发展。如果你还不知道,Blender 是[最好的开源视频编辑][4]之一,特别是以创建专业的 3D 计算机图形而闻名。 - -**Tim Sweeney**(Epic Games 的创始人兼首席执行官)这样评论这笔授予: - -> “开放式工具、库和平台对数字内容生态系统的未来至关重要。……Blender 是艺术社区持久的资源,我们的目标是确保其进步,造福所有创作者。” - -即使这是个好消息,也有人对此不满意。在本文中,我们将看一下得到该拨款后的 Blender 基金会的计划,以及人们对此的看法。 - -### Blender 基金会的改进计划 - -![Image Credit : BlenderNation][5] - -在[新闻稿][6]当中,Blender 基金会提到了如何利用这笔资金以及用于何种目的: - -> “Epic MegaGrant 将在未来三年内逐步交付,并将为 Blender 的专业 Blender 发展计划Professionalizing Blender Development Initiative做出贡献。” - -所以,没错,这笔财务帮助将以现金提供 —— 但是,它要在 3 年内完成。也就是说,我们要期待 Blender 基金会及其软件质量得到重大改进还有很长时间。 - -这是 **Ton Roosendaal**(Blender 基金会的创始人)需要说明的它将如何被利用: - -> “Epic Games 的支持对 Blender 是一个重要里程碑,”Blender 基金会的创始人兼董事长 Ton Roosendaal 说道。“由于这项拨款,我们将对我们的项目组织进行大量投入,以改善支持、协作和代码质量实践。因此,我们期望更多来自该行业的贡献者加入我们的项目。” - -### 为什么人们对此不是很喜欢? - -让我澄清一下,就我个人而言,我不喜欢用 Epic Game 的市场或客户端玩游戏。 - -由于各种原因(功能、隐私等),我更喜欢 [Steam][7] 而不是 Epic Games。 - -Epic Games 被称为游戏社区中的坏人,因为它最近几款游戏专属于其平台 —— 尽管很多人警告用户该平台上的隐私问题。 - -不仅如此,Epic Games 的首席执行官在过去发过这样的推特: - -> 安装 Linux 相当于人们不喜欢美国的政治趋势时就搬到加拿大。 -> -> 不,我们必须为今天的自由而战,如今我们拥有自由。 -> -> - Tim Sweeney(@TimSweeneyEpic)[2018年2月15日][8] - -嗯,这并不直接暗示他讨厌 Linux 或者没有积极推动 Linux 的游戏开发 —— 但是只是因为很多历史情况,人们并不真正信任 Epic Games 的决策。所以,他们并不欣赏与 Blender 基金会的联系(即使这个财务帮助是积极的)。 - -这与财务帮助无关。但是,Epic Games 缺乏良好的声誉(当然是主观的),因此,人们对此的看法是消极的。看看拨款公告后的一些推文: - -> 希望不要走向排它……这可能会破坏你的声誉。 -> -> - Ray(@ Epicshadow1994)[2019年7月15日][9] - -> 我对将来会变成什么样感到怀疑。EPIC 最近一直在采取敌对战术。 -> -> - acrid Heartwood(@acrid_heartwood)[2019年7月15日][10] - -### 总而言之 - -你仍然可以[通过 Lutris 在 Linux 上运行 Epic Games][11],但这是很单薄的非官方尝试。Epic Games 没有表示有兴趣正式支持该项目。 - -所以,很明显不是每个人都信任 Epic Games。因此,这个消息带来了各种消极反应。 - -但是,这笔拨款肯定会帮助 Blender 基金会改善其组织和软件质量。 - -你怎么看待这件事?请在下面的评论中告诉我们您的想法。 - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/epic-games-blender-grant/ - -作者:[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.unrealengine.com/en-US/megagrants -[2]: https://www.epicgames.com/store/en-US/ -[3]: https://www.blender.org/ -[4]: https://itsfoss.com/open-source-video-editors/ -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/epic-games-blender-megagrant.jpg?resize=800%2C450&ssl=1 -[6]: https://www.blender.org/press/epic-games-supports-blender-foundation-with-1-2-million-epic-megagrant/ -[7]: https://itsfoss.com/install-steam-ubuntu-linux/ -[8]: https://twitter.com/TimSweeneyEpic/status/964284402741149698?ref_src=twsrc%5Etfw -[9]: https://twitter.com/Epicshadow1994/status/1150787326626263042?ref_src=twsrc%5Etfw -[10]: https://twitter.com/acrid_heartwood/status/1150789691979030528?ref_src=twsrc%5Etfw -[11]: https://linux.cn/article-10968-1.html diff --git a/sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md b/sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md new file mode 100644 index 0000000000..246ab1160d --- /dev/null +++ b/sources/news/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore]) +[#]: via: (https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore] +====== + +_**Brief: To get the latest Nvidia drivers in Ubuntu LTS versions, you don’t have to use PPA anymore. The latest drivers will now be available in the repositories of the Ubuntu LTS versions.**_ + +![][1] + +You might be aware of the troubles to install the latest and greatest Nvidia binary driver updates on Ubuntu. + +By default, Ubuntu provides the open source [Nvidia Nouveau drivers][2] that some time result in Ubuntu being stuck at boot screen. + +You can also [install the proprietary Nvidia driver in Ubuntu][3] easily. The problem is that the Nvidia drivers in the default [Ubuntu repositories][4] are not the latest one. To solve this problem, [Ubuntu introduced a dedicated PPA][5] a few years back. + +[Using the official PPA][6] is still a decent workaround for installing the closed source graphics driver. However, it is definitely not the most convenient option. + +But, now, Ubuntu agreed to include the latest Nvidia driver update as part of the SRU ([StableReleaseUpdates][7]). So, you will have Nvidia drivers baked in with Ubuntu LTS versions. + +Well, this means that you no longer have to separately download/install the Nvidia graphics drivers on Ubuntu LTS versions. + +Just like you get an update for your browser or the core OS updates (or the security updates), similarly, you will get the required Nvidia binary driver update packages. + +### Can We Rely on the Latest Nvidia Graphics Driver? + +SRU literally refers to stable updates for Ubuntu (or Ubuntu-based distros). So, instead of opting for the pre-released updates in order to get the latest graphics driver, you should wait for it to drop as a stable update. + +Of course, no one can guarantee that it will work 100% of the time – but it will be way more safe to install than the pre-released ones. + +### How Can I Get the latest Nvidia drivers? + +![Software Updates Nvidia][8] + +You just have to enable “Using NVIDIA driver meta package….” from the additional drivers section in the software update option. + +[][9] + +Suggested read  Ubuntu 17.04 Release Date, Features And Upgrade Procedure + +Originally, [The Linux Experiment][10] shared this news through a video – which then Ubuntu’s official Twitter handle re-tweeted as an announcement. You can watch the video below to get more details on it: + +### Which Ubuntu LTS Versions are Supported? + +For now, Ubuntu 18.04 LTS supports this out of the box. It will soon be available for Ubuntu 16.04 LTS (and later LTS versions will follow). + +**Wrapping Up** + +Now that you can install the latest Nvidia binary driver updates, how do you think will it help you? + +If you have tested a pre-released package, let us know your thoughts on that in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/ + +作者:[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/2019/07/nvidia-ubuntu-logo.png?resize=800%2C450&ssl=1 +[2]: https://nouveau.freedesktop.org/wiki/ +[3]: https://itsfoss.com/install-additional-drivers-ubuntu/ +[4]: https://itsfoss.com/ubuntu-repositories/ +[5]: https://itsfoss.com/ubuntu-official-ppa-graphics/ +[6]: https://itsfoss.com/ppa-guide/ +[7]: https://wiki.ubuntu.com/StableReleaseUpdates +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/software-updates-nvidia.jpg?fit=800%2C542&ssl=1 +[9]: https://itsfoss.com/ubuntu-17-04-release-features/ +[10]: https://twitter.com/thelinuxEXP diff --git a/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md new file mode 100644 index 0000000000..31820a380b --- /dev/null +++ b/sources/talk/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md @@ -0,0 +1,53 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use ImageGlass to quickly view JPG images as a slideshow) +[#]: via: (https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10) +[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) + +Use ImageGlass to quickly view JPG images as a slideshow +====== +Want to view images from a folder one-by-one in a slideshow on Windows +10? Open source to the rescue. +![Looking back with binoculars][1] + +Welcome to today’s episode of "How Can I Make This Work?" In my case, I was trying to view a folder of JPG images as a slideshow on Windows 10. As often happens, I turned to open source to solve the issue. + +On a Mac, viewing a folder of JPG images as a slideshow is a simple matter of selecting all the images in a folder ( **Command-A** ), and then pressing **Option-Command-Y**. From there, you can advance the images with the arrow key. Of course, you can do a similar thing on Windows by selecting the first image, then clicking on the window frame's yellow **Manage** bar, then selecting **Slide Show**. There, you can control the speed, but only to a point: slow, medium, and fast. + +I wanted to advance the images in Windows the same way I do it on a Mac. Naturally, I fired up the Googler and searched for a solution. There, I found the [ImageGlass][2] open source app, [licensed GPL 3.0][3], and it did the trick perfectly. Here's what it looks like: + +![Viewing an image in ImageGlass.][4] + +### About ImageGlass + +ImageGlass was developed by Dương Diệu Pháp, a Vietnamese developer who works on the front end for Chainstack, according to his website. He collaborates with US-based [Kevin Routley][5], who "develops new features for ImageGlass." The source code is available on [GitHub][6]. + +ImageGlass supports most common image formats, including JPG, GIF, PNG, WEBP, SVG, and RAW. Users can customize this extension list easily. + +My specific problem was needing to find an image for a catalog cover. Unfortunately, it was in a folder containing dozens of photos. Navigating through the slideshow in ImageGlass, stopping on the image I wanted, and downloading it into my project folder turned out to be easy. Open source to the rescue yet again, and the app took only seconds to download and use. + +ImageGlass was featured as a Picasa alternative in Jason Baker’s article [9 open source alternatives to][7] [Picasa][7] from March 10, 2016. There are some other interesting image-related open source tools in there as well if you are in need. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/6/use-imageglass-view-jpg-images-slideshow-windows-10 + +作者:[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/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) +[2]: https://imageglass.org/ +[3]: https://github.com/d2phap/ImageGlass/blob/master/LICENSE +[4]: https://opensource.com/sites/default/files/uploads/imageglass-screenshot.png (Viewing an image in ImageGlass.) +[5]: https://github.com/fire-eggs +[6]: https://github.com/d2phap/ImageGlass +[7]: https://opensource.com/alternatives/picasa diff --git a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md b/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md index 445075b49f..fef21470c9 100644 --- a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md +++ b/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md @@ -1,11 +1,11 @@ -[#]: collector: "lujun9972" -[#]: translator: "acyanbird " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "Lessons in Vendor Lock-in: Google and Huawei" -[#]: via: "https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei" -[#]: author: "Kyle Rankin https://www.linuxjournal.com/users/kyle-rankin" +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Lessons in Vendor Lock-in: Google and Huawei) +[#]: via: (https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei) +[#]: author: (Kyle Rankin https://www.linuxjournal.com/users/kyle-rankin) Lessons in Vendor Lock-in: Google and Huawei ====== @@ -43,6 +43,7 @@ What's more, the Google Apps suite isn't just a convenient way to load Gmail or Without access to these OS updates, Huawei now will have to decide whether to create its own LineageOS-style Android fork or a whole new phone OS of its own. In either case, it will have to abandon the Google Play Store ecosystem and use F-Droid-style app repositories, or if it goes 100% alone, it will need to create a completely new app ecosystem. If its engineers planned for this situation, then they likely are working on this plan right now; otherwise, they are all presumably scrambling to address an event that "should never happen". Here's hoping that if you find yourself in a similar case of vendor lock-in with an overseas company that's too big to fail, you never get caught in the middle of a trade war. + -------------------------------------------------------------------------------- via: https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei diff --git a/sources/talk/20190716 Server hardware makers shift production out of China.md b/sources/talk/20190716 Server hardware makers shift production out of China.md deleted file mode 100644 index be29283977..0000000000 --- a/sources/talk/20190716 Server hardware makers shift production out of China.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Server hardware makers shift production out of China) -[#]: via: (https://www.networkworld.com/article/3409784/server-hardware-makers-shift-production-out-of-china.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Server hardware makers shift production out of China -====== -Tariffs on Chinese products and unstable U.S./China relations cause server makers to speed up their move out of China. -![Etereuti \(CC0\)][1] - -The supply chain of vendors that build servers and network communication devices is accelerating its shift of production out of China to Taiwan and North America, along with other nations not subject to the trade war between the U.S. and China. - -Last May, the Trump Administration levied tariffs on a number of imported Chinese goods, computer components among them. The tariffs ranged from 10-25%. Consumers were hit hardest, since they are more price sensitive than IT buyers. PC World said the [average laptop price could rise by $120][2] just for the tariffs. - -But since the tariff was based on the value of the product, that means server hardware prices could skyrocket, since servers cost much more than PCs. - -**[ Read also: [HPE’s CEO lays out his technology vision][3] ]** - -### Companies that are moving production out of China - -The Taiwanese tech publication DigiTimes reported (article now locked behind a paywall) that Mitac Computing Technology, a server ODM, reactivated an old production line at Hsinchu Science Park (HSP) in Taiwan at the end of 2018 and restarted another for motherboard SMT process in March 2019. The company plans to establish one more SMT production line prior to the end of 2019. - -It went on to say Mitac plans to produce all of its high-end U.S.-bound servers in Taiwan and is looking to move 30% of its overall server production lines back to Taiwan in the next three years. - -Wiwynn, a cloud computing server subsidiary of Wistron, is primarily assembling its U.S.-bound servers in Mexico and has also recently established a production site in southern Taiwan per clients' requests. - -Taiwan-based server chassis and assembly player AIC recently expanded the number of its factories in Taiwan to four and has been aggressively forming cooperation with its partners to expand its capacity. Many Taiwan-based component suppliers are also expanding their capacity in Taiwan. - -**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]** - -Several ODMs, such as Inventec, Wiwynn, Wistron, and Foxconn, all have plants in Mexico, while Quanta Computer has production lines in the U.S. Wiwynn also plans to open manufacturing facilities in eastern U.S. - -“This is not something that just happened overnight, it’s a process that started a few years ago. The tariffs just accelerated the desire of ODMs to do it,” said Ashish Nadkarni, group vice president for infrastructure systems, platforms and technologies at IDC. “Since [President] Trump has come into office there has been saber rattling about China and a trade war. There has also been a focus on margins.” - -He added that component makers are definitely moving out of China to other parts of Asia, like Korea, the Philippines, and Vietnam. - -### HPE, Dell and Lenovo should remain unaffected - -The big three branded server makers are all largely immunized against the tariffs. HP Enterprise, Dell, and Lenovo all have U.S.-based assemblies and their contract manufacturers are in Taiwan, said Nadkarni. So, their costs should remain unaffected by tariffs. - -The tariffs are not affecting sales as much as revenue for hyperscale whitebox vendors is being stressed. Hyperscale companies such as Amazon Web Services (AWS), Microsoft, Google, etc. have contracts with vendors such as Inspur and Super Micro, and if prices fluctuate, that’s not their problem. The hardware vendor is expected to deliver at the agreed cost. - -So margins, already paper thin, can’t be passed on to the customer, unlike the aforementioned laptop example. - -“It’s not the end customers who are affected by it, it’s the vendors who are affected by it. Certain things they can pass on, like component prices. But if the build value goes up, that’s not the customers problem, that’s the vendor’s problem,” said Nadkarni. - -So while it may cost you more to buy a laptop as this trade fracas goes on, it shouldn’t cost more to buy a server. - -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/3409784/server-hardware-makers-shift-production-out-of-china.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://images.idgesg.net/images/article/2018/07/asia_china_flag_grunge-stars_pixabay_etereuti-100763424-large.jpg -[2]: https://www.pcworld.com/article/3403405/trump-tariffs-on-chinese-goods-could-cost-you-120-more-for-notebook-pcs-say-dell-hp-and-cta.html -[3]: https://www.networkworld.com/article/3394879/hpe-s-ceo-lays-out-his-technology-vision.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 How edge computing is driving a new era of CDN.md b/sources/talk/20190717 How edge computing is driving a new era of CDN.md deleted file mode 100644 index 643d3aa713..0000000000 --- a/sources/talk/20190717 How edge computing is driving a new era of CDN.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How edge computing is driving a new era of CDN) -[#]: via: (https://www.networkworld.com/article/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html) -[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) - -How edge computing is driving a new era of CDN -====== -A CDN is an edge application and an edge application is a superset of what your CDN is doing. -![geralt \(CC0\)][1] - -We are living in a hyperconnected world where anything can now be pushed to the cloud. The idea of having content located in one place, which could be useful from the management’s perspective, is now redundant. Today, the users and data are omnipresent. - -The customer’s expectations have up-surged because of this evolution. There is now an increased expectation of high-quality service and a decrease in customer’s patience. In the past, one could patiently wait 10 hours to download the content. But this is certainly not the scenario at the present time. Nowadays we have high expectations and high-performance requirements but on the other hand, there are concerns as well. The internet is a weird place, with unpredictable asymmetric patterns, buffer bloat and a list of other [performance-related problems][2] that I wrote about on Network Insight. _[Disclaimer: the author is employed by Network Insight.]_ - -Also, the internet is growing at an accelerated rate. By the year 2020, the internet is expected to reach 1.5 Gigabyte of traffic per day per person. In the coming times, the world of the Internet of Things (IoT) driven by objects will far supersede these data figures as well. For example, a connected airplane will generate around 5 Terabytes of data per day. This spiraling level of volume requires a new approach to data management and forces us to re-think how we delivery applications. - -[RELATED: How Notre Dame is going all in with Amazon’s cloud][3] - -Why? Because all this information cannot be processed by a single cloud or an on-premise location. Latency will always be a problem. For example, in virtual reality (VR) anything over 7 milliseconds will cause motion sickness. When decisions are required to be taken in real-time, you cannot send data to the cloud. You can, however, make use of edge computing and a multi-CDN design. - -### Introducing edge computing and multi-CDN - -The rate of cloud adoption, all-things-video, IoT and edge computing are bringing life back to CDNs and multi-CDN designs. Typically, a multi-CDN is an implementation pattern that includes more than one CDN vendor. The traffic direction is performed by using different metrics, whereby traffic can either be load balanced or failed across the different vendors. - -Edge computing moves actions as close as possible to the source. It is the point where the physical world interacts with the digital world. Logically, the decentralized approach of edge computing will not take over the centralized approach. They will be complementary to each other, so that the application can run at its peak level, depending on its position in the network. - -For example, in IoT, saving battery life is crucial. Let’s assume an IoT device can conduct the transaction in 10ms round trip time (RTT), instead of 100ms RTT. As a result, it can use 10 times less battery. - -### The internet, a performance bottleneck - -The internet is designed on the principle that everyone can talk to everyone, thereby providing universal connectivity whether required or not. There has been a number of design changes with network address translation (NAT) being the biggest. However, essentially the role of the internet has remained the same in terms of connectivity, regardless of location. - -With this type of connectivity model, distance is an important determinant for the application’s performance. Users on the other side of the planet will suffer regardless of buffer sizes or other device optimizations. Long RTT is experienced as packets go back and forth before the actual data transmission. Although caching and traffic redirection is being used but limited success has been achieved so far. - -### The principles of application delivery - -When transmission control protocol (TCP) starts, it thinks it is back in the late 1970s. It assumes that all services are on a local area network (LAN) and there is no packet loss. It then starts to work backward from there. Back when it was designed, we didn't have real-time traffic, such as voice and video that is latency and jitter sensitive. - -Ideally, TCP was designed for the ease of use and reliability, not to boost the performance. You actually need to optimize the TCP stack. And this is why CDNs are very good at performing such tasks. For example, if a connection is received from a mobile phone, a CDN will start with the assumption that there is going to be high jitter and packet loss. This allows them to size the TCP window correctly that accurately match network conditions. - -How do you magnify the performance, what options do you have? In a generic sense, many look to lowering the latency. However, with applications, such as video streaming, latency does not tell you if the video is going to buffer. One can only assume that lower latency will lead to less buffering. In such a scenario, measurement-based on throughput is a far better performance metric since will tell you how fast an object will load. - -We have also to consider the page load times. At the network level, it's the time to first byte (TTFB) and ping. However, these mechanisms don’t tell you much about the user experience as everything fits into one packet. Using ping will not inform you about the bandwidth problems. - -And if a web page goes slower by 25% once packet loss exceeds 5% and you are measuring time to the first byte which is the 4th packet - what exactly can you learn? TTFB is comparable to an internet control message protocol (ICMP) request just one layer up the stack. It's good if something is broken but not if there is underperformance issue. - -When you examine the history of TTFB measuring, you will find that it was deployed due to the lack of Real User Monitoring (RUM) measurements. Previously TTFB was as good in approximating how fast something was going to load, but we don't have to approximate anymore as we can measure it with RUM. RUM is measurements from the end-users. An example could be the metrics generated from a webpage that is being served to an actual user. - -Conclusively, TTFB, ping and page load times are not sophisticated measurements. We should prefer RUM time measurements as much as we can. This provides a more accurate picture of the user experience. This is something which has become critical over the last decade. - -Now we are living in a world of RUM which lets us build our network based on what matters to the business users. All CDNs should aim for RUM measurements. For this, they may need to integrate with traffic management systems that intelligently measure on what the end-user really sees. - -### The need for multi-CDN - -Primarily, the reasons one would opt for a multi-CDN environment are availability and performance. No single CDN can be the fastest to everyone and everywhere in the world. It is impossible due to the internet's connectivity model. However, combining the best of two or even more CDN providers will increase the performance. - -A multi-CDN will give a faster performance and higher availability than what can be achieved with a single CDN. A good design is what runs two availability zones. A better design is what runs two availability zones with a single CDN provider. However, superior design is what runs two availability zones in a multi-CDN environment. - -### Edge applications will be the new norm - -It’s not that long ago that there was a transition from the heavy physical monolithic architecture to the agile cloud. But all that really happened was the transition from the physical appliance to a virtual cloud-based appliance. Maybe now is the time that we should ask, is this the future that we really want? - -One of the main issues in introducing edge applications is the mindset. It is challenging to convince yourself or your peers that the infrastructure you have spent all your time working on and investing in is not the best way forward for your business.  - -Although the cloud has created a big buzz, just because you migrate to the cloud does not mean that your applications will run faster. In fact, all you are really doing is abstracting the physical pieces of the architecture and paying someone else to manage it. The cloud has, however, opened the door for the edge application conversation. We have already taken the first step to the cloud and now it's time to make the second move. - -Basically, when you think about edge applications: its simplicity is a programmable CDN. A CDN is an edge application and an edge application is a superset of what your CDN is doing. Edge applications denote cloud computing at the edge. It is a paradigm to distribute the application closer to the source for lower latency, additional resilience, and simplified infrastructure, where you still have control and privacy. - -From an architectural point of view, an edge application provides more resilience than deploying centralized applications. In today's world of high expectations, resilience is a necessity for the continuity of business. Edge applications allow you to collapse the infrastructure into an architecture that is cheaper, simpler and more attentive to the application. The less in the expanse of infrastructure, the more time you can focus on what really matters to your business - the customer. - -### An example of an edge architecture - -An example of edge architecture is within each PoP, every application has its own isolated JavaScript (JS) environment. JavaScript is great for security isolation and the performance guarantees scale. The JavaScript is a dedicated isolated instance that executes the code at the edge. - -Most likely, each JavaScript has its own virtual machine (VM). The sole operation that the VM is performing is the JavaScript runtime engine and the only thing it is running is the customer's code. One could use Google V8 open-source high-performance JavaScript and WebAssembly engine. - -Let’s face it, if you continue building more PoPs, you will hit the law of diminishing returns. When it comes to application such as mobile, you really are maxed out when throwing PoPs to form a solution. So we need to find another solution. - -In the coming times, we are going to witness a trend where most applications will become global, which means edge applications. It certainly makes little sense to place all the application in one location when your users are everywhere else. - -**This article is published as part of the IDG Contributor Network. [Want to Join?][4]** - -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/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html - -作者:[Matt Conran][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/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: https://images.techhive.com/images/article/2017/02/network-traffic-100707086-large.jpg -[2]: https://network-insight.net/2016/12/buffers-packet-drops/ -[3]: https://www.networkworld.com/article/3014599/cloud-computing/how-notre-dame-is-going-all-in-with-amazon-s-cloud.html#tk.nww-fsb -[4]: https://www.networkworld.com/contributor-network/signup.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md b/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md deleted file mode 100644 index 159c8598db..0000000000 --- a/sources/talk/20190717 MPLS is hanging on in this SD-WAN world.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (MPLS is hanging on in this SD-WAN world) -[#]: via: (https://www.networkworld.com/article/3409070/mpls-is-hanging-on-in-this-sd-wan-world.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -MPLS is hanging on in this SD-WAN world -====== -The legacy networking protocol is still viable and there is no need to replace it in certain use cases, argues one cloud provider. -![jamesteohart][1] - -The [SD-WAN networking market is booming and is expected to grow][2] to $17 billion by 2025, and no wonder. Software-defined wide-area networking eliminates the need for expensive routers and does all the network connectivity in the cloud. - -Among its advantages is the support for secure cloud connectivity, one area where multiprotocol label switching (MPLS) falls short. MPLS is a data protocol from before the internet took off and while ideal for communications within the corporate firewall, it doesn’t lend itself to cloud and outside communications well. - -You would think that would seal MPLS’s fate, but just like IPv6 is ever so slowly replacing IPv4, MPLS is hanging on and some IT pros are even increasing their investment. - -**[ Related: [MPLS explained – What you need to know about multi-protocol label switching][3] ]** - -Avant Communications, a cloud services provider that specializes in SD-WAN, recently issued a report entitled [State of Disruption][4] that found that 83% of enterprises that use or are familiar with MPLS plan to increase their MPLS network infrastructure this year, and 40% say they will “significantly increase” their use of it. - -The report did not find one protocol winning that the expense of another. Just as 83% plan to use MPLS, 78% acknowledged plans to use SD-WAN in their corporate networks by the end of the year. Although SD-WAN is on the rise, MPLS is clearly not going away anytime soon. Both SD-WAN and MPLS can live together in harmony, adding value to each other. - -“SD-WAN is the most disruptive technology in our study. It’s not surprising that adoption of new technologies is slowest among the largest companies. The wave of SD-WAN disruption has not fully hit larger companies yet, but our belief is that it is moving quickly upmarket,” the report stated. - -While SD-WAN is much better suited for the job of cloud connectivity, 50% of network traffic is still staying within the corporate firewall. So while SD-WAN can solve the connection issues, so can MPLS. And if you have it deployed, rip and replace makes no sense. - -“MPLS continues to have a strong role in modern networks, and we expect that to continue,” the report stated. “This is especially true among larger enterprises that have larger networks depending on MPLS. While you’ll find MPLS at the core for a long time to come, we expect to see a shared environment with SD-WAN at the edge, enabled by broadband Internet and other lower cost networks. “ - -And MPLS isn’t without its advantages, most notably it can [guarantee performance][5] while SD-WAN, at the mercy of the public internet, cannot. - -As broadband networks continue to improve in performance, SD-WAN will allow companies to reduce their reliance on MPLS, especially as equipment ages and is replaced. Avant expects that, for the foreseeable future, there will continue to be a very viable role for both. - -**More about SD-WAN:** - - * [How to buy SD-WAN technology: Key questions to consider when selecting a supplier][6] - * [How to pick an off-site data-backup method][7] - * [SD-Branch: What it is and why you’ll need it][8] - * [What are the options for security SD-WAN?][9] - - - -Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409070/mpls-is-hanging-on-in-this-sd-wan-world.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://images.idgesg.net/images/article/2019/07/the-latest-in-innovation-in-the-sd-wan-managed-services-market1400-100801684-large.jpg -[2]: https://www.prnewswire.com/news-releases/software-defined-wide-area-network-sd-wan-market-to-hit-17bn-by-2025-global-market-insights-inc-300795304.html -[3]: https://www.networkworld.com/article/2297171/sd-wan/network-security-mpls-explained.html -[4]: https://www.goavant.net/Disruption -[5]: https://www.networkworld.com/article/2297171/network-security-mpls-explained.html -[6]: https://www.networkworld.com/article/3323407/sd-wan/how-to-buy-sd-wan-technology-key-questions-to-consider-when-selecting-a-supplier.html -[7]: https://www.networkworld.com/article/3328488/backup-systems-and-services/how-to-pick-an-off-site-data-backup-method.html -[8]: https://www.networkworld.com/article/3250664/lan-wan/sd-branch-what-it-is-and-why-youll-need-it.html -[9]: https://www.networkworld.com/article/3285728/sd-wan/what-are-the-options-for-securing-sd-wan.html?nsdr=true -[10]: https://www.facebook.com/NetworkWorld/ -[11]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 Public internet should be all software-defined.md b/sources/talk/20190717 Public internet should be all software-defined.md deleted file mode 100644 index 3b834bea66..0000000000 --- a/sources/talk/20190717 Public internet should be all software-defined.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Public internet should be all software-defined) -[#]: via: (https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Public internet should be all software-defined -====== -Having a programmable public internet will correct inefficiencies in the current system, engineers at NOIA say. -![Thinkstock][1] - -The public internet should migrate to a programmable backbone-as-a-service architecture, says a team of network engineers behind NOIA, a startup promising to revolutionize global traffic. They say the internet will be more efficient if internet protocols and routing technologies are re-worked and then combined with a traffic-trading blockchain. - -It’s “impossible to use internet for modern applications,” the company says on its website. “Almost all global internet companies struggle to ensure uptime and reliable user experience.” - -That’s because modern techniques aren’t being introduced fully, NOIA says. The engineers say algorithms should be implemented to route traffic and that segment routing technology should be adopted. Plus, blockchain should be instigated to trade internet transit capacity. A “programmable internet solves the web’s inefficiencies,” a representative from NOIA told me. - -**[ Read also: [What is IPv6, and why aren’t we there yet?][2] ]** - -### Deprecate the public internet - -NOIA has started introducing a caching, distributed content delivery application to improve website loading times, but it wants to ultimately deprecate the existing internet completely. - -The company currently has 353 active cache nodes around the world, with a total 27 terabytes of storage for that caching system—NOIA clients contribute spare bandwidth and storage. It’s also testing a network backbone using four providers with European and American locations that it says will be the [development environment for its envisaged software-defined and radical internet replacement][3]. - -### The problem with today's internet - -The “internet is a mesh of tangled up cables,” [NOIA says][4]. “Thousands of physically connected networks” are involved. Any configuration alterations in any of the jumble of networks causes issues with the protocols, it explains. The company is referring to Border Gateway Protocol (BGP), which lets routers discover paths to IP addresses through the disparate network. Because BGP only forwards to a neighboring router, it doesn’t manage the entire route. That introduces “severe variability” or unreliability. - -“It is impossible to guarantee service reliability without using overlay networks. Low-latency, performance-critical applications, and games cannot operate on public Internet,” the company says. - -### How a software-defined internet works - -NOIA's idea is to use [IPv6][5], the latest internet protocol. IPv6 features an expanded packet size and allows custom headers. The company then adds segment routing to create Segment Routing over IPv6 (SRv6). That SRv6 combo adds routing information to each data packet sent—a packet-level programmable network, in other words. - -Segment routing, roughly, is an updated internet protocol that lets routers comprehend routing information in packet headers and then perform the routing. Cisco has been using it, too. - -NOIA’s network then adds the SRv6 amalgamation to distributed ledger technology (blockchain) in order to let ISPs and data centers buy and sell the routes—buyers can choose their routes in the exchange, too. - -In addition to trade, blockchain introduces security. It's worth noting that routings aren’t the only internet technologies that could be disrupted due to blockchain. In April I wrote about [organizations that propose moving data storage transactions over to distributed ledgers][6]. They say that will be more secure than anything seen before. [Ethernet’s lack of inherent security could be corrected by smart contract, trackable verifiable transactions][7], say some. And, of course, supply chain, the automotive vertical, and the selling of sensor data overall may emerge as [use-contenders for secure, blockchain in the internet of things][8]. - -In NOIA’s case, with SRv6 blended with distributed ledgers, the encrypted ledger holds the IP addresses, but it is architecturally decentralized—no one controls it. That’s one element of added security, along with the aforementioned trading, provided by the ledger. - -That trading could handle the question of who’s paying for all this. However, NOIA says current internet hardware will be able to understand the segment routings, so no new equipment investments are needed. - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.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://images.idgesg.net/images/article/2018/05/dns_browser_http_web_internet_thinkstock-100758191-large.jpg -[2]: https://www.networkworld.com/article/3254575/lan-wan/what-is-ipv6-and-why-aren-t-we-there-yet.html -[3]: https://medium.com/noia/development-update-06-20-07-04-2879f9fce3cb -[4]: https://noia.network/ -[5]: https://www.networkworld.com/article/3254575/what-is-ipv6-and-why-aren-t-we-there-yet.html -[6]: https://www.networkworld.com/article/3390722/how-data-storage-will-shift-to-blockchain.html -[7]: https://www.networkworld.com/article/3356496/how-blockchain-will-manage-networks.html -[8]: https://www.networkworld.com/article/3330937/how-blockchain-will-transform-the-iot.html -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md b/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md deleted file mode 100644 index 06b5726379..0000000000 --- a/sources/talk/20190718 Smart cities offer window into the evolution of enterprise IoT technology.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Smart cities offer window into the evolution of enterprise IoT technology) -[#]: via: (https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -Smart cities offer window into the evolution of enterprise IoT technology -====== -Smart-city technologies such as 0G networking hold clues for successful large-scale implementations of the internet of things in enterprise settings. -![Benjamin Hung modified by IDG Comm. \(CC0\)][1] - -Powering smart cities is one of the most ambitious use cases for the internet of things (IoT), combining a wide variety of IoT technologies to create coherent systems that span not just individual buildings or campuses but entire metropolises. As such, smart cities offer a window into the evolution of enterprise IoT technologies and implementations on the largest scale. - -And that’s why I connected with [Christophe Fourtet][2], CSO and co-founder of [Sigfox][3], a French global network operator, to learn more about using wireless networks to connect large numbers of low-power objects, ranging from smartwatches to electricity meters. (And I have to admit I was intrigued by the 0G network moniker, which conjured visions of weightless IoT devices floating in space, or maybe [OG-][4]style old-school authenticity. That’s not at all what it’s about, of course.) - -**[ Learns more: [Download a PDF bundle of five essential articles about IoT in the enterprise][5] ]** - -According to Fourtet, "Sigfox’s global 0G network specializes in inexpensively conveying small amounts of data over long ranges—without sacrificing quality. Whereas other networks aim to collect and transmit as much data as possible, as quickly as possible, we deliver small packets of information at regular intervals, giving customers only the critical information they need." - -The software-based wireless 0G network listens to devices without the need to establish and maintain network connection, eliminating signaling overhead. With network and computing complexity managed in the cloud, energy consumption and costs of connected devices are dramatically reduced, [the company says][6]. Just as important, the low power requirements can also dramatically cut battery requirements for IoT devices. - -Around the world, customers like Michelin, General Motors, and Airbus use the 0G networks to connect IoT devices, and the network is supported by more than 660 partner organizations, including device makers and service providers such as Urbansense and Bosch. Sigfox cited [0G-connected IoT devices enabling Danish cities][7] to monitor quality of life data, from detecting defects in buildings to tracking garbage collection. - -### 0G applications beyond smart cities - -In addition to smart cities applications, Sigfox serves several industry verticals, including manufacturing, agriculture, and retail. Common use cases include supply-chain management and asset tracking, both within factory/warehouse environments and between locations as containers/shipments move through the supply chain around the globe. The network is uniquely equipped for supply chain use cases due to its cost-efficiency, long-lasting batteries with totally predictable autonomy, and wide-range reach. - -In facilities management, the 0G network can connect IoT devices that track ambient factors such temperature, humidity, and occupancy. Doing so helps managers leverage occupancy data to adjust the amount of space a company needs to rent, reducing overhead costs. It can also help farmers optimize the planting, care, and harvesting of crops. - -Operating as a backup solution to ensure connectivity during a broadband network outage, 0G networking built into a cable box or router could allow service providers to access hardware even when the primary network is down, Fourtet said. - -“The 0G network does not promise a continuation of these services,” Fourtet noted, “but it can provide access to the necessary information to solve challenges associated with outages.” - -In a more dire example in the home and commercial building security market, sophisticated burglars could use cellular and Wi-Fi jammers to block a security system’s access to a network so even though alarms were issued, the service might never receive them, Fourtet said. But the 0G network can send an alert to the alarm system provider even if it has been jammed or blocked, he said. - -### How 0g networks are used today - -Current 0G implementations include helping [Louis Vuitton track luggage][8] for its traveling customers. Using a luggage tracker powered by by [Sigfox’s Monarch service][9], a suitcase can stay connected to the 0G network throughout a trip, automatically recognizing and adapting to local radio frequency standards. The idea is for travelers to track the location of their bags at major airports in multiple countries, Fourtet said, while low energy consumption promises a six-month battery life with a very small battery. - -At the Special Olympics World Games Abu Dhabi 2019, [iWire, LITE-ON and Sigfox worked together][10] to create a tracking solution designed to help safeguard 10,000 athletes and delegates. Sensors connected to the Sigfox 0G network and outfitted with Wi-Fi capabilities were equipped with tiny batteries designed to provide uninterrupted service throughout the weeklong event. The devices “periodically transmitted messages that helped to identify the location of athletes and delegates in case they went off course,” Fourtet said, while LITE-ON incorporated a panic button for use in case of emergencies. In fact, during the event, the system was used to locate a lost athlete and return them to the Games without incident, he said. - -French car manufacturer [Groupe PSA][11] uses the 0G network to optimize shipping container routes between suppliers and assembly plants. [Track&Trace][11] works with IBM’s cloud-based IoT technologies to track container locations and alert Groupe PSA when issues crop up, Fourtet said. - -### 0G is still growing - -“It takes time to build a new network,” Fourtet said. So while Sigfox has delivered 0G network coverage in 60 countries across five continents, covering 1 billion people  (including 51 U.S. metropolitan areas covering 30% of the population), Fourtet acknowledged, “[We] still have a ways to go to build our global network.” In the meantime, the company is expanding its Connectivity-as-a-Service (CaaS) solutions to enable coverage in areas where the 0G network does not yet exist. - -**More on IoT:** - - * [What is the IoT? How the internet of things works][12] - * [What is edge computing and how it’s changing the network][13] - * [Most powerful Internet of Things companies][14] - * [10 Hot IoT startups to watch][15] - * [The 6 ways to make money in IoT][16] - * [What is digital twin technology? [and why it matters]][17] - * [Blockchain, service-centric networking key to IoT success][18] - * [Getting grounded in IoT networking and security][5] - * [Building IoT-ready networks must become a priority][19] - * [What is the Industrial IoT? [And why the stakes are so high]][20] - - - -Join the Network World communities on [Facebook][21] and [LinkedIn][22] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html - -作者:[Fredric 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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/07/tokyo_asia_smart-city_iot_networking_by-benjamin-hung-unsplash-100764249-large.jpg -[2]: https://www.sigfox.com/en/sigfox-story -[3]: https://www.sigfox.com/en -[4]: https://www.dictionary.com/e/slang/og/ -[5]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[6]: https://www.sigfox.com/en/sigfox-iot-technology-overview -[7]: https://www.youtube.com/watch?v=WXc722WGjnE&t=1s -[8]: https://www.sigfox.com/en/news/sigfox-and-louis-vuitton-partner-innovative-luggage-tracker -[9]: https://www.sigfox.com/en/solutions/sigfox-services -[10]: https://www.sigfox.com/en/news/case-study-special-olympics-2019 -[11]: https://www.sigfox.com/en/news/ibm-revolutionizes-container-tracking-groupe-psa-sigfox -[12]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[13]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[14]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[15]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[16]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[17]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[18]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[19]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[20]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[21]: https://www.facebook.com/NetworkWorld/ -[22]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md b/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md deleted file mode 100644 index b490eeeea1..0000000000 --- a/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Worst DNS attacks and how to mitigate them) -[#]: via: (https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Worst DNS attacks and how to mitigate them -====== -DNS threats, including DNS hijacking, tunneling, phishing, cache poisoning and DDoS attacks, are all on the rise. -![Max Bender \(CC0\)][1] - -The Domain Name System remains under constant attack, and there seems to be no end in sight as threats grow increasingly sophisticated. - -DNS, known as the internet’s phonebook, is part of the global internet infrastructure that translates between familiar names and the numbers computers need to access a website or send an email. While DNS has long been the target of assailants looking to steal all manner of corporate and private information, the threats in the [past year][2] or so indicate a worsening of the situation. - -**More about DNS:** - - * [DNS in the cloud: Why and why not][3] - * [DNS over HTTPS seeks to make internet use more private][4] - * [How to protect your infrastructure from DNS cache poisoning][5] - * [ICANN housecleaning revokes old DNS security key][6] - - - -IDC reports that 82% of companies worldwide have faced a DNS attack over the past year. The research firm recently published its fifth annual [Global DNS Threat Report][7], which is based on a survey IDC conducted on behalf of DNS security vendor EfficientIP of 904 organizations across the world during the first half of 2019. - -According to IDC's research, the average costs associated with a DNS attack rose by 49% compared to a year earlier. In the U.S., the average cost of a DNS attack tops out at more than $1.27 million. Almost half of respondents (48%) report losing more than $500,000 to a DNS attack, and nearly 10% say they lost more than $5 million on each breach. In addition, the majority of U.S. organizations say that it took more than one day to resolve a DNS attack. - -“Worryingly, both in-house and cloud applications were damaged, with growth of over 100% for in-house application downtime, making it now the most prevalent damage suffered,” IDC wrote. "DNS attacks are moving away from pure brute-force to more sophisticated attacks acting from the internal network. This will force organizations to use intelligent mitigation tools to cope with insider threats." - -### Sea Turtle DNS hijacking campaign - -An ongoing DNS hijacking campaign known as Sea Turtle is one example of what's occuring in today's DNS threat landscape. - -This month, [Cisco Talos][8] security researchers said the people behind the Sea Turtle campaign have been busy [revamping their attacks][9] with new infrastructure and going after new victims. - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]** - -In April, Talos released a [report detailing][11] Sea Turtle and calling it the “first known case of a domain name registry organization that was compromised for cyber espionage operations.” Talos says the ongoing DNS threat campaign is a state-sponsored attack that abuses DNS to harvest credentials to gain access to sensitive networks and systems in a way that victims are unable to detect, which displays unique knowledge on how to manipulate DNS. - -By obtaining control of victims’ DNS, the attackers can change or falsify any data on the Internet and illicitly modify DNS name records to point users to actor-controlled servers; users visiting those sites would never know, Talos reports.  - -The hackers behind Sea Turtle appear to have regrouped after the April report from Talos and are redoubling their efforts with new infrastructure – a move Talos researchers find to be unusual: “While many actors will slow down once they are discovered, this group appears to be unusually brazen, and will be unlikely to be deterred going forward,” Talos [wrote][9] in July. - -“Additionally, we discovered a new DNS hijacking technique that we assess with moderate confidence is connected to the actors behind Sea Turtle. This new technique is similar in that the threat actors compromise the name server records and respond to DNS requests with falsified A records,” Talos stated.  - -“This new technique has only been observed in a few highly targeted operations. We also identified a new wave of victims, including a country code top-level domain (ccTLD) registry, which manages the DNS records for every domain [that] uses that particular country code; that access was used to then compromise additional government entities. Unfortunately, unless there are significant changes made to better secure DNS, these sorts of attacks are going to remain prevalent,” Talos wrote. - -### DNSpionage attack upgrades its tools - -Another newer threat to DNS comes in the form of an attack campaign called [DNSpionage][12].  - -DNSpionage initially used two malicious websites containing job postings to compromise targets via crafted Microsoft Office documents with embedded macros. The malware supported HTTP and DNS communication with the attackers. And the attackers are continuing to develop new assault techniques. - -“The threat actor's ongoing development of DNSpionage malware shows that the attacker continues to find new ways to avoid detection. DNS tunneling is a popular method of exfiltration for some actors, and recent examples of DNSpionage show that we must ensure DNS is monitored as closely as an organization's normal proxy or weblogs,” [Talos wrote][13]. “DNS is essentially the phonebook of the internet, and when it is tampered with, it becomes difficult for anyone to discern whether what they are seeing online is legitimate.” - -The DNSpionage campaign targeted various businesses in the Middle East as well as United Arab Emirates government domains. - -“One of the biggest problems with DNS attacks or the lack of protection from them is complacency,” said Craig Williams, director of Talos outreach. Companies think DNS is stable and that they don’t need to worry about it. “But what we are seeing with attacks like DNSpionage and Sea Turtle are kind of the opposite, because attackers have figured out how to use it to their advantage – how to use it to do damage to credentials in a way, in the case of Sea Turtle, that the victim never even knows it happened. And that’s a real potential problem.” - -If you know, for example, your name server has been compromised, then you can force everyone to change their passwords. But if instead they go after the registrar and the registrar points to the bad guy’s name, you never knew it happened because nothing of yours was touched – that’s why these new threats are so nefarious, Williams said. - -“Once attackers start using it publicly, successfully, other bad guys are going to look at it and say, ‘Hey, why don't I use that to harvest a bunch of credentials from the sites I am interested in,’” Williams said. - -### **The DNS IoT risk** - -Another developing risk would be the proliferation of IoT devices.  The Internet Corporation for Assigned Names and Numbers (ICANN) recently wrote a [paper on the risk that IoT brings to DNS][14].  - -“The IoT is a risk to the DNS because various measurement studies suggest that IoT devices could stress the DNS infrastructure in ways that we have not seen before,” ICANN stated.   “For example, a software update for a popular IP-enabled IoT device that causes the device to use the DNS more frequently (e.g., regularly lookup random domain names to check for network availability) could stress the DNS in individual networks when millions of devices automatically install the update at the same time.” - -While this is a programming error from the perspective of individual devices, it could result in a significant attack vector from the perspective of DNS infrastructure operators. Incidents like this have already occurred on a small scale, but they may occur more frequently in the future due to the growth of heterogeneous IoT devices from manufacturers that equip their IoT devices with controllers that use the DNS, ICANN stated. - -ICANN also suggested that IoT botnets will represent an increased threat to DNS operators. “Larger DDoS attacks, partly because IoT bots are more difficult to eradicate. Current botnet sizes are on the order of hundreds of thousands. The most well-known example is the Mirai botnet, which involved 400K (steady-state) to 600K (peak) infected IoT devices.  The Hajime botnet hovers around 400K infected IoT devices, but has not launched any DDoS attacks yet. With the growth of the IoT, these attacks may grow to involve millions of bots and as a result larger DDoS attacks. - -### **DNS security warnings grow** - -The UK's [National Cyber Security Centre (NCSC)][15] issued a warning this month about ongoing DNS attacks, particularly focusing on DNS hijacking. It cited a number of risks associated with the uptick in DNS hijacking including: - -**Creating malicious DNS records.** A malicious DNS record could be used, for example, to create a phishing website that is present within an organization’s familiar domain. This may be used to phish employees or customers. - -**Obtaining SSL certificates.** Domain-validated SSL certificates are issued based on the creation of DNS records; thus an attacker may obtain valid SSL certificates for a domain name, which could be used to create a phishing website intended to look like an authentic website, for example. - -**Transparent proxying.** One serious risk employed recently involves transparently proxying traffic to intercept data. The attacker modifies an organization’s configured domain zone entries (such as “A” or “CNAME” records) to point traffic to their own IP address, which is infrastructure they manage. - -“An organization may lose total control of their domain and often the attackers will change the domain ownership details making it harder to recover,” the NCSC wrote. - -These new threats, as well as other dangers, led the U.S. government to issue a warning earlier this year about DNS attacks on federal agencies.  - -The Department of Homeland Security’s Cybersecurity and Infrastructure Security Agency (CISA) told all federal agencies to bolt down their DNS in the face of a series of global hacking campaigns. - -CISA said in its [Emergency Directive][16] that it was tracking a series of incidents targeting DNS infrastructure. CISA wrote that it “is aware of multiple executive branch agency domains that were impacted by the tampering campaign and has notified the agencies that maintain them.” - -CISA says that attackers have managed to intercept and redirect web and mail traffic and could target other networked services. The agency said the attacks start with compromising user credentials of an account that can make changes to DNS records.  Then the attacker alters DNS records, like Address, Mail Exchanger, or Name Server records, replacing the legitimate address of the services with an address the attacker controls. - -These actions let the attacker direct user traffic to their own infrastructure for manipulation or inspection before passing it on to the legitimate service, should they choose. This creates a risk that persists beyond the period of traffic redirection, CISA stated.  - -“Because the attacker can set DNS record values, they can also obtain valid encryption certificates for an organization’s domain names. This allows the redirected traffic to be decrypted, exposing any user-submitted data. Since the certificate is valid for the domain, end users receive no error warnings,” CISA stated. - -### **Get on the DNSSEC bandwagon** - -“Enterprises that are potential targets – in particular those that capture or expose user and enterprise data through their applications – should heed this advisory by the NSCS and should pressure their DNS and registrar vendors to make DNSSEC and other domain security best practices easy to implement and standardized,” said Kris Beevers, co-founder and CEO of DNS security vendor [NS1][17]. “They can easily implement DNSSEC signing and other domain security best practices with technologies in the market today. At the very least, they should work with their vendors and security teams to audit their implementations.” - -DNSSEC was in the news earlier this year when in response to increased DNS attacks, ICANN called for an intensified community effort to install stronger DNS security technology.  - -Specifically, ICANN wants full deployment of the Domain Name System Security Extensions ([DNSSEC][18]) across all unsecured domain names. DNSSEC adds a layer of security on top of DNS. Full deployment of DNSSEC ensures end users are connecting to the actual web site or other service corresponding to a particular domain name, ICANN said. “Although this will not solve all the security problems of the Internet, it does protect a critical piece of it – the directory lookup – complementing other technologies such as SSL (https:) that protect the ‘conversation’, and provide a platform for yet-to-be-developed security improvements,” ICANN stated. - -DNSSEC technologies have been around since about 2010 but are not widely deployed, with less than 20% of the world’s DNS registrars having deployed it, according to the regional internet address registry for the Asia-Pacific region ([APNIC][19]). - -DNSSEC adoption has been lagging because it was viewed as optional and can require a tradeoff between security and functionality, said NS1's Beevers. - -### **Traditional DNS threats** - -While DNS hijacking may be the front line attack method, other more traditional threats still exist.  - -The IDC/EfficientIP study found most popular DNS threats have changed compared with last year. Phishing (47%) is now more popular than last year’s favorite, DNS-based malware (39%), followed by DDoS attacks (30%), false positive triggering (26%), and lock-up domain attacks (26%). - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.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://images.idgesg.net/images/article/2018/08/anonymous_faceless_hooded_mand_in_scary_halloween_mask_finger_to_lips_danger_threat_stealth_attack_hacker_hush_silence_warning_by_max_bender_cc0_via_unsplash_1200x800-100766358-large.jpg -[2]: https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html -[3]: https://www.networkworld.com/article/3273891/hybrid-cloud/dns-in-the-cloud-why-and-why-not.html -[4]: https://www.networkworld.com/article/3322023/internet/dns-over-https-seeks-to-make-internet-use-more-private.html -[5]: https://www.networkworld.com/article/3298160/internet/how-to-protect-your-infrastructure-from-dns-cache-poisoning.html -[6]: https://www.networkworld.com/article/3331606/security/icann-housecleaning-revokes-old-dns-security-key.html -[7]: https://www.efficientip.com/resources/idc-dns-threat-report-2019/ -[8]: https://www.talosintelligence.com/ -[9]: https://blog.talosintelligence.com/2019/07/sea-turtle-keeps-on-swimming.html -[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[11]: https://blog.talosintelligence.com/2019/04/seaturtle.html -[12]: https://www.networkworld.com/article/3390666/cisco-dnspionage-attack-adds-new-tools-morphs-tactics.html -[13]: https://blog.talosintelligence.com/2019/04/dnspionage-brings-out-karkoff.html -[14]: https://www.icann.org/en/system/files/files/sac-105-en.pdf -[15]: https://www.ncsc.gov.uk/news/ongoing-dns-hijacking-and-mitigation-advice -[16]: https://cyber.dhs.gov/ed/19-01/ -[17]: https://ns1.com/ -[18]: https://www.icann.org/resources/pages/dnssec-qaa-2014-01-29-en -[19]: https://www.apnic.net/ diff --git a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md b/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md index 5e5f4df763..0fb3c6469d 100644 --- a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md +++ b/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (ninifly) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20171006 7 deadly sins of documentation.md b/sources/tech/20171006 7 deadly sins of documentation.md index 2289481584..5f2005c764 100644 --- a/sources/tech/20171006 7 deadly sins of documentation.md +++ b/sources/tech/20171006 7 deadly sins of documentation.md @@ -1,4 +1,3 @@ -leemeans translating 7 deadly sins of documentation ====== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-cat-writing-king-typewriter-doc.png?itok=afaEoOqc) diff --git a/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md new file mode 100644 index 0000000000..6b98dbd30d --- /dev/null +++ b/sources/tech/20171226 Top 10 Microsoft Visio Alternatives for Linux.md @@ -0,0 +1,242 @@ +Top 10 Microsoft Visio Alternatives for Linux +====== +**Brief: If you are looking for a good Visio viewer in Linux, here are some alternatives to Microsoft Visio that you can use in Linux.** + +[Microsoft Visio][1] is a great tool for creating or generating mission-critical diagrams and vector representations. While it may be a good tool for making floor plans or other kinds of diagrams - it is neither free nor open source. + +Moreover, Microsoft Visio is not a standalone product. It comes bundled with Microsoft Office. We have already seen [open source alternatives to MS Office][2] in the past. Today we'll see what tools you can use in place of Visio on Linux. + +## Best Microsoft Visio alternatives for Linux + +![Microsoft Visio Alternatives for Linux][4] + +Mandatory disclaimer here. The list is not a ranking. The product at number three is not better than the one at number six on the list. + +I have also mentioned a couple of non open source Visio software that you can use from the web interface. + +| Software | Type | License Type | +| LibreOffice Draw | Desktop Software | Free and Open Source | +| OpenOffice Draw | Desktop Software | Free and Open Source | +| Dia | Desktop Software | Free and Open Source | +| yED Graph Editor | Desktop and web-based | Freemium | +| Inkscape | Desktop Software | Free and Open Source | +| Pencil | Desktop and web-based | Free and Open Source | +| Graphviz | Desktop Software | Free and Open Source | +| darw.io | Desktop and web-based | Free and Open Source | +| Lucidchart | Web-based | Freemium | +| Calligra Flow | Desktop Software | Free and Open Source | + + +### 1. LibreOffice Draw + +![][5] + +LibreOffice Draw module is one of the best open source alternatives to Microsoft Visio. With the help of it, you can either choose to make a quick sketch of an idea or a complex professional floor plan for presentation. Flowcharts, organization charts, network diagrams, brochures, posters, and what not! All that without even requiring to spend a penny. + +Good thing is that it comes bundled with LibreOffice which is installed in most Linux distributions by default. + +#### Overview of Key Features: + + * Style & Formatting tools to make Brochures/Posters + * Calc Data Visualization + * PDF-File editing capability + * Create Photo Albums by manipulating the pictures from Gallery + * Flexible Diagramming tools similar to the ones with Microsoft Visio (Smart Connectors, Dimension lines, etc.,) + * Supports .VSD files (to open) + + + +[LibreOffice Draw][6] + +### 2. Apache OpenOffice Draw + +![][7] + +A lot of people do know about OpenOffice (on which LibreOffice project was initially based on) but they don't really mention Apache OpenOffice Draw as an alternative to Microsoft Visio. But, for a fact - it is yet another amazing open-source diagramming software tool. Unlike LibreOffice Draw, it does not support editing PDF files but it does offer drawing tools for any type of diagram creation. + +Just a caveat here. Use this tool only if you have OpenOffice already on your system. This is because [installing OpenOffice][8] is a pain and it is [not properly developed anymore][9]. + +#### Overview of Key Features: + + * 3D Controller to create shapes quickly + * Create (.swf) flash versions of your work + * Style & Formatting tools + * Flexible Diagramming tools similar to the ones with Microsoft Visio (Smart Connectors, Dimension lines, etc.,) + + + +[Apache OpenOffice Draw][10] + +### 3. Dia + +![][11] + +Dia is yet another interesting open source tool. It may not seem to be under active development like the other ones mentioned. But, if you were looking for a free and open source alternative to Microsoft Visio for simple and decent diagrams - Dia could be your choice. The only let down of this tool for you could be its user interface. Apart from that, it does let you utilize powerful tools for a complex diagram (but it may not look great - so we recommend it for simpler diagrams). + +#### Overview of Key Features: + + * It can be used via command-line + * Styling & Formatting tools + * Shape Repository for custom shapes + * Diagramming tools similar to the ones with Microsoft Visio (Special Objects, Grid Lines, Layers, etc.,) + * Cross-platform + + + +[Dia][12] + +### 4. yED Graph Editor + +yED Graph editor is one of the most loved free Microsoft Visio alternative. If you worry about it being a freeware but not an open source project, you can still utilize [yED's live editor][13] via your web browser for free. It is one of the best recommendations if you want to make diagrams quickly with a very easy-to-use interface. + +#### Overview of Key Features: + + * Drag and drop feature for easy diagram making + * Supports importing external data for linking + + + +[yED Graph Editor][14] + +### 5. Inkscape + +![][15] + +Inkscape is a free and open source vector graphics editor. You get the basic functionalities of creating a flowchart or a data flow diagram. It does not offer advanced diagramming tools but the basic ones to create simpler diagrams. So, Inkscape could be your Visio alternative only if you are looking to generate basic diagrams with the help of diagram connector tool by utilizing the available symbols from the library. + +#### Overview of Key Features: + + * Connector Tool + * Flexible drawing tools + * Broad file format compatibility + + + +[Inkscape][16] + +### 6. Pencil Project + +![][17] + +Pencil Project is an impressive open source initiative that is available for both Windows and Mac along with Linux. It features an easy-to-use GUI which makes diagramming easier and convenient. A good collection of inbuilt shapes and symbols to make your diagrams look great. It also comes baked in with Android and iOS UI stencils to let you start prototyping apps when needed. + +You can also have it installed as a Firefox extension - but the extension does not utilize the latest build of the project. + +#### Overview of Key Features: + + * Browse cliparts easily (utilizing openclipart.org) + * Export as an ODT file / PDF file + * Diagram connector tool + * Cross-platform + + + +[Pencil Project][18] + +### 7. Graphviz + + +![][19] + +Graphviz is slightly different. It is not a drawing tool but a dedicated graph visualization tool. You should definitely utilize this tool if you are into network diagrams which require several designs to represent a node. Well, of course, you can't make a floor plan with this tool (it won't be easy at least). So, it is best-suited for network diagrams, bioinformatics, database connections, and similar stuff. + +#### Overview of Key Features: + + * Supports command-line usage + * Supports custom shapes & tabular node layouts + * Basic stying and formatting tools + + + +[Graphviz][20] + +### 8. Draw.io + +Draw.io is primarily a free web-based diagramming tool with powerful tools to make almost any type of diagrams. You just need to drag n drop and then connect them to create a flowchart, an E-R diagram, or anything relevant. Also, if you like the tool, you can try the [offline desktop version][21]. + +**Overview of Key Features:** + + * Direct uploads to a cloud storage service + * Custom Shapes + * Styling & Formatting tools + * Cross-platform + + + +[Draw.io][22] + +### 9. Lucidchart + +![][23] + +Lucidchart is a premium web-based diagramming tool which offers a free subscription with limited features. You can utilize the free subscription to create several types of diagrams and export them as an image or a PDF. However, the free version does not support data linking and Visio import/export functionality. If you do not need data linking -Lucidchart could prove to be a very good tool while generating beautiful diagrams. + +#### Overview of Key Features: + + * Integrations to Slack, Jira Core, Confluence + * Ability to make product mockups + * Import Visio files + + + +[Lucidchart][24] + +### 10. Calligra Flow + +![calligra flow][25] + +Calligra Flow is a part of [Calligra Project][26] which aims to provide free and open source software tools. With Calligra flow, you can easily create network diagrams, entity-relation diagrams, flowcharts, and more. + +#### Overview of Key Features: + + * Wide range of stencil boxes + * Styling and formatting tools + + + +[Calligra Flow][27] + +### Wrapping Up + +Now that you know about the best free and open source Visio alternatives, what do you think about them? + +Are they better than Microsoft Visio in any aspect of your requirements? Also, let us know in the comments below if we missed any of your favorite diagramming tools as an Linux alternative to Microsoft Visio. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/visio-alternatives-linux/ + +作者:[Ankush Das][a] +译者:[译者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/ +[1]:https://products.office.com/en/visio/flowchart-software +[2]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[3]:data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs= +[4]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/visio-alternatives-linux-featured.png +[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/libreoffice-draw-microsoft-visio-alternatives.jpg +[6]:https://www.libreoffice.org/discover/draw/ +[7]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/apache-open-office-draw.jpg +[8]:https://itsfoss.com/install-openoffice-ubuntu-linux/ +[9]:https://itsfoss.com/openoffice-shutdown/ +[10]:https://www.openoffice.org/product/draw.html +[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/dia-screenshot.jpg +[12]:http://dia-installer.de/ +[13]:https://www.yworks.com/products/yed-live +[14]:https://www.yworks.com/products/yed +[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg +[16]:https://inkscape.org/en/ +[17]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/pencil-project.jpg +[18]:http://pencil.evolus.vn/Downloads.html +[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/graphviz.jpg +[20]:http://graphviz.org/ +[21]:https://about.draw.io/integrations/#integrations_offline +[22]:https://about.draw.io/ +[23]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/lucidchart-visio-alternative.jpg +[24]:https://www.lucidchart.com/ +[25]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/12/calligra-flow.jpg +[26]:https://www.calligra.org/ +[27]:https://www.calligra.org/flow/ diff --git a/published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md b/sources/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md similarity index 80% rename from published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md rename to sources/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md index 600598ce4c..b1f92c921f 100644 --- a/published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md +++ b/sources/tech/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md @@ -1,44 +1,48 @@ [#]: collector: (lujun9972) [#]: translator: (hopefully2333) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11132-1.html) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) [#]: subject: (How to Manually Install Security Updates on Debian/Ubuntu?) [#]: via: (https://www.2daygeek.com/manually-install-security-updates-ubuntu-debian/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -如何在 Debian/Ubuntu 上手动安装安全更新? +How to Manually Install Security Updates on Debian/Ubuntu? ====== -在 Linux 上通过命令行安装一个包程序是一件简单的事。在一行命令中组合使用多个命令能让你更加简单地完成任务。 +Installing a package in Linux from command line is a simple task. -安全更新也同样如此。 +In a single command or combining of multiple commands could make you to complete your task easily. -在这个教程里面,我们会向你展示如何查看可用的安全更新,以及如何在 Ubuntu、LinuxMint 等等这些基于 Debian 的系统中安装它们。 +The same can be done for security updates as well. -有三种方法可以完成这件事,下面会详细地描述这三种方法。 +In this tutorial, we will show you how to check available security update and install them on Debian based systems such as Ubuntu, LinuxMint, etc,. -作为一个 Linux 管理员,你应该让你的系统保持为最新,这会让你的系统更安全,保护你的系统抵抗意想不到的攻击。 +It can be done using three methods. All these methods are described in this article in details. -如果你因为一些应用的依赖问题不能解决,导致不能给所有的系统进行全部更新。那至少,你应该打上安全补丁来让你的系统 100% 符合要求。 +As a Linux administrator, you should keep your system up-to-date, that makes your system more secure. It protects your system against unwanted attack. -### 方法一:如何检查 Debian/Ubuntu 中是否有任何可用的安全更新? +If you are not able to patch entire system with all updates due to some application dependency. At-least, you should install only security patches to make your system 100% compliance. -在进行补丁安装之前,检查可用安全更新列表始终是一个好习惯。它会为你提供将在你的系统中进行更新的软件包的列表。 +### How to Install unattended-upgrades package in Debian/Ubuntu? -默认情况下,你的系统上应该是已经安装了 `unattended-upgrades` 包的。但是如果你的系统没有装这个包,那么请使用下面的命令来安装它。 +By default `unattended-upgrades` package should be installed on your system. But in case if it’s not installed use the following command to install it. -使用 [APT-GET 命令][1] 或者 [APT 命令][2] 来安装 `unattended-upgrades` 包。 +Use **[APT-GET Command][1]** or **[APT Command][2]** to install unattended-upgrades package. ``` $ sudo apt-get install unattended-upgrades -或 +or $ sudo apt install unattended-upgrades ``` -**什么是试运行?** 大多数的 Linux 命令都有一个试运行选项,它会给出实际的输出但不会下载或安装任何东西。 +### Method-1: How to Check if any Security Updates are available in Debian/Ubuntu? -为此,你需要在 `unattended-upgrades` 命令中添加 `--dry-run` 选项。 +It’s always a good practice to check list of available security updates before performing the patch installation. It will give you the list of packages that are going to be updated in your system. + +**What’s dry run?** Most of the Linux commands have a dry run option, which stimulate the actual output but nothing will be downloaded or installed. + +To do so, you need to add `--dry-run` option with unattended-upgrades command. ``` $ sudo unattended-upgrade --dry-run -d @@ -97,21 +101,21 @@ vim-tiny xxd ``` -如果在终端里,上面的命令输出说 “No packages found that can be upgraded unattended and no pending auto-removals”,这意味着你的系统已经是最新的了。 +If the above command output says **“No packages found that can be upgraded unattended and no pending auto-removals”** in the Terminal, this implies your System is up-to-date. -#### 如何在 Debian/Ubuntu 中安装可用的安全更新? +### How to Install available Security Updates in Debian/Ubuntu? -如果你在上面的命令输出中获得了任意的软件包更新,就运行下面的命令来安装它们。 +If your got any package updates in the above command output. Then run the following command to install them. ``` $ sudo unattended-upgrade -d ``` -除此之外,你也可以使用 `apt-get` 命令来进行安装。但是这个方法有点棘手,我会建议用户用第一个选项。 +Alternatively this can be done from apt-get command. It’s bit tricky. However, i would suggest users to go with first option. -### 方法二:如何使用 apt-get 命令在 Debian/Ubuntu 中检查是否有可用的安全更新? +### Method-2: How to Check if any Security Updates are available in Debian/Ubuntu Using apt-get Command? -在你的 Debian/Ubuntu 系统中运行下面的命令来查看可用安全更新的列表。 +Run the following command to check list of available security updates in your Debian/Ubuntu system ``` $ sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi @@ -156,19 +160,19 @@ Inst gcc [4:7.3.0-3ubuntu2.1] (4:7.4.0-1ubuntu2.3 Ubuntu:18.04/bionic-updates, U Inst g++ [4:7.3.0-3ubuntu2.1] (4:7.4.0-1ubuntu2.3 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64]) ``` -#### 如何使用 apt-get 命令在 Debian/Ubuntu 系统中安装可用的安全更新? +### How to Install available Security Updates in Debian/Ubuntu Using apt-get Command? -如果你在上面命令的输出中发现任何的软件包更新。就运行下面的命令来安装它们。 +If you found any package updates in the above output. Finally run the following command to install them. ``` $ sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs apt-get install ``` -除此之外,也可以使用 `apt` 命令来完成。但是这个方法有点棘手,我会建议用户用第一个方式。 +Alternatively this can be done from apt command. It’s bit tricky. However, i would suggest users to go with first option. -### 方法三:如何使用 apt 命令在 Debian/Ubuntu 系统中检查是否有可用的安全更新? +### Method-3: How to Check if any Security Updates are available in Debian/Ubuntu Using apt Command? -在 Debian/Ubuntu 系统中运行下面的命令来查看可用安全更新的列表。 +Run the following command to check list of available security updates in your Debian/Ubuntu system ``` $ sudo apt list --upgradable | grep -e "-security" @@ -213,15 +217,15 @@ vim-tiny/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 [upgradable xxd/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 [upgradable from: 2:8.0.1453-1ubuntu1] ``` -#### 如何在 Debian/Ubuntu 系统中使用 apt 命令来安装可用的安全更新? +### How to Install available Security Updates in Debian/Ubuntu Using apt Command? -如果你在上面命令的输出中发现任何的软件包更新。就运行下面的命令来安装它们。 +If you found any package updates in the above output. Finally run the following command to install them. ``` $ sudo apt list --upgradable | grep -e "-security" | awk -F "/" '{print $1}' | xargs apt install ``` -同样,下面的文件也会告诉你更新包的总数。 +Also, the following file will give you the packages update count. ``` $ sudo cat /var/lib/update-notifier/updates-available @@ -236,8 +240,8 @@ via: https://www.2daygeek.com/manually-install-security-updates-ubuntu-debian/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] -译者:[hopefully2333](https://github.com/hopefully2333) -校对:[wxy](https://github.com/wxy) +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/tech/20190703 Parse arguments with Python.md b/sources/tech/20190703 Parse arguments with Python.md index e84978cde9..73933c53ed 100644 --- a/sources/tech/20190703 Parse arguments with Python.md +++ b/sources/tech/20190703 Parse arguments with Python.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (geekpi) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md b/sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md new file mode 100644 index 0000000000..14284c903a --- /dev/null +++ b/sources/tech/20190706 How To Delete A Repository And GPG Key In Ubuntu.md @@ -0,0 +1,134 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Delete A Repository And GPG Key In Ubuntu) +[#]: via: (https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Delete A Repository And GPG Key In Ubuntu +====== + +![Delete A Repository And GPG Key In Ubuntu][1] + +The other day we discussed how to [**list the installed repositories**][2] in RPM and DEB-based systems. Today, we are going to learn how to delete a repository along with its GPG key in Ubuntu. For those wondering, a repository (shortly **repo** ) is a central place where the developers keep the software packages. The packages in the repositories are thoroughly tested and built specifically for each version by Ubuntu developers. The users can download and install these packages on their Ubuntu system using **Apt** **package manager**. Ubuntu has four official repositories namely **Main** , **Universe** , **Restricted** and **Multiverse**. + +Apart from the official repositories, there are many unofficial repositories maintained by developers (or package maintainers). The unofficial repositories usually have the packages which are not available in the official repositories. All packages are signed with pair of keys, a public and private key, by the package maintainer. As you already know, the public key is given out to the users and the private must be kept secret. Whenever you add a new repository in the sources list, you should also add the repository key if Apt package manager wants to trust the newly added repository. Using the repository keys, you can ensure that you’re getting the packages from the right person. Hope you got a basic idea about software repositories and repository keys. Now let us go ahead and see how to delete the repository and its key if it is no longer necessary in Ubuntu systems. + +### Delete A Repository In Ubuntu + +Whenever you add a repository using “add-apt-repository” command, it will be stored in **/etc/apt/sources.list** file. + +To delete a software repository from Ubuntu and its derivatives, just open the /etc/apt/sources.list file and look for the repository entry and delete it. + +``` +$ sudo nano /etc/apt/sources.list +``` + +As you can see in the below screenshot, I have added [**Oracle Virtualbox**][3] repository in my Ubuntu system. + +![][4] + +virtualbox repository + +To delete this repository, simply remove the entry. Save and close the file. + +If you have added PPA repositories, look into **/etc/apt/sources.list.d/** directory and delete the respective entry. + +Alternatively, you can delete the repository using “add-apt-repository” command. For example, I am deleting the [**Systemback**][5] repository like below. + +``` +$ sudo add-apt-repository -r ppa:nemh/systemback +``` + +Finally, update the software sources list using command: + +``` +$ sudo apt update +``` + +### Delete Repository keys + +We use “apt-key” command to add the repository keys. First, let us list the added keys using command: + +``` +$ sudo apt-key list +``` + +This command will list all added repository keys. + +``` +/etc/apt/trusted.gpg +-------------------- +pub rsa1024 2010-10-31 [SC] +3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B +uid [ unknown] Launchpad PPA for Kendek + +pub rsa4096 2016-04-22 [SC] +B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF +uid [ unknown] Oracle Corporation (VirtualBox archive signing key) <[email protected]> +sub rsa4096 2016-04-22 [E] + +/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg +------------------------------------------------------ +pub rsa4096 2012-05-11 [SC] +790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32 +uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <[email protected]> + +/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg +------------------------------------------------------ +pub rsa4096 2012-05-11 [SC] +8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 +uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <[email protected]> + +/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg +------------------------------------------------------ +pub rsa4096 2018-09-17 [SC] +F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C +uid [ unknown] Ubuntu Archive Automatic Signing Key (2018) <[email protected]> +``` + +As you can see in the above output, the long (40 characters) hex value is the repository key. If you want APT package manager to stop trusting the key, simply delete it using command: + +``` +$ sudo apt-key del "3820 03C2 C8B7 B4AB 813E 915B 14E4 9429 73C6 2A1B" +``` + +Or, specify the last 8 characters only: + +``` +$ sudo apt-key del 73C62A1B +``` + +Done! The repository key has been deleted. Run the following command to update the repository lists: + +``` +$ sudo apt update +``` + +**Resource:** + + * [**Software repositories – Ubuntu Community Wiki**][6] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-delete-a-repository-and-gpg-key-in-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Delete-a-repository-in-ubuntu-720x340.png +[2]: https://www.ostechnix.com/find-list-installed-repositories-commandline-linux/ +[3]: https://www.ostechnix.com/install-oracle-virtualbox-ubuntu-16-04-headless-server/ +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/virtualbox-repository.png +[5]: https://www.ostechnix.com/systemback-restore-ubuntu-desktop-and-server-to-previous-state/ +[6]: https://help.ubuntu.com/community/Repositories/Ubuntu diff --git a/sources/tech/20190708 10 ways to get started with Linux.md b/sources/tech/20190708 10 ways to get started with Linux.md new file mode 100644 index 0000000000..d617eb559f --- /dev/null +++ b/sources/tech/20190708 10 ways to get started with Linux.md @@ -0,0 +1,184 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (10 ways to get started with Linux) +[#]: via: (https://opensource.com/article/19/7/ways-get-started-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/seth/users/don-watkins) + +10 ways to get started with Linux +====== +Ready to dive in and learn Linux? Try these 10 ways to get started. +![Penguins gathered together in the Artic][1] + +The article _[What is a Linux user?][2]_ by Anderson Silva made it clear that these days people are as likely to use Linux (in some way) as they are to use Windows, as long as your definition of "using Linux" is sufficiently broad. Still, if you don't have enough Linux in your life, now is a great time to try Linux in a way you've never tried before. + +Here are 10 ways to get started with Linux. Try one or try them all. + +### 1\. Join a free shell + +![Free shell screenshot][3] + +There are a lot of people running Linux with more Linux servers than they know what to do with (keep in mind that a "Linux server" can be anything from the latest supercomputer to a discarded 12-year-old laptop). To put excess computers to good use, many administrators open their spare boxes up for free shell accounts. + +If you want to log time in a Linux terminal to learn commands, shell scripting, Python, and the basics of web development, a free shell account is an easy, no-cost way to get started. Here's a short list to try: + + * [Freeshell.de][4] is a public access Linux system that's been online since 2002. You get SSH access (to experiment in a Linux shell), IPv6, and OpenSSL, and you can request a MySQL database. + * [Blinkenshell][5] provides a Linux shell to learn Unix, use IRC, host simple websites, and share files. It's been online since 2006. + * [SDF Public Access Unix System][6] was established in 1987 to offer free NetBSD accounts. NetBSD isn't Linux, of course, but it's open source Unix, so it offers a similar experience. It also has several homebrewed applications, so it straddles the line between old-school BBS and plain-old free shell. + + + +Free shell accounts are subject to a lot of abuse, so the more you demonstrate trustworthiness and willingness to participate in the goings-on of the collective, the better your experience. You can often gain access (through a special request or a small donation to demonstrate goodwill) to database engines, compilers, and advanced programming languages. You can also ask for additional software or libraries to be installed, subject to administrator approval. + +#### How to use it + +Public access shell accounts are a great way to try out a real Linux system. The fact that you don't get root access means you get to learn local software management without having to mow your own lawn or fix leaky faucets. You can do just enough real-life activities to make them viable for getting real work done, although they're not reliable enough to be mission critical. + +### 2\. Try Linux on Windows with WSL 2 + +Believe it or not, Microsoft started shipping Linux with Windows as of June 2019, meaning you can run Linux applications from Windows as the second iteration of the [Windows Subsystem for Linux][7] (WSL 2). While it's primarily aimed at developers, Windows users will find WSL 2 to be a Linux environment from the comfort of a familiar desktop without any virtualization taking up extra resources. This is Linux running as a process on your Windows machine. At this time, it's still a new initiative and a work in progress, so it's subject to change. If you try to push it too far too soon, you're likely to encounter a bug or two, but if you're just looking to get started with Linux, learn some commands, and get a feel for getting serious work done in a text-based environment, WSL 2 may be exactly what you need. + +#### How to use it + +WSL doesn't yet have a clear pathway or purpose, but it provides a Linux environment on your Windows machine. You get root access and can run Linux distributions and applications, so it's an easy and seamless way to learn. However, even though WSL _is Linux_, it's not exactly a typical Linux experience. It's Linux provided by Windows, and that's not what you're likely to encounter in the real world. WSL is a development and educational tool, but if it's available to you, then you should use it. + +### 3\. Carry Linux on a bootable thumb drive + +![Porteus Linux][8] + +Carry Linux, installed to a USB thumb drive, everywhere you go, and boot any computer you encounter from that thumb drive. You get a personalized Linux desktop, and you don't have to worry about the data on the host computer you've booted from. The computer doesn't touch your Linux OS, and your Linux OS doesn't affect the computer. It's ideal for public computers at hotel business centers, libraries, schools, or just to give yourself an excuse to boot into Linux from time to time. + +Unlike many other quick hacks to get to a Linux shell, this method offers you a full and robust Linux system, complete with a desktop, access to whatever software you need, and persistent data storage. + +The system never changes. Any data you want to save is written into a compressed filesystem, which is then applied as an overlay to the system when you boot. This flexibility allows you to choose whether to boot in persistent mode, saving all data back to the thumb drive, or in an ephemeral mode, so everything you do disappears once you power down. In other words, you can use this as a secure kiosk on an untrusted computer or as your portable OS on computers you trust. + +There are many [thumb drive distributions][9] you can try, some with minimal desktop environments for low-powered computers and others with a full desktop. I'm partial to [Porteus][10] Linux. I've carried it on my keychain every day for the past eight years, using it as my primary computing platform during business travel as well as a utility disk if computer problems strike at work or home. It's a reliable and stable operating system that's fun and easy to use. + +On Mac or Windows, download the [Fedora Media Writer][11] to create a bootable thumb drive of whatever portable distribution you download. + +#### How to use it + +Booting a "live Linux" from a USB thumb drive provides a complete Linux distribution. While data storage is done a little differently from a system you install to a hard drive, everything else is as you'd expect from a Linux desktop. There's little you can't do on a portable Linux OS, so install one on your keychain to unlock the full potential of every computer you encounter. + +### 4\. Take an online tour + +![Linux tour screenshot][12] + +Somebody over at Ubuntu thought up the brilliant idea of hosting an Ubuntu GNOME desktop in the browser. To try it out for yourself, open a web browser and navigate to [tour.ubuntu.com][13]. You can select which activity you want demonstrated, or you can skip individual lessons and click the Show Yourself Around button. + +Even if you're new to the Linux desktop, you might find showing yourself around is more familiar than you might expect. From the online tour, you can look around, see what applications are available, and view what a typical default Linux desktop is like. You can't adjust settings or launch another tour in Firefox (it was the first thing I tried, naturally), and while you can go through the motions of installing applications, you can't launch them. But if you've never used a Linux desktop before and you want to see what all the fuss is about, this is the whirlwind tour. + +#### How to use it + +An online tour is truly just a tour. If you've never seen a Linux desktop in action, this is an opportunity to get a glimpse of what it's like. Not intended for serious work, this is an attractive display to entice passers-by. + +### 5\. Run Linux in the browser with JavaScript + +![JSLinux][14] + +Not so long ago, virtualization used to be computationally expensive, limited to users with premium hardware. Now virtualization has been optimized to the point that it can be performed by a JavaScript engine, thanks to Fabrice Bellard, the creator of the excellent and open source [QEMU][15] machine emulator and virtualizer. + +Bellard also started the JSLinux project, which allows you to run Linux and other operating systems in a browser, in his spare time for fun. It's still an experimental project, but it's a technical marvel. Open a web browser to the [JSLinux][16] page, and you can boot a text-based Linux shell or a minimal graphical Linux environment. You can upload and download files to your JSLinux host or (theoretically) send your files to a network backup location, because JSLinux has access to the internet through a VPN socket (although at capped speeds, dependent upon the VPN service). + +#### How to use it + +You won't be doing serious work on JSLinux anytime soon, and the environment is arguably too unusual to learn broad lessons about how Linux normally works. If, however, you're bored of running Linux on a plain old PC and would like to try Linux on a truly distinctive platform, JSLinux is in a class all its own. + +### 6\. Read about it + +Not every Linux experience happens on the computer. Maybe you're the sort of person who likes to keep your distance, observe, and do your research before jumping into something new, or maybe you're just not clear yet on what "Linux" encompasses, or maybe you love full immersion. There's a wealth of information to read about how Linux works, what it's like to run Linux, and what's happening in the Linux world. + +The more you get familiar with the world of open source, the easier it is to understand the common lingo and to separate urban myth from actual experience. We publish [book lists][17] from time to time, but one of my favorites is [_The Charm of Linux_][18] by Hazel Russman. It's a tour through Linux from many different angles, written by an independent author out of excitement over discovering Linux. + +#### How to use it + +Nothing beats kicking back with a good book. This is the least traditional method of experiencing Linux, but for people who love the printed word, it's both comforting and effective. + +### 7\. Get a Raspberry Pi + +![Raspberry Pi 4][19] + +If you're using a [Raspberry Pi][20], you're running Linux. It's that easy to get started with Linux and low-powered computing. The great thing about the Pi, aside from it costing well under $100, is that its [website][21] is designed for education. You can learn all about what the Pi does, and while you're at it, all about what Linux can do for you. + +#### How to use it + +The Pi is, by design, a low-powered computer. That means you can't do as much multitasking as you might be used to, but that's a convenient way to keep yourself from getting overwhelmed. The Raspberry Pi is a great way to learn Linux and all of the possibilities that come with it, and it's a fun way to discover the power of eco-friendly, small-form-factor, simplified computing. And be sure to stay tuned to Opensource.com—especially during Pi Week every March—for [tips][22] and [tricks][23] and [fun][24] [activities][25]. + +### 8\. Climb aboard the container craze + +If you work near the back end of the mythical [cloud][26], then you've heard about the container craze. While you can run Docker and Kubernetes on Windows, Azure, Mac, and Linux, you may not know that the containers themselves are Linux. Cloud computing apps and infrastructure are literally minimal Linux systems that run partly virtualized and partly on bare metal. If you launch a container, you are launching a miniature, hyper-specific Linux distribution. + +Containers are [different][27] than virtual machines or physical servers. They're not intended to be used as a general-purpose operating system. However, if you are developing in a container, you might want to pause and have a look around. You'll get a glimpse of how a Linux system is structured, where important files are kept, and which commands are the most common. You can even [try a container online][28], and you can read all about how they work in my article about going [behind the scenes with Linux containers][29]. + +#### How to use it + +Containers are, by design, specific to a single task, but they're Linux, so they're extremely flexible. You can use them as they're intended, or you can build a container out into a mostly complete system for your Linux experiments. It's not a desktop Linux experience, but it's a full Linux experience. + +### 9\. Install Linux as a VM + +Virtualization is the easy way to try an operating system, and [VirtualBox][30] is a great open source way to virtualize. VirtualBox runs on Windows and Mac, so you can install Linux as a virtual machine (VM) and use it almost as if it were just another application. If you're not accustomed to installing an operating system, VirtualBox is also a very safe way to try Linux without accidentally installing it over your usual OS. + +#### How to use it + +Running Linux as a VM is convenient and easy, either as a trial run or an alternative to dual-booting or rebooting when you need a Linux environment. It's full-featured and, because it uses virtual hardware, the host operating system drives your peripherals. The only disadvantage to running Linux as a virtual machine is primarily psychological. If you intend to use Linux as your main OS, but end up defaulting to the host OS for all but the most Linux-specific tasks, then the VM has failed you. Otherwise, a VM is a triumph of modern technology, and using Linux in VirtualBox provides you with all the best features Linux has to offer. + +### 10\. Install it + +![Fedora Silverblue][31] + +When in doubt, there's always the traditional route. If you want to give Linux the attention it deserves, you can download Linux, burn the installer to a thumb drive (or a DVD, if you prefer optical media), and install it on your computer. Linux is open source, so it can be distributed by anyone who wants to take the time to bundle Linux—and all the bits and pieces that make it usable—into what is commonly called a _distribution_ (or "distro") for short. Ask any Linux user, and you're bound to get a different answer for which distribution is "best" (mostly because the term "best" is often left undefined). Most people admit that you should use the Linux distribution that works for you, meaning that you should test a few popular distros and settle on the one that makes your computer behave as you expect it to behave. This is a pragmatic and functional approach. For example, should a distribution fail to recognize your webcam and you want your webcam to work, then use a distribution that recognizes your webcam. + +If you've never installed an operating system before, you'll find most Linux distributions include a friendly and easy installer. Just download a distribution (they are delivered as ISO files), and download the [Fedora Media Writer][11] to create a bootable installation thumb drive. + +#### How to use it + +Installing Linux and using it as an operating system is a step toward becoming familiar and familial with it. There's no wrong way to use it. You might discover must-have features you never knew you needed, you might learn more about computers than you ever imagined you could, and you may shift in your worldview. Or you might use a Linux desktop because it was easy to download and install, or because you want to cut out the middleman of some corporate overlord, or because it helps you get your work done. + +Whatever your reason, just give Linux a try with any (or all) of these options. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/ways-get-started-linux + +作者:[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/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png?itok=p7cWyQv9 (Penguins gathered together in the Artic) +[2]: https://opensource.com/article/19/6/what-linux-user +[3]: https://opensource.com/sites/default/files/uploads/freeshell.png (Free shell screenshot) +[4]: https://freeshell.de +[5]: https://blinkenshell.org/wiki/Start +[6]: https://sdf.org/ +[7]: https://devblogs.microsoft.com/commandline/wsl-2-is-now-available-in-windows-insiders/ +[8]: https://opensource.com/sites/default/files/uploads/porteus.jpg (Porteus Linux) +[9]: https://opensource.com/article/19/6/tiny-linux-distros-you-have-try +[10]: http://porteus.org +[11]: https://getfedora.org/en/workstation/download/ +[12]: https://opensource.com/sites/default/files/uploads/linux_tour.jpg (Linux tour screenshot) +[13]: http://tour.ubuntu.com/en/# +[14]: https://opensource.com/sites/default/files/uploads/jslinux.jpg (JSLinux) +[15]: https://www.qemu.org +[16]: https://bellard.org/jslinux/ +[17]: https://opensource.com/article/19/1/tech-books-new-skils +[18]: http://www.lulu.com/shop/hazel-russman/the-charm-of-linux/paperback/product-21229401.html +[19]: https://opensource.com/sites/default/files/uploads/raspberry-pi-4-case.jpg (Raspberry Pi 4) +[20]: https://opensource.com/resources/raspberry-pi +[21]: https://www.raspberrypi.org/ +[22]: https://opensource.com/article/19/3/raspberry-pi-projects +[23]: https://opensource.com/article/19/3/piflash +[24]: https://opensource.com/article/19/3/gamepad-raspberry-pi +[25]: https://opensource.com/life/16/3/make-music-raspberry-pi-milkytracker +[26]: https://opensource.com/resources/cloud +[27]: https://opensource.com/article/19/6/how-ssh-running-container +[28]: https://linuxcontainers.org/lxd/try-it/ +[29]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[30]: https://virtualbox.org +[31]: https://opensource.com/sites/default/files/uploads/fedora-silverblue.png (Fedora Silverblue) diff --git a/sources/tech/20190708 Command line quick tips- Permissions.md b/sources/tech/20190708 Command line quick tips- Permissions.md new file mode 100644 index 0000000000..2ebd6a9c69 --- /dev/null +++ b/sources/tech/20190708 Command line quick tips- Permissions.md @@ -0,0 +1,133 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command line quick tips: Permissions) +[#]: via: (https://fedoramagazine.org/command-line-quick-tips-permissions/) +[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) + +Command line quick tips: Permissions +====== + +![][1] + +Fedora, like all Linux based systems, comes with a powerful set of security features. One of the basic features is _permissions_ on files and folders. These permissions allow files and folders to be secured from unauthorized access. This article explains a bit about these permissions, and shows you how to share access to a folder using them. + +### Permission basics + +Fedora is by nature a multi-user operating system. It also has _groups_, which users can be members of. But imagine for a moment a multi-user system with no concept of permissions. Different logged in users could read each other’s content at will. This isn’t very good for privacy or security, as you can imagine. + +Any file or folder on Fedora has three sets of permissions assigned. The first set is for the _user_ who owns the file or folder. The second is for the _group_ that owns it. The third set is for everyone else who’s not the user who owns the file, or in the group that owns the file. Sometimes this is called the _world_. + +### What permissions mean + +Each set of permissions comes in three flavors — _read_, _write_, and _execute_. Each of these has an initial that stands for the permission, thus _r_, _w_, and _x_. + +#### File permissions + +For _files_, here’s what these permissions mean: + + * Read (r): the file content can be read + + * Write (w): the file content can be changed + + * Execute (x): the file can be executed — this is used primarily for programs or scripts that are meant to be run directly + + * + + +You can see the three sets of these permissions when you do a long listing of any file. Try this with the _/etc/services_ file on your system: + +``` +$ ls -l /etc/services +-rw-r--r--. 1 root root 692241 Apr 9 03:47 /etc/services +``` + +Notice the groups of permissions at the left side of the listing. These are provided in three sets, as mentioned above — for the user who owns the file, for the group that owns the file, and for everyone else. The user owner is _root_ and the group owner is the _root_ group. The user owner has read and write access to the file. Anyone in the group _root_ can only read the file. And finally, anyone else can also only read the file. (The dash at the far left shows this is a regular file.) + +By the way, you’ll commonly find this set of permissions on many (but not all) system configuration files. They are only meant to be changed by the system administrator, not regular users. Often regular users need to read the content as well. + +#### Folder (directory) permissions + +For folders, the permissions have slightly different meaning: + + * Read (r): the folder contents can be read (such as the _ls_ command) + * Write (w): the folder contents can be changed (files can be created or erased in this folder) + * Execute (x): the folder can be searched, although its contents cannot be read. (This may sound strange, but the explanation requires more complex details of file systems outside the scope of this article. So just roll with it for now.) + + + +Take a look at the _/etc/grub.d_ folder for example: + +``` +$ ls -ld /etc/grub.d +drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d +``` + +Note the _d_ at the far left. It shows this is a directory, or folder. The permissions show the user owner (_root_) can read, change, and _cd_ into this folder. However, no one else can do so — whether they’re a member of the _root_ group or not. Notice you can’t _cd_ into the folder, either: + +``` +$ cd /etc/grub.d +bash: cd: /etc/grub.d: Permission denied +``` + +Notice how your own home directory is setup: + +``` +$ ls -ld $HOME +drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul +``` + +Now, notice how no one, other than you as the owner, can access anything in this folder. This is intentional! You wouldn’t want others to be able to read your private content on a shared system. + +### Making a shared folder + +You can exploit this permissions capability to easily make a folder to share within a group. Imagine you have a group called _finance_ with several members who need to share documents. Because these are user documents, it’s a good idea to store them within the _/home_ folder hierarchy. + +To get started, [use][2] _[sudo][2]_ to make a folder for sharing, and set it to be owned by the _finance_ group: + +``` +$ sudo mkdir -p /home/shared/finance +$ sudo chgrp finance /home/shared/finance +``` + +By default the new folder has these permissions. Notice how it can be read or searched by anyone, even if they can’t create or erase files in it: + +``` +drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance +``` + +That doesn’t seem like a good idea for financial data. Next, use the _chmod_ command to change the mode (permissions) of the shared folder. Note the use of _g_ to change the owning group’s permissions, and _o_ to change other users’ permissions. Similarly, _u_ would change the user owner’s permissions: + +``` +$ sudo chmod g+w,o-rx /home/shared/finance +``` + +The resulting permissions look better. Now, anyone in the _finance_ group (or the user owner _root_) have total access to the folder and its contents: + +``` +drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance +``` + +If any other user tries to access the shared folder, they won’t be able to do so. Great! Now our finance group can put documents in a shared place. + +### Other notes + +There are additional ways to manipulate these permissions. For example, you may want any files in this folder to be set as owned by the group _finance_. This requires additional settings not covered in this article, but stay tuned to the Magazine for more on that topic soon. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/command-line-quick-tips-permissions/ + +作者:[Paul W. Frields][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/pfrields/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg +[2]: https://fedoramagazine.org/howto-use-sudo/ diff --git a/sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md b/sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md new file mode 100644 index 0000000000..9e06d447f8 --- /dev/null +++ b/sources/tech/20190709 Sysadmin vs SRE- What-s the difference.md @@ -0,0 +1,63 @@ +Viz 开始翻译 (¯﹃¯) + +[#]: collector: (lujun9972) +[#]: translator: (vizv) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Sysadmin vs SRE: What's the difference?) +[#]: via: (https://opensource.com/article/19/7/sysadmins-vs-sres) +[#]: author: (Vince Power https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish) + +Sysadmin vs SRE: What's the difference? +====== +Both sysadmins and site reliability engineers are valuable parts of any +organization. Here's a look at each role differs. +![People work on a computer server with devices][1] + +In the IT world, there has always been a pull between generalist and specialist. The stereotypical sysadmin falls in the generalist category 99 times out of 100. The [site reliability engineer (SRE)][2] role is specialized, however, and grew out of the needs of one of the first companies to know real scale: Google. Ultimately, these two roles have the same goal for the applications whose infrastructure they operate: providing a good experience for the applications’ consumers. Yet, these roles have drastically different starting points. + +### Sysadmins: Neutral good incarnate + +Sysadmins typically grow into their position by starting as entry-level desktop and network support, and then over time acquiring the broad set of skills most sysadmins have in common. By that point, these sysadmins know all of the systems and applications they are responsible for. They know the app on server one needs to be restarted every other Tuesday, or the service on server nine will crash on Wednesday with no errors. They have fine-tuned their monitoring so it ignores what doesn’t matter, even that error that happens on the third Sunday of the month, despite the fact that it’s marked as fatal. + +In short, sysadmins know how to feed and care for the servers that run the core of your business. These sysadmins have grown to use automation to handle routine tasks across all the servers they manage. They love templates, golden images, and standards, but are flexible enough to make a parameter change on just the one server that has an error, and then make a note regarding why that server is now uniquely configured. + +Sysadmins are great, but they have a couple of quirks. The first being that you just do not get root access without divine intervention, and that any changes they make which were not their idea have to be documented as required by the application they are working with’s vendor, and then will still be double-checked. + +The servers are their domain, and no one messes with their stuff. + +### SREs: Thanos would be proud + +As opposed to the path to becoming a sysadmin, SREs are as likely to come from a development background as a sysadmin background. The SRE position is closer to the lifecycle you find in an application development environment. + +As an organization grows and introduces [DevOps][3] concepts like [continuous integration][4] and [continuous delivery][5] (CI/CD), there will often be a skills gap on how to run those immutable applications across multiple environments while having them scale to meet the business’s needs. This is the world of an SRE. Yes, a sysadmin can learn the additional tools, but at scale, this easily becomes a full-time position to keep up. A specialist makes sense. + +SREs use concepts like [infrastructure-as-code][6] to produce templates, which are called to deploy the environment an application will run in, with the goal of every application and its environment being completely reproducible with the push of a button. So, app one on server one in system testing will have the exact same binaries that will be used on server fifteen in production, with the exception of environment-specific variables like passwords and database connection strings. + +An SRE will also completely destroy an environment and rebuild it based on a configuration change. There is no emotional attachment to any system. Each system is just a number and is tagged and lifecycled accordingly, even to the point that routine server patching is done by redeploying the entire application stack. + +### Conclusion + +In certain situations, especially when operating in large DevOps-based environments, the specialized skills an SRE provides regarding how to handle any level of scale definitely offer an advantage. And every time they get stuck, they will seek out the help of their friendly neighborhood sysadmin—or [(BOFH)][7] on a bad day—for those well-honed troubleshooting skills, and the breadth of experiences which sysadmins rely on to provide value to any organization they are a part of. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/sysadmins-vs-sres + +作者:[Vince Power][a] +选题:[lujun9972][b] +译者:[vizv](https://github.com/vizv) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/vincepower/users/craig5/users/dawnparzych/users/penglish +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) +[2]: https://en.wikipedia.org/wiki/Site_Reliability_Engineering +[3]: https://opensource.com/resources/devops +[4]: https://en.wikipedia.org/wiki/Continuous_integration +[5]: https://en.wikipedia.org/wiki/Continuous_delivery +[6]: https://en.wikipedia.org/wiki/Infrastructure_as_code +[7]: http://www.bofharchive.com/BOFH.html diff --git a/sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md b/sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md new file mode 100644 index 0000000000..4d01d8f08c --- /dev/null +++ b/sources/tech/20190710 32-bit life support- Cross-compiling with GCC.md @@ -0,0 +1,189 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (32-bit life support: Cross-compiling with GCC) +[#]: via: (https://opensource.com/article/19/7/cross-compiling-gcc) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +32-bit life support: Cross-compiling with GCC +====== +Use GCC to cross-compile binaries for different architectures from a +single build machine. +![Wratchet set tools][1] + +If you're a developer creating binary packages, like an RPM, DEB, Flatpak, or Snap, you have to compile code for a variety of different target platforms. Typical targets include 32-bit and 64-bit x86 and ARM. You could do your builds on different physical or virtual machines, but that means maintaining several systems. Instead, you can use the GNU Compiler Collection ([GCC][2]) to cross-compile, producing binaries for several different architectures from a single build machine. + +Assume you have a simple dice-rolling game that you want to cross-compile. Something written in C is relatively easy on most systems, so to add complexity for the sake of realism, I wrote this example in C++, so the program depends on something not present in C (**iostream**, specifically). + + +``` +#include <iostream> +#include <cstdlib> + +using namespace std; + +void lose (int c); +void win (int c); +void draw (); + +int main() { +  int i; +    do { +      cout << "Pick a number between 1 and 20: \n"; +      cin >> i; +      int c = rand ( ) % 21; +      if (i > 20) lose (c); +      else if (i < c ) lose (c); +      else if (i > c ) win (c); +      else draw (); +      } +      while (1==1); +      } + +void lose (int c ) +  { +    cout << "You lose! Computer rolled " << c << "\n"; +  } + +void win (int c ) +  { +    cout << "You win!! Computer rolled " << c << "\n"; +   } + +void draw ( ) +   { +     cout << "What are the chances. You tied. Try again, I dare you! \n"; +   } +``` + +Compile it on your system using the **g++** command: + + +``` +`$ g++ dice.cpp -o dice` +``` + +Then run it to confirm that it works: + + +``` +$ ./dice +Pick a number between 1 and 20: +[...] +``` + +You can see what kind of binary you just produced with the **file** command: + + +``` +$ file ./dice +dice: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically +linked (uses shared libs), for GNU/Linux 5.1.15, not stripped +``` + +And just as important, what libraries it links to with **ldd**: + + +``` +$ ldd dice +linux-vdso.so.1 => (0x00007ffe0d1dc000) +libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 +(0x00007fce8410e000) +libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 +(0x00007fce83d4f000) +libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 +(0x00007fce83a52000) +/lib64/ld-linux-x86-64.so.2 (0x00007fce84449000) +libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 +(0x00007fce8383c000) +``` + +You have confirmed two things from these tests: The binary you just ran is 64-bit, and it is linked to 64-bit libraries. + +That means that, in order to cross-compile for 32-bit, you must tell **g++** to: + + 1. Produce a 32-bit binary + 2. Link to 32-bit libraries instead of the default 64-bit libraries + + + +### Setting up your dev environment + +To compile to 32-bit, you need 32-bit libraries and headers installed on your system. If you run a pure 64-bit system, then you have no 32-bit libraries or headers and need to install a base set. At the very least, you need the C and C++ libraries (**glibc** and **libstdc++**) along with 32-bit version of GCC libraries (**libgcc**). The names of these packages may vary from distribution to distribution. On Slackware, a pure 64-bit distribution with 32-bit compatibility is available from the **multilib** packages provided by [Alien BOB][3]. On Fedora, CentOS, and RHEL: + + +``` +$ yum install libstdc++-*.i686 +$ yum install glibc-*.i686 +$ yum install libgcc.i686 +``` + +Regardless of the system you're using, you also must install any 32-bit libraries your project uses. For instance, if you include **yaml-cpp** in your project, then you must install the 32-bit version of **yaml-cpp** or, on many systems, the development package for **yaml-cpp** (for instance, **yaml-cpp-devel** on Fedora) before compiling it. + +Once that's taken care of, the compilation is fairly simple: + + +``` +`$ g++ -m32 dice.cpp -o dice32 -L /usr/lib -march=i686` +``` + +The **-m32** flag tells GCC to compile in 32-bit mode. The **-march=i686** option further defines what kind of optimizations to use (refer to **info gcc** for a list of options). The **-L** flag sets the path to the libraries you want GCC to link to. This is usually **/usr/lib** for 32-bit, although, depending on how your system is set up, it could be **/usr/lib32** or even **/opt/usr/lib** or any place you know you keep your 32-bit libraries. + +After the code compiles, see proof of your build: + + +``` +$ file ./dice32 +dice: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), +dynamically linked (uses shared libs) [...] +``` + +And, of course, **ldd ./dice32** points to your 32-bit libraries. + +### Different architectures + +Compiling 32-bit on 64-bit for the same processor family allows GCC to make many assumptions about how to compile the code. If you need to compile for an entirely different processor, you must install the appropriate cross-build GCC utilities. Which utility you install depends on what you are compiling. This process is a little more complex than compiling for the same CPU family. + +When you're cross-compiling for the same family, you can expect to find the same set of 32-bit libraries as 64-bit libraries, because your Linux distribution is maintaining both. When compiling for an entirely different architecture, you may have to hunt down libraries required by your code. The versions you need may not be in your distribution's repositories because your distribution may not provide packages for your target system, or it may not mirror all packages in a convenient location. If the code you're compiling is yours, then you probably have a good idea of what its dependencies are and possibly where to find them. If the code is something you have downloaded and need to compile, then you probably aren't as familiar with its requirements. In that case, investigate what the code requires to build correctly (they're usually listed in the README or INSTALL files, and certainly in the source code itself), then go gather the components. + +For example, if you need to compile C code for ARM, you must first install **gcc-arm-linux-gnu** (32-bit) or **gcc-aarch64-linux-gnu** (64-bit) on Fedora or RHEL, or **arm-linux-gnueabi-gcc** and **binutils-arm-linux-gnueabi** on Ubuntu. This provides the commands and libraries you need to build (at least) a simple C program. Additionally, you need whatever libraries your code uses. You can place header files in the usual location (**/usr/include** on most systems), or you can place them in a directory of your choice and point GCC to it with the **-I** option. + +When compiling, don't use the standard **gcc** or **g++** command. Instead, use the GCC utility you installed. For example: + + +``` +$ arm-linux-gnu-g++ dice.cpp \ +  -I/home/seth/src/crossbuild/arm/cpp \ +  -o armdice.bin +``` + +Verify what you've built: + + +``` +$ file armdice.bin +armdice.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV) [...] +``` + +### Libraries and deliverables + +This was a simple example of how to use cross-compiling. In real life, your source code may produce more than just a single binary. While you can manage this manually, there's probably no good reason to do that. In my next article, I'll demonstrate GNU Autotools, which does most of the work required to make your code portable. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/cross-compiling-gcc + +作者:[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/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools) +[2]: https://gcc.gnu.org/ +[3]: http://www.slackware.com/~alien/multilib/ diff --git a/sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md b/sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md new file mode 100644 index 0000000000..9399d39595 --- /dev/null +++ b/sources/tech/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md @@ -0,0 +1,269 @@ +[#]: collector: (lujun9972) +[#]: translator: (0x996 is translating) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Test 200+ Linux And Unix Operating Systems Online For Free) +[#]: via: (https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +Test 200+ Linux And Unix Operating Systems Online For Free +====== + +![DistroTest - Test 200+ Linux And Unix Operating Systems Online For Free][1] + +A while ago we have covered about [**OSBoxes**][2], a website that offers a collection of free, ready-to-use Linux and Unix VMs. You can download and try them on your Linux system using VirtualBox or VMWare workstation. Today, I stumbled upon a similar service named **“DistroTest”**. Unlike OSBoxes, DistroTest allows you to try the live Linux and Unix operating systems for free. You can test 200+ Linux and Unix operating systems online without having to install them locally. Just visit the website, choose the Linux/Unix distro of your choice and fire it up! + +Two good Samaritans named **Klemann Andy** and **Forster Tobias** have hosted this web service on **Debian** using **Qemu**. There is no restrictions to use the public distros listed here. You can use all functions of the system as the way you do in your local system. You can install and uninstall software. You can test installed programs and +even delete or format the hard disk or system files. In a nutshell, DistoTest lets the distro hoppers to decide; + + * Which distribution is the best for them, + * Which graphical interface they want, + * Which configuration options they have. + + + +As of writing this guide, DistroTest is hosting **711 versions with 227 operating systems**. I have been using Linux for years, however I never heard some of the Linux distros listed here. To be honest, I don’t even actually know this much of Linux operating systems exists. + +Here is the list of available Linux distributions in DistroTrest website. + + * 4mLinux + * AbsoluteLinux + * AlpineLinux + * Antergos + * antiX Linux + * Aptosid + * ArchBang + * ArchLabs + * ArchLinux + * Archman + * ArchStrike + * ArtixLinux + * AryaLinux + * AvLinux + * BackBoxLinux + * BigLinux + * Bio-Linux + * BlackArch + * BlackLab + * BlackPantherOS + * blag + * BlankOn + * Bluestar + * Bodhi + * BunsenLabs + * Caine + * Calculate Linux Desktop + * CentOS 7 + * Chakra + * ChaletOS + * ClearOS + * Clonezilla + * ConnochaetOS + * Cucumber + * Damn Small Linux + * Debian + * Devil-Linux + * Devuan + * DragonFly BSD + * Dragora + * Dyne:bolic + * Edubuntu + * elementaryOS + * Elive Linux + * Emmabuntüs + * Emmabuntüs + * Endless OS + * EnsoOS + * Exe GNU/Linux + * ExTiX + * Fatdog64 + * Fedora + * FerenOS + * FreeBSD + * FreeDOS + * Frugalware + * Frugalware + * G4L + * GeckoLinux + * Gentoo + * GNewSense + * GoboLinux + * Gparted + * GreenieLinux + * GRML + * GuixSD + * Haiku + * Heads + * Kali Linux + * Kanotix + * KaOS + * Knoppix + * Kodachi + * KolibriOS + * Korora + * Kwort + * Linux Lite + * Linux Mint + * LiveRaizo + * LMDE + * LXLE OS + * Macpup + * Mageia + * MakuluLinux + * Manjaro + * MauiLinux + * MenuetOS + * MiniNo + * Modicia + * Musix + * MX Linux + * Nas4Free + * Neptune + * NetBSD + * Netrunner + * NixOs + * NuTyX + * OpenIndiana + * OpenMandriva + * openSUSE + * OracleLinux + * OSGeo live + * OviOS + * Parabola + * Pardus + * Parrot + * Parsix + * PCLinuxOS + * PeachOSI + * Peppermint + * Pinguy + * PinguyOS + * plopLinux + * PointLinux + * Pop!_OS + * PORTEUS + * Puppy Linux + * PureOS + * Q4OS + * QubesOS + * Quirky + * ReactOS + * Redcore + * Rescatux + * RevengeOS + * RoboLinux + * Rockstor + * ROSA + * Runtu + * Sabayon + * SalentOS + * Salix + * ScientificLinux + * Siduction + * Slax + * SliTaz + * Solus + * SolydK + * SparkyLinux + * Springdale + * Stresslinux + * SubgraphOS + * SwagArch (18.03) + * Tails + * Tanglu + * Tiny Core + * Trisquel + * TrueOS + * TurnKey Linux + * Ubuntu and its official variants + * Uruk + * VectorLinux + * VineLinux + * VoidLinux + * Voyager + * VyOS + * WattOs + * Zentyal + * Zenwalk + * Zevenet + * Zorin OS + + + +### How does it work? + +To test any operating systems, head over to the following link: + +![1][3] + +In this website, you will see the list of available OSes. Click on the name of the distribution you want to explore. + +![1][4] + +Test 100+ Linux and Unix operating systems Using DistroTest + +For the purpose of this guide, I am going to test Arch Linux. + +Once you clicked on the distribution’s link, you will be then redirected to the next screen where you can start the OS by clicking on **System start** button. + +![1][5] + +Now, the live system will start in a new browser window and you can access it from the built-in **noVNC viewer**. Please enable/allow the pop-ups in your web browser for this site, otherwise you can’t see the noVNC application. + +Hit ENTER to boot into the live system. + +![1][6] + +Here is the Arch Linux live system: + +![1][7] + +You can **use this system for an hour** for free. You can now test the live OS, install applications, remove applications, delete or modify system files, and test a configuration or script. After every shutdown, everything is back to the default settings. + +Once you’re done, go back to the DistroTest page and stop your test system. If you don’t want to enable the pop-ups in DistroTest page, just use any locally installed VNC client applications in your system. The VNC client login details are given in the same page itself. + +![1][8] + +DistroTest service can be useful for those who wants to test a Linux/Unix operating system online or for those who don’t have the live ISO of the preferred OS. It works just fine as far as I tested in 4G Internet connection. + +### Actually, I can’t install new software in the VMs + +**One problem** I noticed while testing is the VMs are not connected to the network. There is no network interface available, except the loopback interface. I couldn’t figure it out how to download and install new software without connecting to Internet or local mirror. I don’t know why/how they claim we can install software. May be I am missing something here. All I can do at DistroTest is **take a look at the existing systems, test them live and without any installation**. + +* * * + +**Suggested read:** + + * [**Learn And Practice Linux Commands Online For FREE!**][9] + * [**Run Linux And Other Operating Systems In Your Browser**][10] + + + +* * * + +And, that’s all for now. I don’t know how the DistroTest team managed to host this much of operating systems. I am sure it would have taken a lot of time. It is really a commendable work. I really appreciate the self-less act of the project members. Kudos to you guys. More power to you! + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/test-100-linux-and-unix-operating-systems-online-for-free/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2018/07/test-Linux-and-Unix-online-686x340.jpg +[2]: https://www.ostechnix.com/osboxes-free-unixlinux-virtual-machines-for-vmware-and-virtualbox/ +[3]: https://distrotest.net/ +[4]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-5.png +[5]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-1.png +[6]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-2.png +[7]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-3.png +[8]: https://www.ostechnix.com/wp-content/uploads/2018/07/Distrotest-4-1.png +[9]: https://www.ostechnix.com/learn-and-practice-linux-commands-online-for-free/ +[10]: https://www.ostechnix.com/run-linux-operating-systems-browser/ diff --git a/sources/tech/20190711 How to install Elasticsearch on MacOS.md b/sources/tech/20190711 How to install Elasticsearch on MacOS.md new file mode 100644 index 0000000000..052e174832 --- /dev/null +++ b/sources/tech/20190711 How to install Elasticsearch on MacOS.md @@ -0,0 +1,154 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Elasticsearch on MacOS) +[#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins) + +How to install Elasticsearch on MacOS +====== +Installing Elasticsearch is complex! Here's how to do it on a Mac. +![magnifying glass on computer screen][1] + +[Elasticsearch][2] is an open source, full-text search engine developed in Java. Users upload datasets as JSON files. Then, Elasticsearch stores the original document before adding a searchable reference to the document in the cluster’s index. + +Less than nine years after its creation, Elasticsearch is the most popular enterprise search engine. Elastic released its latest update—version 7.2.0 —on June 25, 2019. + +[Kibana][3] is an open source data visualizer for Elasticsearch. This tool helps users create visualizations on top of content indexed in an Elasticsearch cluster. + +[Sunbursts][4], [geospatial data maps][5], [relationship analyses][6], and dashboards with live data are just a few options. And thanks to Elasticsearch’s machine learning prowess, you can learn which properties might influence your data (like servers or IP addresses) and find abnormal patterns. + +At [DevFest DC][7] last month, [Dr. Summer Rankin][8]—lead data scientist at Booz Allen Hamilton—uploaded a dataset of content from TED Talks to Elasticsearch, then used Kibana to quickly build a dashboard. Intrigued, I went to an Elasticsearch meetup days later. + +Since this course was for newbies, we started at Square One: Installing Elastic and Kibana on our laptops. Without both packages installed, we couldn’t create our own visualizations from the dataset of Shakespeare texts we were using as a dummy JSON file. + +Next, I will share step-by-step instructions for downloading, installing, and running Elasticsearch Version 7.1.1 on MacOS. This was the latest version when I attended the Elasticsearch meetup in mid-June 2019. + +### Downloading Elasticsearch for MacOS + + 1. Go to , which takes you to the webpage below: + + + +![The Elasticsearch download page.][9] + + 2. In the **Downloads** section, click **MacOS**, which downloads the Elasticsearch TAR file (for example, **elasticsearch-7.1.1-darwin-x86_64.tar**) into your **Downloads** folder. + 3. Double-click this file to unpack it into its own folder (for example, **elasticsearch-7.1.1**), which contains all of the files that were in the TAR. + + + +**Tip**: If you want Elasticsearch to live in another folder, now is the time to move this folder. + +### Running Elasticsearch from the MacOS command line + +You can run Elasticsearch only using the command line if you prefer. Just follow this process: + + 1. [Open a **Terminal** window][10]. + 2. In the terminal window, enter your Elasticsearch folder. For example (if you moved the program, change **Downloads** to the correct path): + + + +**$ cd ~Downloads/elasticsearch-1.1.0** + + 3. Change to the Elasticsearch **bin** subfolder, and start the program. For example: + + + +**$ cd bin $ ./elasticsearch** + +Here’s some of the output that my command line terminal displayed when I launched Elasticsearch 1.1.0: + +![Terminal output when running Elasticsearch.][11] + +**NOTE**: Elasticsearch runs in the foreground by default, which can cause your computer to slow down. Press **Ctrl-C to** stop Elasticsearch from running. + +### Running Elasticsearch using the GUI + +If you prefer your point-and-click environment, you can run Elasticsearch like so: + + 1. Open a new **Finder** window. + 2. Select **Downloads** in the left Finder sidebar (or, if you moved Elasticsearch to another folder, navigate to there). + 3. Open the folder called (for the sake of this example) **elasticsearch-7.1.1**. A selection of eight subfolders appears. + + + +![The elasticsearch/bin menu.][12] + + 4. Open the **bin** subfolder. As the screenshot above shows, this subfolder yields 20 assets. + 5. Click the first option, which is **elasticsearch**. + + + +Note that you may get a security warning, as shown below: + +![The security warning dialog box.][13] + +  + +In order to open the program in this case: + + 1. Click **OK** in the warning dialog box. + 2. Open **System Preferences**. + 3. Click **Security & Privacy**, which opens the window shown below: + + + +![Where you can allow your computer to open the downloaded file.][14] + + 4. Click **Open Anyway**, which opens the confirmation dialog box shown below: + + + +![Security confirmation dialog box.][15] + + 5. Click **Open**. A terminal window opens and launches Elasticsearch. + + + +The launch process can take a while, so let it run. Eventually, it will finish, and you will see output similar to this at the end: + +![Launching Elasticsearch in MacOS.][16] + +### Learning more + +Once you’ve installed Elasticsearch, it’s time to start exploring! + +The tool’s [Elasticsearch: Getting Started][17] guide directs you based on your goals. Its introductory video walks through steps to launch a hosted cluster on [Elasticsearch Service][18], perform basic search queries, play with data through create, read, update, and delete (CRUD) REST APIs, and more. + +This guide also offers links to documentation, dev console commands, training subscriptions, and a free trial of Elasticsearch Service. This trial lets you deploy Elastic and Kibana on AWS and GCP to support your Elastic clusters in the cloud. + +In the follow-up to this article, we’ll walk through the steps you’ll take to install Kibana on MacOS. This process will take your Elasticsearch queries to the next level via diverse data visualizations. Stay tuned! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/installing-elasticsearch-macos + +作者:[Lauren Maffeo][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/lmaffeo/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) +[2]: https://www.getapp.com/it-management-software/a/qbox-dot-io-hosted-elasticsearch/ +[3]: https://www.elastic.co/products/kibana +[4]: https://en.wikipedia.org/wiki/Pie_chart#Ring +[5]: https://en.wikipedia.org/wiki/Spatial_analysis +[6]: https://en.wikipedia.org/wiki/Correlation_and_dependence +[7]: https://www.devfestdc.org/ +[8]: https://www.summerrankin.com/about +[9]: https://opensource.com/sites/default/files/uploads/wwa1f3_600px_0.png (The Elasticsearch download page.) +[10]: https://support.apple.com/en-ca/guide/terminal/welcome/mac +[11]: https://opensource.com/sites/default/files/uploads/io6t1a_600px.png (Terminal output when running Elasticsearch.) +[12]: https://opensource.com/sites/default/files/uploads/o43yku_600px.png (The elasticsearch/bin menu.) +[13]: https://opensource.com/sites/default/files/uploads/elasticsearch_security_warning_500px.jpg (The security warning dialog box.) +[14]: https://opensource.com/sites/default/files/uploads/the_general_tab_of_the_system_preferences_security_and_privacy_window.jpg (Where you can allow your computer to open the downloaded file.) +[15]: https://opensource.com/sites/default/files/uploads/confirmation_dialog_box.jpg (Security confirmation dialog box.) +[16]: https://opensource.com/sites/default/files/uploads/y5dvtu_600px.png (Launching Elasticsearch in MacOS.) +[17]: https://www.elastic.co/webinars/getting-started-elasticsearch?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch&gclid=EAIaIQobChMImdbvlqOP4wIVjI-zCh3P_Q9mEAAYASABEgJuAvD_BwE +[18]: https://info.elastic.co/elasticsearch-service-gaw-v10-nav.html?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch%20service&gclid=EAIaIQobChMI_MXHt-SZ4wIVJBh9Ch3wsQfPEAAYASAAEgJo9fD_BwE diff --git a/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md new file mode 100644 index 0000000000..0c06ba2489 --- /dev/null +++ b/sources/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md @@ -0,0 +1,162 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) +[#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +Type Linux Commands In Capital Letters To Run Them As Sudo User +====== + +![Type Linux Commands In Capital Letters To Run Them As Sudo User][1] + +The reason I love Linux community a lot is they create so many FUN projects which you rarely find in any other propriety operating systems. A while ago, we looked at a fun project named [**“Hollywood”**][2] which turns the Terminal into a Hollywood technical melodrama hacker interface in Ubuntu-like systems. There are few other utilities available, for example **cowsay** , **fortune** , **sl** and **toilet** (!) etc., to kill your free time and keep you entertained! They may not be useful, but these utilities are really entertaining and fun to use. Today, I stumbled upon yet another similar utility named **“SUDO”**. As the name implies, whenever you type Linux commands in capital letters, the SUDO utility will run them as sudo user! Meaning, you need not to type “sudo” in-front of the Linux commands you about to run. Cool, yeah? + +### Install SUDO + +* * * + +**A word of caution:** + +Before installing this (or any utility), take a look at the source code (Link given at the end) and see if there are suspicious/malicious code included to harm your system. Test it in a VM. If you like or found it useful, you can use it in your personal/production systems. + +* * * + +Git clone the SUDO repository: + +``` +$ git clone https://github.com/jthistle/SUDO.git +``` + +This command will clone the contents of SUDO GIT repository and saves them in a directory named “SUDO” in your current working directory. + +``` +Cloning into 'SUDO'... +remote: Enumerating objects: 42, done. +remote: Counting objects: 100% (42/42), done. +remote: Compressing objects: 100% (29/29), done. +remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 +Unpacking objects: 100% (42/42), done. +``` + +Switch to SUDO directory: + +``` +$ cd SUDO/ +``` + +And, install it using command: + +``` +$ ./install.sh +``` + +The command will add the following entries in your **~/.bashrc** file: + +``` +[...] +# SUDO - shout at bash to su commands +# Distributed under GNU GPLv2, @jthistle on github + +shopt -s expand_aliases + +IFS_=${IFS} +IFS=":" read -ra PATHS <<< "$PATH" + +for i in "${PATHS[@]}"; do + for j in $( ls "$i" ); do + if [ ${j^^} != $j ] && [ $j != "sudo" ]; then + alias ${j^^}="sudo $j" + fi + done +done + +alias SUDO='sudo $(history -p !!)' + +IFS=${IFS_} + +# end SUDO +``` + +It will also take a backup of your **~/.bashrc** and save it as **~/.bashrc.old**. You can restore it if anything goes catastrophically wrong. + +Finally, update the changes using command: + +``` +$ source ~/.bashrc +``` + +### Now, type Linux Commands in Capital letters to run them as Sudo user + +Usually, we execute Linux commands that requires sudo/root privileges like below. + +``` +$ sudo mkdir /ostechnix +``` + +Right? Yes! The above command will create directory named “ostechnix” in root (/). Let us cancel this command using **Ctrl+c**. + +Once SUDO is installed, you can **type any Linux command in capital without sudo** and run them. So, you can run the above command like below: + +``` +$ MKDIR /ostechnix + +$ TOUCH /ostechnix/test.txt + +$ LS /ostechnix +``` + +![][3] + +Type Linux Commands In Capital Letters To Run Them As Sudo User + +Please note that **it will not bypass the sudo password**. You still need to type sudo password to execute the given command. It will only help to avoid typing “sudo” in-front of each command. + +* * * + +**Related read:** + + * [**How To Run Particular Commands Without Sudo Password In Linux**][4] + * [**How To Restore Sudo Privileges To A User**][5] + * [**How To Grant And Remove Sudo Privileges To Users On Ubuntu**][6] + * [**How To Find All Sudo Users In Your Linux System**][7] + * [**How To Display Asterisks When You Type Password In Terminal**][8] + * [**How To Change The Sudo Prompt In Linux**][9] + + + +* * * + +Of course, typing “sudo” will take only a few seconds, so it is not a big deal. I must tell this is just fun and USELESS project to pass time. If you don’t like it, go away and learn something useful. If you like it, give it a go and have fun! + +**Resource:** + + * [**SUDO GitHub Repository**][10] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/sudo-720x340.png +[2]: https://www.ostechnix.com/turn-ubuntu-terminal-hollywood-technical-melodrama-hacker-interface/ +[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/SUDO-in-action.gif +[4]: https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/ +[5]: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/ +[6]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/ +[7]: https://www.ostechnix.com/find-sudo-users-linux-system/ +[8]: https://www.ostechnix.com/display-asterisks-type-password-terminal/ +[9]: https://www.ostechnix.com/change-sudo-prompt-linux-unix/ +[10]: https://github.com/jthistle/SUDO diff --git a/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md new file mode 100644 index 0000000000..07ddecc927 --- /dev/null +++ b/sources/tech/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md @@ -0,0 +1,118 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota) +[#]: via: (https://itsfoss.com/electronmail/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +ElectronMail – a Desktop Client for ProtonMail and Tutanota +====== + +The majority of people on the internet have email accounts from big companies, such as Google, that do not respect your privacy. Thankfully, there are privacy conscience alternatives like [Tutanota][1] and [ProtonMail][2]. The problems is that not all of them have a desktop client. Today, we will look at a project that seeks to solve that problem for you. Let’s take a look at ElectronMail. + +‘Electron’-ic warning! + +The following app is built with Electron (the name is ElectronMail for a reason). If the use of Electron upsets you, please consider this a trigger warning. + +### ElectronMail: Desktop Client for Tutanota and ProtonMail + +![Electron Mail About][3] + +[ElectronMail][4] is simply put an email client for ProtonMail and Tutanota. It is built using three big technologies: [Electron][5], [TypeScript][6] and [Angular][7]. It includes the following features: + + * Multi accounts support per each email provider + * Encrypted local storage + * Available for Linux, Windows, macOS, and FreeBSD + * Native notifications + * System tray icon with a total number of unread messages + * Master password to protect account information + * Switchable view layouts + * Offline access to the emails + * Encrypted local storage for emails + * Batch emails export to EML files + * Full-text search + * Built-in/prepackaged web clients + * Configuring proxy per account + * Spell Checking + * Support for two-factor authentication for extra security + + + +Currently, ElectronMail only supports Tutanota and ProtonMail. I get the feeling that they will be adding more in the future. According to the [GitHub page][4]: “Multi email providers support. ProtonMail and Tutanota at the moment.” + +ElectronMail is licensed under the MIT license. + +#### How to install ElectronMail + +Currently, there are several options to install ElectronMail on Linux. for Arch and Arch-based distros, you can install it from the [Arch User Repository][8]. There is also a Snap available for ElectrionMail. To install it, just enter `sudo snap install electron-mail`. + +For all other Linux distros, you can [download][9] a `.deb` or `.rpm` file. + +![Electron Mail Inbox][10] + +You can also [download][9] an `.exe` installer for Windows or a `.dmg` file for macOS. There is even a file for FreeBSD. + +[][11] + +Suggested read  Zettlr - Markdown Editor for Writers and Researchers + +#### Removing ElectronMail + +If you install ElectronMail and decide that it is not for you, there are a couple steps that the [developer][12] recommends. **Be sure to follow these steps before you uninstall the application.** + +If you are using the “Keep Me Signed In” feature, click “Log out” on the menu. This will delete the locally stored master password. It is possible to delete the master password after uninstalling ElectronMail, but that would involve editing the system keychain. + +You will also need to delete the settings folder manually. You can find it by clicking “Open setting folder” after selecting the application’s icon in the system tray. + +![Electron Mail Setting][13] + +### My Thoughts on ElectronMail + +I don’t usually use email clients. In fact, I mostly depend on web clients. So, I don’t have much use for this application. + +That being said, ElectronMail has a nice feel to it and is easy to set up. It has a good number of features activated out of the box and the advanced features aren’t that hard to activate. + +The one question I have relates to search. According to the features list, ElectronMail supports full-text search. However, the free version of Tutanota only supports a limited search. I wonder how ElectronMail handles that. + +At the end of the day, ElectronMail is just an Electron wrapper for a couple of web-based emails. I would rather just have them open in my browser than dedicate separate system resources to running Electron. If you only [use Tutanota email, they have their own official Electron-based desktop client][14]. You may try that. + +My biggest issue is with security. This is an unofficial app for two very secure email apps. What if there is a way to capture your login info or read through your emails? Someone who is smarter than I would have to go through the source code to know for sure. That is always the issue with unofficial apps for a security project. + +[][14] + +Suggested read  Secure Email Service Tutanota Has a Desktop App Now + +Have you every used ElectronMail? Do you think it would be worthwhile to install ElectronMail? What is your favorite email client? Please let us know in the comments below. + +If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][15]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/electronmail/ + +作者:[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://itsfoss.com/tutanota-review/ +[2]: https://itsfoss.com/protonmail/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-about.jpg?resize=800%2C500&ssl=1 +[4]: https://github.com/vladimiry/ElectronMail +[5]: https://electronjs.org/ +[6]: http://www.typescriptlang.org/ +[7]: https://angular.io/ +[8]: https://aur.archlinux.org/packages/electronmail-bin +[9]: https://github.com/vladimiry/ElectronMail/releases +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1 +[11]: https://itsfoss.com/zettlr-markdown-editor/ +[12]: https://github.com/vladimiry +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-setting.jpg?ssl=1 +[14]: https://itsfoss.com/tutanota-desktop/ +[15]: http://reddit.com/r/linuxusersgroup diff --git a/sources/tech/20190715 Understanding software design patterns.md b/sources/tech/20190715 Understanding software design patterns.md new file mode 100644 index 0000000000..347fe5011b --- /dev/null +++ b/sources/tech/20190715 Understanding software design patterns.md @@ -0,0 +1,364 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Understanding software design patterns) +[#]: via: (https://opensource.com/article/19/7/understanding-software-design-patterns) +[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson) + +Understanding software design patterns +====== +Design patterns help eliminate redundant coding. Learn how to use the +singleton pattern, factory pattern, and observer pattern using Java. +![clouds in the sky with blue pattern][1] + +If you are a programmer or a student pursuing computer science or a similar discipline, sooner or later, you will encounter the term "software design pattern." According to Wikipedia, _"a [software design pattern][2] is a general, reusable solution to a commonly occurring problem within a given context in software design."_ Here is my take on the definition: When you have been working on a coding project for a while, you often begin to think, "Huh, this seems redundant. I wonder if I can change the code to be more flexible and accepting of changes?" So, you begin to think about how to separate what stays the same from what needs to change often. + +> A **design pattern** is a way to make your code easier to change by separating the part that stays the same and the part that needs constant changes. + +Not surprisingly, everyone who has worked on a programming project has probably had the same thought. Especially for any industry-level project, where it's common to work with dozens or even hundreds of developers; the collaboration process suggests that there have to be some standards and rules to make the code more elegant and adaptable to changes. That is why we have [object-oriented programming][3] (OOP) and [software framework tools][4]. A design pattern is somewhat similar to OOP, but it goes further by considering changes as part of the natural development process. Basically, the design pattern leverages some ideas from OOP, like abstractions and interfaces, but focuses on the process of changes. + +When you start to work on a project, you often hear the term _refactoring_, which means _to change the code to be more elegant and reusable;_ this is where the design pattern shines. Whenever you're working on existing code (whether built by someone else or your past self), knowing the design patterns helps you begin to see things differently—you will discover problems and ways to improve the code. + +There are numerous design patterns, but three popular ones, which I'll present in this introductory article, are singleton pattern, factory pattern, and observer pattern. + +### How to follow this guide + +I want this tutorial to be as easy as possible for anyone to understand, whether you are an experienced programmer or a beginner to coding. The design pattern concept is not exactly easy to understand, and reducing the learning curve when you start a journey is always a top priority. Therefore, in addition to this article with diagrams and code pieces, I've also created a [GitHub repository][5] you can clone and run the code to implement the three design patterns on your own. You can also follow along with the following [YouTube video][6] I created. + +#### Prerequisites + +If you just want to get the idea of design patterns in general, you do not need to clone the sample project or install any of the tools. However, to run the sample code, you need to have the following installed: + + * **Java Development Kit (JDK):** I highly recommend [OpenJDK][7]. + * **Apache Maven:** The sample project is built using [Apache Maven][8]; fortunately, many IDEs come with Maven installed. + * **Interactive development editor (IDE):** I use [IntelliJ Community Edition][9], but you can use [Eclipse IDE][10] or any other Java IDE of your choice + * **Git:** If you want to clone the project, you need a [Git][11] client. + + + +To clone the project and follow along, run the following command after you install Git: + + +``` +`git clone https://github.com/bryantson/OpensourceDotComDemos.git` +``` + +Then, in your favorite IDE, you can import the code in the TopDesignPatterns repo as an Apache Maven project. + +I am using Java, but you can implement the design pattern using any programming language that supports the [abstraction principle][12]. + +### Singleton pattern: Avoid creating an object every single time + +The [singleton pattern][13] is a very popular design pattern that is also relatively simple to implement because you need just one class. However, many developers debate whether the singleton design pattern's benefits outpace its problems because it lacks clear benefits and is easy to abuse. Few developers implement singleton directly; instead, programming frameworks like Spring Framework and Google Guice have built-in singleton design pattern features. + +But knowing about singleton is still tremendously useful. The singleton pattern makes sure that a class is created only once and provides a global point of access to it. + +> **Singleton pattern:** Ensures that only one instantation is created and avoids creating multiple instances of the same object. + +The diagram below shows the typical process for creating a class object. When the client asks to create an object, the constructor creates, or instantiates, an object and returns to the class with the caller method. However, this happens every single time an object is requested—the constructor is called, a new object is created, and it returns with a unique object. I guess the creators of the OOP language had a reason behind creating a new object every single time, but the proponents of the singleton process say this is redundant and a waste of resources. + +![Normal class instantiation][14] + +The following diagram creates the object using the singleton pattern. Here, the constructor is called only when the object is requested the first time through a designated getInstance() method. This is usually done by checking the null value, and the object is saved inside the singleton class as a private field value. The next time the getInstance() is called, the class returns the object that was created the first time. No new object is created; it just returns the old one. + +![Singleton pattern instantiation][15] + +The following script shows the simplest possible way to create the singleton pattern: + + +``` +package org.opensource.demo.singleton; + +public class OpensourceSingleton { + +    private static OpensourceSingleton uniqueInstance; + +    private OpensourceSingleton() { +    } + +    public static OpensourceSingleton getInstance() { +        if (uniqueInstance == null) { +            uniqueInstance = new OpensourceSingleton(); +        } +        return uniqueInstance; +    } + +} +``` + +On the caller side, here is how the singleton class will be called to get an object: + + +``` +Opensource newObject = Opensource.getInstance(); +``` + +This code demonstrates the idea of a singleton well: + + 1. When getInstance() is called, it checks whether the object was already created by checking the null value. + 2. If the value is null, it creates a new object, saves it into the private field, and returns the object to the caller. Otherwise, it returns the object that was created previously. + + + +The main problem with this singleton implementation is its disregard for parallel processes. When multiple processes using threads access the resource simultaneously, a problem occurs. There is one solution to this, and it is called _double-checked locking_ for multithread safety, which is shown here: + + +``` +package org.opensource.demo.singleton; + +public class ImprovedOpensourceSingleton { + +    private volatile static ImprovedOpensourceSingleton uniqueInstance; + +    private ImprovedOpensourceSingleton() {} + +    public static ImprovedOpensourceSingleton getInstance() { +        if (uniqueInstance == null) { +            synchronized (ImprovedOpensourceSingleton.class) { +                if (uniqueInstance == null) { +                    uniqueInstance = new ImprovedOpensourceSingleton(); +                } +            } +        } +        return uniqueInstance; +    } + +} +``` + +Just to emphasize the previous point, make sure to implement your singleton directly only when you believe is a safe option to do so. The best way is to leverage the singleton feature is by using a well-made programming framework. + +### Factory pattern: Delegate object creation to the factory class to hide creation logic + +The [factory pattern][16] is another well-known design pattern, but it is a little more complex. There are several ways to implement the factory pattern, but the following sample code demonstrates the simplest possible way. The factory pattern defines an interface for creating an object but lets the subclasses decide which class to instantiate. + +> **Factory pattern:** Delegates object creation to the factory class so it hides the creation logic. + +The diagram below shows how the simplest factory pattern is implemented. + +![Factory pattern][17] + +Instead of the client directly calling the object creation, the client asks the factory class for a certain object, type x. Based on the type, the factory pattern decides which object to create and to return. + +In this code sample, OpensourceFactory is the factory class implementation that takes the _type_ from the caller and decides which object to create based on that input value: + + +``` +package org.opensource.demo.factory; + +public class OpensourceFactory { + +    public OpensourceJVMServers getServerByVendor([String][18] name) { +        if(name.equals("Apache")) { +            return new Tomcat(); +        } +        else if(name.equals("Eclipse")) { +            return new Jetty(); +        } +        else if (name.equals("RedHat")) { +            return new WildFly(); +        } +        else { +            return null; +        } +    } +} +``` + +And OpenSourceJVMServer is a 100% abstraction class (or an interface class) that indicates what to implement, not how: + + +``` +package org.opensource.demo.factory; + +public interface OpensourceJVMServers { +    public void startServer(); +    public void stopServer(); +    public [String][18] getName(); +} +``` + +Here is a sample implementation class for OpensourceJVMServers. When "RedHat" is passed as the type to the factory class, the WildFly server is created: + + +``` +package org.opensource.demo.factory; + +public class WildFly implements OpensourceJVMServers { +    public void startServer() { +        [System][19].out.println("Starting WildFly Server..."); +    } + +    public void stopServer() { +        [System][19].out.println("Shutting Down WildFly Server..."); +    } + +    public [String][18] getName() { +        return "WildFly"; +    } +} +``` + +### Observer pattern: Subscribe to topics and get notified about updates + +Finally, there is the [observer pattern][20]_._ Like the singleton pattern, few professional programmers implement the observer pattern directly. However, many messaging queue and data service implementations borrow the observer pattern concept. The observer pattern defines one-to-many dependencies between objects so that when one object changes state, all of its dependents are notified and updated automatically. + +> **Observer pattern:** Subscribe to the topics/subjects where the client can be notified if there is an update. + +The easiest way to think about the observer pattern is to imagine a mailing list where you can subscribe to any topic, whether it is open source, technologies, celebrities, cooking, or anything else that interests you. Each topic maintains a list of its subscribers, which is equivalent to an "observer" in the observer pattern. When a topic is updated, all of its subscribers (observers) are notified of the changes. And a subscriber can always unsubscribe from a topic. + +As the following diagram shows, the client can be subscribed to different topics and add the observer to be notified about new information. Because the observer listens continuously to the subject, the observer notifies the client about any change that occurs. + +![Observer pattern][21] + +Let's look at the sample code for the observer pattern, starting with the subject/topic class: + + +``` +package org.opensource.demo.observer; + +public interface Topic { + +    public void addObserver([Observer][22] observer); +    public void deleteObserver([Observer][22] observer); +    public void notifyObservers(); +} +``` + +This code describes an interface for different topics to implement the defined methods. Notice how an observer can be added, removed, or notified. + +Here is an example implementation of the topic: + + +``` +package org.opensource.demo.observer; + +import java.util.List; +import java.util.ArrayList; + +public class Conference implements Topic { +    private List<Observer> listObservers; +    private int totalAttendees; +    private int totalSpeakers; +    private [String][18] nameEvent; + +    public Conference() { +        listObservers = new ArrayList<Observer>(); +    } + +    public void addObserver([Observer][22] observer) { +        listObservers.add(observer); +    } + +    public void deleteObserver([Observer][22] observer) { +        int i = listObservers.indexOf(observer); +        if (i >= 0) { +            listObservers.remove(i); +        } +    } + +    public void notifyObservers() { +        for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { +            [Observer][22] observer = listObservers.get(i); +            observer.update(totalAttendees,totalSpeakers,nameEvent); +        } +    } + +    public void setConferenceDetails(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { +        this.totalAttendees = totalAttendees; +        this.totalSpeakers = totalSpeakers; +        this.nameEvent = nameEvent; +        notifyObservers(); +    } +} +``` + +This class defines the implementation of a particular topic. When a change happens, this implementation is where it is invoked. Notice that this takes the number of observers, which is stored as the list, and can both notify and maintain the observers. + +Here is an observer class: + + +``` +package org.opensource.demo.observer; + +public interface [Observer][22] { +    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent); +} +``` + +This class defines an interface that different observers can implement to take certain actions. + +For example, the observer implementation can print out the number of attendees and speakers at a conference: + + +``` +package org.opensource.demo.observer; + +public class MonitorConferenceAttendees implements [Observer][22] { +    private int totalAttendees; +    private int totalSpeakers; +    private [String][18] nameEvent; +    private Topic topic; + +    public MonitorConferenceAttendees(Topic topic) { +        this.topic = topic; +        topic.addObserver(this); +    } + +    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { +        this.totalAttendees = totalAttendees; +        this.totalSpeakers = totalSpeakers; +        this.nameEvent = nameEvent; +        printConferenceInfo(); +    } + +    public void printConferenceInfo() { +        [System][19].out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); +    } +} +``` + +### Where to go from here? + +Now that you've read this introductory guide to design patterns, you should be in a good place to pursue other design patterns, such as facade, template, and decorator. There are also concurrent and distributed system design patterns like the circuit breaker pattern and the actor pattern. + +However, I believe it's best to hone your skills first by implementing these design patterns in your side projects or just as practice. You can even begin to contemplate how you can apply these design patterns in your real projects. Next, I highly recommend checking out the [SOLID principles][23] of OOP. After that, you will be ready to look into the other design patterns. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/understanding-software-design-patterns + +作者:[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/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) +[2]: https://en.wikipedia.org/wiki/Software_design_pattern +[3]: https://en.wikipedia.org/wiki/Object-oriented_programming +[4]: https://en.wikipedia.org/wiki/Software_framework +[5]: https://github.com/bryantson/OpensourceDotComDemos/tree/master/TopDesignPatterns +[6]: https://www.youtube.com/watch?v=VlBXYtLI7kE&feature=youtu.be +[7]: https://openjdk.java.net/ +[8]: https://maven.apache.org/ +[9]: https://www.jetbrains.com/idea/download/#section=mac +[10]: https://www.eclipse.org/ide/ +[11]: https://git-scm.com/ +[12]: https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming) +[13]: https://en.wikipedia.org/wiki/Singleton_pattern +[14]: https://opensource.com/sites/default/files/uploads/designpatterns1_normalclassinstantiation.jpg (Normal class instantiation) +[15]: https://opensource.com/sites/default/files/uploads/designpatterns2_singletonpattern.jpg (Singleton pattern instantiation) +[16]: https://en.wikipedia.org/wiki/Factory_method_pattern +[17]: https://opensource.com/sites/default/files/uploads/designpatterns3_factorypattern.jpg (Factory pattern) +[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[20]: https://en.wikipedia.org/wiki/Observer_pattern +[21]: https://opensource.com/sites/default/files/uploads/designpatterns4_observerpattern.jpg (Observer pattern) +[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+observer +[23]: https://en.wikipedia.org/wiki/SOLID diff --git a/sources/tech/20190715 What is POSIX- Richard Stallman explains.md b/sources/tech/20190715 What is POSIX- Richard Stallman explains.md index b09db22275..c80b3ac266 100644 --- a/sources/tech/20190715 What is POSIX- Richard Stallman explains.md +++ b/sources/tech/20190715 What is POSIX- Richard Stallman explains.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (martin2011qi) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20190716 Security scanning your DevOps pipeline.md b/sources/tech/20190716 Security scanning your DevOps pipeline.md deleted file mode 100644 index 75017345d6..0000000000 --- a/sources/tech/20190716 Security scanning your DevOps pipeline.md +++ /dev/null @@ -1,488 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Security scanning your DevOps pipeline) -[#]: via: (https://opensource.com/article/19/7/security-scanning-your-devops-pipeline) -[#]: author: (Jessica Repka https://opensource.com/users/jrepkahttps://opensource.com/users/marcobravohttps://opensource.com/users/jrepka) - -Security scanning your DevOps pipeline -====== -A hands-on introduction to container security using Anchore with Jenkins -on Kubernetes. -![Target practice][1] - -Security is one of the most important considerations for running in any environment, and using open source software is a great way to handle security without going over budget in your corporate environment or for your home setup. It is easy to talk about the concepts of security, but it's another thing to understand the tools that will get you there. This tutorial explains how to set up security using [Jenkins][2] with [Anchore][3]. - -There are many ways to run [Kubernetes][4]. Using [Minikube][5], a prepackaged virtual machine (VM) environment designed for local testing, reduces the complexity of running an environment. - -Technology | What is it? ----|--- -[Jenkins][2] | An open source automation server -[Anchore][3] | A centralized service for inspection, analysis, and certification of container images -[Minikube][5] | A single-node Kubernetes cluster inside a VM - -In this tutorial, you'll learn how to add Jenkins and Anchore to Kubernetes and configure a scanning pipeline for new container images and registries. - -_Note: For best performance in this tutorial, Minikube requires at least four CPUs._ - -### Basic requirements - -#### Knowledge - - * Docker (including a [Docker Hub][6] account) - * Minikube - * Jenkins - * Helm - * Kubectl - - - -#### Software - - * Minikube - * Helm - * Kubectl client - * Anchore CLI installed locally - - - -### Set up the environment - -[Install Minikube][7] in whatever way that makes sense for your environment. If you have enough resources, I recommend giving a bit more than the default memory and CPU power to your VM: - - -``` -$ minikube config set memory 8192 -⚠️  These changes will take effect upon a minikube delete and then a minikube start -$ minikube config set cpus 4 -⚠️  These changes will take effect upon a minikube delete and then a minikube start -``` - -If you are already running a Minikube instance, you must delete it using **minikube delete** before continuing. - -Next, [install Helm][8], the standard Kubernetes package manager, in whatever way makes sense for your operating system. - -Now you're ready to install the applications. - -### Install and configure Anchore and Jenkins - -To begin, start Minikube and its dashboard. - - -``` -$ minikube start -😄  minikube v1.1.0 on darwin (amd64) -💡  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one. -🔄  Restarting existing virtualbox VM for "minikube" ... -⌛  Waiting for SSH access ... -🐳  Configuring environment for Kubernetes v1.14.2 on Docker 18.09.6 -🔄  Relaunching Kubernetes v1.14.2 using kubeadm ... -⌛  Verifying: apiserver proxy etcd scheduler controller dns -🏄  Done! kubectl is now configured to use "minikube" - -$ minikube dashboard -🔌  Enabling dashboard ... -🤔  Verifying dashboard health ... -🚀  Launching proxy ... -🤔  Verifying proxy health ... -🎉  Opening in your default browser... -``` - -As long as you stay connected to this terminal session, you will have access to a visual dashboard for Minikube at **127.0.0.1:52646**. - -![Minikube dashboard][9] - -  - -### Create namespace and install Jenkins - -The next step is to get the Jenkins build environment up and running. To start, ensure your storage is configured for persistence so you can reuse it later. Set the storage class for **Persistent Volumes** before you install Helm, so its installation will be persistent across reboots. - -Either exit the dashboard using CTRL+C or open a new terminal to run: - - -``` -$ minikube addons enable default-storageclass -✅  default-storageclass was successfully enabled -``` - -**Using namespaces** - -I test quite a few different applications, and I find it incredibly helpful to use [namespaces][10] in Kubernetes. Leaving everything in the default namespace can overcrowd it and make it challenging to uninstall a Helm-installed application. If you stick to this for Jenkins, you can remove it by running **helm del --purge jenkins --namespace jenkins** then **kubectl delete ns jenkins**. This is much easier than manually hunting and pecking through a long list of containers. - -### Install Helm - -To use Helm, Kubernetes' default package manager, initialize an environment and install Jenkins. - - -``` -$ kubectl create ns jenkins -namespace "jenkins" created -$ helm init -helm init -Creating /Users/alleycat/.helm -Creating /Users/alleycat/.helm/repository -Creating /Users/alleycat/.helm/repository/cache -Creating /Users/alleycat/.helm/repository/local -Creating /Users/alleycat/.helm/plugins -Creating /Users/alleycat/.helm/starters -Creating /Users/alleycat/.helm/cache/archive -Creating /Users/alleycat/.helm/repository/repositories.yaml -Adding stable repo with URL: -Adding local repo with URL: -$HELM_HOME has been configured at /Users/alleycat/.helm. - -Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster. - -Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy. -To prevent this, run `helm init` with the --tiller-tls-verify flag. -For more information on securing your installation see: -$ helm install --name jenkins stable/jenkins --namespace jenkins -NAME:   jenkins -LAST DEPLOYED: Tue May 28 11:12:39 2019 -NAMESPACE: jenkins -STATUS: DEPLOYED - -RESOURCES: -==> v1/ConfigMap -NAME           DATA  AGE -jenkins        5     0s -jenkins-tests  1     0s - -==> v1/Deployment -NAME     READY  UP-TO-DATE  AVAILABLE  AGE -jenkins  0/1    1           0          0s - -==> v1/PersistentVolumeClaim -NAME     STATUS   VOLUME    CAPACITY  ACCESS MODES  STORAGECLASS  AGE -jenkins  Pending  standard  0s - -==> v1/Pod(related) -NAME                      READY  STATUS   RESTARTS  AGE -jenkins-7565554b8f-cvhbd  0/1    Pending  0         0s - -==> v1/Role -NAME                     AGE -jenkins-schedule-agents  0s - -==> v1/RoleBinding -NAME                     AGE -jenkins-schedule-agents  0s - -==> v1/Secret -NAME     TYPE    DATA  AGE -jenkins  Opaque  2     0s - -==> v1/Service -NAME           TYPE          CLUSTER-IP    EXTERNAL-IP  PORT(S)         AGE -jenkins        LoadBalancer  10.96.90.0    <pending>    8080:32015/TCP  0s -jenkins-agent  ClusterIP     10.103.85.49  <none>       50000/TCP       0s - -==> v1/ServiceAccount -NAME     SECRETS  AGE -jenkins  1        0s - -NOTES: -1\. Get your 'admin' user password by running: -  printf $(kubectl get secret --namespace jenkins jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo -2\. Get the Jenkins URL to visit by running these commands in the same shell: -  NOTE: It may take a few minutes for the LoadBalancer IP to be available. -        You can watch the status of by running 'kubectl get svc --namespace jenkins -w jenkins' -  export SERVICE_IP=$(kubectl get svc --namespace jenkins jenkins --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}") -  echo http://$SERVICE_IP:8080/login - -3\. Login with the password from step 1 and the username: admin - -For more information on running Jenkins on Kubernetes, visit: - -``` - -Note the Bash one-liner above that begins with **printf**; it allows you to query for the Jenkins password and it can be challenging to find your [default Jenkins password][11] without it. Take note of it and save it for later. - -### Set up port forwarding to log into the UI - -Now that you've installed Minikube and Jenkins, log in to configure Jenkins. You'll need the Pod name for port forwarding: - - -``` -$ kubectl get pods --namespace jenkins -NAME                       READY     STATUS    RESTARTS   AGE -jenkins-7565554b8f-cvhbd   1/1       Running   0          9m -``` - -Run the following to set up port forwarding (using your Jenkins pod name, which will be different from mine below): - - -``` -# verify your pod name from the namespace named jenkins -kubectl get pods --namespace jenkins -NAME                       READY     STATUS    RESTARTS   AGE -jenkins-7565554b8f-cvhbd   1/1       Running   0          37m -# then forward it -$ kubectl port-forward jenkins-7565554b8f-cvhbd 8088:8080 -n jenkins -Forwarding from 127.0.0.1:8088 -> 8080 -Forwarding from [::1]:8088 -> 8080 -``` - -Note that you will need multiple tabs in your terminal once you run the port-forwarding command. - -Leave this tab open going forward to maintain your port-forwarding session. - -Navigate to Jenkins in your preferred browser by going to **localhost:8088**. The default username is **admin** and the password is stored in Kubernetes Secrets. Use the command at the end of the **helm install jenkins** step: - - -``` -$ printf $(kubectl get secret --namespace jenkins jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo -Jfstacz2vy -``` - -After logging in, the UI will display **Welcome to Jenkins!** - -![Jenkins UI][12] - -From here we'll have to install some plugins to Jenkins for our pipeline to work properly. From the main page choose **Manage Jenkins **on the left-hand side. - -![][13] - -  - -Then choose **Manage Plugins** - -![][14] - -Then choose **Available ** - -**![][15]** - -Then choose the checkboxes beside these plugins shown below - -![][16] - -![][17] - -Once you have checked the boxes scroll to the bottom of the page and choose **Install without Restart**. -  - -![][18] - -  - -  - -#### Deploy Anchore - -[Anchore Engine][19] "is an open source project that provides a centralized service for inspection, analysis, and certification of container images." Deploy it within Minikube to do some security inspection on your Jenkins pipeline. Add a security namespace for the Helm install, then run an installation: - - -``` -$ kubectl create ns security -namespace "security" created -$ helm install --name anchore-engine stable/anchore-engine --namespace security -NAME:   anchore-engine -LAST DEPLOYED: Wed May 29 12:22:25 2019 -NAMESPACE: security -STATUS: DEPLOYED -## And a lot more output -``` - -Confirm that the service is up and running with this command: - - -``` -kubectl run -i --tty anchore-cli --restart=Always --image anchore/engine-cli --env ANCHORE_CLI_USER=admin --env ANCHORE_CLI_PASS=${ANCHORE_CLI_PASS} --env ANCHORE_CLI_URL= -If you don't see a command prompt, try pressing enter. -[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ -``` - -If you are logged into an Anchore container (similar to above), then the system is online. The default password for Anchore is **admin/foobar**. Type **exit** to leave the terminal. - -Use port forwarding again to access the Anchore Engine API from your host system: - - -``` -$ kubectl get pods --namespace security -NAME                                                         READY     STATUS    RESTARTS   AGE -anchore-engine-anchore-engine-analyzer-7cf5958795-wtw69      1/1       Running   0          3m -anchore-engine-anchore-engine-api-5c4cdb5587-mxkd7           1/1       Running   0          3m -anchore-engine-anchore-engine-catalog-648fcf54fd-b8thl       1/1       Running   0          3m -anchore-engine-anchore-engine-policy-7b78dd57f4-5dwsx        1/1       Running   0          3m -anchore-engine-anchore-engine-simplequeue-859c989f99-5dwgf   1/1       Running   0          3m -anchore-engine-postgresql-844dfcc468-s92c5                   1/1       Running   0          3m -# Find the API pod name above and add it to the command below -$ kubectl port-forward anchore-engine-anchore-engine-api-5c4cdb5587-mxkd7 8228:8228 --namespace security -``` - -### Join Anchore and Jenkins - -Go back to the Jenkins UI at ****. On the main menu, click **Manage Jenkins > Manage Plugins**. Choose the **Available** tab, then scroll down or search for the **Anchore Container Image Scanner Plugin**. Check the box next to the plugin and choose **Install without restart**. - -![Jenkins plugin manager][20] - -Once the installation completes, go back to the main menu in Jenkins and choose **Manage Jenkins**, then **Configure System**. Scroll down to **Anchore Configuration**. Confirm **Engine Mode** is selected and a URL is entered, which is output from the Helm installation. Add the username and password (default **admin/foobar**). For debugging purposes, check **Enable DEBUG logging**. - -![Anchore plugin mode][21] - -Now that the plugin is configured, you can set up a Jenkins pipeline to scan your container builds. - -### Jenkins pipeline and Anchore scanning - -The purpose of this setup is to be able to inspect container images on the fly to ensure they meet security requirements. To do so, use Anchore Engine and give it permission to access your images. In this example, they are on Docker Hub, but they could also be on Quay or any other [container registry supported by Anchore][22].  - -In order to run the necessary commands on the command line, we need to find our Anchore pod name, then SSH into it using **kubectl exec**: - - -``` -$ kubectl get all -NAME                               READY     STATUS    RESTARTS   AGE -pod/anchore-cli-86d7fd9568-rmknw   1/1       Running   2          2d - -NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE -service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   7d - -NAME                          DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE -deployment.apps/anchore-cli   1         1         1            1           2d - -NAME                                     DESIRED   CURRENT   READY     AGE -replicaset.apps/anchore-cli-86d7fd9568   1         1         1         2d -# Let’s connect to our anchore-cli pod -$ kubectl exec -it anchore-cli-86d7fd9568-rmknw -i -t -- bash -[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ anchore-cli --u admin  --p foobar  registry add index.docker.io <username> <password> -Registry: index.docker.io -User: jrepka -Type: docker_v2 -Verify TLS: True -Created: 2019-05-14T22:37:59Z -Updated: 2019-05-14T22:37:59Z -``` - -Anchore Engine is now ready to work with your registry. There are [several ways][23] it can do so, including: - - * Analyzing images - * Inspecting image content - * Scanning repositories - * Viewing security vulnerabilities - - - -Point Anchore Engine toward an image to analyze it against your policy. For our testing, we'll use the publicly available [Cassandra][24] image: - - -``` -[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ anchore-cli --u admin  --p foobar   image add -docker.io/library/cassandra:latest - -Image Digest: sha256:7f7afff84384e36593b085d62e087674029de9aced4482c7780f155d8ee55fad -Parent Digest: sha256:800084987d58c2a62daeea4662ecdd79fd4928d449279bd410ef7690ef482469 -Analysis Status: not_analyzed -Image Type: docker -Analyzed At: None -Image ID: a34c036183d18527684cdb613fbb1c806c7e1bc26f6911dcc25e918aa7b093fc -Dockerfile Mode: None -Distro: None -Distro Version: None -Size: None -Architecture: None -Layer Count: None - -Full Tag: docker.io/library/cassandra:latest -Tag Detected At: 2019-07-09T17:44:45Z -``` - -You will also need to grab a default policy ID to test against for your pipeline. (In a future article, I will go into customizing policy and whitelist rules.) - -Run the following command to get the policy ID: - - -``` -[anchore@anchore-cli-86d7fd9568-rmknw anchore-cli]$ anchore-cli --u admin  --p foobar policy list - -Policy ID                                   Active        Created                     Updated                     -2c53a13c-1765-11e8-82ef-23527761d060        True          2019-05-14T22:12:05Z        2019-05-14T22:12:05Z -``` - -Now that you have added a registry and the image you want, you can build a pipeline to scan it continuously. - -Scanning works in this order: **Build, push, scan.** To prevent images that do not meet security requirements from making it into production, I recommend a tiered approach to security scanning: promote a container image to a separate development environment and promote it to production only once it passes the Anchore Engine's scan. - -We can't do anything too exciting until we configure our custom policy, so we will make sure a scan completes successfully by running a Hello World version of it. Below is an example workflow written in Groovy: - - -``` -node { -   echo 'Hello World' -} -``` - -To run this code, log back into the Jenkins UI at **localhost:8088**, choose New Item, Pipeline, then place this code block into the Pipeline Script area. - -![The "Hello World" of Jenkins][25] - -It will take some time to complete since we're building the entire Cassandra image added above. You will see a blinking red icon in the meantime.  - -![Jenkins building][26] - -And it will eventually finish and pass. That means we have set everything up correctly. - -### That's a wrap - -If you made it this far, you have a running Minikube configuration with Jenkins and Anchore Engine. You also have one or more images hosted on a container registry service and a way for Jenkins to show errors when images don't meet the default policy. In the next article, we will build a custom pipeline that verifies security policies set by Anchore Engine. - -Anchore can also be used to scan large-scale Amazon Elastic Container Registries (ECRs), as long as the credentials are configured properly in Jenkins. - -### Other resources - -This is a lot of information for one article. If you'd like more details, the following links (which include my GitHub for all the examples in this tutorial) may help: - - * [Anchore scan example][27] - * [Anchore Engine][28] - * [Running Kubernetes locally via Minikube][5] - * [Jenkins Helm Chart][29] - - - -Are there any specific pipelines you want me to build in the next tutorial? Let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/security-scanning-your-devops-pipeline - -作者:[Jessica Repka][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/jrepkahttps://opensource.com/users/marcobravohttps://opensource.com/users/jrepka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/target-security.png?itok=Ca5-F6GW (Target practice) -[2]: https://jenkins.io/ -[3]: https://anchore.com/ -[4]: https://opensource.com/resources/what-is-kubernetes -[5]: https://kubernetes.io/docs/setup/minikube/ -[6]: https://hub.docker.com/ -[7]: https://kubernetes.io/docs/tasks/tools/install-minikube/ -[8]: https://helm.sh/docs/using_helm/#installing-helm -[9]: https://opensource.com/sites/default/files/uploads/minikube-dashboard.png (Minikube dashboard) -[10]: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ -[11]: https://opensource.com/article/19/6/jenkins-admin-password-helm-kubernetes -[12]: https://opensource.com/sites/default/files/uploads/welcometojenkins.png (Jenkins UI) -[13]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_4.52.06_pm.png -[14]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_4.52.30_pm.png -[15]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_4.59.20_pm.png -[16]: https://opensource.com/sites/default/files/resize/lead-images/screen_shot_2019-06-14_at_8.26.55_am-500x288.png -[17]: https://opensource.com/sites/default/files/resize/lead-images/screen_shot_2019-06-14_at_8.26.25_am-500x451.png -[18]: https://opensource.com/sites/default/files/lead-images/screen_shot_2019-06-20_at_5.05.10_pm.png -[19]: https://github.com/anchore/anchore-engine -[20]: https://opensource.com/sites/default/files/uploads/jenkins-install-without-restart.png (Jenkins plugin manager) -[21]: https://opensource.com/sites/default/files/uploads/anchore-configuration.png (Anchore plugin mode) -[22]: https://github.com/anchore/enterprise-docs/blob/master/content/docs/using/ui_usage/registries/_index.md -[23]: https://docs.anchore.com/current/docs/using/cli_usage/ -[24]: http://cassandra.apache.org/ -[25]: https://opensource.com/sites/default/files/articles/jenkins_hello_world_pipeline_opensourcecom.png (The "Hello World" of Jenkins) -[26]: https://opensource.com/sites/default/files/jenkins_build_opensourcecom.png (Jenkins building) -[27]: https://github.com/Alynder/anchore_example -[28]: https://github.com/anchore/anchore-engine/wiki -[29]: https://github.com/helm/charts/tree/master/stable/jenkins diff --git a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md deleted file mode 100644 index 4eeabbeeb6..0000000000 --- a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md +++ /dev/null @@ -1,126 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bond WiFi and Ethernet for easier networking mobility) -[#]: via: (https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/) -[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) - -Bond WiFi and Ethernet for easier networking mobility -====== - -![][1] - -Sometimes one network interface isn’t enough. Network bonding allows multiple network connections to act together with a single logical interface. You might do this because you want more bandwidth than a single connection can handle. Or maybe you want to switch back and forth between your wired and wireless networks without losing your network connection. - -The latter applies to me. One of the benefits to working from home is that when the weather is nice, it’s enjoyable to work from a sunny deck instead of inside. But every time I did that, I lost my network connections. IRC, SSH, VPN — everything goes away, at least for a moment while some clients reconnect. This article describes how I set up network bonding on my Fedora 30 laptop to seamlessly move from the wired connection my laptop dock to a WiFi connection. - -In Linux, interface bonding is handled by the bonding kernel module. Fedora does not ship with this enabled by default, but it is included in the kernel-core package. This means that enabling interface bonding is only a command away: - -``` -sudo modprobe bonding -``` - -Note that this will only have effect until you reboot. To permanently enable interface bonding, create a file called _bonding.conf_ in the _/etc/modules-load.d_ directory that contains only the word “bonding”. - -Now that you have bonding enabled, it’s time to create the bonded interface. First, you must get the names of the interfaces you want to bond. To list the available interfaces, run: - -``` -sudo nmcli device status -``` - -You will see output that looks like this: - -``` -DEVICE TYPE STATE CONNECTION -enp12s0u1 ethernet connected Wired connection 1 -tun0 tun connected tun0 -virbr0 bridge connected virbr0 -wlp2s0 wifi disconnected -- -p2p-dev-wlp2s0 wifi-p2p disconnected -- -enp0s31f6 ethernet unavailable -- -lo loopback unmanaged -- -virbr0-nic tun unmanaged -- -``` - -In this case, there are two (wired) Ethernet interfaces available. _enp12s0u1_ is on a laptop docking station, and you can tell that it’s connected from the _STATE_ column. The other, _enp0s31f6_, is the built-in port in the laptop. There is also a WiFi connection called _wlp2s0_. _enp12s0u1_ and _wlp2s0_ are the two interfaces we’re interested in here. (Note that it’s not necessary for this exercise to understand how network devices are named, but if you’re interested you can see the [systemd.net-naming-scheme man page][2].) - -The first step is to create the bonded interface: - -``` -sudo nmcli connection add type bond ifname bond0 con-name bond0 -``` - -In this example, the bonded interface is named _bond0_. The “_con-name bond0_” sets the connection name to _bond0_; leaving this off would result in a connection named _bond-bond0_. You can also set the connection name to something more human-friendly, like “Docking station bond” or “Ben” - -The next step is to add the interfaces to the bonded interface: - -``` -sudo nmcli connection add type ethernet ifname enp12s0u1 master bond0 con-name bond-ethernet -sudo nmcli connection add type wifi ifname wlp2s0 master bond0 ssid Cotton con-name bond-wifi -``` - -As above, the connection name is specified to be [more descriptive][3]. Be sure to replace _enp12s0u1_ and _wlp2s0_ with the appropriate interface names on your system. For the WiFi interface, use your own network name (SSID) where I use “Cotton”. If your WiFi connection has a password (and of course it does!), you’ll need to add that to the configuration, too. The following assumes you’re using [WPA2-PSK][4] authentication - -``` -sudo nmcli connection modify bond-wifi wifi-sec.key-mgmt wpa-psk -sudo nmcli connection edit bond-wif -``` - -The second command will bring you into the interactive editor where you can enter your password without it being logged in your shell history. Enter the following, replacing _password_ with your actual password - -``` -set wifi-sec.psk password -save -quit -``` - -Now you’re ready to start your bonded interface and the secondary interfaces you created - -``` -sudo nmcli connection up bond0 -sudo nmcli connection up bond-ethernet -sudo nmcli connection up bond-wifi -``` - -You should now be able to disconnect your wired or wireless connections without losing your network connections. - -### A caveat: using other WiFi networks - -This configuration works well when moving around on the specified WiFi network, but when away from this network, the SSID used in the bond is not available. Theoretically, one could add an interface to the bond for every WiFi connection used, but that doesn’t seem reasonable. Instead, you can disable the bonded interface: - -``` -sudo nmcli connection down bond0 -``` - -When back on the defined WiFi network, simply start the bonded interface as above. - -### Fine-tuning your bond - -By default, the bonded interface uses the “load balancing (round-robin)” mode. This spreads the load equally across the interfaces. But if you have a wired and a wireless connection, you may want to prefer the wired connection. The “active-backup” mode enables this. You can specify the mode and primary interface when you are creating the interface, or afterward using this command (the bonded interface should be down): - -``` -sudo nmcli connection modify bond0 +bond.options "mode=active-backup,primary=enp12s0u1" -``` - -The [kernel documentation][5] has much more information about bonding options. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/ - -作者:[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://fedoramagazine.org/author/bcotton/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/networkingmobility-816x345.jpg -[2]: https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html -[3]: https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns -[4]: https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#Target_users_(authentication_key_distribution) -[5]: https://www.kernel.org/doc/Documentation/networking/bonding.txt diff --git a/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md b/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md deleted file mode 100644 index 8836995311..0000000000 --- a/sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Get going with EtherCalc, a web-based alternative to Google Sheets) -[#]: via: (https://opensource.com/article/19/7/get-going-ethercalc) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-phttps://opensource.com/users/marcobravo) - -Get going with EtherCalc, a web-based alternative to Google Sheets -====== -EtherCalc is an open source spreadsheet that makes it easy to work -remotely and collaborate with others. -![Open data brain][1] - -Spreadsheets can be very useful—and not just for [managing your finances][2]. That said, desktop spreadsheets have their limitations. The biggest is that you need to be at your computer to use one. On top of that, collaborating on a spreadsheet can quickly become a messy affair. - -Enter [EtherCalc][3], an open source, web-based spreadsheet. While not as fully featured as a desktop spreadsheet, EtherCalc packs enough features for most people. - -Let's take a look at how to get started using it. - -### Getting EtherCalc - -If you're self-hosting, you can [download the code][4], get it through [Sandstorm.io][5], or use npm (the Node.js package manager) to install it on a server. - -But what if you don't have a server? You can use one of the many hosted instances of EtherCalc—for example, at [EtherCalc.org][6], the [instance hosted][7] by the folks at [Framasoft][8], or use it through [Sandstorm Oasis][9]. - -### What can you use EtherCalc for? - -Just about everything you'd use a desktop spreadsheet for. That could be to balance your budget, track your savings, record your income, schedule meetings, or take an inventory of your possessions. - -I've used EtherCalc to track time on freelance projects, to create invoices for those projects, and even to share article ideas with my fellow [Opensource.com community moderators][10]. How you use EtherCalc is up to your needs and your imagination. - -### Working with EtherCalc - -The first step is to create a spreadsheet. - -![Empty EtherCalc spreadsheet][11] - -If you've used a desktop or web-based spreadsheet before, EtherCalc will look somewhat familiar. As with any spreadsheet, you type what you need to type in the cells on the sheet. The includes column headings, labels, and functions (more on those in a moment). - -Before you do anything else, bookmark the URL to your spreadsheet. EtherCalc uses randomly generated URLs—for example, —which aren't easy to remember. - -### Formatting your spreadsheet - -To add formatting to your spreadsheet, highlight the cell or cells that you want to format and click the **Format** menu. - -![EtherCalc's Format menu][12] - -You can add borders and padding, change fonts and their attributes, align text, and change the format of numbers, for example to dates or currency formats. When you're done, click the **Save to:** button to apply the formatting. - -### Adding functions - -_Functions_ enable you to add data, manipulate data, and make calculations in a spreadsheet. They can do a lot more, too. - -To add a function to your spreadsheet, click a cell. Then, click the **Function** button on the toolbar. - -![EtherCalc Function button][13] - -That opens a list all of the functions EtherCalc supports, along with a short description of what each function does. - -![EtherCalc Functions list][14] - -Select the function you want to use, then click **Paste**. EtherCalc adds the function, along with an opening parenthesis, to the cell. Type what you need to after the parenthesis, then type a closing parenthesis. For example, if you want to total up all the numbers in column B in the spreadsheet using the _=SUM()_ function, type _B1:B21_ and close the parenthesis. - -![Entering a function in EtherCalc ][15] - -You can also add functions by double-clicking in a cell and typing them. There's no reference in the documentation for EtherCalc's functions. However, it does support [OpenFormula][16] (a standard for math formulas that spreadsheets support). If you're not familiar with spreadsheet functions, you can look up what you need in the [OpenFormula specification][17] or this handy dandy [reference to LibreOffice Calc's functions][18]. - -### Collaborating with others - -Earlier this year, I worked with two friends on a content strategy project. I'm in New Zealand, one friend is in British Columbia, and the other is in Toronto. Since we were working across time zones, each of us needed access to the spreadsheet we were using to track and coordinate our work. Emailing a LibreOffice Calc file wasn't an option. Instead, we turned to EtherCalc, and it worked very well. - -Collaborating with EtherCalc starts with sharing your spreadsheet's URL with your collaborators. You can tell when someone else is working on the spreadsheet by the blue border that appears around one or more cells. - -![Collaborating in EtherCalc][19] - -You and your collaborators can enter information into the spreadsheet simultaneously. All you need to remember is to respect the sanctity of those blue borders. - -The **Comment** tab comes in handy when you need to ask a question, include additional information, or make a note to follow up on something. To add a comment, click the tab, and type what you need to type. When you're finished, click **Save**. - -![Adding a comment in EtherCalc][20] - -You can tell when a cell has a comment by the small red triangle in the top-right corner of the cell. Hold your mouse pointer over it to view the comment. - -![Viewing a comment in EtherCalc][21] - -### Final thoughts - -EtherCalc doesn't do everything that, say, [LibreOffice Calc][22] or [Gnumeric][23] can do. And there's nothing wrong with that. In this case, the [80/20 rule][24] applies. - -If you need a simple spreadsheet and one that you can work on with others, EtherCalc is a great choice. It takes a bit of getting used to, but once you do, you'll have no problems using EtherCalc. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/get-going-ethercalc - -作者:[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/scottnesbitthttps://opensource.com/users/greg-phttps://opensource.com/users/marcobravo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opendata_0613mm.png?itok=UIjD_jhK (Open data brain) -[2]: https://opensource.com/article/17/8/budget-libreoffice-calc -[3]: https://ethercalc.net/ -[4]: https://github.com/audreyt/ethercalc -[5]: https://sandstorm.io -[6]: https://ethercalc.org -[7]: https://accueil.framacalc.org/en/ -[8]: https://opensource.com/article/18/8/framasoft -[9]: https://oasis.sandstorm.io/ -[10]: https://opensource.com/community-moderator-program -[11]: https://opensource.com/sites/default/files/uploads/ethercalc-empty-spreadsheet.png (Empty EtherCalc spreadsheet) -[12]: https://opensource.com/sites/default/files/uploads/ethercalc-formatting.png (EtherCalc's Format menu) -[13]: https://opensource.com/sites/default/files/uploads/ethercalc-function.png (EtherCalc Function button) -[14]: https://opensource.com/sites/default/files/uploads/ethercalc-function-list.png (EtherCalc Functions list) -[15]: https://opensource.com/sites/default/files/uploads/ethercalc-function-example.png (Entering a function in EtherCalc ) -[16]: https://en.wikipedia.org/wiki/OpenFormula -[17]: https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html -[18]: https://help.libreoffice.org/Calc/Functions_by_Category -[19]: https://opensource.com/sites/default/files/uploads/ethercalc-collaborators.png (Collaborating in EtherCalc) -[20]: https://opensource.com/sites/default/files/uploads/ethercalc-add-comment.png (Adding a comment in EtherCalc) -[21]: https://opensource.com/sites/default/files/uploads/ethercalc-view-comment.png (Viewing a comment in EtherCalc) -[22]: https://www.libreoffice.org/discover/calc/ -[23]: http://www.gnumeric.org/ -[24]: https://en.wikipedia.org/wiki/Pareto_principle diff --git a/sources/tech/20190717 Mastering user groups on Linux.md b/sources/tech/20190717 Mastering user groups on Linux.md deleted file mode 100644 index 82f9cca815..0000000000 --- a/sources/tech/20190717 Mastering user groups on Linux.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (0x996) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Mastering user groups on Linux) -[#]: via: (https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Mastering user groups on Linux -====== -Managing user groups on Linux systems is easy, but the commands can be more flexible than you might be aware. -![Scott 97006 \(CC BY 2.0\)][1] - -User groups play an important role on Linux systems. They provide an easy way for a select groups of users to share files with each other. They also allow sysadmins to more effectively manage user privileges, since they can assign privileges to groups rather than individual users. - -While a user group is generally created whenever a user account is added to a system, there’s still a lot to know about how they work and how to work with them. - -**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** - -### One user, one group? - -Most user accounts on Linux systems are set up with the user and group names the same. The user "jdoe" will be set up with a group named "jdoe" and will be the only member of that newly created group. The user’s login name, user id, and group id will be added to the **/etc/passwd** and **/etc/group** files when the account is added, as shown in this example: - -``` -$ sudo useradd jdoe -$ grep jdoe /etc/passwd -jdoe:x:1066:1066:Jane Doe:/home/jdoe:/bin/sh -$ grep jdoe /etc/group -jdoe:x:1066: -``` - -The values in these files allow the system to translate between the text (jdoe) and numeric (1066) versions of the user id — jdoe is 1066 and 1066 is jdoe. - -The assigned UID (user id) and GID (group id) for each user are generally the same and configured sequentially. If Jane Doe in the above example were the most recently added user, the next new user would likely be assigned 1067 as their user and group IDs. - -### GID = UID? - -UIDs and GIDs can get of out sync. For example, if you add a group using the **groupadd** command without specifying a group id, your system will assign the next available group id (in this case, 1067). The next user to be added to the system would then get 1067 as a UID but 1068 as a GID. - -You can avoid this issue by specifying a smaller group id when you add a group rather than going with the default. In this command, we add a new group and provide a GID that is smaller than the range used for user accounts. - -``` -$ sudo groupadd -g 500 devops -``` - -If it works better for you, you can specify a shared group when you create accounts. For example, you might want to assign new development staff members to a devops group instead of putting each one in their own group. - -``` -$ sudo useradd -g staff bennyg -$ grep bennyg /etc/passwd -bennyg:x:1064:50::/home/bennyg:/bin/sh -``` - -### Primary and secondary groups - -There are actually two types of groups — primary and secondary. - -The **primary group** is the one that’s recorded in the **/etc/passwd** file, configured when an account is set up. When a user creates a file, it’s their primary group that is associated with it. - -``` -$ whoami -jdoe -$ grep jdoe /etc/passwd -jdoe:x:1066:1066:John Doe:/home/jdoe:/bin/bash - ^ - | - +-------- primary group -$ touch newfile -$ ls -l newfile --rw-rw-r-- 1 jdoe jdoe 0 Jul 16 15:22 newfile - ^ - | - +-------- primary group -``` - -**Secondary groups** are those that users might be added to once they already have accounts. Secondary group memberships show up in the /etc/group file. - -``` -$ grep devops /etc/group -devops:x:500:shs,jadep - ^ - | - +-------- secondary group for shs and jadep -``` - -The **/etc/group** file assigns names to user groups (e.g., 500 = devops) and records secondary group members. - -### Preferred convention - -The convention of having each user a member of their own group and optionally a member of any number of secondary groups allows users to more easily separate files that are personal from those they need to share with co-workers. When a user creates a file, members of the various user groups they belong to don't necessarily have access. A user will have to use the **chgrp** command to associate a file with a secondary group. - -### There’s no place like /home - -One important detail when adding a new account is that the **useradd** command does not necessarily add a home directory for a new user. If you want this step to be taken only some of the time, you can add **-m** (think of this as the “make home” option) with your useradd commands. - -``` -$ sudo useradd -m -g devops -c "John Doe" jdoe2 -``` - -The options in this command: - - * **-m** creates the home directory and populates it with start-up files - * **-g** specifies the group to assign the user to - * **-c** adds a descriptor for the account (usually the person’s name) - - - -If you want a home directory to be created _all_ of the time, you can change the default behavior by editing the **/etc/login.defs** file. Change or add a setting for the CREATE_HOME variable and set it to “yes”: - -``` -$ grep CREATE_HOME /etc/login.defs -CREATE_HOME yes -``` - -Another option is to set yourself up with an alias so that **useradd** always uses the -m option. - -``` -$ alias useradd=’useradd -m’ -``` - -Make sure you add the alias to your ~/.bashrc or similar start-up file to make it permanent. - -### Looking into /etc/login.defs - -Here’s a command to list all the setting in the /etc/login.defs file. The **grep** commands are hiding comments and blank lines. - -``` -$ cat /etc/login.defs | grep -v "^#" | grep -v "^$" -MAIL_DIR /var/mail -FAILLOG_ENAB yes -LOG_UNKFAIL_ENAB no -LOG_OK_LOGINS no -SYSLOG_SU_ENAB yes -SYSLOG_SG_ENAB yes -FTMP_FILE /var/log/btmp -SU_NAME su -HUSHLOGIN_FILE .hushlogin -ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games -TTYGROUP tty -TTYPERM 0600 -ERASECHAR 0177 -KILLCHAR 025 -UMASK 022 -PASS_MAX_DAYS 99999 -PASS_MIN_DAYS 0 -PASS_WARN_AGE 7 -UID_MIN 1000 -UID_MAX 60000 -GID_MIN 1000 -GID_MAX 60000 -LOGIN_RETRIES 5 -LOGIN_TIMEOUT 60 -CHFN_RESTRICT rwh -DEFAULT_HOME yes -CREATE_HOME yes <=== -USERGROUPS_ENAB yes -ENCRYPT_METHOD SHA512 -``` - -Notice the various settings in this file determine the range of user ids to be used along with password aging and other setting (e.g., umask). - -### How to display a user’s groups - -Users can be members of multiple groups for various reasons. Group membership gives a user access to group-owned files and directories, and sometimes this behavior is critical. To generate a list of the groups that some user belongs to, use the **groups** command. - -``` -$ groups jdoe -jdoe : jdoe adm admin cdrom sudo dip plugdev lpadmin staff sambashare -``` - -You can list your own groups by typing “groups” without an argument. - -### How to add users to groups - -If you want to add an existing user to another group, you can do that with a command like this: - -``` -$ sudo usermod -a -G devops jdoe -``` - -You can also add a user to multiple groups by specifying the groups in a comma-separated list: - -``` -$ sudo usermod -a -G devops,mgrs jdoe -``` - -The **-a** argument means “add” while **-G** lists the groups. - -You can remove a user from a group by editing the **/etc/group** file and removing the username from the list. The usermod command may also have an option for removing a member from a group. - -``` -fish:x:16:nemo,dory,shark - | - V -fish:x:16:nemo,dory -``` - -### Wrap-up - -Adding and managing user groups isn't particularly difficult, but consistency in how you configure accounts can make it easier in the long run. - -**[ Now see: [Must-know Linux Commands][3] ]** - -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/3409781/mastering-user-groups-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://images.idgesg.net/images/article/2019/07/carrots-100801917-large.jpg -[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua -[3]: https://www.networkworld.com/article/3391029/must-know-linux-commands.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md b/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md deleted file mode 100644 index 718bc8fca3..0000000000 --- a/sources/tech/20190717 Start tinkering with the Circuit Playground Express.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Start tinkering with the Circuit Playground Express) -[#]: via: (https://opensource.com/article/19/7/circuit-playground-express) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -Start tinkering with the Circuit Playground Express -====== -Learn what you can do with these tiny gadgets and a bit of Python code. -![Tools in a cloud][1] - -I've been a gadget person as long as I can remember, so I was delighted when I discovered an Adafruit [Circuit Playground Express][2] (CPX) in the swag bag I got at [PyConUS][3] in May. I became fascinated with these little devices last year, when Nina Zakharenko highlighted them in her All Things Open presentation, [Five Things You Didn't Know Python Could Do][4], with Python-powered earrings. - -After finding one in my PyCon bag, I set out to learn more about these mesmerizing little devices. First, I attended a "how-to" session at one of the Open Spaces meetups at PyCon. But learning always requires hands-on practice, and that's what I did when I got home. I connected the CPX device to my Linux laptop with a USB-to-MicroUSB cable. The unit mounts just like any standard USB drive, listed as CIRCUITPY. - -![Circuit Playground Express mounted as USB drive][5] - -The CPX works on MacOS, [Windows][6], and Linux (including [Chromebooks][7]). The device comes pre-loaded with code and some sound files. [Adafruit][8]'s extremely well-written documentation answered most of my questions. I discovered the unit can be programmed on Linux three different ways: [MakeCode][9], the [Arduino IDE][10], and the Python-based [CircuitPython][11], which I chose. - -Adafruit provides excellent documentation for [creating and editing CircuitPython code][12], which I found helpful. You can use a variety of editors (e.g., Emacs, Visual Studio Code, gedit), but Adafruit recommends the [Mu Python editor][13], which I [wrote about][14] last year. I [installed Mu][15] on my system with **pip3 install --user mu-editor**. Then I opened a terminal and entered **mu-editor**. It asked me how to run Mu, and I chose Adafruit Circuit Python. Then I was able to look at the code that powers the CPX. - -![Selecting CircuitPython mode to run Mu][16] - -To open a connection between Mu and the CPX connected to your computer, press the Serial button in Mu. Then you can see any serial data from the CPX and edit it using Python's REPL shell. - -Adafruit's programmers have written a library called **adafruit_circuitplayground.express** that enables CircuitPython to interact with the CPX board. To use it, add **import adafruit.circuitplayground.express** to your code. Or, to make it simpler, you can use the acronym **cpx**, shortening the code (as shown below) to **from adafruit_circuitplayground.express import cpx**. - -![Importing Adafruit's CPX library][17] - -The way you name your file is essential. The four options are code.txt, code.py, main.txt, and main.py. CircuitPython looks for the code files in that order and runs the first one it finds. Save the code to your CIRCUITPY drive each time you change it. - -The main.py code included with a new CPX offers an example of the device's capabilities. - -![CPX's default main.py][18] - -When you execute this code, the CPX displays beautiful, brightly colored LEDs whirling in a rainbow of colors. With my rudimentary knowledge, I could tweak a few settings, like increasing the brightness and turning on the TOUCH_PIANO capability, but other modifications were beyond my coding ability at this point. - -Eager to do more, I wanted to find code snippets I could use as building blocks to learn. First, I reached out to [Nina Zakharenko][19] on Twitter and asked for some help. She recommended I contact [Kattni Rembor][20], who pointed me to her GitHub repo and some [code examples][21] she wrote for the Chicago Linux User Group. - -Each of these simple building blocks left me more confident in my Python journey. In addition to making lights blink, the CPX can also function as a sensor, and I wanted to try that. Here is code for a simple light sensor: - -![CPX code for a blinking LED][22] - -And here is the CPX with the D13 LED blinking: - -![CPX with a blinking LED][23] - -I also discovered a way to create some fun for my grandson by making the CPX "come to life." I recorded a couple of .wav files with Audacity and saved them to the device. Then I wrote some simple code that utilized the A and B buttons on the device to make the CPX "talk" to him: - -![Code to play a sound when a button is pressed on CPX][24] - -I've really enjoyed tinkering with the code to explore the CPX's capabilities. I am always looking for ways to make Python code come alive for students I teach. The CPX is a great way to help new users learn and enjoy coding and digital making. Another excellent resource for new users is Mike Barela's book _[Getting Started with Adafruit Circuit Playground Express][25]_. I found its information and examples very helpful as I was learning. - -Get a [Circuit Playground Express][2] and start writing your own code. And then please share how you are using it in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/circuit-playground-express - -作者:[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/cloud_tools_hardware.png?itok=PGjJenqT (Tools in a cloud) -[2]: https://www.adafruit.com/product/3333 -[3]: https://us.pycon.org/2019/ -[4]: https://youtu.be/WlGkBqBRsik -[5]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_mounted.png (Circuit Playground Express mounted as USB drive) -[6]: https://learn.adafruit.com/adafruit-circuit-playground-express/adafruit2-windows-driver-installation -[7]: https://learn.adafruit.com/using-circuit-playground-express-makecode-circuitpython-on-a-chromebook/overview -[8]: https://learn.adafruit.com/adafruit-circuit-playground-express -[9]: https://makecode.adafruit.com/ -[10]: https://learn.adafruit.com/adafruit-circuit-playground-express/arduino -[11]: https://circuitpython.org/ -[12]: https://learn.adafruit.com/adafruit-circuit-playground-express/creating-and-editing-code -[13]: https://codewith.mu/en/ -[14]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners -[15]: https://codewith.mu/en/howto/1.0/install_with_python -[16]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_mu.png (Selecting CircuitPython mode to run Mu) -[17]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_import-cpx.png (Importing Adafruit's CPX library) -[18]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_main-py.png (CPX's default main.py) -[19]: https://twitter.com/nnja -[20]: https://learn.adafruit.com/users/kattni -[21]: https://github.com/kattni/ChiPy_2018 -[22]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_simpleblinkingled.png (CPX code for a blinking LED) -[23]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_d13blinking.jpg (CPX with a blinking LED) -[24]: https://opensource.com/sites/default/files/uploads/circuitplaygroundexpress_talking.png (Code to play a sound when a button is pressed on CPX) -[25]: https://www.adafruit.com/product/3944 diff --git a/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md b/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md deleted file mode 100644 index 4a16a41058..0000000000 --- a/sources/tech/20190718 How to apply -release early, release often- to build a better brand.md +++ /dev/null @@ -1,110 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to apply 'release early, release often' to build a better brand) -[#]: via: (https://opensource.com/article/19/7/build-better-brand) -[#]: author: (Alex Kimball https://opensource.com/users/alex-kimballhttps://opensource.com/users/marcobravo) - -How to apply 'release early, release often' to build a better brand -====== -Try this faster, more collaborative process to promote your project. -![][1] - -The importance of open source—and specifically the maxim "release early, release often" (RERO)—can hardly be overstated.  - -This approach born at the command line has impacted the world as organizations of every shape and size discover what open, collaborative processes can do. Look around. The evidence is everywhere: on our phones, in our cars, in schools and hospitals. - -If we still built software the way we used to, innovations across these and countless other areas may never have seen the light of day. - -The worlds of marketing and brand development are no different. In today's fast-moving tech industry, marketers and strategists are taking a page out of the dev team's playbook, applying more agile methods to creating brand messaging and visual identities. - -Why? For the same reasons cathedral-style development is no longer the best way to build apps: it's too isolated, too slow, and too disconnected from the reality of how the rest of the world works. - -Fans of the TV series _Mad Men_ will be familiar with how marketing used to be done, especially within an agency. Marketing messages—taglines, slogans, jingles, and the like—developed by creative powerhouses with a unique gift they (and only they) seemed to truly understand. - -A typical project would go something like this: - - * The client hires the agency. Much excitement as the journey sets off; after a very brief introductory meeting, the client sends along a few existing materials. - * The agency retreats to its creative confines to wait for divine inspiration to strike. - * Many weeks and months later, the agency returns with—_**eureka!**_—the answer! - - - -Why these antiquated processes don't work: - - * They allow little room for the voice of the customer. - * They allow little room for the voice of those within the company who know it best and care about it most. - * They hold precious the final product until the very end, increasing the likelihood that bugs in the creative code will survive until it's too late. All destination. No journey. - - - -That's not how today's most agile, most innovative companies build their software. It shouldn't be how they build their brands. - -### 3 simple steps to begin your RERO journey - -Applying RERO to your brand projects is simple. Start with these three steps: - -#### 1\. Set clear expectations - -As the well-known African proverb cautions: "If you want to go fast, go alone; if you want to go far, go together." When it comes to projects guided by RERO principles, setting clear expectations early can be the key to going farther, faster. - -At any project's outset, gather your working team, partners, clients, or anyone else expected to contribute, and make sure everyone is prepared to adopt an agile mindset. Progress will be measured in speedy steps, not big leaps. In a room packed with perfectionists, some will likely bristle at this new approach—don't worry. - -Don't forget the logistics, either. Share the project schedule, clearly outlining the milestones where all are expected to participate, as well as windows of working time where individual progress should be made. - -#### 2\. Share silly first drafts - -Ideas, especially rough ones, should be welcomed with open arms. We call these early explorations Silly First Drafts. The SFD is a crucial piece of our creative puzzle. Naming it makes it less scary. An open invitation to share with the team even the smallest seed of an idea without fear of ridicule or rejection. - -Easier said than done, for sure. As a writer, I struggle to take this advice more than I'd care to admit. Putting something you've created out there before it's ready for primetime feels like a mortal sin. Not so in the RERO world. The goal of the SFD is to create more, more quickly — and get what you create in front of users and customers who can help you make it even better. To dive in, get messy and create in the open for more eyes to see and help improve. - -Some content creators will bristle at this approach initially. Encourage them to embrace this discomfort with a more curious, growth-oriented mindset. Apply what the improv world calls a "Yes, and…" mindset, which emphasizes additive contributions not subtractive naysaying. - -Emphasize the journey _and_ the destination. Not a simple binary of success or failure, but rather an opportunity for continuous development. At the project level, this approach helps combat progress-killing factors like the dreaded "paralysis by analysis." How much time have we all lost to hand-wringing indecision and over-thinking? - -Gather input on anything you've created—whether lines of code or lines of copy—and your final product will thank you. Just make sure these "fresh eyes" know what to look for. Equip your team to understand how they can be most helpful. Highlight specific areas where feedback is most needed (and by contrast, where things are feeling pretty good). - -#### 3\. Embrace technology - -This last step is probably the easiest but worth mentioning, as it's overlooked more often than you might expect. Collaboration software has made life a lot easier for all of us lately and can be a crucial strategy to implement a RERO approach for your next project effectively. - -##### Team communication - -Today's crop of online messaging platforms is well-suited to match the pace of a RERO-guided process. Provide all project contributors—especially those who work remotely—with a single, always-available venue for productive discussions. For our money, the best open source option of the bunch is [Mattermost][2]. It does just about everything Slack can do—file sharing, real-time chat, robust integrations—while also letting you access the source code. - -Set a few parameters for the team around best practices to keep the channel positive and productive. Without at least a few rules in place, channels and threads can quickly become side-tracked and GIF-overloaded. Describe the purpose of each channel when it's created so that everyone knows why it exists and what you're there to do. - -##### Content creation - -For content-related tasks that require word processing, spreadsheets, and presentations, open source alternatives to the Microsoft Office suite of products have been available for decades—chief among them was the now-defunct OpenOffice. Since its final release in 2011, a handful of other providers have picked up the torch. - -LibreOffice is a good option, but by the development team's own admission, it may not be the best choice for enterprise deployments. For business-critical applications, check out [Collabora Online][3]. This hosted solution offers a full suite of office applications with powerful team tools for live collaborative editing, support for all major file formats, and data security protections. - -With project files accessible to anyone with a modern browser, you won't have to worry about "I can't open it" issues that arise when your PC-loving executive goes to review work from the Mac-loving design team. And when revision histories are updated automatically, it's easy to revisit previous drafts and chronicle the journey you've taken. - -Just be sure to set some ground rules as all your cooks enter the content kitchen at once. Allow one content creator to retain editing permissions while granting other team members comment-only or view-only permissions. This helps keep revisions to the core piece of content firmly within the realm of the person who created it and helps ensure all reviewers are reacting to the same version. - -### How the future of business is built - -Release early, release often is more relevant to our world than ever. This faster, more collaborative process is the way businesses of all kinds must create their futures. - -Follow the steps outlined above, and you and your team will be well on your way to applying the principles of agile development, rapid iteration, and continuous innovation to your next brand development project. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/build-better-brand - -作者:[Alex Kimball][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/alex-kimballhttps://opensource.com/users/marcobravo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/branding_opensource_intersection.png?itok=4lf-f5NB -[2]: https://mattermost.com/ -[3]: https://www.collaboraoffice.com/code/ diff --git a/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md b/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md deleted file mode 100644 index 75c6dd9afe..0000000000 --- a/sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Redirect a GitHub Pages site with this HTTP hack) -[#]: via: (https://opensource.com/article/19/7/permanently-redirect-github-pages) -[#]: author: (Oleksii Tsvietnov https://opensource.com/users/oleksii-tsvietnov) - -Redirect a GitHub Pages site with this HTTP hack -====== -Learn how to configure two repositories to serve as static websites with -custom domain names. -![computer servers processing data][1] - -I run a few static websites for my private projects on [GitHub Pages][2]. I'm absolutely happy with the service, as it supports custom domains, automatically redirects to HTTPS, and transparently installs SSL certificates (with automatic issuing via [Let's Encrypt][3]). It is very fast (thanks to [Fastly's][4] content delivery network) and is extremely reliable (I haven't had any issues for years). Taking into account the fact that I get all of this for free, it perfectly matches my needs at the moment. - -It has, however, one important limitation: because it serves static websites only, this means no query parameters, no dynamic content generated on the server side, no options for injecting any server-side configuration (e.g., .htaccess), and the only things I can push to the website's root directory are static assets (e.g., HTML, CSS, JS, JPEG, etc.). In general, this is not a big issue. There are a lot of open source [static site generators][5] available, such as [Jekyll][6], which is available by default from the dashboard, and [Pelican][7], which I prefer in most cases. Nevertheless, when you need to implement something that is traditionally solved on the server side, a whole new level of challenge begins.  - -For example, I recently had to change a custom domain name for one of my websites. Keeping the old one was ridiculously expensive, and I wasn't willing to continue wasting money. I found a cheaper alternative and immediately faced a bigger problem: all the search engines have the old name in their indexes. Updating indexes takes time, and until that happens, I would have to redirect all requests to the new location. Ideally, I would redirect each indexed resource to the equivalent on the new site, but at minimum, I needed to redirect requests to the new start page. I had access to the old domain name for enough time, and therefore, I could run the site separately on both domain names at the same time. - -There is one proper solution to this situation that should be used whenever possible: Permanent redirect, or the [301 Moved Permanently][8] status code, is the way to redirect pages implemented in the HTTP protocol. The only issue is that it's supposed to happen on the server side within a server response's HTTP header. But the only solution I could implement resides on a client side; that is, either HTML code or JavaScript. I didn't consider the JS variant because I didn't want to rely on the script's support in web browsers. Once I defined the task, I recalled a solution: the [**HTML <meta> tag**][9] **<meta http-equiv>** with the [**refresh**][10] [HTTP header][11]. Although it can be used to ask browsers to reload a page or jump to another URL after a specified number of seconds, after some research, I learned it is more complicated than I thought with some interesting facts and details. - -### The solution - -**TL;DR** (for anyone who isn't interested in all the details): In brief, this solution configures two repositories to serve as static websites with custom domain names. - -On the site with the old domain, I reconstructed the website's entire directory structure and put the following index.html (including the root) in each of them:  - - -``` -<!DOCTYPE HTML>                                                                 -<html lang="en">                                                                 -    <head>                                                                       -        <meta charset="utf-8"> -        <meta http-equiv="refresh" content="0;url={{THE_NEW_URL}}" />       -        <link rel="canonical" href="{{THE_NEW_URL}}" />                     -    </head>                                                                                                                                                                   -    <body>                                                                       -        <h1>                                                                     -            The page been moved to <a href="{{THE_NEW_URL}}">{{THE_NEW_URL}}</a> -        </h1>                                                                   -    </body>                                                                     -</html> -``` - -When someone opens a resource on the old domain, most web browsers promptly redirect to the same resource on the new website (thanks to **http-equiv="refresh"**). For any resources that were missed or nonexistent, it's helpful to create a **404.html** file in the old website's root directory with similar content, but without **rel="canonical"** (because there is no a canonical page, in this case). - -The last piece of the puzzle is the [canonical link relation][12] (**rel="canonical"**), which prevents duplicating content as long as the implemented redirect _is not permanent._ From the HTTP response's perspective, it happens when [the request has succeeded][13] and there is an indication for search engines that a resource has moved and should be associated with a new (preferred) location. - -I have learned a few interesting facts related to **http-equiv="refresh"** and **rel="canonical"**. The HTML metatag **http-equiv** is used to simulate the presence of an HTTP header in a server response. That is, web developers without access to the web server's configuration can get a similar result by "injecting" HTTP headers from an HTML document (the "body" of an HTTP response). It seems the **refresh** header, which has been used by all popular web browsers for many years, _doesn't really exist_. At least not as a standardized HTTP header. There was a plan to add it in the HTTP/1.1 specification that was [deferred to HTTP/1.2][14] (or later), but it never happened. - -### Summary - -The task of finding the real source URL for a resource is far from trivial. There are different scheme names (HTTP, HTTPS), multiple query parameters (page.html, page.html?a=1), various hostnames that resolve to the same IP address, etc. All of these options make a webpage look different to search engines, but the page is still the same. It gets even worse when the same content is published on independent web services. In 2009, Google, Yahoo, and Microsoft announced [support for a canonical link element][15] to clean up duplicate URLs on sites by allowing webmasters to choose a canonical (preferred) URL for a group of possible URLs for the same page. This helps search engines pick up the correct URL to associate with the content and can also improve [SEO for a site][16]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/permanently-redirect-github-pages - -作者:[Oleksii Tsvietnov][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/oleksii-tsvietnov -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/server_data_system_admin.png?itok=q6HCfNQ8 (computer servers processing data) -[2]: https://pages.github.com/ -[3]: https://letsencrypt.org/ -[4]: https://www.fastly.com/ -[5]: https://www.staticgen.com/ -[6]: https://jekyllrb.com/ -[7]: https://github.com/getpelican/pelican -[8]: https://tools.ietf.org/html/rfc2616#section-10.3.2 -[9]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta -[10]: http://www.otsukare.info/2015/03/26/refresh-http-header -[11]: https://tools.ietf.org/html/rfc2616#section-14 -[12]: https://tools.ietf.org/html/rfc6596 -[13]: https://tools.ietf.org/html/rfc2616#section-10.2.1 -[14]: https://lists.w3.org/Archives/Public/ietf-http-wg-old/1996MayAug/0594.html -[15]: https://www.mattcutts.com/blog/canonical-link-tag/ -[16]: https://yoast.com/rel-canonical/ diff --git a/sources/tech/20190718 What you need to know to be a sysadmin.md b/sources/tech/20190718 What you need to know to be a sysadmin.md deleted file mode 100644 index bd482f3ca4..0000000000 --- a/sources/tech/20190718 What you need to know to be a sysadmin.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (WangYueScream ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What you need to know to be a sysadmin) -[#]: via: (https://opensource.com/article/19/7/be-a-sysadmin) -[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/kimvila) - -What you need to know to be a sysadmin -====== -Kickstart your sysadmin career by gaining these minimum competencies. -![People work on a computer server with devices][1] - -The system administrator of yesteryear jockeyed users and wrangled servers all day, in between mornings and evenings spent running hundreds of meters of hundreds of cables. This is still true today, with the added complexity of cloud computing, containers, and virtual machines. - -Looking in from the outside, it can be difficult to pinpoint what exactly a sysadmin does, because they play at least a small role in so many places. Nobody goes into a career already knowing everything they need for a job, but everyone needs a strong foundation. If you're looking to start down the path of system administration, here's what you should be concentrating on in your personal or formal training. - -### Bash - -When you learn the Bash shell, you don't just learn the Bash shell. You learn a common interface to Linux systems, BSD, MacOS, and even Windows (under the right conditions). You learn the importance of syntax, so you can quickly adapt to systems like Cisco routers' command line or Microsoft's PowerShell, and eventually, you can even learn more powerful languages like Python or Go. And you also begin to think procedurally so you can analyze complex problems and break them down into individual components, which is key because _that's_ how systems, like the internet, or an organization's intranet, or a web server, or a backup solution, are designed. - -But wait. There's more. - -Knowing the Bash shell has become particularly important because of the recent trend toward DevOps and [containers][2]. Your career as a sysadmin may lead you into a world where infrastructure is treated like code, which usually means you'll have to know the basics of scripting, the structure of [YAML-based][3] configuration, and how to [interact][4] with [containers][5] (tiny Linux systems running inside a [sandboxed file][6]). Knowing Bash is the gateway to efficient management of the most exciting open source technology, so go get [Bourne Again][7]. - -#### Resources - -There are many ways to get practice in the Bash shell. - -Try a [portable Linux distribution][8]. You don't have to install Linux to use Linux, so grab a spare thumb drive and spend your evenings or weekends getting comfortable with a text-based interface. - -There are several excellent [Bash articles][9] available here on opensource.com as well as [on Enable SysAdmin][10]. - -The problem with telling someone to practice with Bash is that to practice, you must have something to do. And until you know how to use Bash, you probably won't be able to think of anything to do. If that's your situation, go to Over The Wire and play [Bandit][11]. It's a game aimed at absolute beginners, with 34 levels of interactive basic hacking to get you comfortable with the Linux shell. - -### Web server setup - -Once you're comfortable with Bash, you should try setting up a web server. Not all sysadmins go around setting up web servers or even maintain web servers, but the skills you acquire while installing and starting the HTTP daemon, configuring Apache or Nginx, setting up the [correct permissions][12], and [configuring a firewall][13], are the same skills you need on a daily basis. After a little bit of effort, you may start to notice certain patterns in your labor. There are concepts you probably took for granted before trying to administer production-ready software and hardware, and you're no longer shielded from them in your fledgling role as an administrator. It might be frustrating at first because everyone likes to be good at everything they do, but that's actually a good thing. Let yourself be bad at new skills. That's how you learn. - -And besides, the more you struggle through your first steps, the sweeter it is when you finally see that triumphant "it works!" default index.html. - -#### Resources - -David Both wrote an excellent article on [Apache web server][14] configuration. For extra credit, step through his follow-up article on how to [host multiple sites][15] on one machine. - -### DHCP - -The Dynamic Host Configuration Protocol (DHCP) is the system that assigns IP addresses to devices on a network. At home, the modem or router your ISP (internet service provider) supports probably has an embedded DHCP server in it, so it's likely out of your purview. If you've ever logged into your home router to adjust the IP address range or set up a static address for some of your network devices, then you're at least somewhat familiar with the concept. You may understand that devices on a network are assigned the equivalent of phone numbers in the form of IP addresses, and you may realize that computers communicate with one another by broadcasting messages addressed to a specific IP address. Message headers are read by routers along the path, each of which works to direct the message to the next most logical router along the path toward its ultimate goal. - -Even if you understand these concepts, the inevitable escalation of basic familiarity with DHCP is to set up a DHCP server. Installing and configuring your own DHCP server provides you the opportunity to introduce DHCP collisions on your home network (try to avoid that, if you can, as it will definitely kill your network until it's resolved), control the distribution of addresses, create subnets, and monitor connections and lease times. - -More importantly, setting up DHCP and experimenting with different configurations helps you understand inter-networking. You understand how networks represent "partitions" in data transference and what steps you have to take to pass information from one to the other. That's vital for a sysadmin to know because the network is easily one of the most important aspects of the job. - -#### Resources - -Before running your own DHCP server, ensure that the DHCP server in your home router (if you have one) is inactive. Once you have it up and running, read Archit Modi's [guide to network commands][16] for tips on how to explore your network. - -### Network cables - -It might sound mundane, but getting familiar with how network cables work not only makes for a really fun weekend but also gives you a whole new understanding of how data gets across the wires. The best way to learn is to go to your local hobby shop and purchase a Cat 5 cutter and crimper and a few Cat 5 terminators. Then head home, grab a spare Ethernet cable, and cut the terminators off. Spend whatever amount of time it takes to get that cable back in commission. - -Once you have solved that puzzle, do it again, this time creating a working [crossover cable][17]. - -You should also start obsessing _now_ about cable management. If you're not naturally inclined to run cables neatly along the floor molding or the edges of a desk or to bind cables together to keep them orderly, then make it a goal to permanently condition yourself with a phobia of messy cables. You won't understand why this is necessary at first, but the first time you walk into a server room, you will immediately know. - -### Ansible - -[Ansible][18] is configuration management software, and it's a bit of a bridge between sysadmin and DevOps. Sysadmins use Ansible to configure fresh installs of an operating system and to maintain specific states on machines. DevOps uses Ansible to reduce time and effort spent on tooling so that more time and effort gets spent on developing. You should learn Ansible as part of your sysadmin training, with an eye toward the practices of DevOps, because most of what DevOps is pioneering now will end up as part of your workflow in the system administration of the future. - -The good thing about Ansible is that you can start using it now. It's cross-platform, and it scales both up and down. Ansible may be overkill for a single-user computer, but then again, Ansible could change the way you spin up virtual machines, or it could help you synchronize the states of all the computers in your home or [home lab][19]. - -#### Resources - -Read "[How to manage your workstation configuration with Ansible][20]" by Jay LaCroix for the quintessential introduction to get started with Ansible on a casual basis. - -### Break stuff - -Problems arise on computers because of user error, buggy software, administrator (that's you!) error, and any number of other factors. There's no way to predict what's going to fail or why, so part of your personal sysadmin training regime should be to poke at the systems you set up until they fail. The worse you are to your own lab infrastructure, the more likely you are to find weak points. And the more often you repair those weak spots, the more confident you become in your problem-solving skills. - -Aside from the rigors of setting up all the usual software and hardware, your primary job as a sysadmin is to find solutions. There will be times when you encounter a problem outside your job description, and it may not even be possible for you to fix it, but it'll be up to you to find a workaround. - -The more you break stuff now and work to fix it, the better prepared you will be to work as a sysadmin. - -* * * - -Are you a working sysadmin? Are there tasks you wish you'd prepared better for? Add them in the comments below! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/be-a-sysadmin - -作者:[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/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/kimvila -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) -[2]: https://opensource.com/article/19/6/kubernetes-dump-truck -[3]: https://www.redhat.com/sysadmin/yaml-tips -[4]: https://opensource.com/article/19/6/how-ssh-running-container -[5]: https://opensource.com/resources/what-are-linux-containers -[6]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[7]: https://opensource.com/article/18/7/admin-guide-bash -[8]: https://opensource.com/article/19/6/linux-distros-to-try -[9]: https://opensource.com/tags/bash -[10]: https://www.redhat.com/sysadmin/managing-files-linux-terminal -[11]: http://overthewire.org/wargames/bandit -[12]: https://opensource.com/article/19/6/understanding-linux-permissions -[13]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd -[14]: https://opensource.com/article/18/2/how-configure-apache-web-server -[15]: https://opensource.com/article/18/3/configuring-multiple-web-sites-apache -[16]: https://opensource.com/article/18/7/sysadmin-guide-networking-commands -[17]: https://en.wikipedia.org/wiki/Ethernet_crossover_cable -[18]: https://opensource.com/sitewide-search?search_api_views_fulltext=ansible -[19]: https://opensource.com/article/19/6/create-centos-homelab-hour -[20]: https://opensource.com/article/18/3/manage-workstation-ansible diff --git a/sources/tech/20190719 Buying a Linux-ready laptop.md b/sources/tech/20190719 Buying a Linux-ready laptop.md deleted file mode 100644 index f63f9276e4..0000000000 --- a/sources/tech/20190719 Buying a Linux-ready laptop.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Buying a Linux-ready laptop) -[#]: via: (https://opensource.com/article/19/7/linux-laptop) -[#]: author: (Ricardo Berlasso https://opensource.com/users/rgb-eshttps://opensource.com/users/greg-phttps://opensource.com/users/chrisodhttps://opensource.com/users/victorhckhttps://opensource.com/users/hankghttps://opensource.com/users/noplanman) - -Buying a Linux-ready laptop -====== -Tuxedo makes it easy to buy an out-of-the-box "penguin-ready" laptop. -![Penguin with green background][1] - -Recently, I bought and started using a Tuxedo Book BC1507, a Linux laptop computer. Ten years ago, if someone had told me that, by the end of the decade, I could buy top-quality, "penguin-ready" laptops from companies such as [System76][2], [Slimbook][3], and [Tuxedo][4], I probably would have laughed. Well, now I'm laughing, but with joy! - -Going beyond designing computers for free/libre open source software (FLOSS), all three companies recently [announced][5] they are trying to eliminate proprietary BIOS software by switching to [Coreboot][6]. - -### Buying it - -Tuxedo Computers is a German company that builds Linux-ready laptops. In fact, if you want a different operating system, it costs more. - -Buying the computer was incredibly easy. Tuxedo offers many payment methods: not only credit cards but also PayPal and even bank transfers. Just fill out the bank transfer form on Tuxedo's web page, and the company will send you the bank coordinates. - -Tuxedo builds every computer on demand, and picking exactly what you want is as easy as selecting the basic model and exploring the drop-down menus to select different components. There is a lot of information on the page to guide you in the purchase. - -If you pick a different Linux distribution from the recommended one, Tuxedo does a "net install," so have a network cable ready to finish the installation, or you can burn your preferred image onto a USB key. I used a DVD with the openSUSE Leap 15.1 installer through an external DVD reader instead, but you get the idea. - -The model I chose accepts up to two disks: one SSD and the other either an SSD or a conventional hard drive. As I was already over budget, I decided to pick a conventional 1TB disk and increase the RAM to 16GB. The processor is an 8th Generation i5 with four cores. I selected a back-lit Spanish keyboard, a 1920×1080/96dpi screen, and an SD card reader—all in all, a great system. - -If you're fine with the default English or German keyboard, you can even ask for a penguin icon on the Meta key! I needed a Spanish keyboard, which doesn't offer this option. - -### Receiving and using it - -The perfectly packaged computer arrived in total safety to my door just six working days after the payment was registered. After unpacking the computer and unlocking the battery, I was ready to roll. - -![Tuxedo Book BC1507][7] - -The new toy on top of my (physical) desktop. - -The computer's design is really nice and feels solid. Even though the chassis on this model is not aluminum, it stays cool. The fan is really quiet, and the airflow goes to the back edge, not to the sides, as in many other laptops. The battery provides several hours of autonomy from an electrical outlet. An option in the BIOS called FlexiCharger stops charging the battery after it reaches a certain percentage, so you don't need to remove the battery when you work for a long time while plugged in. - -The keyboard is really comfortable and surprisingly quiet. Even the touchpad keys are quiet! Also, you can easily adjust the light intensity on the back-lit keyboard. - -Finally, it's easy to access every component in the laptop so the computer can be updated or repaired without problems. Tuxedo even sends spare screws! - -### Conclusion - -After a month of heavy use, I'm really happy with the system. I got exactly what I asked for, and everything works perfectly. - -Because they are usually high-end systems, Linux-included computers tend to be on the expensive side of the spectrum. If you compare the price of a Tuxedo or Slimbook computer with something with similar specifications from a more established brand, the prices are not that different. If you are after a powerful system to use with free software, don't hesitate to support these companies: What they offer is worth the price. - -Let's us know in the comments about your experience with Tuxedo and other "penguin-friendly" companies. - -* * * - -_This article is based on "[My new 'penguin ready' laptop: Tuxedo-Book-BC1507][8]," published on Ricardo's blog, [From Mind to Type][9]._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/linux-laptop - -作者:[Ricardo Berlasso][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/rgb-eshttps://opensource.com/users/greg-phttps://opensource.com/users/chrisodhttps://opensource.com/users/victorhckhttps://opensource.com/users/hankghttps://opensource.com/users/noplanman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_penguin_green.png?itok=ENdVzW22 (Penguin with green background) -[2]: https://system76.com/ -[3]: https://slimbook.es/en/ -[4]: https://www.tuxedocomputers.com/ -[5]: https://www.tuxedocomputers.com/en/Infos/News/Tuxedo-Computers-stands-for-Free-Software-and-Security-.tuxedo -[6]: https://coreboot.org/ -[7]: https://opensource.com/sites/default/files/uploads/tuxedo-600_0.jpg (Tuxedo Book BC1507) -[8]: https://frommindtotype.wordpress.com/2019/06/17/my-new-penguin-ready-laptop-tuxedo-book-bc1507/ -[9]: https://frommindtotype.wordpress.com/ diff --git a/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md b/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md deleted file mode 100644 index 10d779fe6b..0000000000 --- a/sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md +++ /dev/null @@ -1,375 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Modifying Windows local accounts with Fedora and chntpw) -[#]: via: (https://fedoramagazine.org/modifying-windows-local-accounts-with-fedora-and-chntpw/) -[#]: author: (Shaun Assam https://fedoramagazine.org/author/sassam/) - -Modifying Windows local accounts with Fedora and chntpw -====== - -![][1] - -I recently encountered a problem at work where a client’s Windows 10 PC lost trust to the domain. The user is an executive and the hindrance of his computer can affect real-time mission-critical tasks. He gave me 30 minutes to resolve the issue while he attended a meeting. - -Needless to say, I’ve encountered this issue many times in my career. It’s an easy fix using the Windows 7/8/10 installation media to reset the Administrator password, remove the PC off the domain and rejoin it. Unfortunately it didn’t work this time. After 20 minutes of scouring the net and scanning through the Microsoft Docs with no success, I turned to my development machine running Fedora with hopes of finding a solution. - -With _dnf search_ I found a utility called **chntpw**: - -``` -$ dnf search windows | grep password -``` - -According to the summary, _chntpw_ will “change passwords in Windows SAM files.” - -Little did I know at the time there was more to this utility than explained in the summary. Hence, this article will go through the steps I used to successfully reset a Windows local user password using _chntpw_ and a Fedora Workstation Live boot USB. The article will also cover some of the features of _chntpw_ used for basic user administration. - -### Installation and setup - -If the PC can connect to the internet after booting the live media, install _chntpw_ from the official Fedora repository with: - -``` -$ sudo dnf install chntpw -``` - -If you’re unable to access the internet, no sweat! Fedora Workstation Live boot media has all the dependencies installed out-of-the-box, so all we need is the package. You can find the builds for your Fedora version from the [Fedora Project’s Koji][2] site. You can use another computer to download the utility and use a USB thumb drive, or other form of media to copy the package. - -First and foremost we need to create the Fedora Live USB stick. If you need instructions, the article on [How to make a Fedora USB stick][3] is a great reference. - -Once the key is created shut-down the Windows PC, insert the thumb drive if the USB key was created on another computer, and turn on the PC — be sure to boot from the USB drive. Once the live media boots, select “Try Fedora” and open the Terminal application. - -Also, we need to mount the Windows drive to access the files. Enter the following command to view all drive partitions with an NTFS filesystem: - -``` -$ sudo blkid | grep ntfs -``` - -Most hard drives are assigned to _/dev/sdaX_ where X is the partition number — virtual drives may be assigned to _/dev/vdX_, and some newer drives (like SSDs) use _/dev/nvmeX_. For this example the Windows C drive is assigned to _/dev/sda2_. To mount the drive enter: - -``` -$ sudo mount /dev/sda2 /mnt -``` - -Fedora Workstation contains the _ntfs-3g_ and _ntfsprogs_ packages out-of-the-box. If you’re using a spin that does not have NTFS working out of the box, you can install these two packages from the official Fedora repository with: - -``` -$ sudo dnf install ntfs-3g ntfsprogs -``` - -Once the drive is mounted, navigate to the location of the SAM file and verify that it’s there: - -``` -$ cd /mnt/Windows/System32/config -$ ls | grep SAM - SAM - SAM.LOG1 - SAM.LOG2 -``` - -### Clearing or resetting a password - -Now it’s time to get to work. The help flag **-h** provides everything we need to know about this utility and how to use it: - -``` -$ chntpw -h -chntpw: change password of a user in a Windows SAM file, -or invoke registry editor. Should handle both 32 and 64 bit windows and -all version from NT3.x to Win8.1 -chntpw [OPTIONS] [systemfile] [securityfile] [otherreghive] […] - -h This message - -u Username or RID (0x3e9 for example) to interactively edit - -l list all users in SAM file and exit - -i Interactive Menu system - -e Registry editor. Now with full write support! - -d Enter buffer debugger instead (hex editor), - -v Be a little more verbose (for debuging) - -L For scripts, write names of changed files to /tmp/changed - -N No allocation mode. Only same length overwrites possible (very safe mode) - -E No expand mode, do not expand hive file (safe mode) - -Usernames can be given as name or RID (in hex with 0x first) -See readme file on how to get to the registry files, and what they are. - Source/binary freely distributable under GPL v2 license. See README for details. - NOTE: This program is somewhat hackish! You are on your own! -``` - -Use the **-l** parameter to display a list of users it reads from the SAM file: - -``` -$ sudo chntpw -l SAM -chntpw version 1.00 140201, (c) Petter N Hagen -Hive name (from header): <\SystemRoot\System32\Config\SAM> -ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c -File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) -Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. - -| RID -|---------- Username ------------| Admin? |- Lock? --| -| 01f4 | Administrator | ADMIN | dis/lock | -| 01f7 | DefaultAccount | | dis/lock | -| 03e8 | defaultuser0 | | dis/lock | -| 01f5 | Guest | | dis/lock | -| 03ea | sysadm | ADMIN | | -| 01f8 | WDAGUtilityAccount | | dis/lock | -| 03e9 | WinUser | | | -``` - -Now that we have a list of Windows users we can edit the account. Use the **-u** parameter followed by the username and the name of the SAM file. For this example, edit the _sysadm_ account: - -``` -$ sudo chntpw -u sysadm SAM -chntpw version 1.00 140201, (c) Petter N Hagen -Hive name (from header): <\SystemRoot\System32\Config\SAM> -ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c -File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) -Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. - -================= USER EDIT ==================== - -RID : 1002 [03ea] -Username: sysadm -fullname: SysADM -comment : -homedir : - -00000220 = Administrators (which has 2 members) - -Account bits: 0x0010 = -[ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | -[ ] Temp. duplicate | [X] Normal account | [ ] NMS account | -[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | -[ ] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | -[ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) | - -Failed login count: 0, while max tries is: 0 -Total login count: 0 - -- - - User Edit Menu: -1 - Clear (blank) user password -(2 - Unlock and enable user account) [seems unlocked already] -3 - Promote user (make user an administrator) -4 - Add user to a group -5 - Remove user from a group -q - Quit editing user, back to user select -Select: [q] > -``` - -To clear the password press **1** and ENTER. If successful you will see the following message: - -``` -... -Select: [q] > 1 -Password cleared! -================= USER EDIT ==================== - -RID : 1002 [03ea] -Username: sysadm -fullname: SysADM -comment : -homedir : - -00000220 = Administrators (which has 2 members) - -Account bits: 0x0010 = -[ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | -[ ] Temp. duplicate | [X] Normal account | [ ] NMS account | -[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | -[ ] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | -[ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) | - -Failed login count: 0, while max tries is: 0 -Total login count: 0 -** No NT MD4 hash found. This user probably has a BLANK password! -** No LANMAN hash found either. Try login with no password! -... -``` - -Verify the change by repeating: - -``` -$ sudo chntpw -l SAM -chntpw version 1.00 140201, (c) Petter N Hagen -Hive name (from header): <\SystemRoot\System32\Config\SAM> -ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c -File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) -Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. - -| RID -|---------- Username ------------| Admin? |- Lock? --| -| 01f4 | Administrator | ADMIN | dis/lock | -| 01f7 | DefaultAccount | | dis/lock | -| 03e8 | defaultuser0 | | dis/lock | -| 01f5 | Guest | | dis/lock | -| 03ea | sysadm | ADMIN | *BLANK* | -| 01f8 | WDAGUtilityAccount | | dis/lock | -| 03e9 | WinUser | | | - -... -``` - -The “Lock?” column now shows _BLANK_ for the sysadm user. Type **q** to exit and **y** to write the changes to the SAM file. Reboot the machine into Windows and login using the account (in this case _sysadm_) without a password. - -### Features - -Furthermore, _chntpw_ can perform basic Windows user administrative tasks. It has the ability to promote the user to the administrators group, unlock accounts, view and modify group memberships, and edit the registry. - -#### The interactive menu - -_chntpw_ has an easy-to-use interactive menu to guide you through the process. Use the **-i** parameter to launch the interactive menu: - -``` -$ chntpw -i SAM -chntpw version 1.00 140201, (c) Petter N Hagen -Hive name (from header): <\SystemRoot\System32\Config\SAM> -ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c -File size 65536 [10000] bytes, containing 7 pages (+ 1 headerpage) -Used for data: 346/37816 blocks/bytes, unused: 23/7016 blocks/bytes. - -<>========<> chntpw Main Interactive Menu <>========<> -Loaded hives: - 1 - Edit user data and passwords - 2 - List groups - - - - - 9 - Registry editor, now with full write support! - q - Quit (you will be asked if there is something to save) -``` - -#### Groups and account membership - -To display a list of groups and view its members, select option **2** from the interactive menu: - -``` -... -What to do? [1] -> 2 -Also list group members? [n] y -=== Group # 220 : Administrators - 0 | 01f4 | Administrator | - 1 | 03ea | sysadm | -=== Group # 221 : Users - 0 | 0004 | NT AUTHORITY\INTERACTIVE | - 1 | 000b | NT AUTHORITY\Authenticated Users | - 2 | 03e8 | defaultuser0 | - 3 | 03e9 | WinUser | -=== Group # 222 : Guests - 0 | 01f5 | Guest | -=== Group # 223 : Power Users -... -=== Group # 247 : Device Owners -``` - -#### Adding the user to the administrators group - -To elevate the user with administrative privileges press **1** to edit the account, then **3** to promote the user: - -``` -... -Select: [q] > 3 - -=== PROMOTE USER -Will add the user to the administrator group (0x220) -and to the users group (0x221). That should usually be -what is needed to log in and get administrator rights. -Also, remove the user from the guest group (0x222), since -it may forbid logins. - -(To add or remove user from other groups, please other menu selections) - -Note: You may get some errors if the user is already member of some -of these groups, but that is no problem. - -Do it? (y/n) [n] : y - -Adding to 0x220 (Administrators) … -sam_put_user_grpids: success exit -Adding to 0x221 (Users) … -sam_put_user_grpids: success exit -Removing from 0x222 (Guests) … -remove_user_from_grp: NOTE: group not in users list of groups, may mean user not member at all. Safe. Continuing. -remove_user_from_grp: NOTE: user not in groups list of users, may mean user was not member at all. Does not matter, continuing. -sam_put_user_grpids: success exit - -Promotion DONE! -``` - -#### Editing the Windows registry - -Certainly the most noteworthy, as well as the most powerful, feature of chntpw is the ability to edit the registry and write to it. Select **9** from the interactive menu: - -``` -... -What to do? [1] -> 9 -Simple registry editor. ? for help. - -> ? - Simple registry editor: - hive [] - list loaded hives or switch to hive number - cd - change current key - ls | dir [] - show subkeys & values, - cat | type - show key value - dpi - show decoded DigitalProductId value - hex - hexdump of value data - ck [] - Show keys class data, if it has any - nk - add key - dk - delete key (must be empty) - ed - Edit value - nv - Add value - dv - Delete value - delallv - Delete all values in current key - rdel - Recursively delete key & subkeys - ek - export key to (Windows .reg file format) - debug - enter buffer hexeditor - st [] - debug function: show struct info - q - quit -``` - -#### Finding help - -As we saw earlier, the **-h** parameter allows us to quickly access a reference guide to the options available with chntpw. The man page contains detailed information and can be accessed with: - -``` -$ man chntpw -``` - -Also, if you’re interested in a more hands-on approach, spin up a virtual machine. [Windows Server 2019][4] has an evaluation period of 180 days, and [Windows Hyper-V Server 2019][5] is unlimited. Creating a Windows guest VM will provide the basics to modify the Administrator account for testing and learning. For help with quickly creating a guest VM refer to the article [Getting started with virtualization in Gnome Boxes][6]. - -### Conclusion - -_chntpw_ is a hidden gem for Linux administrators and IT professionals alike. While a nifty tool to quickly reset Windows account passwords, it can also be used to troubleshoot and modify local Windows accounts with a no-nonsense feel that delivers. This is perhaps only one such tool for solving the problem, though. If you’ve experienced this issue and have an alternative solution, feel free to put it in the comments below. - -This tool, like many other “hacking” tools, holds with it an ethical responsibility. Even chntpw states: - -> NOTE: This program is somewhat hackish! You are on your own! - -When using such programs, we should remember the three edicts outlined in the message displayed when running **sudo** for the first time: - - 1. Respect the privacy of others. - 2. Think before you type. - 3. With great power comes great responsibility. - - - -* * * - -_Photo by _[_Silas Köhler_][7]_ on _[_Unsplash_][8]_,_ - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/modifying-windows-local-accounts-with-fedora-and-chntpw/ - -作者:[Shaun Assam][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/sassam/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/chntpw-816x345.jpg -[2]: https://koji.fedoraproject.org/koji/packageinfo?packageID=6945 -[3]: https://fedoramagazine.org/make-fedora-usb-stick/ -[4]: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019 -[5]: https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019 -[6]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ -[7]: https://unsplash.com/@silas_crioco?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[8]: https://unsplash.com/search/photos/key-lock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md deleted file mode 100644 index 6c28cfb644..0000000000 --- a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md +++ /dev/null @@ -1,165 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line) -[#]: via: (https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/) -[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) - -How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line -====== - -Hello All!!!, Good to See you! So we saw how to install [Debian 10(Buster)][1] in the previous article. Today, we are going to learn how to upgrade from Debian 9 to Debian 10. Since we have already seen about Debian 10 and its features, let’s not go deep into it. But readers who didn’t have the chance to read that article, let’s give a quick update about Debian 10 and its new features. - - - -After almost two years of development, the team at Debian has finally released a stable version of Buster, code name for Debian 10. Buster is a LTS (Long Term Support) version and hence will be supported for the next 5 years by Debian. - -### Debian 10 (Buster) – New Features - -Debian 10 (Buster) comes packed with a lot of new features which could be rewarding to most of the Debian fans out there. Some of the features include: - - * GNOME Desktop 3.30 - * AppArmor enabled by default - * Supports Linux Kernel 4.19.0-4 - * Supports OpenJDk 11.0 - * Moved from Nodejs 4-8 to Nodejs 10.15.2 - * Iptables replaced by NFTables - - - -and a lot more. - -### Step by Step Guide to Upgrade from Debian 9 to Debian 10 - -Before we start upgrading to Debian 10, let’s look at the prerequisites needed for the upgrade: - -### Step 1) Debian upgrade prerequisites - - * A good internet connection - * Root user permission - * Data backup - - - -It is extremely important to backup all your application code bases, data files, user account details, configuration files, so that you can always revert to the previous version if anything goes wrong during the upgrade. - -### Step 2) Upgrade Debian 9 Existing Packages - -Next step is to upgrade all your existing packages as any packages that are tagged as held back cannot be upgraded and there is a possibility the upgrade from Debian 9 to Debian 10 may fail or cause some issues. So, let’s not take any chances and better upgrade the packages. Use the following code to upgrade the packages: - -``` -root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y -``` - -### Step 3) Modify Package Repository file (/etc/sources.list) - -Next step is to modify package repository file “/etc/sources.list” where you need to replace the text “Stretch” with the text “Buster”. - -But before you change anything, make sure to create a backup of the sources.list file as shown below: - -``` -root@linuxtechi:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak -``` - -Now use below sed commands to replace the text ‘**stretch**‘ with ‘**buster**‘ in package repository file, example is shown below, - -``` -root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list -root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*.list -``` - -Once the text is updated, you need to update the package index like shown below: - -``` -root@linuxtechi:~$ sudo apt update -``` - -Before start upgrading  your existing Debian OS , let’s verify the current version using the following command, - -``` -root@linuxtechi:~$ cat /etc/*-release -PRETTY_NAME="Debian GNU/Linux 9 (stretch)" -NAME="Debian GNU/Linux" -VERSION_ID="9" -VERSION="9 (stretch)" -ID=debian -HOME_URL="https://www.debian.org/" -SUPPORT_URL="https://www.debian.org/support" -BUG_REPORT_URL="https://bugs.debian.org/" -root@linuxtechi:~$ -``` - -### Step 4) Upgrade from Debian 9 to Debian 10 - -Once you made all the changes, it is time to upgrade from Debian 9 – Debian 10. But before that, make sure to update your packages again as shown below: - -``` -root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y -``` - -During packages upgrade you will be prompted to start the services, so choose your preferred option - -Once all the packages are updated in your system, it is time to upgrade your distribution package. Use the following code to upgrade the distribution: - -``` -root@linuxtechi:~$ sudo apt dist-upgrade -y -``` - -The upgrade process may take a few minutes depending upon your internet connection. Remember during the upgrade process, you’ll also be asked a few questions whether you need to restart the services during the packages are upgraded and whether you need to keep the existing configurations files. If you don’t want to make any custom changes, simply type “Y” and let the upgrade process continue. - -### Step 5) Verify Upgrade - -Once the upgrade process is completed, reboot your machine and check the version using the following command: - -``` -root@linuxtechi:~$ lsb_release -a -``` - -If you get the output as shown below: - -``` -Distributor ID: Debian -Description: Debian GNU/Linux 10 (buster) -Release: 10 -Codename: buster -root@linuxtechi:~$ -``` - -Yes, you have successfully upgraded from Debian 9 to Debian 10. - -Alternate way to verify upgrade - -``` -root@linuxtechi:~$ cat /etc/*-release -PRETTY_NAME="Debian GNU/Linux 10 (buster)" -NAME="Debian GNU/Linux" -VERSION_ID="10" -VERSION="10 (buster)" -VERSION_CODENAME=buster -ID=debian -HOME_URL="https://www.debian.org/" -SUPPORT_URL="https://www.debian.org/support" -BUG_REPORT_URL="https://bugs.debian.org/" -root@linuxtechi:~$ -``` - -### Conclusion - -Hope the above step by step guide provided you with all the information needed to upgrade from Debian 9(Stretch) to Debian 10 (Buster) easily. Please give us your feedback, suggestions and your experiences with the all new Debian 10 in the comments section. For more such Linux tutorials and articles, keep visiting LinuxTechi.com every now and then. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/ - -作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ diff --git a/sources/tech/20190722 How to run virtual machines with virt-manager.md b/sources/tech/20190722 How to run virtual machines with virt-manager.md deleted file mode 100644 index 8a2586ea25..0000000000 --- a/sources/tech/20190722 How to run virtual machines with virt-manager.md +++ /dev/null @@ -1,169 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to run virtual machines with virt-manager) -[#]: via: (https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/) -[#]: author: (Marco Sarti https://fedoramagazine.org/author/msarti/) - -How to run virtual machines with virt-manager -====== - -![][1] - -In the beginning there was dual boot, it was the only way to have more than one operating system on the same laptop. At the time, it was difficult for these operating systems to be run simultaneously or interact with each other. Many years passed before it was possible, on common PCs, to run an operating system inside another through virtualization. - -Recent PCs or laptops, including moderately-priced ones, have the hardware features to run virtual machines with performance close to the physical host machine. - -Virtualization has therefore become normal, to test operating systems, as a playground for learning new techniques, to create your own home cloud, to create your own test environment and much more. This article walks you through using Virt Manager on Fedora to setup virtual machines. - -### Introducing QEMU/KVM and Libvirt - -Fedora, like all other Linux systems, comes with native support for virtualization extensions. This support is given by KVM (Kernel based Virtual Machine) currently available as a kernel module. - -QEMU is a complete system emulator that works together with KVM and allows you to create virtual machines with hardware and peripherals. - -Finally [libvirt][2] is the API layer that allows you to administer the infrastructure, ie create and run virtual machines. - -The set of these three technologies, all open source, is what we’re going to install on our Fedora Workstation. - -### Installation - -#### Step 1: install packages - -Installation is a fairly simple operation. The Fedora repository provides the “virtualization” package group that contains everything you need. -``` - -``` - -sudo dnf install @virtualization -``` - -``` - -#### Step 2: edit the libvirtd configuration - -By default the system administration is limited to the root user, if you want to enable a regular user you have to proceed as follows. - -Open the /etc/libvirt/libvirtd.conf file for editing -``` - -``` - -sudo vi /etc/libvirt/libvirtd.conf -``` - -``` - -Set the domain socket group ownership to libvirt -``` - -``` - -unix_sock_group = "libvirt" -``` - -``` - -Adjust the UNIX socket permissions for the R/W socket -``` - -``` - -unix_sock_rw_perms = "0770" -``` - -``` - -#### Step 3: start and enable the libvirtd service -``` - -``` - -sudo systemctl start libvirtd -sudo systemctl enable libvirtd -``` - -``` - -#### Step 4: add user to group - -In order to administer libvirt with the regular user you must add the user to the libvirt group, otherwise every time you start virtual-manager you will be asked for the password for sudo. -``` - -``` - -sudo usermod -a -G libvirt $(whoami) -``` - -``` - -This adds the current user to the group. You must log out and log in to apply the changes. - -### Getting started with virt-manager - -The libvirt system can be managed either from the command line (virsh) or via the virt-manager graphical interface. The command line can be very useful if you want to do automated provisioning of virtual machines, for example with [Ansible][3], but in this article we will concentrate on the user-friendly graphical interface. - -The virt-manager interface is simple. The main form shows the list of connections including the local system connection. - -The connection settings include virtual networks and storage definition. it is possible to define multiple virtual networks and these networks can be used to communicate between guest systems and between the guest systems and the host. - -### Creating your first virtual machine - -To start creating a new virtual machine, press the button at the top left of the main form: - -![][4] - -The first step of the wizard requires the installation mode. You can choose between a local installation media, network boot / installation or an existing virtual disk import: - -![][5] - -Choosing the local installation media the next step will require the ISO image path: - -![ ][6] - -The subsequent two steps will allow you to size the CPU, memory and disk of the new virtual machine. The last step will ask you to choose network preferences: choose the default network if you want the virtual machine to be separated from the outside world by a NAT, or bridged if you want it to be reachable from the outside. Note that if you choose bridged the virtual machine cannot communicate with the host machine. - -Check “Customize configuration before install” if you want to review or change the configuration before starting the setup: - -![][7] - -The virtual machine configuration form allows you to review and modify the hardware configuration. You can add disks, network interfaces, change boot options and so on. Press “Begin installation” when satisfied: - -![][8] - -At this point you will be redirected to the console where to proceed with the installation of the operating system. Once the operation is complete, you will have the working virtual machine that you can access from the console: - -![][9] - -The virtual machine just created will appear in the list of the main form, where you will also have a graph of the CPU and memory occupation: - -![][10] - -libvirt and virt-manager is a powerful tool that allows great customization to your virtual machines with enterprise level management. If something even simpler is desired, note that Fedora Workstation comes with [GNOME Boxes pre-installed and can be sufficient for basic virtualization needs][11]. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ - -作者:[Marco Sarti][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/msarti/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/virt-manager-816x346.jpg -[2]: https://libvirt.org/ -[3]: https://fedoramagazine.org/get-the-latest-ansible-2-8-in-fedora/ -[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-41-45.png -[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-30-53.png -[6]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-42-39.png -[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-43-21.png -[8]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-44-58.png -[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-55-35.png -[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-11-09-22.png -[11]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ diff --git a/sources/tech/20190723 8 Best Open Source CRM Software.md b/sources/tech/20190723 8 Best Open Source CRM Software.md deleted file mode 100644 index 89d0b977b4..0000000000 --- a/sources/tech/20190723 8 Best Open Source CRM Software.md +++ /dev/null @@ -1,230 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (8 Best Open Source CRM Software) -[#]: via: (https://itsfoss.com/best-open-source-crm/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -8 Best Open Source CRM Software -====== - -_**In this article, we list some of the best open source CRM software available for small and medium sized businesses.**_ - -### What is CRM? - -CRM stands for [Customer Relationship Management][1]. A CRM software enables the companies to interact with their potential and existing customers, understand and manage their requirement. This improved the relation of the organization with customer and you know that a happy customer brings profitability to the business. - -No matter how big your team is (small business or a big firm), a CRM software always comes in handy when you want to keep things organized in your business. - -You may avoid a CRM software for a couple of employees when you start a business. However, to streamline the process and make the work efficient and fast – you will eventually need a CRM software. - -But, what about the level of control (or security) in a CRM software? Do you want a transparent CRM software which you can take control of? - -Well, that is when an open source CRM software comes into play. You can host it yourself, and you can customize it as per your requirements. You may also opt for the hosted version where you don’t have to manage it yourself. - -In this article, we talk about some of the best open-source CRM software I have found. - -### Best Free and Open Source CRM Software - -![][2] - -Let me clarify something. CRM is intended for businesses and when there is a software created for business organizations, the developers would also like to make money. This is why almost all of the free and open source software also have their paid ‘enterprise versions’ available. - -While you can download the open source version and host it on your own Linux based server, the ‘enterprise versions’ are hosted by the developers themselves so that you don’t have to manage it. Some enterprise versions also provide premium features that are not available for the open source versions. Ticket support is also a feature available only for the enterprise versions. - -I have tried to highlight their ‘premium features’ in the list. Of course, t_he list below is in no particular order of ranking._ - -#### 1\. SuiteCRM - -![Suitecrm Hosting][3] - -Key Highlights: - - * Sever-basis charge instead of per-user subscription for hosted service - * Open-source - * Affordable managed hosting plans - * Supports third party integration - * 7-days free trial - - - -SuiteCRM was originally inspired (and forked) from SugarCRM’s open-source version. Well, that is no longer available. So, SuiteCRM is the open source alternative for organizations who utilized SugarCRM earlier. - -[][4] - -Suggested read  Use Do Not Disturb Mode in Ubuntu With NoNotifications - -In addition to all the essential features a CRM has to offer, SuiteCRM offers some great affordable managed hosting deals for organizations. With an impressive pricing plan (on server-basis with unlimited users), [SuiteCRM takes aim at Salesforce][5] – which is promising. - -[SuiteCRM][6] - -#### 2\. Odoo - -![][7] - -Key Highlights: - - * Open-source edition available - * Enterprise edition pricing on a per-user basis - * Wide variety of third party integrations - * 15-days free trial - - - -Odoo is yet another popular open-source CRM solution. However, in contrast to SuitCRM, you will observe the pricing plan per user. So, if you are just starting out with a lot of users – you might find it a bit pricey. - -The third-party integrations can be done easily and you can find the pricing for each app/integration when purchasing a subscription. You can either opt for the open source community edition or purchase the enterprise edition. - -[Odoo][8] - -#### 3\. Vtiger - -![][9] - -Key Highlights: - - * Open source edition based on SugarCRM - * Separate pricing plans for Marketing, Sales, Help desk or all-in-one - * Regional pricing available for some countries like India - * Per-user pricing - - - -Vtiger offers a cloud version and an open source version. Of course, if you opt for the open source version, you get to host it yourself and manage it all by yourself or hire a team. - -After observing the pricing plan, the managed cloud version obviously looks promising. – with separate pricing plans for sales, marketing, and help desk. However, if you have the required technical expertise, the open-source version is good enough as well. Also, it was interesting to see a regional pricing plan for India because they have an office here. - -[Vtiger][10] - -#### 4\. ConcourseSuite - -![][11] - -Key Highlights: - - * Offers a separate (but outdated) open source community edition - * Provides a 5-user trial plan for the latest version - - - -ConcourseSuite is a simple CRM which offers open-source version as well. The community edition (or the open-source version) is outdated – which you can still utilize as a basic CRM. - -In case you want the latest version (which is the enhanced version of the community edition), you will have to opt for a 5-user trial or purchase the enterprise/cloud version. I couldn’t find a clear pricing plan but its pricing page did mention $10,000 for unlimited users. So, you will probably find out about it after trying out the trial. - -[ConcourseSuite][12] - -#### 5\. EspoCRM - -![][13] - -Key Highlights: - - * The ability to switch to on-premise anytime. - * Actively maintained open source (self-hosted) package. - - - -EspoCRM is new to the scene and it is an impressive CRM software. You can download it for free and host it yourself or opt for the cloud solution where they do it for you. - -[][14] - -Suggested read  10 Amazing Websites Every Linux Gamer Must Follow - -They have got a detailed [documentation][15] – in case you want to try it yourself. Also, if you want to go with the cloud solution – you can always switch to on-premise anytime you want. I guess that makes it a bit more appealing. - -[EspoCRM][16] - -#### 6\. Axelor CRM - -![Axelor Crm][17] - -Key Highlights: - - * A complete suite of ERP, CRM, and BPM. - * Mobile apps for Android and iOS - - - -Axelor is normally a complete suite of ERP, CRM, and BPM. Here, we talk about the CRM which is an incredible open source CRM available out there. - -In addition to the web app, it also offers mobiles apps for Android and iOS. So, no matter you host it yourself or purchase a subscription for managed hosting – Axelor CRM is a great choice to keep up across multiple platforms. - -#### 7\. Crust CRM (Corteza) - -![][18] - -Key Highlights: - - * A unified open source solution - * Recently launched with latest features on board - - - -[Crust CRM][19] is one of the best enterprise-level Slack/Salesforce alternatives. Well, the primary aim of Crust CRM is to provide you a unified platform. - -Crust CRM offers a community edition “Corteza” which is open-source in nature with all the latest features that you get with Crust CRM. It has been recently launched – so you can expect it to be compatible with a lot of services. You need to go through the [technical documentation][20] to set it up. - -[Corteza][21] - -#### 8\. X2CRM - -![][22] - -Key Highlights: - - * The open-source package is no longer actively maintained – but available. - * On-premise and hosted options available - - - -X2CRM is yet another convincing open source solution. The open source package includes all the modules (Sales, Marketing, and Support). - -However, do note that the open source package isn’t actively maintained anymore – so if you want the latest and greatest features, you will have to purchase it. You can let them manage everything (hosted solution) or you get to manage everything and opt for their support and optimization services (on-premise). - -[X2CRM][23] - -### Wrapping Up - -I had made the [list of best open source CMS][24] earlier. You may read that to get some ideas about which open source technology to use for creating your business website. - -Coming back to CRM, if you would ever consider trying out an open source CRM, these are the best ones I would recommend. Did I miss one of your favorites? Let us know about it in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/best-open-source-crm/ - -作者:[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/Customer_relationship_management -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/open-source-crm-software.png?resize=800%2C450&ssl=1 -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/05/suitecrm-hosting.jpg?resize=800%2C457&ssl=1 -[4]: https://itsfoss.com/do-not-disturb-mode-ubuntu/ -[5]: https://itsfoss.com/suitecrm-ondemand/ -[6]: https://suitecrm.com/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/odoocrm.jpg?fit=800%2C384&ssl=1 -[8]: https://www.odoo.com/page/crm -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/vtiger.jpg?fit=800%2C419&ssl=1 -[10]: https://www.vtiger.com/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/concoursesuite-crm.jpg?fit=800%2C629&ssl=1 -[12]: https://www.concursive.com/show/concoursesuite/wiki/How+to+Get+ConcourseSuite -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/espo-crm.jpg?ssl=1 -[14]: https://itsfoss.com/best-linux-gaming-websites/ -[15]: https://github.com/espocrm/documentation -[16]: https://www.espocrm.com/ -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/axelor-crm.jpg?fit=800%2C526&ssl=1 -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/corteza.jpg?resize=800%2C417&ssl=1 -[19]: https://www.crust.tech/products/crust-crm/ -[20]: https://github.com/cortezaproject/corteza-docs -[21]: https://cortezaproject.org/ -[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/x2crm.png?ssl=1 -[23]: https://x2crm.com/download -[24]: https://itsfoss.com/open-source-cms/ diff --git a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md deleted file mode 100644 index 2f8d92bb28..0000000000 --- a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Create a User Account Without useradd Command in Linux?) -[#]: via: (https://www.2daygeek.com/linux-user-account-creation-in-manual-method/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -How to Create a User Account Without useradd Command in Linux? -====== - -There are three commands are available in Linux to create an user account. - -Did you ever tried to create a user account in Linux using manual method? - -I mean to say without using an above three commands. - -If you don’t know how to do that? we are here to help you on this and will show you in details. - -Have you wondering, how it’s possible? If yes, don’t worry, as we have mentioned many times that anything can be done on Linux. It is one of the example. - -Yes, we can create it. Are you excited to know more it? - - * **[Three Methods To Create A User Account In Linux?][1]** - * **[Two Methods To Create Bulk Users In Linux][2]** - - - -I don’t want to you to wait any more. Let’s do it right away. - -To do so, first, we need to find out last created UID and GID information. Once you have these information handy then proceed to next step. - -``` -# cat /etc/passwd | tail -1 - -tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash -``` - -Based on the above output. Last created user UID is 1153 and GID is 1154. To experiment this, we are going to add `tuser2` in the system. - -Now, add an entry of user details in /etc/passwd. There are seven fields exist and you need to add required details. - -``` -+-----------------------------------------------------------------------+ -|username:password:UID:GID:Comments:User Home Directory:User Login Shell| -+-----------------------------------------------------------------------+ - | | | | | | | - 1 2 3 4 5 6 7 - -1- Username: This field indicates the User name. Characters length should be between 1 to 32. -2- Password (x): It indicates that encrypted password is stored at /etc/shadow file. -3- User ID: It indicates the user ID (UID) each user should be contain unique UID. UID (0-Zero) is reserved for root, UID (1-99) reserved for system users and UID (100-999) reserved for system accounts/groups -4- Group ID (GID): It indicates the group ID (GID) each group should be contain unique GID is stored at /etc/group file. -5- Comment/User ID Info: It indicates the command field. This field can be used to describe the user information. -6- Home directory (/home/$USER): It indicates the user's home directory. -7- shell (/bin/bash): It indicates the user's shell. -``` - -Add the user information in end of the file. - -``` -# vi /etc/passwd - -tuser2:x:1154:1155:Test User2:/home/tuser2:/bin/bash -``` - -You have to create a group with same name. So, add a group details in /etc/group file as well. - -``` -# vi /etc/group - -tuser2:x:1155: -``` - -Once you done the above two steps, then set a password for user. - -``` -# passwd tuser2 - -Changing password for user tuser2. -New password: -Retype new password: -passwd: all authentication tokens updated successfully. -``` - -Finally, try to login with newly created user. - -``` -# ssh [email protected] - -[email protected]'s password: -Creating directory '/home/tuser2'. - -$ls -la - -total 16 -drwx------. 2 tuser2 tuser2 59 Jun 17 09:46 . -drwxr-xr-x. 15 root root 4096 Jun 17 09:46 .. --rw-------. 1 tuser2 tuser2 18 Jun 17 09:46 .bash_logout --rw-------. 1 tuser2 tuser2 193 Jun 17 09:46 .bash_profile --rw-------. 1 tuser2 tuser2 231 Jun 17 09:46 .bashrc -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/linux-user-account-creation-in-manual-method/ - -作者:[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/linux-user-account-creation-useradd-adduser-newusers/ -[2]: https://www.2daygeek.com/linux-bulk-users-creation-useradd-newusers/ diff --git a/published/20190211 Introducing kids to computational thinking with Python.md b/translated/talk/20190211 Introducing kids to computational thinking with Python.md similarity index 54% rename from published/20190211 Introducing kids to computational thinking with Python.md rename to translated/talk/20190211 Introducing kids to computational thinking with Python.md index 17c062ad8e..f9f5406615 100644 --- a/published/20190211 Introducing kids to computational thinking with Python.md +++ b/translated/talk/20190211 Introducing kids to computational thinking with Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (WangYueScream) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11116-1.html) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) [#]: subject: (Introducing kids to computational thinking with Python) [#]: via: (https://opensource.com/article/19/2/break-down-stereotypes-python) [#]: author: (Don Watkins https://opensource.com/users/don-watkins) @@ -11,37 +11,40 @@ 利用 Python 引导孩子的计算机思维 ======================== -> 编程可以给低收入家庭的学生提供足够的技能、信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。 +编程可以给低收入家庭的学生提供足够的技能,信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。 -![](https://img.linux.net.cn/data/attachment/album/201907/17/231228k3t9skntnlst59h9.jpg) +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_kid_education.png?itok=3lRp6gFa) 尽管暑假期间底特律公共图书馆的[帕克曼分部][1]挤满了无聊的孩子并且占用了所有的电脑,图书馆工作人员并不觉得这会是个问题,反而更多是一个机会。他们成立一个名为 [Parkman Coders][2] 的编程社团,社团以 [Qumisha Goss][3] 为首,她是图书管理员,也负责利用 Python 的魔力引导弱势儿童的计算机思维。 -四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q”(代表她)并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和树莓派认证讲师。 +四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q” 并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和 Raspberry Pi 认证讲师。 社团最开始采用 [Scratch][4] 教学,但很快学生就对这种图形化的块编程感到乏味,他们觉得这就是个“婴儿玩具”。Q 坦言,“我们意识到是时候需要在课程内容这方面做些改变了,如果是为了维持课程内容对初学者的友好性继续选择 Scratch 教学,这无疑会影响孩子们后期继续保持对编程的关注。”因此,她开始教授孩子们 Python。 -Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 《[Python Programming: An Introduction to Computer Science][6]》 和 《[Python for Kids][7]》 这两本书学习的 Python。她也推荐 《[Automate the Boring Stuff with Python][8]》 和 《[Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9]》 这两本书。 +Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 [Python Programming: An Introduction to Computer Science][6] 和 [Python for Kids][7] 这两本书学习 Python。她也推荐 [Automate the Boring Stuff with Python][8] 和 [Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9] 这两本书。 -### 建立一个基于树莓派的创客空间 -Q 决定使用[树莓派][10]电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[树莓派][10]的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。 +### 建立一个基于 Raspberry Pi 的创客空间 -虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间,进而维持图书馆的平和,但社区发展的很快,很受大家欢迎,以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台[树莓派][10]来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft、4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。 -目前,每节课程大概有 40 个孩子参加,而且图书馆也有了足够的[树莓派][10]让参与者人手一台设备甚至还可以送出去一些。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。 +Q 决定使用 [Raspberry Pi][10] 电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[Raspberry Pi][10] 的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。 -Q 说,“当孩子们的表现可以证明他们能够很好的使用[树莓派][10]或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器、键盘、鼠标等外设。” +虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间进而维持图书馆的平和,但社区发展的很快,很受大家欢迎以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台 [Raspberry Pi][10] 来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft,4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。 + +目前,大概有 40 个孩子参加了每节课程而且图书馆也有了足够的 [Raspberry Pi][10] 让参与者人手一台设备甚至还可以分发出去。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。 + +Q 说,“当孩子们的表现可以证明他们能够很好的使用 [Raspberry Pi][10] 或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器,键盘,鼠标等外设。” ### 利用 Python 学习生存技能,打破束缚 -Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈、很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。” + +Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。” 她继续分享道,“在学习编程的过程中,你不得不对单词的拼写和大小写高度警惕。受限于孩子年龄,有时候阅读认知会是个大问题。为了确保课程受众的包容性,我们会在授课过程中大声拼读,同样我们也会极力鼓励孩子们大声说出他们不知道的或者不能正确拼写的单词,以便我们纠正。” -Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想帮助到他们而不是让他们因为挫败而沮丧的不再参与进来。” +Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想到帮助到他们而不是让他们因为挫败而沮丧的不在参与进来。” -最重要的是,[Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。” +最重要的是, [Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。” Q 和 [Parkman Coders][2] 计划所营造的环境氛围能够帮助到参与者摆脱低家庭收入带来的劣势。如果说社区能够发展壮大到今天的规模真有什么独特秘诀的话,那大概就是,Q 解释道,“确保你有一个令人舒适的空间,充满了理解与宽容,这样大家才会被吸引过来。让来的人不忘初心,做好传道受业解惑的准备;当大家参与进来并感觉到充实愉悦,自然而然会想要留下来。” @@ -53,7 +56,7 @@ via: https://opensource.com/article/19/2/break-down-stereotypes-python 作者:[Don Watkins][a] 选题:[lujun9972][b] 译者:[WangYueScream](https://github.com/WangYueScream) -校对:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md b/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md new file mode 100644 index 0000000000..c5ec0570fa --- /dev/null +++ b/translated/tech/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md @@ -0,0 +1,139 @@ +MX Linux: 一款专注于简洁性的发行版 +====== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux.png?itok=OLjmCxT9) +Linux 有着如此多种的发型版。许多发行版为了使自己与众不同而做出了很多改变。另一方面,许多发行版之间的区别又是如此之小,你可能会问为什么有人还愿意不厌其烦的重复别人已经做过的工作呢?也正是基于这一疑惑,让我好奇为什么 [antiX][1] 和 [MEPIS][2]这两个社区要联合推出一个特殊的发行版,考虑到具体情况应该会是一个搭载 Xfce 桌面并基于 antiX 的版本,由 MEPIS 社区承担开发。 + +这一开发中的使用 Xfce 桌面的 antiX 系统是否会基于他之前的发行版呢?毕竟,antiX 旨在提供一个“快速、轻量级、易于安装的、支持linux live CD 且基于Debian Stable的发行版”。antiX 所搭载的桌面是 [LXDE][3],能够极好的满足关于轻量化系统的相关要求和特性。那究竟是什么原因使得 antiX 决定构建另一个轻量化发行版呢,仅仅是因为这次换成了 Xfce 吗?好吧,Linux 社区中的任何人都知道,差异之处体现了不同版本的特性,一个好的轻量级发行版是值得一试的(特别是可以使得我们的旧硬件摆脱进入垃圾填埋场的宿命)。当然,LXDE 和 Xfce 并不完全属于同一类别。LXDE应该被认为是一个真正的轻量级桌面,而 Xfce 应该被认为是一个中等重量的桌面。朋友们,这就是为什么 MX Linux 是 antiX 的一个重要迭代的关键。一个基于Debian的中等体量的发行版,它包含你完成工作所需的所有工具。 + +但是在 MX linux 中有一些直接从 antiX 借用来的非常有用的东西—那就是安装工具。当我第一次设置VirtualBox 的虚拟机来安装 MX Linux 时,我认为安装将是我已经习惯的典型的、非常简单的Linux安装。令我非常惊讶的是,MX Linux 使用的 antiX 安装程序打破了以往的痛点,特别是对于那些对尝试 Linux 持观望态度的人来说。 + +因此,甚至在我开始尝试 MX Linux 之前,我就对它有了深刻的印象。让我们来看看是什么让这个发行版的安装如此特别,最后再来看看桌面。 + +你可以从[这里][4]下载 MX Linux 17.1。系统的最低要求是: + + * CD/DVD驱动器(以及能够从该驱动器引导的BIOS)或活动USB(以及能够从USB引导的BIOS) + + * 英特尔 i486 或 AMD 处理器 + + * 512 MB 内存 + + * 5 GB 硬盘空间 + + * 扬声器,AC97 或 HDA-compatible 声卡 + + * 作为一个 LiveUSB 使用,需要 4 GB 空间 + +### 安装 + +MX Linux安装程序使安装 Linux 变得轻而易举。虽然它可能不是外观最现代化的安装工具,但也已经差不多了。安装的要点是从选择磁盘和选择安装类型开始的(图1)。 + +![install][6] + +图1:MX Linux 的安装程序截图之一。 + +[Used with permission][7] + +下一个重要的界面(图2)要求你为MS网络设置一个计算机名称、域名和(如果需要的话)工作组。 + +配置工作组的能力是真正值得称赞的第一项。这是我记忆中第一款在安装期间提供此选项的发行版。它还应该提示你,MX Linux 提供了开箱即用共享目录的功能。它做到了,而且深藏功与名。它并不完美,但它可以在不需要安装任何额外包的情况下工作(稍后将详细介绍)。 + +最后一个重要的安装界面(需要用户交互)是创建用户帐户和 root 权限的密码(图3)。 + +![user][9] + +图3:设置用户帐户详细信息和 root 用户密码。 + +[Used with permission][7] + +最后一个界面设置完成后,安装将完成并要求重新启动。重启后,你将看到登录屏幕。登录并享受MX Linux 带来的体验。 + +### 使用 + +Xfce桌面是一个非常容易上手的界面。默认设置将面板位于屏幕的左边缘(图4)。 + +![desktop ][11] + +图4: MX Linux 的默认桌面。 + +[Used with permission][7] + +如果你想将面板移动到更传统的位置,右键单击面板上的空白点,然后单击面板>面板首选项。在生成的窗口中(图5),单击样式下拉菜单,在桌面栏、垂直栏或水平栏之间进行选择你想要的模式。 + +![panel][13] + +图5:配置 MX Linux 面板。 + +[Used with permission][7] + +桌面栏和垂直选项的区别在于,在桌面栏模式下,面板垂直对齐,就像在垂直模式下一样,但是插件是水平放置的。这意味着你可以创建更宽的面板(用于宽屏布局)。如果选择水平布局,它将默在顶部,然后你必须取消锁定面板,单击关闭,然后(使用面板左侧边缘的拖动手柄)将其拖动到底部。你可以回到面板设置窗口并重新锁定面板。 + +除此之外,使用 Xfce 桌面对于任何级别的用户来说都是无需动脑筋的事情……就是这么简单。你会发现很多生产力代表的软件(LibreOffice, Orage日历,PDF-Shuffler)、图像软件(GIMP)、通信(Firefox,Thunderbird,HexChat),多媒体(Clementine、guvcview SMTube, VLC媒体播放器),和一些 MX Linux 专属的工具(称为MX工具,涵盖了 live-USB 驱动器制作工具,包管理工具,repo 管理工具,回购经理,live ISO 快照工具,等等)。 + +![sharing][15] + +图6:向网络共享一个目录。 +[Used with permission][7] + +### Samba + +让我们讨论一下如何将文件夹共享到你的网络。正如我所提到的,你不需要安装任何额外的包就可以使其正常工作。只需打开文件管理器,右键单击任何位置,并选择网络上的共享文件夹。系统将提示你输入管理密码(已在安装期间设置)。验证成功之后,Samba服务器配置工具将打开(图6)。 + +![sharing][17] + +图7:在MX Linux上配置共享。 + +[Used with permission][7] + +单击+按钮并配置你的共享。你将被要求指定一个目录,为共享提供一个名称/描述,然后决定该共享是否可写且可见(图7)。 + +当你单击 Access 选项时,你可以选择是让每个人都访问共享,还是限于特定的用户。问题就出在这里。此时,没有用户可以共享。为什么?因为它们还没有被添加。,有两种方法可以把它们添加到共享:从命令行或使用我们已经打开的工具。让我们用一种更为简单的方法。在Samba服务器配置工具的主窗口中,单击Preferences > Samba Users。在弹出的窗口中,单击 Add user。 + +将出现一个新窗口(图8),你需要从下拉框中选择用户,输入Windows用户名,并为用户键入/重新键入密码。 + +![Samba][19] + +图8:向 Samba 添加用户。 + +[Used with permission][7] + +一旦你单击确定,用户将被添加,并且基于你的网络的对用户的共享功能也随之启用。创建 Samba 共享从未变得如此容易。 + +### 结论 + +MX Linux 使任何从桌面操作系统转到 Linux 都变得非常简单。尽管有些人可能会觉得桌面界面不太现代,但发行版的主要关注点不是美观,而是简洁。为此,MX Linux 以出色的方式取得了成功。Linux 的这种特性可以让任何人在使用 Linux 的过程中感到宾至如归。尝试这一中等体量的发行版,看看它能否作为你的日常系统。 + +从Linux 基金会和 edX 的[“Linux入门”][20]课程了解更多关于Linux的知识。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/learn/intro-to-linux/2018/4/mx-linux-mid-weight-distro-focused-simplicity + +作者:[JACK WALLEN][a] +译者:[qfzy1233](https://github.com/qfzy1233) +校对:[校对者ID](https://github.com/校对者ID) +选题:[lujun9972](https://github.com/lujun9972) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/users/jlwallen +[1]:https://antixlinux.com/ +[2]:https://en.wikipedia.org/wiki/MEPIS +[3]:https://lxde.org/ +[4]:https://mxlinux.org/download-links +[5]:/files/images/mxlinux1jpg +[6]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_1.jpg?itok=i9bNScjH (install) +[7]:/licenses/category/used-permission +[8]:/files/images/mxlinux3jpg +[9]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_3.jpg?itok=ppf2l_bm (user) +[10]:/files/images/mxlinux4jpg +[11]:https://www.linux.com/sites/lcom/files/styles/rendered_file/public/mxlinux_4.jpg?itok=mS1eBy9m (desktop) +[12]:/files/images/mxlinux5jpg +[13]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_5.jpg?itok=wsN1hviN (panel) +[14]:/files/images/mxlinux6jpg +[15]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_6.jpg?itok=vw8mIp9T (sharing) +[16]:/files/images/mxlinux7jpg +[17]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_7.jpg?itok=tRIWdcEk (sharing) +[18]:/files/images/mxlinux8jpg +[19]:https://www.linux.com/sites/lcom/files/styles/floated_images/public/mxlinux_8.jpg?itok=ZS6lhZN2 (Samba) +[20]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md deleted file mode 100644 index c321d5374d..0000000000 --- a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md +++ /dev/null @@ -1,163 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) -[#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 -====== - -![Type Linux Commands In Capital Letters To Run Them As Sudo User][1] - -我非常喜欢 Linux 社区的原因是他们创建了很多有趣的项目,你很少能在任何其他操作系统中找到它们。不久前,我们看了一个名为 [**“Hollywood”**][2] 的有趣项目,它在类 Ubuntu 系统将终端变成了好莱坞技术情景剧的黑客界面。还有一些其他工具,例如 **cowsay**、**fortune**、**sl** 和 **toilet** 等,用来打开时间和自娱自乐!它们可能没有用,但这些程序娱乐性不错并且使用起来很有趣。今天,我偶然发现了另一个名为 **“SUDO”** 的类似工具。正如名字暗示的那样,你无论何时用大写字母输入 Linux 命令,SUDO 程序都会将它们作为 sudo 用户运行!这意味着,你无需在要运行的 Linux 命令前面输入 “sudo”。很酷,不是么? - - -### 安装 SUDO - -* * * - -**提醒一句:** - -在安装(或任何程序)之前,请查看源代码(最后给出的链接),并查看是否包含会损害你的系统的可疑/恶意代码。在 VM中 测试它。如果你喜欢或觉得它很有用,你可以在个人/生产系统中使用它。 - -* * * - -用 Git 克隆 SUDO 仓库: - -``` -$ git clone https://github.com/jthistle/SUDO.git -``` - -此命令将克隆 SUDO GIT 仓库的内容,并将它们保存在当前目录下的 “SUDO” 的目录中。 - -``` -Cloning into 'SUDO'... -remote: Enumerating objects: 42, done. -remote: Counting objects: 100% (42/42), done. -remote: Compressing objects: 100% (29/29), done. -remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 -Unpacking objects: 100% (42/42), done. -``` - -切换到 SUDO 目录: - -``` -$ cd SUDO/ -``` - -并使用命令安装它: - -``` -$ ./install.sh -``` - -该命令将在 **~/.bashrc** 文件中添加以下行: - -``` -[...] -# SUDO - shout at bash to su commands -# Distributed under GNU GPLv2, @jthistle on github - -shopt -s expand_aliases - -IFS_=${IFS} -IFS=":" read -ra PATHS <<< "$PATH" - -for i in "${PATHS[@]}"; do - for j in $( ls "$i" ); do - if [ ${j^^} != $j ] && [ $j != "sudo" ]; then - alias ${j^^}="sudo $j" - fi - done -done - -alias SUDO='sudo $(history -p !!)' - -IFS=${IFS_} - -# end SUDO -``` - -它还会备份你的 **~/.bashrc** 并将其保存为 **~/.bashrc.old**。如果有重大错误,你可以恢复它。 - -最后,使用命令更新更改: - -``` -$ source ~/.bashrc -``` - -### 现在,用大写字母中输入 Linux 命令,将它们作为 Sudo 用户运行 - -通常我们像下面那样执行需要 sudo/root 权限的命令。 - -``` -$ sudo mkdir /ostechnix -``` - -对么?没错!上面的命令将在根目录(/)中创建名为 “ostechnix” 的目录。让我们使用 **Ctrl + c** 取消。 - -一旦安装了 SUDO,你就可以**在没有 sudo 的情况下输入任何大写 Linux 命令**并运行它们。因此,你可以像下面那样运行上面的命令: - -``` -$ MKDIR /ostechnix - -$ TOUCH /ostechnix/test.txt - -$ LS /ostechnix -``` - -![][3] - -用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 - -请注意**它无法绕过 sudo 密码**。你仍然需要键入 sudo 密码才能执行给定的命令。它只会有助于避免在每个命令前面输入“sudo”。 - -* * * - -**相关阅读:Related read:=** - - * [**如何在 Linux 中没有 Sudo 密码运行特定命令**][4] - * [**如何恢复用户的 Sudo 权限**][5] - * [**如何在 Ubuntu 上为用户授予和删除 Sudo 权限**][6] - * [**如何在 Linux 系统中查找所有 Sudo 用户**][7] - * [**如何在终端中输入密码时显示星号**][8] - * [**如何更改 Linux 中的 Sudo 提示符**][9] - - - -* * * - -当然,输入 “sudo” 只需几秒钟,所以这不是什么大问题。 我必须告诉这是一个用来消磨时间的有趣且无用的项目。 如果你不喜欢它,那就去学习一些有用的东西吧。 如果你喜欢它,试一试,玩得开心! - -**资源:** - - * [**SUDO GitHub 仓库**][10] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/sudo-720x340.png -[2]: https://www.ostechnix.com/turn-ubuntu-terminal-hollywood-technical-melodrama-hacker-interface/ -[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/SUDO-in-action.gif -[4]: https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/ -[5]: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/ -[6]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/ -[7]: https://www.ostechnix.com/find-sudo-users-linux-system/ -[8]: https://www.ostechnix.com/display-asterisks-type-password-terminal/ -[9]: https://www.ostechnix.com/change-sudo-prompt-linux-unix/ -[10]: https://github.com/jthistle/SUDO diff --git a/translated/tech/20190715 Understanding software design patterns.md b/translated/tech/20190715 Understanding software design patterns.md deleted file mode 100644 index 9767669658..0000000000 --- a/translated/tech/20190715 Understanding software design patterns.md +++ /dev/null @@ -1,360 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (arrowfeng) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Understanding software design patterns) -[#]: via: (https://opensource.com/article/19/7/understanding-software-design-patterns) -[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson) - -理解软件设计模式 -====== -设计模式可以帮助消除冗余代码。学习如何利用Java使用单例模式、工厂模式和观察者模式。 -![clouds in the sky with blue pattern][1] - -如果你是一名正在致力于计算机科学或者相关学科的程序员或者学生,很快,你将会遇到一条术语 “软件设计模式。” 根据维基百科,_" [软件设计模式][2]是在平常的软件设计工作中所遭遇的问题是一种通用的, 可重复使用的解决方案。“_ 这里是我对定义的理解:当你在编码项目上的同时,你经常会思考,“呵呵,这里貌似是冗余代码,我想是否我能改变代码使得更灵活并且这个改变是可接受的?”因此,你将开始思考怎样分割那些保持不变的内容和需要经常改变的内容。 - - -> 设计模式是一种通过分割那些保持不变的部分和经常变化的部分,让你的代码更容易修改的方法。 - -不出意外的话,每个从事编码工程的人都可能会有同样的思考。特别是那些工业级别的工程,在那里通常工作着数十甚至数百名开发者;协作过程表明必须有一些标准和规则来使代码更加优雅并适应变化。 这就是为什么我们有 [面向对象编程][3](OOP)和 [软件框架工具][4]。设计模式有点类似于OOP,但它通过将变化视为自然开发过程的一部分而进一步发展。基本上,设计模式利用了一些OOP的思想,比如抽象和接口,但是专注于改变的过程。 - - -当你开始开发项目时, 你经常会听到这样一个术语 _重构_,_意味着通过改变代码使它变得更优雅和可复用;_ 这就是设计模式耀眼的地方。 无论什么时候你处理现有代码时(无论是由其他人构建还是你自己过去构建的),了解设计模式可以帮助你以不同的方式看待事物,你将发现问题以及改进代码的方法。 - -那里有很多种设计模式,其中单例模式,工厂模式,和观察者模式三种最受欢迎,在这篇文章中我将会一一介绍它们。 - -### 如何遵循本指南 - -无论你是一位有经验的编程工作者还是一名刚刚接触的新手,我想让这篇教程很容易让每个人都可以理解。设计模式概念并不容易理解,减少开始旅程时的学习曲线始终是首要任务。因此,除了这篇带有图表和代码片段的文章外,我还创建了一个 [GitHub仓库][5],你可以克隆和在你的电脑上运行代码去实现这三种设计模式。你也可以观看我创建的 [YouTube视频][6]。 - - -#### 必要条件 - -如果你只是想了解一般的设计模式思想,则无需克隆示例项目或安装任何工具。但是,如果要运行示例代码,你需要安装以下工具: - - - * **Java Development Kit (JDK):** 我强烈建议 [OpenJDK][7]。 - * **Apache Maven:** 这个简单的工程使用 [Apache Maven][8] 构建; 幸好许多IDEs自带了Maven。 - * **Interactive development editor (IDE):** 我使用 [IntelliJ Community Edition][9], 但是你也可以使用 [Eclipse IDE][10] 或者其他你喜欢的 Java IDE。 - * **Git:** 如果你想克隆这个工程,你需要 [Git][11]客户端。 - - -安装好Git后运行下列命令克隆这个工程: - -``` -`git clone https://github.com/bryantson/OpensourceDotComDemos.git` -``` - -然后在你喜欢的IDE中,你可以将TopDesignPatterns仓库中的代码作为Apache Maven项目导入。 - -我正在使用Java,但你也可以使用支持 [抽象原理][12]的任何编程语言来实现设计模式。 - -### 单例模式:避免每次创建一个对象 - -[单例模式][13]是非常受欢迎的设计模式,它的实现相对来说很简单,因为你只需要一个类。然而,许多开发人员争论单例设计模式的是否利大于弊,因为它缺乏明显的好处并且容易被滥用。很少有开发人员直接实现单例;相反,像Spring Framework和Google Guice等编程框架内置了单例设计模式的特性。 - -但是了解单例模式仍然有巨大的用处。单例模式确保一个类仅创建一次且提供了一个对他的全局访问点。 - -> **Singleton pattern:** 确保仅有一个实例被创建且避免在同样的工程中创建多个实例。 - -下面这幅图展示了经典的类对象创建过程。当客户端请求创建一个对象时,构造函数会创建或者实例化一个对象并调用方法返回这个类。但是每次请求一个对象都会发生这样的情况——构造函数被调用,一个新的对象被创建并且它返回一个唯一的对象。我猜面向对象语言的创建者有每次都创建一个新对象的原因,但是单例过程的支持者说这是冗余的且浪费资源。 - -![Normal class instantiation][14] - -下面这幅图使用单例模式创建对象。这里,构造函数仅当对象首次通过调用预先设计好的 getInstance() 方法时才会被调用。这通常通过检查值是否为 null 来完成,并且这个对象被作为私有变量保存在单例类的内部。下次 getInstance() 被调用时,这个类会返回第一次被创建的对象。没有新的对象产生;它只是返回旧的那一个。 - -![Singleton pattern instantiation][15] - -下面这段代码展示了创建单例模式最简单的方法: - - -``` -package org.opensource.demo.singleton; - -public class OpensourceSingleton { - -    private static OpensourceSingleton uniqueInstance; - -    private OpensourceSingleton() { -    } - -    public static OpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            uniqueInstance = new OpensourceSingleton(); -        } -        return uniqueInstance; -    } - -} -``` - -在调用方, 这里展示了如何调用单例类来获取对象: - -``` -Opensource newObject = Opensource.getInstance(); -``` - -这段代码很好的验证了单例模式的思想: - - 1. 当 getInstance() 被调用时,它通过检查 null 值来见检查对象是否已经被创建。 - 2. 如果值为空,它会创建一个新对象并把它保存到私有域,返回这个对象给调用者。否则直接返回之前被创建的对象。 - - -单例模式实现的主要问题是它忽略了并行进程。当多个进程使用线程同时访问资源时,这个问题就产生了。对于这种情况有对应的解决方案,它被称为 _双重检查锁_ 用于多线程安全,如下所示: - -``` -package org.opensource.demo.singleton; - -public class ImprovedOpensourceSingleton { - -    private volatile static ImprovedOpensourceSingleton uniqueInstance; - -    private ImprovedOpensourceSingleton() {} - -    public static ImprovedOpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            synchronized (ImprovedOpensourceSingleton.class) { -                if (uniqueInstance == null) { -                    uniqueInstance = new ImprovedOpensourceSingleton(); -                } -            } -        } -        return uniqueInstance; -    } - -} -``` - -只是为了强调前一点,确保只有在你认为这是一个安全的选项时才能直接实现你的单例模式。最好的方法是通过使用一个制作精良的编程框架来利用单例功能。 - -### 工厂模式:将对象创建委派给工厂类以隐藏创建逻辑 - -[工厂模式][16] 是另一种众所周知的设计模式,但是有一小点复杂。实现工厂模式的方法有很多,而下列的代码示例为最简单的实现方式。为了创建对象,工厂模式定义了一个接口,让它的子类去决定哪一个子类实例化。 - -> **Factory pattern:** 将对象创建委派给工厂类,因此它能隐藏创建逻辑。 - -下列的图片展示了最简单的工厂模式是如何实现的? - -![Factory pattern][17] - -客户端请求工厂类创建某个对象,类型 x,而不是客户端直接调用对象创建。根据类型,工厂模式决定要创建和返回的对象。 - -在下列代码示例中,OpensourceFactory 是工厂类实现,它从调用者那里获取 _类型_ 并根据该输入值决定要创建和返回的对象: - -``` -package org.opensource.demo.factory; - -public class OpensourceFactory { - -    public OpensourceJVMServers getServerByVendor([String][18] name) { -        if(name.equals("Apache")) { -            return new Tomcat(); -        } -        else if(name.equals("Eclipse")) { -            return new Jetty(); -        } -        else if (name.equals("RedHat")) { -            return new WildFly(); -        } -        else { -            return null; -        } -    } -} -``` - -OpenSourceJVMServer 是一个100%的抽象类(或者一个接口类),它指示要实现的是什么,而不是怎样实现: - - -``` -package org.opensource.demo.factory; - -public interface OpensourceJVMServers { -    public void startServer(); -    public void stopServer(); -    public [String][18] getName(); -} -``` - -这是一个 OpensourceJVMServers 实现类示例。当 “RedHat” 被作为类型传递给工厂类,WildFly 服务器将被创建: - - -``` -package org.opensource.demo.factory; - -public class WildFly implements OpensourceJVMServers { -    public void startServer() { -        [System][19].out.println("Starting WildFly Server..."); -    } - -    public void stopServer() { -        [System][19].out.println("Shutting Down WildFly Server..."); -    } - -    public [String][18] getName() { -        return "WildFly"; -    } -} -``` - -### 观察者模式:订阅主题并获取相关更新的通知 - -最后是[观察者模式][20]。像单例模式那样,很少有专业的程序员直接实现观察者模式。但是,许多消息队列和数据服务实现都借用了观察者模式的概念。观察者模式在对象之间定义了一对多的依赖关系,当一个对象的状态发生改变时,所有依赖它的对象都将被自动地通知和更新。 - -> **Observer pattern:** 如果有更新,那么订阅了该话题/主题的客户端将被通知。 - -思考观察者模式的最简单方法是想象一个邮件列表,你可以在其中订阅任何主题,无论是开源,技术,名人,烹饪还是您感兴趣的任何其他内容。每个主题维护者一个它的订阅者列表,在观察者模式中它们相当于观察者。当某一个主题更新时,它所有的订阅者(观察者)都将被通知这次改变。并且订阅者总是能取消某一个主题的订阅。 - -如下图所示,客户端可以订阅不同的主题并添加观察者以获得最新信息的通知。因为观察者不断的监听着这个主题,这个观察者会通知客户端任何发生的改变。 - -![Observer pattern][21] - -让我们呢来看看观察者模式的代码示例,从主题/话题类开始: - - -``` -package org.opensource.demo.observer; - -public interface Topic { - -    public void addObserver([Observer][22] observer); -    public void deleteObserver([Observer][22] observer); -    public void notifyObservers(); -} -``` -这段代码描述了一个接口为不同的主题去实现已定义的方法。注意一个观察者如何被添加、移除和通知。 - -这是一个主题的实现示例: - -``` -package org.opensource.demo.observer; - -import java.util.List; -import java.util.ArrayList; - -public class Conference implements Topic { -    private List<Observer> listObservers; -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; - -    public Conference() { -        listObservers = new ArrayList<Observer>(); -    } - -    public void addObserver([Observer][22] observer) { -        listObservers.add(observer); -    } - -    public void deleteObserver([Observer][22] observer) { -        int i = listObservers.indexOf(observer); -        if (i >= 0) { -            listObservers.remove(i); -        } -    } - -    public void notifyObservers() { -        for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { -            [Observer][22] observer = listObservers.get(i); -            observer.update(totalAttendees,totalSpeakers,nameEvent); -        } -    } - -    public void setConferenceDetails(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        notifyObservers(); -    } -} -``` - -这段代码定义了一个特定主题的实现。当发生改变时,这个实现调用它自己的方法。 注意这将获取存储为列表的观察者的数量,并且可以通知和维护观察者。 - -这是一个观察者类: - -``` -package org.opensource.demo.observer; - -public interface [Observer][22] { -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent); -} -``` - -这个类定义了一个接口,不同的观察者可以实现该接口以执行特定的操作。 - -例如,实现了该接口的观察者可以在会议上打印出与会者和发言人的数量: - - -``` -package org.opensource.demo.observer; - -public class MonitorConferenceAttendees implements [Observer][22] { -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; -    private Topic topic; - -    public MonitorConferenceAttendees(Topic topic) { -        this.topic = topic; -        topic.addObserver(this); -    } - -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        printConferenceInfo(); -    } - -    public void printConferenceInfo() { -        [System][19].out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); -    } -} -``` - -### 之后去哪? - -现在你已经阅读了这篇对于设计模式的介绍引导,你应该去一个好地方寻求其他设计模式,例如外观模式,模版模式和装饰器模式。也有一些并发和分布式系统的设计模式如断路器模式和锚定模式。 - -可是,我相信最好的磨砺你的技能首先是通过在你的边缘工程或者练习中实现这些设计模式。你甚至可以开始考虑如何在实际项目中应用这些设计模式。接下来,我强烈建议您查看OOP的 [SOLID原则][23]。之后,你将准备好了解其他设计模式。 - -However, I believe it's best to hone your skills first by implementing these design patterns in your side projects or just as practice. You can even begin to contemplate how you can apply these design patterns in your real projects. Next, I highly recommend checking out the [SOLID principles][23] of OOP. After that, you will be ready to look into the other design patterns. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/understanding-software-design-patterns - -作者:[Bryant Son][a] -选题:[lujun9972][b] -译者:[arrowfeng](https://github.com/arrowfeng) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) -[2]: https://en.wikipedia.org/wiki/Software_design_pattern -[3]: https://en.wikipedia.org/wiki/Object-oriented_programming -[4]: https://en.wikipedia.org/wiki/Software_framework -[5]: https://github.com/bryantson/OpensourceDotComDemos/tree/master/TopDesignPatterns -[6]: https://www.youtube.com/watch?v=VlBXYtLI7kE&feature=youtu.be -[7]: https://openjdk.java.net/ -[8]: https://maven.apache.org/ -[9]: https://www.jetbrains.com/idea/download/#section=mac -[10]: https://www.eclipse.org/ide/ -[11]: https://git-scm.com/ -[12]: https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming) -[13]: https://en.wikipedia.org/wiki/Singleton_pattern -[14]: https://opensource.com/sites/default/files/uploads/designpatterns1_normalclassinstantiation.jpg (Normal class instantiation) -[15]: https://opensource.com/sites/default/files/uploads/designpatterns2_singletonpattern.jpg (Singleton pattern instantiation) -[16]: https://en.wikipedia.org/wiki/Factory_method_pattern -[17]: https://opensource.com/sites/default/files/uploads/designpatterns3_factorypattern.jpg (Factory pattern) -[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[20]: https://en.wikipedia.org/wiki/Observer_pattern -[21]: https://opensource.com/sites/default/files/uploads/designpatterns4_observerpattern.jpg (Observer pattern) -[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+observer -[23]: https://en.wikipedia.org/wiki/SOLID From d4ac2ada0d4e4270c4572b9779fb14649148edc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=E2=99=A1Adele?= Date: Wed, 24 Jul 2019 00:48:39 +0800 Subject: [PATCH 091/951] Update and rename sources/tech/20190715 What is POSIX- Richard Stallman explains.md to translated/tech/20190715 What is POSIX- Richard Stallman explains.md --- ...hat is POSIX- Richard Stallman explains.md | 193 ----------------- ...hat is POSIX- Richard Stallman explains.md | 195 ++++++++++++++++++ 2 files changed, 195 insertions(+), 193 deletions(-) delete mode 100644 sources/tech/20190715 What is POSIX- Richard Stallman explains.md create mode 100644 translated/tech/20190715 What is POSIX- Richard Stallman explains.md diff --git a/sources/tech/20190715 What is POSIX- Richard Stallman explains.md b/sources/tech/20190715 What is POSIX- Richard Stallman explains.md deleted file mode 100644 index b09db22275..0000000000 --- a/sources/tech/20190715 What is POSIX- Richard Stallman explains.md +++ /dev/null @@ -1,193 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (martin2011qi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is POSIX? Richard Stallman explains) -[#]: via: (https://opensource.com/article/19/7/what-posix-richard-stallman-explains) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -What is POSIX? Richard Stallman explains -====== -Discover what's behind the standards for operating system compatibility -from a pioneer of computer freedom. -![Scissors cutting open access to files][1] - -What is [POSIX][2], and why does it matter? It's a term you've likely seen in technical writing, but it often gets lost in a sea of techno-initialisms and jargon-that-ends-in-X. I emailed Dr. [Richard Stallman][3] (better known in hacker circles as RMS) to find out more about the term's origin and the concept behind it. - -Richard Stallman says "open" and "closed" are the wrong way to classify software. Stallman classifies programs as _freedom-respecting_ ("free" or "libre") and _freedom-trampling_ ("non-free" or "proprietary"). Open source discourse typically encourages certain practices for the sake of practical advantages, not as a moral imperative. - -The free software movement, which Stallman launched in 1984, says more than _advantages_ are at stake. Users of computers _deserve_ control of their computing, so programs denying users control are an injustice to be rejected and eliminated. For users to have control, the program must give them the [four essential freedoms][4]: - - * The freedom to run the program as you wish, for any purpose (freedom 0). - * The freedom to study how the program works and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this. - * The freedom to redistribute copies so you can help others (freedom 2). - * The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. - - - -### About POSIX - -**Seth:** The POSIX standard is a document released by the [IEEE][5] that describes a "portable operating system." As long as developers write programs to match this description, they have produced a POSIX-compliant program. In the tech industry, we call this a "specification" or "spec" for short. That's mostly understandable, as far as tech jargon goes, but what makes an operating system "portable"? - -**RMS:** I think it was the _interface_ that was supposed to be portable (among systems), rather than any one _system_. Indeed, various systems that are different inside do support parts of the POSIX interface spec. - -**Seth:** So if two systems feature POSIX-compliant programs, then they can make assumptions about one another, enabling them to know how to "talk" to one another. I read that it was you who came up with the name "POSIX." How did you come up with the term, and how was it adopted by the IEEE? - -**RMS:** The IEEE had finished developing the spec but had no concise name for it. The title said something like "portable operating system interface," though I don't remember the exact words. The committee put on "IEEEIX" as the concise name. I did not think that was a good choice. It is ugly to pronounce—it would sound like a scream of terror, "Ayeee!"—so I expected people would instead call the spec "Unix." - -Since [GNU's Not Unix][6], and it was intended to replace Unix, I did not want people to call GNU a "Unix system." I, therefore, proposed a concise name that people might actually use. Having no particular inspiration, I generated a name the unclever way: I took the initials of "portable operating system" and added "ix." The IEEE adopted this eagerly. - -**Seth:** Does "operating system" in the POSIX acronym refer only to Unix and Unix-like systems such as GNU, or is the intent to encompass all operating systems? - -**RMS:** The term "operating system," in the abstract, covers systems that are not at all like Unix, not at all close to the POSIX spec. However, the spec is meant for systems that are a lot like Unix; only such systems will fit the POSIX spec. - -**Seth:** Are you involved in reviewing or updating the current POSIX standards? - -**RMS:** Not now. - -**Seth:** The GNU Autotools toolchain does a lot to make applications easier to port, at least in terms of when it comes time to build and install. Is Autotools an important part of building a portable infrastructure? - -**RMS:** Yes, because even among systems that follow POSIX, there are lots of little differences. The Autotools make it easier for a program to adapt to those differences. By the way, if anyone wants to help in the development of the Autotools, please email me. - -**Seth:** I imagine, way back when GNU was just starting to make people realize that a (not)Unix liberated from proprietary technology was possible, there must have been a void of clarity about how free software could possibly work together. - -**RMS:** I don't think there was any void or any uncertainty. I was simply going to follow the interfaces of BSD. - -**Seth:** Some GNU applications are POSIX-compliant, while others have GNU-specific features either not in the POSIX spec or lack features required by the spec. How important is POSIX compliance to GNU applications? - -**RMS:** Following a standard is important to the extent it serves users. We do not treat a standard as an authority, but rather as a guide that may be useful to follow. Thus, we talk about following standards rather than "complying" with them. See the section [Non-GNU Standards][7] in the GNU Coding Standards. - -We strive to be compatible with standards on most issues because, on most issues, that serves users best. But there are occasional exceptions. - -For instance, POSIX specifies that some utilities measure disk space in units of 512 bytes. I asked the committee to change this to 1K, but it refused, saying that a bureaucratic rule compelled the choice of 512. I don't recall much attempt to argue that users would be pleased with that decision. - -Since GNU's second priority, after users' freedom, is users' convenience, we made GNU programs measure disk space in blocks of 1K by default. - -However, to defend against potential attacks by competitors who might claim that this deviation made GNU "noncompliant," we implemented optional modes that follow POSIX and ISO C to ridiculous extremes. For POSIX, setting the environment variable POSIXLY_CORRECT makes programs specified by POSIX list disk space in terms of 512 bytes. If anyone knows of a case of an actual use of POSIXLY_CORRECT or its GCC counterpart **\--pedantic** that provides an actual benefit to some user, please tell me about it. - -**Seth:** Are POSIX-compliant free software projects easier to port to other Unix-like systems? - -**RMS:** I suppose so, but I decided in the 1980s not to spend my time on porting software to systems other than GNU. I focused on advancing the GNU system towards making it unnecessary to use any non-free software and left the porting of GNU programs to non-GNU-like systems to whoever wanted to run them on those systems. - -**Seth:** Is POSIX important to software freedom? - -**RMS:** At the fundamental level, it makes no difference. However, standardization by POSIX and ISO C surely made the GNU system easier to migrate to, and that helped us advance more quickly towards the goal of liberating users from non-free software. That was achieved in the early 1990s, when Linux was made free software and then filled the kernel-shaped gap in GNU. - -### GNU innovations adopted by POSIX - -I also asked Dr. Stallman whether any GNU-specific innovations or conventions had later become adopted as a POSIX standard. He couldn't recall specific examples, but kindly emailed several developers on my behalf. - -Developers Giacomo Catenazzi, James Youngman, Eric Blake, Arnold Robbins, and Joshua Judson Rosen all responded with memories of previous POSIX iterations as well as ones still in progress. POSIX is a "living" standard, so it's being updated and reviewed by industry professionals continuously, and many developers who work on GNU projects propose the inclusion of GNU features. - -For the sake of historical interest, here' are some popular GNU features that have made their way into POSIX. - -#### Make - -Some GNU **Make** features have been adopted into POSIX's definition of **make**. The relevant [specification][8] provides detailed attribution for features borrowed from existing implementations. - -#### Diff and patch - -Both the **[diff][9]** and **[patch][10]** commands have gotten **-u** and **-U** options added directly from GNU versions of those tools. - -#### C library - -Many features of the GNU C library, **glibc**, have been adopted in POSIX. Lineage is sometimes difficult to trace, but James Youngman wrote: - -> "I'm pretty sure there are a number of features of ISO C which were pioneered by GCC. For example, **_Noreturn** is new in C11, but GCC-1.35 had this feature (one used the **volatile** modifier on a function declaration). Also—though I'm not certain about this—GCC-1.35 supported Arrays of Variable Length which seem to be very similar to modern C's conformant arrays." - -Giacomo Catenazzi cites the Open Group's [**strftime** article][11], pointing to this attribution: "This is based on a feature in some versions of GNU libc's **strftime()**." - -Eric Blake notes that the **getline()** and various ***_l()** locale-based functions were definitely pioneered by GNU. - -Joshua Judson Rosen adds to this, saying he clearly remembers being impressed by the adoption of **getline** functions after witnessing strangely familiar GNU-like behavior from code meant for a different OS entirely. - -"Wait…that's GNU-specific… isn't it? Oh—not anymore, apparently." - -Rosen pointed me to the [**getline** man page][12], which says: - -> Both **getline()** and **getdelim()** were originally GNU extensions. They were standardized in POSIX.1-2008. - -Eric Blake sent me a list of other extensions that may be added in the next POSIX revision (codenamed Issue 8, currently due around 2021): - - * [ppoll][13] - * [pthread_cond_clockwait et al.][14] - * [posix_spawn_file_actions_addchdir][15] - * [getlocalename_1][16] - * [reallocarray][17] - - - -### Userspace extensions - -POSIX doesn't just define functions and features for developers. It defines standard behavior for userspace as well. - -#### ls - -The **-A** option is used to exclude the **.** (representing the current location) and **..** (representing the opportunity to go back one directory) notation from the results of an **ls** command. This was adopted for POSIX 2008. - -#### find - -The **find** command is a useful tool for ad hoc [**for** loops][18] and as a gateway into [parallel][19] processing. - -A few conveniences made their way from GNU to POSIX, including the **-path** and **-perm** options. - -The **-path** option lets you filter search results matching a filesystem path pattern and was available in GNU's version of **find** since before 1996 (the earliest record in **findutil**'s Git repository). James Youngman notes that [HP-UX][20] also had this option very early on, so whether it's a GNU or an HP-UX innovation (or both) is uncertain. - -The **-perm** option lets you filter search results by file permission. This was in GNU's version of **find** by 1996 and arrived later in the POSIX standard "IEEE Std 1003.1, 2004 Edition." - -The **xargs** command, part of the **findutils** package, had a **-p** option to put **xargs** into an interactive mode (the user is prompted whether to continue or not) by 1996, and it arrived in POSIX in "IEEE Std 1003.1, 2004 Edition." - -#### Awk - -Arnold Robbins, the maintainer of GNU **awk** (the **gawk** command in your **/usr/bin** directory, probably the destination of the symlink **awk**), says that **gawk** and **mawk** (another GPL **awk** implementation) allow **RS** to be a regular expression, which is the case when **RS** has a length greater than 1. This isn't a feature in POSIX yet, but there's an [indication that it will be][21]: - -> _The undefined behavior resulting from NULs in extended regular expressions allows future extensions for the GNU gawk program to process binary data._ -> -> _The unspecified behavior from using multi-character RS values is to allow possible future extensions based on extended regular expressions used for record separators. Historical implementations take the first character of the string and ignore the others._ - -This is a significant enhancement because the **RS** notation defines a separator between records. It might be a comma or a semicolon or a dash or any such character, but if it's a _sequence_ of characters, then only the first character is used unless you're working in **gawk** or **mawk**. Imagine parsing a document of IP addresses with records separated by an ellipsis (three dots in a row), only to get back results parsed at every dot in every IP address. - -**[Mawk][22]** supported the feature first, but it was without a maintainer for several years, leaving **gawk** to carry the torch. (**Mawk** has since gained a new maintainer, so arguably credit can be shared for pushing this feature into the collective expectation.) - -### The POSIX spec - -In general, Giacomo Catenzzi points out, "…because GNU utilities were used so much, a lot of other options and behaviors were aligned. At every change in shell, Bash is used as comparison (as a first-class citizen)." There's no requirement to cite GNU or any other influence when something is rolled into the POSIX spec, and it can safely be assumed that influences to POSIX come from many sources, with GNU being only one of many. - -The significance of POSIX is consensus. A group of technologists working together toward common specifications to be shared by hundreds of uncommon developers lends strength to the greater movement toward software independence and developer and user freedom. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/what-posix-richard-stallman-explains - -作者:[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://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ -[3]: https://stallman.org/ -[4]: https://www.gnu.org/philosophy/free-sw.en.html -[5]: https://www.ieee.org/ -[6]: http://gnu.org -[7]: https://www.gnu.org/prep/standards/html_node/Non_002dGNU-Standards.html -[8]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html -[9]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html -[10]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/patch.html -[11]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html -[12]: http://man7.org/linux/man-pages/man3/getline.3.html -[13]: http://austingroupbugs.net/view.php?id=1263 -[14]: http://austingroupbugs.net/view.php?id=1216 -[15]: http://austingroupbugs.net/view.php?id=1208 -[16]: http://austingroupbugs.net/view.php?id=1220 -[17]: http://austingroupbugs.net/view.php?id=1218 -[18]: https://opensource.com/article/19/6/how-write-loop-bash -[19]: https://opensource.com/article/18/5/gnu-parallel -[20]: https://www.hpe.com/us/en/servers/hp-ux.html -[21]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html -[22]: https://invisible-island.net/mawk/ diff --git a/translated/tech/20190715 What is POSIX- Richard Stallman explains.md b/translated/tech/20190715 What is POSIX- Richard Stallman explains.md new file mode 100644 index 0000000000..038541daa1 --- /dev/null +++ b/translated/tech/20190715 What is POSIX- Richard Stallman explains.md @@ -0,0 +1,195 @@ +[#]: collector: (lujun9972) +[#]: translator: (martin2011qi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What is POSIX? Richard Stallman explains) +[#]: via: (https://opensource.com/article/19/7/what-posix-richard-stallman-explains) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +POSIX 是什么?让我们听听 Richard Stallman 的诠释 +====== +从计算机自由先驱口中探寻操作系统兼容性标准背后的本质。 + +![Scissors cutting open access to files][1] + +[POSIX][2] 是什么?为什么如此重要?你可能在很多的技术类文章中看到这个术语,但往往会在探寻其本质时迷失在技术初始主义techno-initialisms的海洋中或是以 X 结尾的行话jargon-that-ends-in-X中。 + +Richard Stallman 认为用 “开源” 和 “闭源” 来归类软件是一种错误的方法。Stallman 将程序分类为 _尊重自由的freedom-respecting_(“自由free” 或 “自由(西语)libre”)和 _践踏自由的freedom-trampling_(“非自由non-free” 或 “专有proprietary”)。开源话语通常会为了(用户)实际得到的优势/便利advantages考虑,而去鼓励某些做法,而非作为道德层面上的约束。 + +Stallman 在由其本人于 1984 年发起的自由软件运动中表明,不仅仅是这些 _优势/便利advantages_ 受到了威胁。计算机的用户 _理应得到deserve_ 计算机的控制权,因此拒绝被用户控制的程序即是 非正义injustice,理应得到拒绝rejected排斥eliminated。对于用户的控制权,程序应当给予用户 [四项基本自由][4]: + + * 自由度0:无论用户出于何种目的,必须可以按照用户意愿,自由地运行该软件。 + * 自由度1:用户可以自由地学习并修改该软件,以此来帮助用户完成用户自己的计算。作为前提,用户必须可以访问到该软件的源代码。 + * 自由度2:用户可以自由地分发该软件的拷贝,这样就可以助人。 + * 自由度3:用户可以自由地分发该软件修改后的拷贝。借此,用户可以把改进后的软件分享给整个社区令他人也从中受益。作为前提,用户必须可以访问到该软件的源代码。 + +### 关于 POSIX + +**Seth:** POSIX 标准是由 [IEEE][5] 发布,用于描述 “可移植操作系统” 的文档。只要开发人员编写符合此描述的程序,他们生产的便是符合 POSIX 的程序。在科技行业,我们称之为 “规范specification” 或将其简写为 “spec”。 就技术用语而言,这是可以理解的,但我们不禁要问是什么使操作系统 “可移植”? + +**RMS:** 我认为完成这项任务应该是 _接口_, 接口就应该做到可移植(在不同系统中皆然),而不应只支持任何一种 _系统_。实际上,各种各样的系统内部构造虽然不同,但仍会支持一部分 POSIX 接口规范。 + +**Seth:** 因此,如果两个系统皆具有 POSIX 兼容程序,那么他们便可以相互对对方做出假设,也就使他们知道如何相互 “交谈”。我了解到 “POSIX” 这个简称是你想出来的。那你是怎么想出来的呢?它是如何就被 IEEE 采纳了呢? + +**RMS:** IEEE 已经完成了规范的开发,但还没为其想好简练的名称。标题上写的是 “便携式操作系统接口”,虽然我已记不清确切的单词。委员倾向于将 “IEEEIX” 作为简称。而我认为那不太好。发音有点怪 - 听起来像恐怖的尖叫,“Ayeee!” - 所以我觉得人们反而会倾向于称之为 “Unix”。 + +但是,由于 [GNU 并不是 Unix(GNU's Not Unix)][6],并且它打算取代之,所以我不希望人们将 GNU 称为 “Unix 系统”。因此,我提出了人们在实际使用中会比较好用的简称。那个时候也没有什么灵感,我就用了一个并不是非常聪明的方式创造了这个简称:我使用了 “便携式操作系统portable operating system” 的首字母缩写,并在末尾添加了 “ix” 作为简称。IEEE 也欣然接受了。 + +**Seth:** POSIX 中的 “操作系统” 是仅涉及 Unix 和类 Unix 的系统(如GNU)呢?还是意图包含所有操作系统? + +**RMS:** 缩写中的 “操作系统” 一词涵盖的系统并不完全指的是类 Unix 系统,也不是完全要符合 POSIX 规范。但是,该规范适用于大量类 Unix 的系统;也只有这样的系统才会去遵守 POSIX 规范。 + +**Seth:** 你是否参与审核或更新当前版本的 POSIX 标准? + +**RMS:** 现在不了。 + +**Seth:** GNU Autotools 工具链能使应用程序更容易移植,至少在构建和安装的时间上是这样的。所以可以认为 Autotools 是构建便携式基础设施的重要一环吗? + +**RMS:** 是的,因为即使在遵循 POSIX 的系统中,也存在着诸多差异。而 Autotools 可以使程序更容易适应这些差异。顺带一提,如果有人想助力 Autotools 的开发,可以发邮件联系我。 + +**Seth:** 我认为,是 GNU 首先开始让人们意识到这种可能,一个非 Unix 的系统可以从专有的技术中挣脱出来的可能。关于自由软件如何协作方面,在实现的途中应该有些缺乏明确性地方吧!。 + +**RMS:** 我认为没有任何空白或不确定性。我只是简单地照着 BSD 的接口写而已。 + +**Seth:** 一些 GNU 应用程序符合 POSIX 标准,而另一些 GNU 应用程序则具有不在 POSIX 规范中的或者是缺少规范要求的 GNU 特定功能。对于 GNU 应用程序 POSIX 合规性有多重要? + +**RMS:** 遵循标准对于为用户服务的程度很重要。我们不仅将标准视为权威,而且将其作为可能有用的指南来遵循。因此,我们谈论的是遵循following标准而不是“遵守complying”。可以参考 GNU 编码标准中的 [非 GNU 标准][7] 段落。 + +我们努力在大多数问题上与标准兼容,因为这样做在大多数的问题上能为用户提供最好的服务。但也偶有例外。 + +例如,POSIX 指定某些实用程序以 512 字节为单位测量磁盘空间。我要求委员会将其改为 1K,但被拒绝了,说是有个官僚主义的规则bureaucratic rule强迫选用 512。我不记得有多少人试图争辩说,用户会对这个决定感到满意的。 + +由于 GNU 的第二优先级,在用户的自由freedom之后即是用户的便利convenience,我们使 GNU 程序以默认 1K 为单位按块测量磁盘空间。 + +然而,为了防止竞争对手利用这点给 GNU 安上 “不合规noncompliant” 的骂名,我们实现了遵循 POSIX 和 ISO C 的可选模式,这种妥协着实可笑。想要遵循 POSIX,只需设置环境变量 POSIXLY_CORRECT,即可使程序符合以 512 字节为单位的 POSIX 列表磁盘空间。如果有人知道实际使用 POSIXLY_CORRECT 或者 GCC 中的 **\--pedantic** 会为某些用户提供什么实际利益的话,请务必告诉我。 + +**Seth:** 符合 POSIX 标准的自由软件项目是否更容易移植到其他类 Unix 系统? + +**RMS:** 我认为是这样,但自 80 年代开始,我决定不再把时间浪费在将软件移植到 GNU 以外的系统上。我开始专注于推进 GNU 系统,使其不必使用任何非自由软件。至于将 GNU 程序移植到非类 GNU 系统就留给想在其他系统上运行它们的人们了。 + +**Seth:** POSIX 对于软件的自由很重要吗? + +**RMS:** 本质上说,(遵不遵循 POSIX)其实没有任何区别。但是,POSIX 和 ISO C 的标准化确实使 GNU 系统更容易迁移,这有助于我们更快地实现从非自由软件中解放用户的目标。在 90 年代早期,使用自由软件成功地打造出 Linux,同时也填补了 GNU 中对于内核的空白。 + +### POSIX 采纳 GNU 的创新 + +我还讯问过 Dr. Stallman,是否有任何 GNU 特定的创新或惯例后来被采纳为 POSIX 标准。他无法回想起具体的例子,但友好地代我向几位开发人员发了邮件。 + +开发人员 Giacomo Catenazzi,James Youngman,Eric Blake,Arnold Robbins 和 Joshua Judson Rosen 都根据当前版本的 POSIX 以及诸多前回版本做出了回应。POSIX 是一个 “活的living” 标准,因此会不断被行业专业人士更新和评审,许多从事 GNU 项目的开发人员会提出对于 GNU 特性的包容。 + +为了回顾这些有趣的历史,接下来会罗列一些脍炙人口的已经融入 POSIX 的 GNU 特性。 + +#### Make + +一些 GNU **Make** 的特性已经被 POSIX 定义的 **make** 所采用。相关的 [规范][8] 提供了从现有实现中借来特性的详细归属。 + +#### Diff 和 patch + +**[diff][9]** 和 **[patch][10]** 命令都直接从这些工具的 GNU 版本中引进了 **-u** 和 **-U** 选项。 + +#### C 库 + +POSIX 采用了 GNU C 库 **glibc** 的许多特性。血统Lineage一时已难以追溯,但 James Youngman 如是写道: + +>“我非常确定 GCC 首创了许多 ISO C 的特性。例如,**_Noreturn** 是 C11 中的新特性,但 GCC-1.35 便具有此功能(使用 **volatile** 作为声明函数的修饰符)。另外尽管我不确定该 GCC-1.35 支持的可变长度数组似乎与现代 C 中的(柔性数组conformant array没有找到准确的翻译,推测是柔性数组)非常相似。“ + +Giacomo Catenazzi 援引 Open Group 的 [文章 **strftime**][11],并指出其归因:“这是基于某版本 GNU libc 的 **strftime()** 的某特性。” + +Eric Blake 指出,对于 **getline()** 和各种基于本地环境的 ***_l()** 函数,GNU 绝对是这方面的先驱。 + +Joshua Judson Rosen 补充道,他对采纳 **getline** 函数的印象深刻,特别是在目睹了全然不同操作系统的代码中和类 GNU 代码相似却又怪异的做法后。 + +“等等……那是 GNU 特有的……不是吗?显然已经不再是了。” + +Rosen 指出的 [**getline** 手册页][12] 中写道: + +> **getline()** 和 **getdelim()** 最初都是 GNU 扩展。在 POSIX.1-2008 中被标准化。 + +Eric Blake 向我发送了一份其他扩展的列表,这些扩展可能会在下一个 POSIX 修订版中添加(代号为 Issue 8,大约在 2021 年前后): + + * [ppoll][13] + * [pthread_cond_clockwait et al.][14] + * [posix_spawn_file_actions_addchdir][15] + * [getlocalename_1][16] + * [reallocarray][17] + + + +### 关于用户空间的扩展 + +POSIX 不仅为开发人员定义函数和特性,还为用户空间定义了标准行为。 + +#### ls + +**-A** 选项会排除符号 **.**(代表当前位置)和 **..**(代表上一级目录)这些来自 **ls** 命令的结果。被 POSIX 2008 采纳。 + +#### find + +The **find** command is a useful tool for ad hoc [**for** loops][18] and as a gateway into [parallel][19] processing. + +**find** 命令是一个专门的ad hoc [**for** loops][18] 工具,也是 [并行parallel][19] 处理的出入口。 + +A few conveniences made their way from GNU to POSIX, including the **-path** and **-perm** options. + +一些从 GNU 引入到 POSIX 的便捷操作conveniences,包括 **-path** 和 **-perm** 选项。 + +**-path** 选项帮你过滤与文件系统路径模式匹配的搜索结果,并且 1996 年前 GNU 版本的 **find** (根据 **findutil** 在 Git 仓库中最早的记录)便可使用此选项。James Youngman 指出 [HP-UX][20] 也很早就有这个选项,所以究竟是 GNU 还是 HP-UX 做出的这一创新(抑或两者兼而有之)无法考证。 + +**-perm** 选项帮你按文件权限过滤搜索结果。1996 年 GNU 版本的 **find** 中便已存在,随后被纳入 POSIX 标准 “IEEE Std 1003.1,2004 Edition” 中。 + +**xargs** 命令是 **findutils** 软件包的一部分,1996 年的时候就有一个 **-p** 选项会将 **xargs** 置于交互模式(用户将被提示是否继续),随后被纳入 POSIX 标准 "IEEE Std 1003.1, 2004 Edition." 中。 + +#### Awk + +GNU **awk**(即 **/usr/bin** 目录中的 **gawk** 命令,可能也是符号链接 **awk** 的目标地址)的维护者 Arnold Robbins 说道,**gawk** 和 **mawk**(另一个GPL 的 **awk** 实现)允许使用 **RS** 作为正则表达式,即 **RS** 的长度大于 1 时的情况。这一特性还不是 POSIX 的特性,但有 [迹象表明它即将会是][21]: + +> _在扩展正则表达式中未定义的行为将导致 NUL 结果,以支持 GNU gawk 程序未来对于处理二进制数据的扩展。_ +> +> _使用多字符 RS 值的未指定行为是为了支持未来可能基于扩展正则表达式使用记录分隔符的特性。历史实现为采用字符串的第一个字符而忽略其他字符。_ + +这是一个重大的增强,因为 **RS** 符号定义了记录之间的分隔符。可能是逗号、分号、短划线、或者是任何此类字符,但如果它是字符 _序列_,则只会使用第一个字符,除非你使用的是 **gawk** 或 **mawk**。想象一下这种情况,使用省略号(连续的三个点)作为解析 IP 地址文档的分隔记录,只是想获取在每个 IP 地址的每个点处解析的结果。 + +**[Mawk][22]** 首先支持这个功能,但是几年来没有维护者,留下来的火把由 **gawk** 接过。(**Mawk** 已然获得了一个新的维护者,可以说是大家薪火传承地将这一特性推向共同的预期值。) + +### POSIX 规范 + +总的来说,Giacomo Catenzzi 指出,“……因为 GNU 的实用程序使用广泛,而且许多其他的选项和行为又对标规范。在 shell 的每次更改中,Bash 都会被用作比较(作为一等公民)。” 当某些东西被纳入 POSIX 规范时,无需提及 GNU 或任何其他影响,你可以简单地认为 POSIX 规范会受到许多方面的影响,GNU 只是其中之一。 + +共识是 POSIX 存在的意义所在。一群技术人员共同努力为了实现普世的规范,再分享给数以百计独特的开发人员,经由他们的赋能,从而实现软件的独立性,以及开发人员和用户的自由。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/what-posix-richard-stallman-explains + +作者:[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://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ +[3]: https://stallman.org/ +[4]: https://www.gnu.org/philosophy/free-sw.en.html +[5]: https://www.ieee.org/ +[6]: http://gnu.org +[7]: https://www.gnu.org/prep/standards/html_node/Non_002dGNU-Standards.html +[8]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html +[9]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html +[10]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/patch.html +[11]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html +[12]: http://man7.org/linux/man-pages/man3/getline.3.html +[13]: http://austingroupbugs.net/view.php?id=1263 +[14]: http://austingroupbugs.net/view.php?id=1216 +[15]: http://austingroupbugs.net/view.php?id=1208 +[16]: http://austingroupbugs.net/view.php?id=1220 +[17]: http://austingroupbugs.net/view.php?id=1218 +[18]: https://opensource.com/article/19/6/how-write-loop-bash +[19]: https://opensource.com/article/18/5/gnu-parallel +[20]: https://www.hpe.com/us/en/servers/hp-ux.html +[21]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html +[22]: https://invisible-island.net/mawk/ From 8513a748208d9759204154f41291e8387ff99738 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:51:40 +0800 Subject: [PATCH 092/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20WPS=20?= =?UTF-8?q?Office=20on=20Linux=20is=20a=20Free=20Alternative=20to=20Micros?= =?UTF-8?q?oft=20Office?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md --- ... a Free Alternative to Microsoft Office.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md diff --git a/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md b/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md new file mode 100644 index 0000000000..6d271a33cf --- /dev/null +++ b/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md @@ -0,0 +1,112 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (WPS Office on Linux is a Free Alternative to Microsoft Office) +[#]: via: (https://itsfoss.com/wps-office-linux/) +[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) + +WPS Office on Linux is a Free Alternative to Microsoft Office +====== + +_**If you are looking for a free alternative of Microsoft Office on Linux, WPS Office is one of the best choice. It’s free to use and offers compatibility with MS Office document formats.**_ + +[WPS Office][1] is a cross-platform office productivity suite. It is light and fully compatible with Microsoft Office, Google Docs/Sheets/Slide and Adobe PDF. + +For many users, WPS Office feels intuitive and capable enough to meet their needs. It has gained popularity because of its closeness to Microsoft Office, both in terms of looks and compatibility. + +![WPS Office 2019 All In One Mode][2] + +WPS office is created by Kingsoft Corporation based in China. For Windows users, WPS Office has both free and premium versions. For Linux users, WPS Office is available for free through its [community project][3]. + +Non-FOSS Alert! + +WPS Office is not an open source software. We have covered it here because it’s available for free for Linux users and at times, we cover software created for Linux even if they are not open source. + +### WPS Office on Linux + +![WPS Office in Linux | Image Credit: Ubuntu Handbook][4] + +WPS Office has four main components: + + * WPS Writer + * WPS Presentation + * WPS Spreadsheet + * WPS PDF + + + +WPS Office is fully compatible with MS Office and more, supporting .doc, .docx, .dotx, .ppt, .pptx, .xls, .xlsx, .docm, .dotm, .xml, .txt, .html, .rtf (and others), as well as its own format (.wps, .wpt). It also includes Microsoft fonts by default (to ensure compatibility), can export PDFs and provides spell checking capabilities in more than 10 languages. + +However, it didn’t do very well with ODT, ODP and other open document formats. + +All three main WPS Office applications feature a very similar interface to Microsoft Office, with the same Ribbon UI. Although there are minor differences, the usage remains relatively the same. You can easily clone any Microsoft Office/LibreOffice document using WPS Office. + +![WPS Office Writer][5] + +The only thing you might dislike are some of the default styling settings (some headers having a lot of space beneath them etc.), but these can be easily tweaked. + +[][6] + +Suggested read  WPS Office: Microsoft Office Clone For Ubuntu! + +By default, WPS saves files in .docx, .pptx and .xlsx file types. You can also save documents to the **[WPS Cloud][7]** and collaborate on them with others. Another nice addition is the possibility to download a great number of templates from [here][8]. + +### Install WPS Office on Linux + +WPS provides DEB and RPM installer files for Linux distributions. This makes installing WPS Office an easy process if you use Debian/Ubuntu or Fedora based distributions. + +You can download WPS for Linux from its download section: + +[Download WPS Office for Linux][9] + +Scroll down and you’ll find a link to the package for the latest version: + +![WPS Office Download][10] + +Download the appropriate file for your distribution. [Installing applications from DEB][11] or RPM file is as easy as double clicking on them. Doing so will open up a Software Center instance providing you the option to install the package: + +![WPS Office Install Package][12] + +After a few seconds, the application should successfully install on your system! + +You can now search for **WPS** in the Applications Menu and find all applications found in the WPS Office Suite: + +![WPS Applications Menu][13] + +**Do you use WPS Office or something else?** + +There are other [open source alternatives to Microsoft Office][14] but they have poor compatibility with the MS Office. + +Personally, I prefer LibreOffice but you have to work considerably with Microsoft Office, you may try WPS Office on Linux. It looks similar to MS Office and has good compatibility with MS document formats. It’s free on Linux so you don’t have to worry about Office 365 subscription as well. + +What office suite do you use on your system? Have you ever used WPS Office on Linux? How was/is your experience with it? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/wps-office-linux/ + +作者:[Sergiu][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/sergiu/ +[b]: https://github.com/lujun9972 +[1]: https://www.wps.com/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps2019-all-in-one-mode.png?resize=800%2C526&ssl=1 +[3]: http://wps-community.org/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-2019-Linux.jpg?resize=800%2C450&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-office-writer.png?resize=800%2C454&ssl=1 +[6]: https://itsfoss.com/wps-office-microsoft-office-clone-for-ubuntu/ +[7]: https://account.wps.com/?cb=https%3A%2F%2Fdrive.wps.com%2F +[8]: https://template.wps.com/ +[9]: http://wps-community.org/downloads +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_download.jpg?fit=800%2C413&ssl=1 +[11]: https://itsfoss.com/install-deb-files-ubuntu/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_install_package.png?fit=800%2C719&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_applications_menu.jpg?fit=800%2C355&ssl=1 +[14]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ From 815c8aad54b32c9426fb6eda871aad512cdb8079 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:52:28 +0800 Subject: [PATCH 093/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190723=20Buildi?= =?UTF-8?q?ng=20an=20organization=20that's=20always=20learning:=20Tips=20f?= =?UTF-8?q?or=20leaders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190723 Building an organization that-s always learning- Tips for leaders.md --- ...hat-s always learning- Tips for leaders.md | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sources/tech/20190723 Building an organization that-s always learning- Tips for leaders.md diff --git a/sources/tech/20190723 Building an organization that-s always learning- Tips for leaders.md b/sources/tech/20190723 Building an organization that-s always learning- Tips for leaders.md new file mode 100644 index 0000000000..dca14d131e --- /dev/null +++ b/sources/tech/20190723 Building an organization that-s always learning- Tips for leaders.md @@ -0,0 +1,103 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Building an organization that's always learning: Tips for leaders) +[#]: via: (https://opensource.com/open-organization/19/7/continuous-learning-tool) +[#]: author: (Colin Willis https://opensource.com/users/colinwillishttps://opensource.com/users/colinwillishttps://opensource.com/users/marcobravohttps://opensource.com/users/jamesf) + +Building an organization that's always learning: Tips for leaders +====== +Research shows that informal learning is essential in open +organizations. How can we measure and foster it? +![word learn in chalk on blackboard][1] + +In open organizations, informal learning is critical to success. "Informal learning" accounts for all learning that occurs outside a training program, a classroom, or another formalized instruction setting. Unlike the learning in these formalized learning settings, informal learning is unstructured, personal, and voluntary. + +As a result, systematic study of it is difficult. But due to [the prevalence and importance of informal learning in workplaces][2], several researchers have called for additional research into the subject—and particularly for the design of instruments to actually _measure_ informal learning. Such instruments could likewise be useful in [open organizations][3] hoping to measure and foster informal learning practices among employees. + +Over the past few years, I've conducted research addressing this gap in the scientific literature. In this article, I'll describe a recent study I conducted and explain how my results can help us think about informal learning in the open organization. + +### Measuring the invisible + +The field of psychology studies the thoughts, attitudes, and behaviors of individuals both in isolation and in group settings. The specific field of psychology in which I specialize, industrial and organizational psychology, studies these same variables in the workplace. + +My research in this area concerns a phenomenon important to everyone in my field: How do we _accurately_ and _reliably_ measure psychological phenomena? In my case, I'm attempting to develop a specific tool for measuring informal learning. In short, this means I'm testing for two things: + + 1. Can an "invisible" concept, like one's ability to adapt, be measured by a set of behaviors that are thought to be indicative of, in this example, adapting? + 2. If these conceptual abilities exist, are they related to other behaviors or outcomes in an interesting way (for example, is there a relationship between adapting and job performance)? + + + +One method of measurement is the use of psychological scales, which are a set of statements that describe a psychological construct. People respond to statements they're given and note the extent to which they agree with the statement or believe the statement to be true of them, typically on some form of "low to high" scale. For example, common psychological scales include, but are not limited to, personality inventories of traits like "conscientiousness," "openness to experience," "extraversion," "agreeableness," or "emotional stability" and specific attitudes like "job satisfaction" or "self-efficacy." Scales such as these go through an extensive scientific development process. + +However, not all scales are created equally. You may recognize the similarity between a psychological scale and an internet or magazine quiz. Both include a series of statements that you rate, and your ratings tell you something about yourself. But the former has undergone a rigorous process of study and verification involving creation of many possible statements, as well as continual refinement via data collection and statistical analysis. The latter has not. + +### A new tool + +To create a measure of informal learning behaviors, I reviewed theories and behaviors of informal learning documented in hundreds of journal articles and books on the subject. + +To create a measure of informal learning behaviors, I reviewed theories and behaviors of informal learning documented in hundreds of journal articles and books on the subject. I then analyzed what I found in them to create a set of six higher-level dimensions of behaviors that I believed would comprehensively and accurately describe the wide variety of intentional learning behaviors often seen in the workplace. These were: + + * **Planning:** the act of thinking ahead or preparing for future events by amassing materials, rehearsing, setting goals, or evaluating one's learning ability + * **Socializing:** the process of debating, conversing, or digesting information with a group of peers, creating or maintaining a network, or observing the work of others + * **Reflecting:** the internal act of thinking about feedback one has received, maintaining awareness about one's environment, or drawing upon experiences to adjust future behavior + * **Experimenting:** The outwardly act of trying out new ideas, taking on new challenges, coming up with alternatives, taking risks, and anticipating consequences of actions. + * **Adapting:** the set of proactive behaviors one takes to learn, adjust to, and master changes to one's environment such as asking clarifying questions, addressing conflict directly, or making conclusions about new situations + * **Scanning:** the process of staying current on job-related knowledge by researching answers to new questions, reading or watching content related to one's job, or attending events related to one's profession + + + +I then wrote slightly fewer than 100 statements that described unique behaviors related to the six dimensions I hypothesized existed. With the help of several subject matter experts, I revised and retooled the language of these statements. For example, a planning item reads, "Set a learning goal for yourself," and an experimenting item reads, "Challenge existing assumptions about ideas at work." Subjects rate their responses to these items on a 1-to-5 scale, where "1" means "not at all characteristic of me" and "5" means "highly characteristic of me." + +I collected more than 1,000 responses to these items and several additional, related psychological scales that pertained to motivations and attitudes centered on learning. I found strong support for four of my dimensions and additional evidence that two of my dimensions—"planning" and "scanning"—were very similar to one another, so I began treating those two dimensions as one. Furthermore, I reduced the number of statements down to 23 while retaining the ability to measure each dimension accurately. These five dimensions were very strongly related to other learning concepts, like one's motivation to learn, one's tendency to think about one's own thinking and learning, and one's tendency to act in a goal-driven manner. + +### What I learned about learning + +Given this evidence, I conducted a second study to confirm the five dimensions and 23 items I found in the first study. I conducted this study in an organization where I asked participants to respond to my "informal learning" scale, a "professional confidence" scale, and a "support for learning" scale. The organization also provided performance data to use as an outcome measure. + +Specifically, I was interested in determining whether and how professional confidence and perceived support for learning in the organization predicted informal learning behaviors and whether informal learning behaviors predicted job performance. It is increasingly common in the organizational science to test statistical models of individual and organizational level variables; in this case, I was interested in determining the extent to which one's confidence in their ability to do their job affected informal learning (are confident people more likely to self-guide their own learning?) and the extent to which a culture of learning (or lack thereof) bolstered or inhibited learning (if one thinks they won't be rewarded for learning, will they perform learning behaviors anyway?). Finally, job performance is a common outcome to measure in the organizational sciences, as researchers and practitioners in the field are often concerned with the ability to predict and improve performance. + +For this study, 167 employees completed the survey. The small sample size limited the ability for the statistical analyses to study all proposed research questions, but I still uncovered several interesting results. + +I found that two dimensions of informal learning were strong predictors of job outcomes: + + 1. Experimenting behaviors, or _a willingness to try new things_, predicted job performance and job potential. + 2. Reflecting behaviors, or _the extent to which one requests and processes feedback_, predicted a likelihood to remain with the organization. + + + +Additionally, the study found a strong relationship between occupational self-efficacy, or _one's confidence in his or her ability to do their job_, and informal learning. + +### Some results and implications + +Succeeding in any organization—but especially an open organization—requires one to develop as a continuous learner. Evidence supports this claim. + +The second study provided some compelling indications that informal learning is not only theoretically but also practically important to both the employee and the organization. Succeeding in any organization—but especially an open organization—requires one to develop as a continuous learner. Evidence supports this claim. Those who had well-developed habits of experimenting and reflecting were more likely to be top performers who were well-ingrained in the organization. + +That's not to say that these are the only important behaviors. But they do represent important areas of concern for both individual contributors, managers, and other leaders in an organization. If you're intrigued and want to begin supporting informal learning in a concrete way, consider the following: + + * Evidence from these studies suggest that informal learning is closely related to one's confidence in their ability to do their job. Confidence can be developed through motivation and work design; for example, giving an employee the ability to shape his or her own tasks or role, which cultivates a sense of autonomy and curiosity, would likely spur learning behaviors. + * Following up with support and rewards for doing so, which are strong motivators, would reinforce that learning. You might also consider educating yourself or your team about learning behaviors and providing, where applicable, tools and opportunities to develop those behaviors. For example, research has shown that reflecting via note-taking or journaling has been very effective at bolstering reflecting abilities and later ability to recall information. + + + +Learning informally at work is incredibly common; however, treating learning as a skill is far less common. Hopefully this article series has better equipped you to think about and support learning at work using the latest research has to offer on the topic. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/19/7/continuous-learning-tool + +作者:[Colin Willis][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/colinwillishttps://opensource.com/users/colinwillishttps://opensource.com/users/marcobravohttps://opensource.com/users/jamesf +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_khan_520x292_FINAL.png?itok=vuhXpZDI (word learn in chalk on blackboard) +[2]: https://opensource.com/open-organization/19/7/informal-learning-adaptability +[3]: https://opensource.com/open-organization/resources/open-org-definition From fb1621c24c81881b2069e2ed83df01cf410d478a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:53:03 +0800 Subject: [PATCH 094/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190723=20JavaSc?= =?UTF-8?q?ript's=20surprising=20rise=20from=20the=20ashes=20of=20the=20br?= =?UTF-8?q?owser=20wars=20on=20Command=20Line=20Heroes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190723 JavaScript-s surprising rise from the ashes of the browser wars on Command Line Heroes.md --- ...the browser wars on Command Line Heroes.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/tech/20190723 JavaScript-s surprising rise from the ashes of the browser wars on Command Line Heroes.md diff --git a/sources/tech/20190723 JavaScript-s surprising rise from the ashes of the browser wars on Command Line Heroes.md b/sources/tech/20190723 JavaScript-s surprising rise from the ashes of the browser wars on Command Line Heroes.md new file mode 100644 index 0000000000..b65d6f5ee3 --- /dev/null +++ b/sources/tech/20190723 JavaScript-s surprising rise from the ashes of the browser wars on Command Line Heroes.md @@ -0,0 +1,69 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (JavaScript's surprising rise from the ashes of the browser wars on Command Line Heroes) +[#]: via: (https://opensource.com/article/19/7/command-line-heroes-javascript) +[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/petercheerhttps://opensource.com/users/marcobravohttps://opensource.com/users/madtom1999) + +JavaScript's surprising rise from the ashes of the browser wars on Command Line Heroes +====== +A single Netscape employee wrote JavaScript in 10 days. It's now the +most pervasive programming language in the world. Here's the unlikely +story of how it happened. +![Listen to the Command Line Heroes Podcast][1] + +The third season of the [Command Line Heroes][2] podcast continues its look at the history of the programming languages we depend on every day. Episode 3, released today, investigates the origin of JavaScript. Here's the unlikely story of how it happened. + +### A look back at the browser wars + +1995 was a year full of competition over a new frontier. The web browser created by Netscape had been out for a full year already, and the competition was heating up. [Clive Thompson][3] recollects the intensity and the excitement in the air during that time. Today we talk about the velocity of technology being faster than ever, and I wonder if it's our [recency bias][4] tricking our minds from remembering the buzz in 1995. + +> "Things were moving so rapidly back then." +> —Clive Thompson + +The story goes of a single person being "locked in a room" (I hope that's an exaggeration) and creating what is now the most prevalent language of the web. That was 34-year-old Netscape employee Brendan Eich, who chained himself to his desk for 10 days. At the end of those 10 days in 1995, [he delivered JavaScript][5]. + +Eich's efforts to deliver value to his company also sound like a fulfillment of his passion to write a widely used programming language. This story hits home, especially after hearing about the [history of BASIC][6] on episode 2. + +The programming community of 1995 did not accept JavaScript with open arms. (I believe the word "derision" was used in the episode.) But it was unpretentious, secretly elegant, based on the best in language design, and sacrificed some bugginess for speed to market. It worked. + +> "The origins of Firefox can be traced directly to Netscape, a compan­y whose web browser, Netscape Navigator, was the dominant browser before Microsoft developed Internet Explorer. The internal company name for the browser was Mozilla. Eventually, Netscape released the source code for Navigator under an open source license, meaning anyone could see and use the code. A non­profit group was set up to direct the development of browsers using this code. This group became the Mozilla Foundation in 2003." +> —Sayak Sarkar, [From Netscape To Firefox: The Story Of Mozilla Firefox][7] + +This story makes me think about what my 18-year-old niece studying computer science might take away from all of this. A long time ago, very few people were on the internet. One person made a difference for his company. Even though that company wouldn't survive its time, ultimately, he made a difference for all of us. It's a fun story to explore. + +### A look back at waterfall development + +There's a subtle element in the conversation around JavaScript that looks at software lifecycles in 1995. Netscape was far ahead of the curve with three-month development cycles at a time when the most dominant force in technology was releasing updates every four years. It was well before [Agile][8] and its Manifesto, before the hyper-scale mantra of "move fast and break things" (which [hasn't aged well][9]) and the brilliance of [Toyota Kata][10]. That boldness absolutely blows my mind. + +### Give it a listen + +Command Line Heroes' combination of history and present time creates a great story. Give it a listen. + +Command Line Heroes will cover programming languages for all of season 3. [Subscribe][2] to learn everything you want to know about the origin of programming languages. I would love to hear your thoughts about it in the comments below. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/command-line-heroes-javascript + +作者:[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/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/petercheerhttps://opensource.com/users/marcobravohttps://opensource.com/users/madtom1999 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command-line-heroes-520x292.png?itok=s_F6YEoS (Listen to the Command Line Heroes Podcast) +[2]: https://www.redhat.com/en/command-line-heroes +[3]: https://www.clivethompson.net/ +[4]: https://www.davemanuel.com/investor-dictionary/recency-bias/ +[5]: https://thenewstack.io/brendan-eich-on-creating-javascript-in-10-days-and-what-hed-do-differently-today/ +[6]: https://opensource.com/19/7/command-line-heroes-ruby-basic +[7]: https://sayaksarkar.wordpress.com/2012/03/12/from-netscape-to-firefox-the-story-of-mozilla-firefox/ +[8]: https://opensource.com/article/18/10/what-agile +[9]: https://hbr.org/2019/01/the-era-of-move-fast-and-break-things-is-over +[10]: https://en.wikipedia.org/wiki/Toyota_Kata From c2418cf6f01d77073d0c0c942c6ce77137adc77d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:53:42 +0800 Subject: [PATCH 095/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190723=209=20pe?= =?UTF-8?q?ople=20for=20sysadmins=20to=20follow=20on=20Twitter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190723 9 people for sysadmins to follow on Twitter.md --- ...ople for sysadmins to follow on Twitter.md | 177 ++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 sources/tech/20190723 9 people for sysadmins to follow on Twitter.md diff --git a/sources/tech/20190723 9 people for sysadmins to follow on Twitter.md b/sources/tech/20190723 9 people for sysadmins to follow on Twitter.md new file mode 100644 index 0000000000..8fb6e32c2e --- /dev/null +++ b/sources/tech/20190723 9 people for sysadmins to follow on Twitter.md @@ -0,0 +1,177 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (9 people for sysadmins to follow on Twitter) +[#]: via: (https://opensource.com/article/19/7/twitter-sysadmins) +[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberghttps://opensource.com/users/sethhttps://opensource.com/users/aloksharma08https://opensource.com/users/marcobravohttps://opensource.com/users/don-watkins) + +9 people for sysadmins to follow on Twitter +====== +Follow these accounts to gain a wealth of knowledge about being a better +sysadmin. +![Red and blue birds chatting on telephone wire over city skyline][1] + +While Twitter certainly isn't the most open source platform, the open source community on the social network brings a lot of great minds together on a daily basis. The site, as I see it, also democratizes access to these brilliant minds since we're all just one **@** away. + +Here are nine people whose Twitter accounts are making my pursuit of sysadmin knowledge, and its continued evolution, better. They fall across the spectrum of technology with the one thing they have in common being their passionate, informative, and thoughtful perspective. They share a wealth of knowledge from explaining Linux commands through comics, to applying a PhD's worth of knowledge to making DevOps make sense. + +### Julia Evans [@b0rk][2] + +Julia has found a beautiful way to combine her love for sysadmin skills with her talent in drawing. She teaches the skills you need to be a deeply knowledgeable sysadmin through "zines" (online magazines) that are as playful as they are brilliant. + +> reminder: if you like the comics I post on twitter, they're collected into zines you can buy at ★ ★ [pic.twitter.com/rRy9uijlnS][3] +> +> — 🔎Julia Evans🔍 (@b0rk) [January 23, 2019][4] + +### Nicole Forsgren, PhD [@nicolefv][5] + +If you have ever asked, "Is there data that supports DevOps' effectiveness?" then you need to be following Nicole. She has led [DORA][6]'s annual State of DevOps Report from its inception and is the lead author of the new book [_Accelerate: The Science of Lean Software and DevOps_][7]. + +> Y'all, I am SUPER excited and unbelievably proud to announce that Accelerate, the book I coauthored with [@jezhumble][8] and [@RealGeneKim][9], has just been awarded the Shingo Publication Award from [@ShingoPrize][10] \-- the top award for Lean and operational work. 🎉 +> +> — nicole forsgren PHD IN COMPUTERING THINGS (@nicolefv) [April 26, 2019][11] + +### Jessie Frazelle [@jessfraz][12] + +If you're into kernel hacking, NASA nerdery, and honest thoughts from a self-defined weirdo, you will be very happy to follow Jessie's exploration of the intersection of technology and culture. You will become smarter on a regular basis if you investigate the projects she's exploring. + +> I got to write the forward for [@calavera][13] and [@fntlnz][14]'s new eBPF book! Here it is :D +> +> — jessie frazelle 👩🏼‍🚀 (@jessfraz) [July 11, 2019][15] + +### Jess Dodson [@girlgerms][16] + +Jess is a passionate, open, and witty sysadmin-focused tweeter. + +> [pic.twitter.com/f5U9lMX4k1][17] +> +> — Jess Dodson (@girlgerms) [July 14, 2019][18] + +### Angie Jones [@techgirl1908][19] + +If you've ever wondered what the evolution of manual testing looks like, go no further than Angie's tweets. She's deep in that space and exploring topics that all sysadmin-minded people can appreciate. You'll be smarter for doing so. Bonus: If you're ever wanted to learn Java, she's recently released a free course to help you do so (and it has a great testing angle to it).  + +> The wait is over! I've just released my free [#Java][20] course! 🎉 +> +> The course is designed for beginners to programming, so if you or anyone you know has been wanting to get into coding, this is a great resource to do so. [pic.twitter.com/Pk9q2dcH6b][21] +> +> — Angie Jones (@techgirl1908) [May 31, 2019][22] + +  + +### Bridget Kromhout [@bridgetkromhout][23] + +Bridget is the person who first introduced me to container technology. She continues to share her expertise in DevOps, Kubernetes, and many other IT ops topics. She also is the [DevOpsDays][24] international lead and the local Minneapolis lead, and an expert-level live-tweeter of talks. + +> “What’s left is _people_.” [@adamhjk][25] with a powerful message on community stewardship and building meaning. [#oscon][26] [pic.twitter.com/66CjbedrXJ][27] +> +> — Bridget Kromhout (@bridgetkromhout) [July 18, 2019][28] + +### Vallery Lancey [@vllry][29] + +As I see it, Vallery is live-tweeting, amongst other things, her pursuit to be an expert Kubernetes administrator. She goes *deep* on the topic on a regular basis and is a textbook example of how to engage with the open source community. This thread will give you an idea: + +> Kubernetes' data model is a major performance/scalability bottleneck. I'm wondering how (if ever) it will change. +> +> All resources (within a scope, EG all pods within a namespace) are stored together. This makes things simple, but becomes huge. +> +> — Vallery Lancey (@vllry) [July 12, 2019][30] + +### Ashley McNamara [@ashleymcnamara][31] + +Some joke that a Sysadmin who learns Go is now [an SRE][32]. f you have wondered about the programming language [Go][33], follow Ashley to keep up-to-date on its maturation and new uses. She's also an excellent curator of internet memes. + +> My kid is gaming with friends so I brought him a snack and he says, "Thanks, Love you" then laughter erupts on the headset and he goes, "What? You don't love your mothers? I'm sad for you." so if you need me I'll just be over here sobbing into my worlds best mom ribbon. +> +> — Ashley McNamara (@ashleymcnamara) [April 19, 2019][34] + +### Nina Zakharenko [@nnja][35] + +Similar to the Sysadmin + Go meme is a Sysadmin that knows Python is now a DevOps Engineer. Nina continuously shares her expertise in Python with incredible storytelling. She's an inspiration. + +> Thanks for the nice write up of my PyCon US keynote! 🐍🎉 [@btskinn][36] +> +> 👉 Missed it? +> 📺 Video: +> 📊 Slides: +> ✏️ blog post by [@pylogging][37]: [pic.twitter.com/u9kAjebfhP][38] +> +> — Nina Zakharenko 💜🐍 (@nnja) [June 27, 2019][39] + +### Bonus: Follow sysadmin topics and companies + +While I find the most value from Twitter by following real human beings that inspire me on a regular basis, there are some wonderful companies and projects that can also add to your day-to-day fun on the site. Here are a few:  + + * Reading [IT Revolution Books][40] has greatly improved my knowledge of DevOps; it's worth following on Twitter, too. + * [Hackaday.io][41] bills itself as the "world's largest hardware + software community. It looks pretty fun.  + * Lists can also be a great way to avoid following lots of people, but still seeing their work. Chris Short has curated a fantastic [list of Twitter accounts about sysadmin topics][42]. + * I love podcasts, and [The Changelog][43] is a mix of new episodes, open source news, and tech memes.  + * The best conference to attend as an open source enthusiast is [All Things Open][44], and they curate a fun set of content. + + + +And finally, to enjoy Twitter more as a work tool, [don't forget about muting][45] the noise you don't want to see there. It's made all the difference for me personally.  + +Have questions? Ask in the comments or DM me [@mbbroberg][46]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/twitter-sysadmins + +作者:[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/mbbroberghttps://opensource.com/users/sethhttps://opensource.com/users/aloksharma08https://opensource.com/users/marcobravohttps://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/birds_wire.png?itok=1RsjPYwB (Red and blue birds chatting on telephone wire over city skyline) +[2]: https://twitter.com/b0rk +[3]: https://t.co/rRy9uijlnS +[4]: https://twitter.com/b0rk/status/1087923184488366084?ref_src=twsrc%5Etfw +[5]: https://twitter.com/nicolefv +[6]: https://devops-research.com/ +[7]: https://www.amazon.com/dp/B07B9F83WM +[8]: https://twitter.com/jezhumble?ref_src=twsrc%5Etfw +[9]: https://twitter.com/RealGeneKim?ref_src=twsrc%5Etfw +[10]: https://twitter.com/ShingoPrize?ref_src=twsrc%5Etfw +[11]: https://twitter.com/nicolefv/status/1121841152603246593?ref_src=twsrc%5Etfw +[12]: https://twitter.com/jessfraz +[13]: https://twitter.com/calavera?ref_src=twsrc%5Etfw +[14]: https://twitter.com/fntlnz?ref_src=twsrc%5Etfw +[15]: https://twitter.com/jessfraz/status/1149336855441108992?ref_src=twsrc%5Etfw +[16]: https://twitter.com/girlgerms +[17]: https://t.co/f5U9lMX4k1 +[18]: https://twitter.com/girlgerms/status/1150531514611847168?ref_src=twsrc%5Etfw +[19]: https://twitter.com/techgirl1908 +[20]: https://twitter.com/hashtag/Java?src=hash&ref_src=twsrc%5Etfw +[21]: https://t.co/Pk9q2dcH6b +[22]: https://twitter.com/techgirl1908/status/1134451364833050625?ref_src=twsrc%5Etfw +[23]: https://twitter.com/bridgetkromhout +[24]: https://devopsdays.org/ +[25]: https://twitter.com/adamhjk?ref_src=twsrc%5Etfw +[26]: https://twitter.com/hashtag/oscon?src=hash&ref_src=twsrc%5Etfw +[27]: https://t.co/66CjbedrXJ +[28]: https://twitter.com/bridgetkromhout/status/1151884811855728640?ref_src=twsrc%5Etfw +[29]: https://twitter.com/vllry +[30]: https://twitter.com/vllry/status/1149534333553614849?ref_src=twsrc%5Etfw +[31]: https://twitter.com/ashleymcnamara +[32]: https://opensource.com/article/19/7/sysadmins-vs-sres +[33]: https://golang.org/ +[34]: https://twitter.com/ashleymcnamara/status/1119357024691638277?ref_src=twsrc%5Etfw +[35]: https://twitter.com/nnja +[36]: https://twitter.com/btskinn?ref_src=twsrc%5Etfw +[37]: https://twitter.com/pylogging?ref_src=twsrc%5Etfw +[38]: https://t.co/u9kAjebfhP +[39]: https://twitter.com/nnja/status/1144046094348890112?ref_src=twsrc%5Etfw +[40]: https://twitter.com/ITRevBooks +[41]: https://twitter.com/hackadayio +[42]: https://twitter.com/ChrisShort/lists/systems-devops-sre-devs +[43]: https://twitter.com/changelog +[44]: https://twitter.com/AllThingsOpen +[45]: https://help.twitter.com/en/using-twitter/advanced-twitter-mute-options +[46]: https://twitter.com/mbbroberg From 44d1095653d99874095e091035c34f79a8222737 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:54:19 +0800 Subject: [PATCH 096/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190722=2010=20r?= =?UTF-8?q?esources=20every=20sysadmin=20should=20know=20about?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190722 10 resources every sysadmin should know about.md --- ...ources every sysadmin should know about.md | 237 ++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 sources/tech/20190722 10 resources every sysadmin should know about.md diff --git a/sources/tech/20190722 10 resources every sysadmin should know about.md b/sources/tech/20190722 10 resources every sysadmin should know about.md new file mode 100644 index 0000000000..d61feedcd4 --- /dev/null +++ b/sources/tech/20190722 10 resources every sysadmin should know about.md @@ -0,0 +1,237 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (10 resources every sysadmin should know about) +[#]: via: (https://opensource.com/article/19/7/resources-sysadmin) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/erezhttps://opensource.com/users/sethhttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesfhttps://opensource.com/users/alanfdoss) + +10 resources every sysadmin should know about +====== +Work smarter, not harder with these 10 resources that make a sysadmin +look superhuman. +![Person on top of a mountain, arm raise][1] + +Everybody knows that sysadmins are impossibly busy people. Consequently, it sometimes seems they are superhuman. The sysadmin's dirty secret, the same one shared by many open source users, is that they don't actually _do_ all of the work it looks like they've done. One of the greatest tools in the sysadmin's kit is their ability to reuse work someone else has already done for them. + +A good sysadmin knows where to turn when there's a big job to be done but nobody available to do it. If you're looking to work smarter, not harder, this is for you: a list of the top 10 resources every sysadmin should know about. + +### Turnkey Linux + +![Turnkey Linux][2] + +The [Turnkey Linux][3] project is the app store of systems administration. Turnkey takes popular open source components of infrastructure, installs them on a virtual server, creates an image of the install, and offers them to the world as free downloads. In the days before [containers][4], Turnkey mostly targeted virtualization engines, but with the advent of the cloud, the project also offers cloud "apps." + +Whether you use a cloud version or virtual machines, installing infrastructure has never been easier. No matter what a department requests, you can satisfy and close the ticket by simply spinning up a virtual server and dropping Turnkey Linux into it or installing the app on Turnkey's cloud platform. Turnkey provides OVA, ISO, VMDK, QCow2, Xen, and Docker images, so no matter what your infrastructure is based on, you can use Turnkey. + +The most exciting thing about Turnkey (aside from how easy it makes to spin up infrastructure) is that it also serves as a working example for new sysadmins. If you've never configured an NFS server, you can run a Turnkey solution to witness a working instance and use it as context for your research on how to make it happen the next time. + +If you haven't tried a Turnkey image yet, do yourself a favor and download one for evaluation. + +An easy demonstration is the [file sharing][5] package. You can download the image as an ISO and install it into a virtual machine such as [GNOME Boxes][6]. Start the image and run it as a live demo. + +![Turnkey Linux][7] + +Once the Turnkey server starts, it prompts you to create an administrative password. You can skip the other options until you see a list of IP addresses and ports. You can use whatever protocol best suits your OS, using **root** as the username with the administrative password you created after boot. + +### Subnet calculator + +If you're a new sysadmin, you might be struggling with the concept of subnets, or the limits placed on routers to direct traffic within a network. Subnets can be confusing, and calculating subnets and masks and the resulting blocks of addresses can be hard. Even for the experienced sysadmin used to configuring routers and who can calculate subnets in their head, it never hurts to double-check the math. + +There are many subnet calculators online, but if you're in a text-only SSH session, that's not always convenient. That's where [SubNetCalc][8]** **comes in. + +The **subnetcalc** command, available from your distribution's repositories, is an IPv4 and IPv6 subnet calculator for your terminal. The basic command is simple: provide it with the IP address you want to provision along with an estimated bit mask using CIDR notation, and **subnetcalc** displays the ramifications: + + +``` +$ subnetcalc  192.168.6.0/24 +Address       = 192.168.6.0 +   11000000.10101000.00000110.00000000 +Network       = 192.168.6.0 / 24 +Netmask       = 255.255.255.0 +Broadcast     = 192.168.6.255 +Wildcard Mask = 0.0.0.255 +Hosts Bits    = 8 +Max. Hosts    = 254   (2^8 - 2) +Host Range    = { 192.168.6.1 - 192.168.6.254 } +Properties    = +   - 192.168.6.0 is a NETWORK address +   - Class C +   - Private +``` + +It also understands IPv6: + + +``` +Address       = fe80::f811:e76e:7218:ff46 +                   fe80 = 11111110 10000000 +                   0000 = 00000000 00000000 +                   0000 = 00000000 00000000 +                   0000 = 00000000 00000000 +                   f811 = 11101000 00011001 +                   e76e = 11100101 01011110 +                   7328 = 01110011 00011000 +                   ff46 = 11111111 01010110 +Network       = fe80:: / 64 +Netmask       = ffff:ffff:ffff:ffff:: +Wildcard Mask = ::ffff:ffff:ffff:ffff +Hosts Bits    = 64 +Max. Hosts    = 18446744073709551615   (2^64 - 1) +Host Range    = { fe80::1 - fe80::ffff:ffff:ffff:ffff } +Properties    = +   - fe80::f811:e74e:7318:ff56 is a HOST address in fe80::/64 +   - Link-Local Unicast Properties: +      + Interface ID = f811:e74e:7318:ff56 +      + Sol. Node MC = ff02::1:ff18:ff56 +``` + +### Crontab Guru + +The Unix [cron][9] subsystem is a timer that runs commands at a specific time on a specific day. It's one of the many ways a sysadmin ensures that important tasks, like backups, reminder emails, and log rotations, happen automatically. Crontabs, the configuration files that control **cron**, were once an arcane sequence of numbers, slashes, and asterisks that somehow translated to a representation of time. + +The good news is they've gotten a lot easier to use, with syntax like **@daily** and **@weekly** instead of **0 0 * * */1** or **0 0 * * 7**, respectively. Even better are online crontab composers like [Crontab Guru][10]. + +![Crontab guru][11] + +This website serves one purpose: to de-mystify crontab scheduling. With its simple interface, you can compose what you believe is your desired schedule in cron syntax and get the results back in plain English. No more struggling to remember mnemonics for the order of minute, hour, date, month, weekday (mine was "Mini Horrific Devils Maraud the Weary"). No more giving up and resorting to the comparatively imprecise **@daily**-style shorthand. And most importantly, no more feeling sure that you got the syntax right only to discover later that your cron job isn't set to run until the year 2112. With a good crontab interpreter, you can enter your best guess and get instant feedback. + +### A rescue and testing thumb drive + +![Kali Linux][12] + +Be honest with yourself: the reason you got into the sysadmin racket in the first place was because you like to play with computers. Take your love of digital exploration and put it to good use with occasional pen-test challenges. No matter how careful you've been while setting up your infrastructure, you probably overlooked something, whether it's a configuration that's not as strict as it ought to be or a bug you couldn't have possibly known about. And sometimes it's not you, but shadow IT on your network that exposes a vulnerability. Regardless of the cause, it's your job to find weaknesses, and Kali Linux is the most hyper-focused pen-testing distribution available. + +You can [download Kali][13] and install it on a spare machine, a virtual machine, a thumb drive, and even your mobile phone with [NetHunter][14]. + +Start learning some of its [tools][15], like Metasploit, Wifiphisher, and Wireshark. Kali has excellent training resources available, and there's nothing quite as fun and nerve-racking as trying to break into a network of your own design. + +### Samba + +![File sharing with Samba][16] + +No matter your intentions as a sysadmin using open source, you're going to encounter a mixed environment of platforms that need to share files. Not everyone on your network is going to agree to just SSH copies of files to one another or to work in plain text so they can commit to [Git][17]. In fact, if you don't provide an easy method for users to share information, your users will find a way to do it anyway, and their solution will involve putting company data on whatever free service they encounter online. + +When sysadmins need a universal platform for file sharing, they invariably turn to [Samba][18], which humbly bills itself as the standard Windows interoperability suite of programs for Linux and Unix. In fact, Samba is much more than that, partly because of the scope of Active Directory and partly because of the business world's acceptance of Microsoft technology. For instance, there's no need to run separate file share interfaces for the different operating systems on your network, because nearly everything on your network is compatible with SMB/CIFS. + +### Cockpit web console + +![Cockpit web console][19] + +For people unfamiliar with the Linux terminal, it can be difficult to visualize what a server is, much less what it does. That can make it difficult for interns or transitioning Windows admins to help administer Linux servers, and it can make it difficult to justify hardware purchases to management. + +Fedora, RHEL, and CentOS ship with the [Cockpit][20] web console, and it's easy to install on Debian, Ubuntu, and many others. + +Cockpit lets you monitor and modify properties of servers that otherwise would require SSH access and familiarity with Linux commands. Not only is it open source, but it has a rich API and is easy to extend, so if you need your web console to do more than what Cockpit provides, you can develop your own interfaces to common tasks. + +The [server edition of Fedora][21] enables the web console by default, so if you haven't tried Cockpit, you can see it in action with just one install. If you're already running Ubuntu or Debian and want to see Cockpit in action, you can install it with: + + +``` +`$ sudo apt-get install cockpit` +``` + +### Hex keys and Screwdrivers + +There are some things web consoles and terminals just can't fix. Sometimes, you have to go to the source of the problem, and if the source turns out to be bare metal, then every sysadmin will happily tell you that hex keys and screwdrivers are an absolute must. + +![Multi-tool carabiner][22] + +Any given sysadmin may have their allegiances, but I never go to work without my Leatherman and a few common hex keys. There are also some pretty handy keyrings out there with screwdrivers and other tools built-in, so if you're looking for a gift for your friendly local sysadmin, you can't go wrong with a multi-tool carabiner. + +### Telnet and OpenSSL + +Those who experienced the old-school internet may remember Telnet as a clunky, unwieldy, but effective interface for public Unix servers for big institutions. The New York Public Library used to make its card catalog available for online searches over Telnet, and many an online [MUD][23] (multi-user dungeon) was accessed over this ancient protocol. Most people call Telnet a dead protocol and a dangerous command because it lacks encryption, and while its use is limited, it's still a great command for probing ports. + +As the world moves slowly toward encryption-by-default, though, alternatives arise. Things you used to use Telnet for can be done better with new tools. For instance, the old way of testing an email server was with the **telnet** command, but in many cases OpenSSL can be used instead: + + +``` +$ openssl s_client -starttls smtp -connect email.example.com:587 +> ehlo example.com +> auth login +(the user as a base64 string) +(the pass as a base64 string) +> mail from: [noreply@example.com][24] +> rcpt to: [foo@example.com][25] +> data +> Subject: foo bar +Baz Quux Blah. +. +> quit +``` + +It's a classic email server test done over an encrypted line. + +Whether you use Telnet or OpenSSL to probe and test servers, it's important to remember that low-level commands are vital even in the days of fancy frontends. + +### Cheat + +Having a hard time remembering a command? Normally you might resort to a man page, but some man pages have a hard time getting to the point. It's the reason Chris Allen Lane came up with the idea (and more importantly, the code) for a [**cheat** command][26]. + +The **cheat** command displays cheatsheets for common tasks in your terminal. It's a man page without the preamble. It cuts to the chase and tells you exactly how to do whatever it is you're trying to do. And if it lacks a common example that you think ought to be included, you can submit an update. + + +``` +$ cheat tar +# To extract an uncompressed archive: +tar -xvf '/path/to/foo.tar' + +# To extract a .gz archive: +tar -xzvf '/path/to/foo.tgz' +[...] +``` + +You can also treat **cheat** as a local cheatsheet system, which is great for all the in-house commands you and your team have invented over the years. You can easily add a local cheatsheet to your own home directory, and **cheat** will find and display it just as if it were a popular system command. + +### Emacs + +At the end of the day, there's nothing better than sitting back with a fresh [Emacs][27] session and typing that magical key combo: **M-x tetris**. Yes, the popular multi-tool text editor is not just the sysadmin's most worthy tool during work hours; it's the best way to relax. + +![Tetris in Emacs][28] + +Turn off the pager, close [Mutt][29], and enjoy. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/resources-sysadmin + +作者:[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/sethhttps://opensource.com/users/erezhttps://opensource.com/users/sethhttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesfhttps://opensource.com/users/alanfdoss +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/developer_mountain_cloud_top_strong_win.jpg?itok=axK3EX-q (Person on top of a mountain, arm raise) +[2]: https://opensource.com/sites/default/files/uploads/turnkey-linux.jpg (Turnkey Linux) +[3]: https://www.turnkeylinux.org/ +[4]: https://opensource.com/resources/what-are-linux-containers +[5]: https://www.turnkeylinux.org/fileserver +[6]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization +[7]: https://opensource.com/sites/default/files/uploads/turnkey.jpg (Turnkey Linux) +[8]: https://www.uni-due.de/~be0001/subnetcalc/ +[9]: https://opensource.com/article/17/11/how-use-cron-linux +[10]: http://crontab.guru +[11]: https://opensource.com/sites/default/files/uploads/crontab-guru.jpg (Crontab guru) +[12]: https://opensource.com/sites/default/files/uploads/kali.jpg (Kali Linux) +[13]: https://www.kali.org/ +[14]: https://www.kali.org/kali-linux-nethunter/ +[15]: https://tools.kali.org/ +[16]: https://opensource.com/sites/default/files/uploads/samba.jpg (File sharing with Samba) +[17]: https://opensource.com/article/19/4/file-sharing-git +[18]: https://www.samba.org +[19]: https://opensource.com/sites/default/files/uploads/cockpit.jpg (Cockpit web console) +[20]: https://cockpit-project.org/ +[21]: https://getfedora.org/en/server/ +[22]: https://opensource.com/sites/default/files/uploads/multitool.jpg (Multi-tool carabiner) +[23]: https://mudlistings.com/ +[24]: mailto:noreply@example.com +[25]: mailto:foo@example.com +[26]: https://github.com/cheat/cheat +[27]: https://opensource.com/life/16/2/intro-to-emacs +[28]: https://opensource.com/sites/default/files/uploads/tetris.jpg (Tetris in Emacs) +[29]: http://www.mutt.org/ From e5cf124b521ca23ff05a7beae2d7ab8a8194bc9a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:54:42 +0800 Subject: [PATCH 097/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190722=20System?= =?UTF-8?q?=20administrator=20responsibilities:=209=20critical=20tasks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190722 System administrator responsibilities- 9 critical tasks.md --- ...ator responsibilities- 9 critical tasks.md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/tech/20190722 System administrator responsibilities- 9 critical tasks.md diff --git a/sources/tech/20190722 System administrator responsibilities- 9 critical tasks.md b/sources/tech/20190722 System administrator responsibilities- 9 critical tasks.md new file mode 100644 index 0000000000..cd133a836d --- /dev/null +++ b/sources/tech/20190722 System administrator responsibilities- 9 critical tasks.md @@ -0,0 +1,147 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (System administrator responsibilities: 9 critical tasks) +[#]: via: (https://opensource.com/article/19/7/sysadmin-best-practices) +[#]: author: (Alok Sharma https://opensource.com/users/aloksharma08https://opensource.com/users/vincepowerhttps://opensource.com/users/bcottonhttps://opensource.com/users/penglishhttps://opensource.com/users/bijeshhttps://opensource.com/users/aloksharma08https://opensource.com/users/jamesfhttps://opensource.com/users/aloksharma08) + +System administrator responsibilities: 9 critical tasks +====== +Sysadmins are responsible for a wide range of duties, but these are the +most essential. +![Tools for the sysadmin][1] + +System administrators are critical to the reliable and successful operation of an organization and its network operations center and data center. A sysadmin must have expertise with the system's underlying platform (i.e., Windows, Linux) as well as be familiar with multiple areas including networking, backup, data restoration, IT security, database operations, middleware basics, load balancing, and more. Sysadmin tasks are not limited to server management, maintenance, and repair, but also any functions that support a smoothly running production environment with minimal (or no) complaints from customers and end users. + +Although sysadmins have a seemingly endless list of responsibilities, some are more critical than others. If you work in a sysadmin role (or hope to one day), make sure you are ready to follow these best practices. + +### Documentation + +Documentation is how sysadmins keep records of assets, including hardware and software types, counts, and licenses. Should there be any issues in the production environment, documentation helps identify the hardware, virtual machine, appliance, software, etc., that may be involved. + +#### Hardware inventory + +Maintain lists of all your physical and virtual servers with the following details: + + * **OS:** Linux or Windows, hypervisor with versions + * **RAM:** DIMM slots in physical servers + * **CPU:** Logical and virtual CPUs + * **HDD:** Type and size of hard disks + * **External storage (SAN/NAS):** Make and model of storage with management IP address and interface IP address + * **Open ports:** Ports opened at the server end for incoming traffic + * **IP address:** Management and interface IP address with VLANs + * **Engineering appliances:** e.g., Exalogic, PureApp, etc. + + + +#### Software inventory + + * **Configured applications:** e.g., Oracle WebLogic, IBM WebSphere Application Server, Apache Tomcat, Red Hat JBoss, etc. + * **Third-party software:** Any software not shipped with the installed OS + + + +#### License details + +Maintain license counts and details for physical servers and virtual servers (VMs), including licenses for Windows, subscriptions for Linux OS, and the license limit of hypervisor host. + +### Server health checkup + + * **Running processes:** Check for processes that are consuming more resources than expected, and take action to fine-tune the applications (with the help of the application team). + * **CPU utilization:** Consistently monitor and check the CPU utilization of the critical process like "java", "http", "mysql" etc. to ensure that these are not consuming the CPU resources more than expected. If it is so, then coordinate with the application team to check it at application level  and fine tune the same. Parallely analyse the OS parameters like "Ulimits". + * **Memory utilization:** Check memory utilization and clear the cache, if required. + * **Zombie processes:** Check for processes where the PID still exists in the process table after it is terminated. Zombie processes degrade server performance, so find and kill any that exist. + * **Load average:** If you're having performance issues, check the load average and tune the server for performance. + * **Disk/SAN/NAS utilization:** Check the I/O reports for externally attached storage to track and check the speed of read/write operations. If you find any issues, coordinate with the storage and network teams immediately to correct them. + + + +### Backup and disaster recovery planning + +Communicate with the backup team and provide them the data and client priorities for backup. The recommended backup criteria for production servers is: + + * **Incremental backups:** Daily, Monday to Friday + * **Full backup:** Saturday and Sunday + * **Disaster recovery drills:** Perform restoration mock drills once a month (preferably, or quarterly if necessary) with the backup team to ensure the data can be restored in case of an issue. + + + +### Patching + +Operating system patches for known vulnerabilities must be implemented promptly. There are many types and levels of patches, including: + + * Security  + * Critical  + * Moderate + + + +When a patch is released, check the bug or vulnerability details to see how it applies to your system (e.g., does the vulnerability affect the hardware in your system?), and take any necessary actions to apply the patches when required. Make sure to cross-verify applications' compatibility with patches or upgrades. + +### Application compatibility + +Before going live with any application, check its compatibility with your hardware and operating system, and make sure to do load testing (with the support of application team). + +### Server hardening + +#### Linux: + + * **Set a BIOS password:** This prevents users from altering BIOS settings. + * **Set a GRUB password:** This stops users from altering the GRUB bootloader. + * **Deny root access:** Rejecting root access minimizes the probability of intrusions. + * **Sudo users:** Make sudo users and assign limited privileges to invoke commands. + * **TCP wrappers:** This is the weapon to protect a server from hackers. Apply a rule for the SSH daemon to allow only trusted hosts to access the server, and deny all others. Apply similar rules for other services like FTP, SSH File Transfer Protocol, etc. + * **Firewalld/iptables:** Configure firewalld and iptables rules for incoming traffic to the server. Include the particular port, source IP, and destination IP and allow, reject, deny ICMP requests, etc. for the public zone and private zone. + * **Antivirus:** Install antivirus software and update virus definitions regularly. + * **Secure and audit logs:** Check the logs regularly and when required. + * **Rotate the logs:** Keep the logs for limited period of time like "for 7 days", to keep the sufficient disk space for flawless operation. + + + +#### Windows: + + * **Set a BIOS password:** This prevents users from altering BIOS settings. + * **Antivirus:** Install antivirus software and update virus definitions regularly. + * **Configure firewall rules:** Prevent unauthorized parties from accessing your systems. + * **Deny administrator login:** Limit users' ability to make changes that could increase your systems' vulnerabilities. + + + +### Use a syslog server + +By configuring a syslog server in the environment to keep records of system and application logs, in the event of an intrusion or issue, the sysadmin can check previous and real-time logs to diagnose and resolve the problem. + +### Automation + +Many sysadmin tasks (such as server health checkups, resource utilization, backup triggers, transfer files and logs, etc.) must be done at specific times. Therefore, the sysadmin must write scripts or use external tools and configure them as cron jobs to do the tasks automatically at the proper time. + +### Monitoring tools + +Install and configure live monitoring tools like Nagios, HP, etc., to monitor your IT infrastructure and issue alerts about potential problems. + +### Conclusion + +While these are the most important tasks a sysadmin is responsible for, there is much more to the role than the duties on this list. + +For example, the sysadmin must coordinate with multiple teams to resolve issues, communicate with and update customers, maintain 100% uptime, hold discussions with the audit team, prepare weekly/monthly/quarterly reports, do continuous monitoring of servers and services using appropriate tools, and maintain the hardware console and respond to any triggered alarms. + +The sysadmin is always a single point of content (SPOC) in the data center or network operations center for issues related to web hosting, application and server outages, and other critical IT operations problems. + +_What other tasks or best practices do you think are essential for sysadmins? Please share your opinion in the comments._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/sysadmin-best-practices + +作者:[Alok Sharma][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/aloksharma08https://opensource.com/users/vincepowerhttps://opensource.com/users/bcottonhttps://opensource.com/users/penglishhttps://opensource.com/users/bijeshhttps://opensource.com/users/aloksharma08https://opensource.com/users/jamesfhttps://opensource.com/users/aloksharma08 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_sysadmin_cloud.png?itok=sUciG0Cn (Tools for the sysadmin) From 162e292fc52cbf450f7410a2730b5e1a22f865b7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:55:22 +0800 Subject: [PATCH 098/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190722=20Gift?= =?UTF-8?q?=20ideas=20for=20Sysadmin=20Appreciation=20Day?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190722 Gift ideas for Sysadmin Appreciation Day.md --- ...ift ideas for Sysadmin Appreciation Day.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sources/tech/20190722 Gift ideas for Sysadmin Appreciation Day.md diff --git a/sources/tech/20190722 Gift ideas for Sysadmin Appreciation Day.md b/sources/tech/20190722 Gift ideas for Sysadmin Appreciation Day.md new file mode 100644 index 0000000000..7109378d61 --- /dev/null +++ b/sources/tech/20190722 Gift ideas for Sysadmin Appreciation Day.md @@ -0,0 +1,48 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Gift ideas for Sysadmin Appreciation Day) +[#]: via: (https://opensource.com/article/19/7/gift-ideas-sysadmin-appreciation-day) +[#]: author: (Lauren Pritchett https://opensource.com/users/lauren-pritchetthttps://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/jamesf) + +Gift ideas for Sysadmin Appreciation Day +====== +What was the best gift you received as a sysadmin? Take our poll and +check out some gift ideas for Sysadmin Appreciation Day. +![Gift box opens with colors coming out][1] + +Sysadmin Appreciation Day is coming up this Friday, July 26. To help honor sysadmins everywhere, we want you to share your best gift ideas. What would be the best way a team member or customer could show their appreciation for you? As a sysadmin, what was the best gift you've ever received? We asked our writers the same question, and here are their answers: + +"Whilst working in the Ubuntu community on Edubuntu, I took it upon myself to develop the startup/shutdown sound scheme, which became the default in Ubuntu for, from what I can understand, the next decade. Whilst people had a love-hate relationship with my sound scheme, and rightly so, I had a love-hate relationship with my sound card during the development. + +At the time I had recorded all my sound samples using one sample rate, but my new sound card, as my motherboard had exploded a few days earlier, did not support it. I had two choices, resample all my samples (which I didn't really want to do) or buy a new sound card. + +After discussing my displeasure at the choices I faced in one of the Ubuntu channels, a very kind member of the community told me they would be happy to purchase a sound card for me, in thanks for all the work I had done on the sound scheme. However, I was not prepared for what showed up. + +I had expected a run-of-the-mill, entry-level sound card that would get me through the difficulties. I received an M-audio Delta 1010, a truly amazing beast of a sound card which I joyfully used for many years after. Hands down the BEST gift I've received in appreciation of my Open Source efforts ever!" ⁠—Pete Savage + +"Best gift: time off." ⁠—Chris Short + +"At my very first job, the CTO would hand out little 1-inch plastic pelicans if you did a good job at something. And a gold-painted plastic pelican if it was an outstanding job. He only did it for a year, I think he probably ran out of pelicans. It was a small thing, but it was nice to have a little token to say 'Thank you.' And it was a conversation starter at work: 'You got a pelican. What did you do?'" ⁠—Jim Hall + +Take our poll or let us know your own gift idea by leaving us a comment. If you are still looking for ideas, be sure to check out our [favorite sysadmin snack poll][2], too! + +Some are creative and encourage productivity, and others just inspire creativity. Some are just... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/gift-ideas-sysadmin-appreciation-day + +作者:[Lauren Pritchett][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/lauren-pritchetthttps://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/jamesf +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) +[2]: https://opensource.com/article/19/7/sysadmins-snack-on-call From b5112aeda6532528ac0f03cc4ed45eec96341ddf Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 24 Jul 2019 00:56:17 +0800 Subject: [PATCH 099/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190723=20Gettin?= =?UTF-8?q?g=20help=20for=20Linux=20shell=20built-ins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190723 Getting help for Linux shell built-ins.md --- ... Getting help for Linux shell built-ins.md | 222 ++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 sources/tech/20190723 Getting help for Linux shell built-ins.md diff --git a/sources/tech/20190723 Getting help for Linux shell built-ins.md b/sources/tech/20190723 Getting help for Linux shell built-ins.md new file mode 100644 index 0000000000..621ee44bed --- /dev/null +++ b/sources/tech/20190723 Getting help for Linux shell built-ins.md @@ -0,0 +1,222 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting help for Linux shell built-ins) +[#]: via: (https://www.networkworld.com/article/3410350/getting-help-for-linux-shell-built-ins.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Getting help for Linux shell built-ins +====== +Linux built-ins are commands that are part of a user’s shell. Here's an explanation on how to recognize them and get help on their use. +![Sandra Henry-Stocker][1] + +Linux built-ins are commands that are built into the shell, much like shelves that are built into a wall. You won’t find them as stand-alone files the way standard Linux commands are stored in /usr/bin and you probably use quite a few of them without ever questioning how they’re different from commands such as **ls** and **pwd**. + +Built-ins are used just like other Linux commands. They are likely to run a bit faster than similar commands that are not part of your shell. Bash built-ins include commands such as **alias**, **export** and **bg**. + +**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** + +As you might suspect, because built-ins are shell-specific, they won't be supplied with man pages. Ask **man** to help with **bg** and you'll see something like this: + +``` +$ man bg +No manual entry for bg +``` + +Another tip-off that a command is a built-in is when you use the **which** command to identify the source of the command. Bash's non-response will remind you that there is no file associated with the built-in: + +``` +$ which bg +$ +``` + +If your shell is **/bin/zsh**, on the other hand, you might get a slightly more illuminating response: + +``` +% which bg +bg: shell built-in command +``` + +Additional help is available with bash, but it comes through the use of the **help** command: + +``` +$ help bg +bg: bg [job_spec ...] + Move jobs to the background. + + Place the jobs identified by each JOB_SPEC in the background, as if they + had been started with `&'. If JOB_SPEC is not present, the shell's notion + of the current job is used. + + Exit Status: + Returns success unless job control is not enabled or an error occurs. +``` + +If you want to see a list of all of the built-ins that bash provides, use the **compgen -b**  command. Pipe the output to column for a nicely formatted listing. + +``` +$ compgen -b | column +. compgen exit let return typeset +: complete export local set ulimit +[ compopt false logout shift umask +alias continue fc mapfile shopt unalias +bg declare fg popd source unset +bind dirs getopts printf suspend wait +break disown hash pushd test +builtin echo help pwd times +caller enable history read trap +cd eval jobs readarray true +command exec kill readonly type +``` + +If you use the **help** command, you’ll see a list of built-ins along with short descriptions. This list is, however, truncated (ending with the **help** command): + +``` +$ help +GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu) +These shell commands are defined internally. Type `help' to see this list. +Type `help name' to find out more about the function `name'. +Use `info bash' to find out more about the shell in general. +Use `man -k' or `info' to find out more about commands not in this list. + +A star (*) next to a name means that the command is disabled. + + job_spec [&] history [-c] [-d offset] [n] or histo> + (( expression )) if COMMANDS; then COMMANDS; [ elif CO> + . filename [arguments] jobs [-lnprs] [jobspec ...] or jobs -> + : kill [-s sigspec | -n signum | -sigsp> + [ arg... ] let arg [arg ...] + [[ expression ]] local [option] name[=value] ... + alias [-p] [name[=value] ... ] logout [n] + bg [job_spec ...] mapfile [-d delim] [-n count] [-O ori> + bind [-lpsvPSVX] [-m keymap] [-f filen> popd [-n] [+N | -N] + break [n] printf [-v var] format [arguments] + builtin [shell-builtin [arg ...]] pushd [-n] [+N | -N | dir] + caller [expr] pwd [-LP] + case WORD in [PATTERN [| PATTERN]...) > read [-ers] [-a array] [-d delim] [-i> + cd [-L|[-P [-e]] [-@]] [dir] readarray [-d delim] [-n count] [-O o> + command [-pVv] command [arg ...] readonly [-aAf] [name[=value] ...] or> + compgen [-abcdefgjksuv] [-o option] [-> return [n] + complete [-abcdefgjksuv] [-pr] [-DEI] > select NAME [in WORDS ... ;] do COMMA> + compopt [-o|+o option] [-DEI] [name ..> set [-abefhkmnptuvxBCHP] [-o option-n> + continue [n] shift [n] + coproc [NAME] command [redirections] shopt [-pqsu] [-o] [optname ...] + declare [-aAfFgilnrtux] [-p] [name[=va> source filename [arguments] + dirs [-clpv] [+N] [-N] suspend [-f] + disown [-h] [-ar] [jobspec ... | pid . <p>'> test [expr] + echo [-neE] [arg ...] time [-p] pipeline + enable [-a] [-dnps] [-f filename] [nam> times + eval [arg ...] trap [-lp] [[arg] signal_spec ...] + exec [-cl] [-a name] [command [argumen> true + exit [n] type [-afptP] name [name ...] + export [-fn] [name[=value] ...] or exp> typeset [-aAfFgilnrtux] [-p] name[=va> + false ulimit [-SHabcdefiklmnpqrstuvxPT] [li> + fc [-e ename] [-lnr] [first] [last] or> umask [-p] [-S] [mode] + fg [job_spec] unalias [-a] name [name ...] + for NAME [in WORDS ... ] ; do COMMANDS> unset [-f] [-v] [-n] [name ...] + for (( exp1; exp2; exp3 )); do COMMAND> until COMMANDS; do COMMANDS; done + function name { COMMANDS ; } or name (> variables - Names and meanings of som> + getopts optstring name [arg] wait [-fn] [id ...] + hash [-lr] [-p pathname] [-dt] [name .> while COMMANDS; do COMMANDS; done + help [-dms] [pattern ...] { COMMANDS ; } +``` + +As you can see from the listings above, the **help** command is itself a built-in. + +You can get more information on any of these built-ins by providing the **help** command with the name of the built-in you're curious about — as in **help dirs**. + +``` +$ help dirs +dirs: dirs [-clpv] [+N] [-N] + Display directory stack. + + Display the list of currently remembered directories. Directories + find their way onto the list with the `pushd' command; you can get + back up through the list with the `popd' command. + + Options: + -c clear the directory stack by deleting all of the elements + -l do not print tilde-prefixed versions of directories relative + to your home directory + -p print the directory stack with one entry per line + -v print the directory stack with one entry per line prefixed + with its position in the stack + + Arguments: + +N Displays the Nth entry counting from the left of the list + shown by dirs when invoked without options, starting with + zero. + + -N Displays the Nth entry counting from the right of the list + shown by dirs when invoked without options, starting with + zero. + + Exit Status: + Returns success unless an invalid option is supplied or an error occurs. +``` + +Built-ins provide much of the functionality of each shell. Any shell you use will have some built-ins, though how to get information on these built-ins may differ from shell to shell. For **zsh**, for example, you can get a description of built-in commands by using the **man zshbuiltins** command. + +``` +$ man zshbuiltins + +ZSHBUILTINS(1) General Commands Manual ZSHBUILTINS(1) + +NAME + zshbuiltins - zsh built-in commands + +SHELL BUILTIN COMMANDS + Some shell builtin commands take options as described in individual en‐ + tries; these are often referred to in the list below as `flags' to avoid + confusion with shell options, which may also have an effect on the behav‐ + iour of builtin commands. In this introductory section, `option' always + has the meaning of an option to a command that should be familiar to most + command line users. +… +``` + +Within this lengthy man page, you will find a list of built-ins with useful descriptions as in this excerpt. + +``` +bg [ job ... ] +job ... & + Put each specified job in the background, or the current job if + none is specified. + +bindkey + See the section `Zle Builtins' in zshzle(1). + +break [ n ] + Exit from an enclosing for, while, until, select or repeat loop. + If an arithmetic expression n is specified, then break n levels + instead of just one. +``` + +### Wrap-up + +Linux built-ins are essential to each shell and operate like shell-specific commands. If you use a different shell from time to time and notice that some command you often use doesn’t seem to exist or doesn’t work as you were expecting, it just might be that it's one of your normal shell's built-ins. + +**[ Also see: [Invaluable tips and tricks for troubleshooting Linux][3] ]** + +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/3410350/getting-help-for-linux-shell-built-ins.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://images.idgesg.net/images/article/2019/07/linux_penguin-100802549-large.jpg +[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua +[3]: https://www.networkworld.com/article/3242170/linux/invaluable-tips-and-tricks-for-troubleshooting-linux.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From 2795d1bbfa00b952bb01efeadc6e387e9ad2185e Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 24 Jul 2019 08:44:36 +0800 Subject: [PATCH 100/951] translated --- .../20190703 Parse arguments with Python.md | 200 ------------------ .../20190703 Parse arguments with Python.md | 200 ++++++++++++++++++ 2 files changed, 200 insertions(+), 200 deletions(-) delete mode 100644 sources/tech/20190703 Parse arguments with Python.md create mode 100644 translated/tech/20190703 Parse arguments with Python.md diff --git a/sources/tech/20190703 Parse arguments with Python.md b/sources/tech/20190703 Parse arguments with Python.md deleted file mode 100644 index e84978cde9..0000000000 --- a/sources/tech/20190703 Parse arguments with Python.md +++ /dev/null @@ -1,200 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Parse arguments with Python) -[#]: via: (https://opensource.com/article/19/7/parse-arguments-python) -[#]: author: (Seth Kenlon https://opensource.com/users/seth/users/notsag) - -Parse arguments with Python -====== -Parse Python like a pro with the argparse module. -![COBOL punch card][1] - -If you're using [Python][2] for any amount of development, you have probably issued a command in a terminal, even if only to launch a Python script or install a Python module with [pip][3]. Commands may be simple and singular: - - -``` -`$ ls` -``` - -Commands also might take an argument: - - -``` -`$ ls example` -``` - -Commands can also have options or flags: - - -``` -`$ ls --color example` -``` - -Sometimes options also have arguments: - - -``` -`$ sudo firewall-cmd  --list-all --zone home` -``` - -### Arguments - -The POSIX shell automatically splits whatever you type as a command into an array. For instance, here is a simple command: - - -``` -`$ ls example` -``` - -The command **ls** is position **$0**, and the argument **example** is in position **$1**. - -You _could_ write a loop to iterate over each item; determine whether it is the command, an option, or an argument; and take action accordingly. Luckily, a module called [argparse][4] already exists for that. - -### Argparse - -The argparse module is easy to integrate into your Python programs and has several convenience features. For instance, if your user changes the order of options or uses one option that takes no arguments (called a _Boolean_, meaning the option toggles a setting on or off) and then another that requires an argument (such as **\--color red**, for example), argparse can handle the variety. If your user forgets an option that's required, the argparse module can provide a friendly error message. - -Using argparse in your application starts with defining what options you want to provide your user. There are several different kinds of arguments you can accept, but the syntax is consistent and simple. - -Here's a simple example: - - -``` -#!/usr/bin/env python -import argparse -import sys - -def getOptions(args=sys.argv[1:]): -    parser = argparse.ArgumentParser(description="Parses command.") -    parser.add_argument("-i", "--input", help="Your input file.") -    parser.add_argument("-o", "--output", help="Your destination output file.") -    parser.add_argument("-n", "--number", type=int, help="A number.") -    parser.add_argument("-v", "--verbose",dest='verbose',action='store_true', help="Verbose mode.") -    options = parser.parse_args(args) -    return options -``` - -This code sample creates a function called **getOptions** and tells Python to look at each potential argument preceded by some recognizable string (such as **\--input** or **-i**). Any option that Python finds is returned out of the function as an **options** object (**options** is an arbitrary name and has no special meaning; it's just a data object containing a summary of all the arguments that the function has parsed). - -By default, any argument given by the user is seen by Python as a string. If you need to ingest an integer (a number), you must specify that an option expects **type=int**, as in the **\--number** option in the sample code. - -If you have an argument that just turns a feature on or off, then you must use the **boolean** type, as with the **\--verbose** flag in the sample code. This style of option simply stores **True** or **False**, specifying whether or not the user used the flag. If the option is used, then **stored_true** is activated. - -Once the **getOptions** function runs, you can use the contents of the **options** object and have your program make decisions based on how the user invoked the command. You can see the contents of **options** with a test print statement. Add this to the bottom of your example file: - - -``` -`print(getOptions())` -``` - -Then run the code with some arguments: - - -``` -$ python3 ./example.py -i foo -n 4 -Namespace(input='foo', number=4, output=None, verbose=False) -``` - -### Retrieving values - -The **options** object in the sample code contains any value provided by the user (or a derived Boolean value) in keys named after the long option. In the sample code, for instance, the **\--number** option can be retrieved by looking at **options.number**. - - -``` -options = getOptions(sys.argv[1:]) - -if options.verbose: -    print("Verbose mode on") -else: -    print("Verbose mode off") - -print(options.input) -print(options.output) -print(options.number) - -# Insert Useful Python Code Here... -``` - -The Boolean option, **\--verbose** in the example, is determined by testing whether **options.verbose** is True (meaning the user did use the **\--verbose** flag) or False (the user did not use the **\--verbose** flag), and taking some action accordingly. - -### Help and feedback - -Argparse also includes a built-in **\--help** (**-h** for short) option that provides a helpful tip on how the command is used. This is derived from your code, so it takes no extra work to generate this help system: - - -``` -$ ./example.py --help -usage: example.py [-h] [-i INPUT] [-o OUTPUT] [-n NUMBER] [-v] - -Parses command. - -optional arguments: -  -h, --help            show this help message and exit -  -i INPUT, --input INPUT -                        Your input file. -  -o OUTPUT, --output OUTPUT -                        Your destination output file. -  -n NUMBER, --number NUMBER -                        A number. -  -v, --verbose         Verbose mode. -``` - -### Python parsing like a pro - -This a simple example that demonstrates how to deal with parsing arguments in a Python application and how to quickly and efficiently document their syntax. The next time you write a quick Python script, give it some options with argparse. You'll thank yourself later, and your command will feel less like a quick hack and more like a "real" Unix command! - -Here's the sample code, which you can use for testing: - - -``` -#!/usr/bin/env python3 -# GNU All-Permissive License -# Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright -# notice and this notice are preserved.  This file is offered as-is, -# without any warranty. - -import argparse -import sys - -def getOptions(args=sys.argv[1:]): -    parser = argparse.ArgumentParser(description="Parses command.") -    parser.add_argument("-i", "--input", help="Your input file.") -    parser.add_argument("-o", "--output", help="Your destination output file.") -    parser.add_argument("-n", "--number", type=int, help="A number.") -    parser.add_argument("-v", "--verbose",dest='verbose',action='store_true', help="Verbose mode.") -    options = parser.parse_args(args) -    return options - -options = getOptions(sys.argv[1:]) - -if options.verbose: -    print("Verbose mode on") -else: -    print("Verbose mode off") - -print(options.input) -print(options.output) -print(options.number) -``` - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/parse-arguments-python - -作者:[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/users/notsag -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cobol-card-punch-programming-code.png?itok=6W6PUqUi (COBOL punch card) -[2]: https://www.python.org/ -[3]: https://pip.pypa.io/en/stable/installing/ -[4]: https://pypi.org/project/argparse/ diff --git a/translated/tech/20190703 Parse arguments with Python.md b/translated/tech/20190703 Parse arguments with Python.md new file mode 100644 index 0000000000..142e759574 --- /dev/null +++ b/translated/tech/20190703 Parse arguments with Python.md @@ -0,0 +1,200 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Parse arguments with Python) +[#]: via: (https://opensource.com/article/19/7/parse-arguments-python) +[#]: author: (Seth Kenlon https://opensource.com/users/seth/users/notsag) + +使用 Python 解析参数 +====== +使用 argparse 模块像专业人士一样解析参数。 +![COBOL punch card][1] + +如果你在使用 [Python][2] 进行开发,你可能会在终端中使用命令,即使只是为了启动 Python 脚本或使用 [pip][3] 安装 Python 模块。命令可能简单而单一: + + +``` +`$ ls` +``` + +命令也可能需要参数: + + +``` +`$ ls example` +``` + +命令也可以有选项或标志: + + +``` +`$ ls --color example` +``` + +有时选项也有参数: + + +``` +`$ sudo firewall-cmd  --list-all --zone home` +``` + +### 参数 + +POSIX shell 会自动将你输入的内容作为命令分成数组。例如,这是一个简单的命令: + + +``` +`$ ls example` +``` + +命令 **ls** 的位置是 **$0**,参数 **example** 位置是 **$1**。 + +你_可以_写一个循环迭代每项。确定它是否是命令、选项还是参数。并据此采取行动。幸运的是,已经有一个名为 [argparse][4] 的模块。 + +### Argparse + +argparse 模块很容易集成到 Python 程序中,并有多种便利功能。例如,如果你的用户更改选项的顺序或使用一个不带参数的选项(称为_布尔_,意味着选项可以打开或关闭设置),然后另一个需要参数(例如 **\--color red**),argparse 可以处理多种情况。如果你的用户忘记了所需的选项,那么 argparse 模块可以提供友好的错误消息。 + +要在应用中使用 argparse,首先要定义为用户提供的选项。你可以接受几种不同的参数,但语法一致又简单。 + +这是一个简单的例子: + + +``` +#!/usr/bin/env python +import argparse +import sys + +def getOptions(args=sys.argv[1:]): +    parser = argparse.ArgumentParser(description="Parses command.") +    parser.add_argument("-i", "--input", help="Your input file.") +    parser.add_argument("-o", "--output", help="Your destination output file.") +    parser.add_argument("-n", "--number", type=int, help="A number.") +    parser.add_argument("-v", "--verbose",dest='verbose',action='store_true', help="Verbose mode.") +    options = parser.parse_args(args) +    return options +``` + +此示例代码创建一个名为 **getOptions** 的函数,并告诉 Python 查看每个可能的参数,前面有一些可识别的字符串(例如 **\--input** 或者 **-i**)。 Python 找到的任何选项都将作为 **options** 对象从函数中返回(**options** 是一个任意名称,且没有特殊含义。它只是一个包含函数已解析的所有参数的摘要的数据对象)。 + +默认情况下,Python 将用户给出的任何参数视为字符串。如果需要提取整数(数字),则必须指定选项 **type=int**,如示例代码中的 **\--number** 选项。 + +如果你有一个只是关闭和打开功能的参数,那么你必须使用 **boolean** 类型,就像示例代码中的 **\--verbose** 标志一样。这种选项只保存 **True** 或 **False**,用户用来指定是否使用标志。如果使用该选项,那么会激活 **stored_true**。 + +当 **getOptions** 函数运行时,你就可以使用 **options** 对象的内容,并让程序根据用户调用命令的方式做出决定。你可以使用测试打印语句查看**选项**的内容。将其添加到示例文件的底部: + + +``` +`print(getOptions())` +``` + +然后带上参数运行代码: + + +``` +$ python3 ./example.py -i foo -n 4 +Namespace(input='foo', number=4, output=None, verbose=False) +``` + +### 检索值 + +示例代码中的 **options** 对象包含了用户提供的选项后面的值(或派生的布尔值)。例如,在示例代码中,可以通过 **options.number** 来检索 **\--number**。 + + +``` +options = getOptions(sys.argv[1:]) + +if options.verbose: +    print("Verbose mode on") +else: +    print("Verbose mode off") + +print(options.input) +print(options.output) +print(options.number) + +# 这里插入你的 Python 代码 +``` + +示例中的布尔选项 **\--verbose** 是通过测试 **options.verbose** 是否为 True(意味着用户使用了 **\--verbose** 标志)或 False(用户没有使用 **\--verbose** 标志),并采取相应的措施。 + +### 帮助和反馈 + +argparse 还包含一个内置的 **\--help**(简称 **-h**)选项,它提供了有关如何使用命令的提示。这是从你的代码派生的,因此生成此帮助系统不需要额外的工作: + + +``` +$ ./example.py --help +usage: example.py [-h] [-i INPUT] [-o OUTPUT] [-n NUMBER] [-v] + +Parses command. + +optional arguments: +  -h, --help            show this help message and exit +  -i INPUT, --input INPUT +                        Your input file. +  -o OUTPUT, --output OUTPUT +                        Your destination output file. +  -n NUMBER, --number NUMBER +                        A number. +  -v, --verbose         Verbose mode. +``` + +### 像专业人士一样用 Python 解析 + +这是一个简单的示例,来演示如何在 Python 应用中的解析参数以及如何快速有效地记录它的语法。下次编写 Python 脚本时,请使用 argparse 为其提供一些选项。 你以后会感谢自己,你的命令不会像一个快速的 hack,更像是一个“真正的” Unix 命令! + +以下是可用于测试的示例代码: + + +``` +#!/usr/bin/env python3 +# GNU All-Permissive License +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved.  This file is offered as-is, +# without any warranty. + +import argparse +import sys + +def getOptions(args=sys.argv[1:]): +    parser = argparse.ArgumentParser(description="Parses command.") +    parser.add_argument("-i", "--input", help="Your input file.") +    parser.add_argument("-o", "--output", help="Your destination output file.") +    parser.add_argument("-n", "--number", type=int, help="A number.") +    parser.add_argument("-v", "--verbose",dest='verbose',action='store_true', help="Verbose mode.") +    options = parser.parse_args(args) +    return options + +options = getOptions(sys.argv[1:]) + +if options.verbose: +    print("Verbose mode on") +else: +    print("Verbose mode off") + +print(options.input) +print(options.output) +print(options.number) +``` + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/parse-arguments-python + +作者:[Seth Kenlon][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/seth/users/notsag +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cobol-card-punch-programming-code.png?itok=6W6PUqUi (COBOL punch card) +[2]: https://www.python.org/ +[3]: https://pip.pypa.io/en/stable/installing/ +[4]: https://pypi.org/project/argparse/ From 3c42ae2d37440d68df3389438a94f903385517de Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 24 Jul 2019 08:52:51 +0800 Subject: [PATCH 101/951] translating --- .../20190722 How to run virtual machines with virt-manager.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190722 How to run virtual machines with virt-manager.md b/sources/tech/20190722 How to run virtual machines with virt-manager.md index 8a2586ea25..e9b2f14c2c 100644 --- a/sources/tech/20190722 How to run virtual machines with virt-manager.md +++ b/sources/tech/20190722 How to run virtual machines with virt-manager.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From ecf1d5212b43607a53818b45d0285de080802bf0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 24 Jul 2019 09:09:30 +0800 Subject: [PATCH 102/951] PRF @geekpi --- ...apital Letters To Run Them As Sudo User.md | 64 ++++++++----------- 1 file changed, 25 insertions(+), 39 deletions(-) diff --git a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md index c321d5374d..07629d97be 100644 --- a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md +++ b/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md @@ -1,37 +1,32 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) [#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) [#]: author: (sk https://www.ostechnix.com/author/sk/) -用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 +用大写字母输入 Linux 命令以将其作为 sudo 用户运行 ====== ![Type Linux Commands In Capital Letters To Run Them As Sudo User][1] -我非常喜欢 Linux 社区的原因是他们创建了很多有趣的项目,你很少能在任何其他操作系统中找到它们。不久前,我们看了一个名为 [**“Hollywood”**][2] 的有趣项目,它在类 Ubuntu 系统将终端变成了好莱坞技术情景剧的黑客界面。还有一些其他工具,例如 **cowsay**、**fortune**、**sl** 和 **toilet** 等,用来打开时间和自娱自乐!它们可能没有用,但这些程序娱乐性不错并且使用起来很有趣。今天,我偶然发现了另一个名为 **“SUDO”** 的类似工具。正如名字暗示的那样,你无论何时用大写字母输入 Linux 命令,SUDO 程序都会将它们作为 sudo 用户运行!这意味着,你无需在要运行的 Linux 命令前面输入 “sudo”。很酷,不是么? - +我非常喜欢 Linux 社区的原因是他们创建了很多有趣的项目,你很少能在任何其他操作系统中找到它们。不久前,我们看了一个名为 [Hollywood][2] 的有趣项目,它在类 Ubuntu 系统将终端变成了好莱坞技术情景剧的黑客界面。还有一些其他工具,例如 `cowsay`、`fortune`、`sl` 和 `toilet` 等,用来消磨时间自娱自乐!它们可能没有用,但这些程序娱乐性不错并且使用起来很有趣。今天,我偶然发现了另一个名为 `SUDO` 的类似工具。正如名字暗示的那样,你无论何时用大写字母输入 Linux 命令,`SUDO` 程序都会将它们作为 sudo 用户运行!这意味着,你无需在要运行的 Linux 命令前面输入 `sudo`。很酷,不是么? ### 安装 SUDO -* * * +> 提醒一句: -**提醒一句:** +> 在安装这个程序(或任何程序)之前,请查看源代码(最后给出的链接),并查看是否包含会损害你的系统的可疑/恶意代码。在 VM 中测试它。如果你喜欢或觉得它很有用,你可以在个人/生产系统中使用它。 -在安装(或任何程序)之前,请查看源代码(最后给出的链接),并查看是否包含会损害你的系统的可疑/恶意代码。在 VM中 测试它。如果你喜欢或觉得它很有用,你可以在个人/生产系统中使用它。 - -* * * - -用 Git 克隆 SUDO 仓库: +用 Git 克隆 `SUDO` 仓库: ``` $ git clone https://github.com/jthistle/SUDO.git ``` -此命令将克隆 SUDO GIT 仓库的内容,并将它们保存在当前目录下的 “SUDO” 的目录中。 +此命令将克隆 SUDO GIT 仓库的内容,并将它们保存在当前目录下的 `SUDO` 的目录中。 ``` Cloning into 'SUDO'... @@ -42,7 +37,7 @@ remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 Unpacking objects: 100% (42/42), done. ``` -切换到 SUDO 目录: +切换到 `SUDO` 目录: ``` $ cd SUDO/ @@ -54,7 +49,7 @@ $ cd SUDO/ $ ./install.sh ``` -该命令将在 **~/.bashrc** 文件中添加以下行: +该命令将在 `~/.bashrc` 文件中添加以下行: ``` [...] @@ -81,7 +76,7 @@ IFS=${IFS_} # end SUDO ``` -它还会备份你的 **~/.bashrc** 并将其保存为 **~/.bashrc.old**。如果有重大错误,你可以恢复它。 +它还会备份你的 `~/.bashrc` 并将其保存为 `~/.bashrc.old`。如果有重大错误,你可以恢复它。 最后,使用命令更新更改: @@ -97,46 +92,37 @@ $ source ~/.bashrc $ sudo mkdir /ostechnix ``` -对么?没错!上面的命令将在根目录(/)中创建名为 “ostechnix” 的目录。让我们使用 **Ctrl + c** 取消。 +对么?没错!上面的命令将在根目录(`/`)中创建名为 `ostechnix` 的目录。让我们使用 `Ctrl + c` 取消。 -一旦安装了 SUDO,你就可以**在没有 sudo 的情况下输入任何大写 Linux 命令**并运行它们。因此,你可以像下面那样运行上面的命令: +一旦安装了 `SUDO`,你就可以**在不使用 sudo 的情况下输入任何大写 Linux 命令**并运行它们。因此,你可以像下面那样运行上面的命令: ``` $ MKDIR /ostechnix - $ TOUCH /ostechnix/test.txt - $ LS /ostechnix ``` ![][3] -用大写字母输入 Linux 命令以将其作为 Sudo 用户运行 +用大写字母输入 Linux 命令以将其作为 sudo 用户运行 -请注意**它无法绕过 sudo 密码**。你仍然需要键入 sudo 密码才能执行给定的命令。它只会有助于避免在每个命令前面输入“sudo”。 +请注意**它无法绕过 sudo 密码**。你仍然需要键入 `sudo` 密码才能执行给定的命令。它只会有助于避免在每个命令前面输入 `sudo`。 -* * * +相关阅读: -**相关阅读:Related read:=** - - * [**如何在 Linux 中没有 Sudo 密码运行特定命令**][4] - * [**如何恢复用户的 Sudo 权限**][5] - * [**如何在 Ubuntu 上为用户授予和删除 Sudo 权限**][6] - * [**如何在 Linux 系统中查找所有 Sudo 用户**][7] - * [**如何在终端中输入密码时显示星号**][8] - * [**如何更改 Linux 中的 Sudo 提示符**][9] + * [如何在 Linux 中没有 sudo 密码运行特定命令][4] + * [如何恢复用户的 sudo 权限][5] + * [如何在 Ubuntu 上为用户授予和删除 sudo 权限][6] + * [如何在 Linux 系统中查找所有 sudo 用户][7] + * [如何在终端中输入密码时显示星号][8] + * [如何更改 Linux 中的 sudo 提示符][9] +当然,输入 `sudo` 只需几秒钟,所以这不是什么大问题。 我必须告诉这是一个用来消磨时间的有趣且无用的项目。 如果你不喜欢它,那就去学习一些有用的东西吧。 如果你喜欢它,试一试,玩得开心! -* * * - -当然,输入 “sudo” 只需几秒钟,所以这不是什么大问题。 我必须告诉这是一个用来消磨时间的有趣且无用的项目。 如果你不喜欢它,那就去学习一些有用的东西吧。 如果你喜欢它,试一试,玩得开心! - -**资源:** - - * [**SUDO GitHub 仓库**][10] - +资源: + * [SUDO GitHub 仓库][10] -------------------------------------------------------------------------------- @@ -145,7 +131,7 @@ via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-the 作者:[sk][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 3c10f38afa2029d589620a9c6921098ef36a811c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 24 Jul 2019 09:10:28 +0800 Subject: [PATCH 103/951] PUB @geekpi https://linux.cn/article-11142-1.html --- ...ux Commands In Capital Letters To Run Them As Sudo User.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md (98%) diff --git a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/published/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md similarity index 98% rename from translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md rename to published/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md index 07629d97be..f10ae9352f 100644 --- a/translated/tech/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md +++ b/published/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11142-1.html) [#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User) [#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From 795e02de98d66ca6907ed8b99ecff4a41e3cedae Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 24 Jul 2019 10:02:26 +0800 Subject: [PATCH 104/951] APL:20190518 Best Linux Distributions for Beginners --- sources/tech/20190518 Best Linux Distributions for Beginners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190518 Best Linux Distributions for Beginners.md b/sources/tech/20190518 Best Linux Distributions for Beginners.md index 1630f1bc85..aa3b4c505b 100644 --- a/sources/tech/20190518 Best Linux Distributions for Beginners.md +++ b/sources/tech/20190518 Best Linux Distributions for Beginners.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: () +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 85afa16eed5733e171d0abf0d4e124ebbb53c43a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 24 Jul 2019 11:14:24 +0800 Subject: [PATCH 105/951] TSL PART --- ... Best Linux Distributions for Beginners.md | 74 +++++++++---------- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/sources/tech/20190518 Best Linux Distributions for Beginners.md b/sources/tech/20190518 Best Linux Distributions for Beginners.md index aa3b4c505b..2a1639ac5c 100644 --- a/sources/tech/20190518 Best Linux Distributions for Beginners.md +++ b/sources/tech/20190518 Best Linux Distributions for Beginners.md @@ -7,79 +7,73 @@ [#]: via: (https://itsfoss.com/best-linux-beginners/) [#]: author: (Aquil Roshan https://itsfoss.com/author/aquil/) -Best Linux Distributions for Beginners +最适合于初学者的 Linux 发行版 ====== -_**Brief** : In this article, we will see the **best Linux distro for beginners**_. This will help new Linux users to pick their first distribution. +> 在本文中,我们将看到**最适合于初学者的 Linux 发行版**。这将有助于新 Linux 用户选择他们的第一个发行版。 -Let’s face it, [Linux][1] can pose an overwhelming complexity to new users. But then, it’s not Linux itself that brings this complexity. Rather, it’s the “newness” factor that causes this. Not getting nostalgic, but remembering my first time with Linux, I didn’t even know what to expect. I liked it. But it was an upstream swim for me initially. +让我们面对现实,[Linux][1] 可能会给新用户带来巨大复杂性。但是,这并不是 Linux 本身带来了这种复杂性。相反,它是导致这种情况的“新奇”因素。并不是怀旧,但我记得第一次使用 Linux 时,我甚至不知道会发生什么。我喜欢它,但最初这对我来说像是逆流游泳一样。 -Not knowing where to start can be a downer. Especially for someone who does not have the concept of something else running on their PC in place of Windows. +不知道从何处着手可能是一个令人沮丧的原因,特别是对于那些在 PC 上运行 Windows 之外的其它系统没有概念的人来说如此。 -Linux is more than an OS. It’s an idea where everybody grows together and there’s something for everybody. We have already covered: +Linux 不仅仅是一个操作系统,而是一个理念:在这里大家共同成长,也适合于每个人的不同需要。我们已经介绍过: - * [Best Linux distributions for Windows users][2] - * [Best lightweight Linux distros][3] - * [Best Linux distributions for hacking][4] - * [Best Linux distributions for gaming][5] - * [Best Linux distributions for privacy and anonymity][6] - * [Best Linux distributions that look like MacOS][7] +* [Windows 用户的最佳 Linux 发行版][2] +* [最佳轻量级 Linux 发行版][3] +* [黑客攻击的最佳 Linux 发行版][4] +* [最佳 Linux 游戏发行版][5] +* [隐私和匿名的最佳 Linux 发行版][6] +* [看起来像 MacOS 的最佳 Linux 发行版][7] +除此之外,还有一些发行版能够满足新人的需求。这里有一些适合初学者的 Linux 发行版。你也可以在视频中观看并[订阅我们的 YouTube 频道][8]以获取更多与 Linux 相关的视频。 +[视频](https://youtu.be/QC2B2-gCbbI) -In addition to that, there are distributions that cater to the needs of newcomers especially. So here are a few such Linux distros for beginners. You can watch it in a video and [subscribe to our YouTube channel][8] for more Linux related videos. +### 最适合于初学者的 Linux 发行版 -### Best Linux Distros for Beginners +请记住,此列表没有特别的顺序。编制此列表的主要标准是易于安装、开箱即用的硬件和软件、易用性和软件包的可用性。 -Please remember that this list is no particular order. The main criteria for compiling this list is ease of installation, out of the box hardware software, ease of use and availability of software packages. +#### 1、Ubuntu -#### 1\. Ubuntu - -If you’ve researched Linux on the internet, it’s highly probable that you have come across Ubuntu. Ubuntu is one of the leading Linux distributions. It is also the perfect path to begin your Linux journey. +如果你在互联网上研究过 Linux,那么你很可能遇到过 Ubuntu。Ubuntu 是领先的 Linux 发行版之一。 它也是开始 Linux 之旅的完美之选。 ![][9] -Ubuntu has been tagged as Linux for human beings. Now, this is because Ubuntu has put in a lot of effort on universal usability. Ubuntu does not require you to be technically sound for you to use it. It breaks the notion of Linux=Command line hassle. This is one of the major plus points that rocketed Ubuntu to where it is today. +Ubuntu 被视为人性化的 Linux,这是因为 Ubuntu 在通用可用性上付出了很多努力。Ubuntu 并不要求你用技术的方式去使用它。它打破了 “Linux = 命令行麻烦”这一概念。这是 Ubuntu 飙升到今天的主要优势之一。 -Ubuntu offers a very convenient installation procedure. The installer speaks plain English (or any major language you want). You can even try out Ubuntu before actually going through the installation procedure. The installer provides simple options to: +Ubuntu 提供了非常方便的安装程序。这个安装程序以简单的英语(或你想要的任何主要语言)描述安装过程。你甚至可以在实际执行安装过程之前尝试使用 Ubuntu。安装程序提供了简单的选项: - * Install Ubuntu removing the older OS - * [Install Ubuntu alongside Windows][10] or any other existing OS (A choice is given at every startup to select the OS to boot). - * Configure partitions for users who know what they are doing. +* 删除旧操作系统安装 Ubuntu。 +* 安装 Ubuntu,与 Windows 或任何其他现有操作系统[共存][10](每次启动时都会选择要启动的操作系统)。 +* 让高级用户自行配置分区。 +*初学者提示:如果你不确定该怎么做,请选择第二个选项。* +Ubuntu 的用户界面名为 GNOME。它既简单又富有成效。你可以通过按 Windows 键搜索从应用程序到文件的任何内容。有什么比这更简单的吗? -_Beginner tip: Select the second option if you are not sure about what to do._ +没有驱动程序安装问题,因为 Ubuntu 附带了一个硬件检测器,可以检测、下载和安装适用于你的 PC 的最佳驱动程序。此外,安装会附带所有基本软件,如音乐播放器、视频播放器、办公套件和一些消磨时间的游戏。 -Ubuntu’s user interface is called GNOME. It is as simple as well as productive as it gets. You can search anything from applications to files by pressing the Windows key. Is there any way you can make this simpler? +Ubuntu 有很好的文档和社区支持。[Ubuntu 论坛][11]和 [Ask Ubuntu][12] 几乎在 Ubuntu 的所有方面都提供了可观的高质量支持。你有的一些问题很有可能已经回答过了,这些答案是适合初学者的。 -There are no driver installation issues as Ubuntu comes with a hardware detector which detects, downloads and installs optimal drivers for your PC. Also, the installation comes with all the basic software like a music player, video player, an office suite and games for some time killing. +请在[官方网站][13]查看并下载 [Ubuntu][13]。 -Ubuntu has a great documentation and community support. [Ubuntu forums ][11]and [Ask Ubuntu][12] provide an appreciable quality support in almost all aspects regarding Ubuntu. It’s highly probable that any question you might have will already be answered. And the answers are beginner friendly. +#### 2、Linux Mint Cinnamon -Do check out and download [Ubuntu][13] at the [official site.][13] - -#### 2\. Linux Mint Cinnamon - -For years, Linux Mint has been the **number one** Linux distribution on [Distrowatch][14]. Well deserved throne I must say. Linux mint is one of my personal favorites. It is elegant, graceful and provides a superior computing experience (out of the box). +多年来,Linux Mint 一直是 [Distrowatch][14] 上的**头号** Linux 发行版。我必须说,当之无愧的宝座。Linux Mint 是我个人的最爱之一。它优雅、秀气,提供了卓越的计算体验(开箱即用)。 ![][15] -Linux Mint features the Cinnamon desktop environment. New Linux users who are still in the process of familiarizing themselves with Linux software will find Cinnamon very useful. All the software are very accessibly grouped under categories. Although this is nothing of a mind-blowing feature, to new users who do not know the names of Linux software, this is a huge bonus. +Linux Mint 具有 Cinnamon 桌面环境。仍处于熟悉 Linux 软件的 Linux 新用户会发现 Cinnamon 非常有用。所有软件都非常易于按类别分组。虽然这不是一个令人兴奋的功能,但对于不了解 Linux 软件名称的新用户来说,这是一个巨大的好处。 -[][16] - -Suggested read Installing Microsoft Visual Studio Code on Linux - -Linux Mint is fast. Runs fine on older computers. Linux Mint is built upon the rock-solid Ubuntu base. It uses the same software repository as Ubuntu. About the Ubuntu software repository, Ubuntu pushes software for general only use after extensive testing. This means users will not have to deal with unexpected crashes and glitches that some new software are prone to, which can be a real no-no for new Linux users. +Linux Mint 很快。在旧电脑上运行良好。Linux Mint 建立在坚如磐石的 Ubuntu 基础之上。它使用与 Ubuntu 相同的软件存储库。关于 Ubuntu 软件存储库,Ubuntu 推送的软件仅供广泛测试后使用。这意味着用户不必处理一些新软件容易出现的意外崩溃和故障,对于新的 Linux 用户来说这可能是一个真正的禁忌。 ![][17] -Windows 7 lovers who are really not into where Microsoft if heading with Windows 10 will find Linux Mint lovable. Linux Mint desktop is pretty similar to Windows 7 desktop. Similar toolbar, similar menu, similar tray icons are all set to make Windows users feel absolutely at home. +Windows 7 爱好者如果真的没有升级到微软 Windows 10 的话,那将会发现 Linux Mint 的可爱。 Linux Mint 桌面非常类似于 Windows 7 桌面。类似的工具栏、类似的菜单、类似的托盘图标都绝对会使 Windows 用户感到十分熟悉。 -Personally, I’m more likely to suggest Linux Mint to someone who is new to Linux world as Linux Mint does impress users enough for them to accept it. To me, Linux Mint should be the first among the list of Linux for beginners. +就个人而言,我更倾向于向 Linux 世界的新人推荐 Linux Mint,因为 Linux Mint 确实给用户留下了足够的印象,会让他们接受它。对我来说,Linux Mint 应该是面向初学者的 Linux 列表中的首位。 -Do check out [Linux Mint here][18]. Go for the Cinnamon version. +请在这里查看 [Linux Mint][18],看看 Cinnamon 版。 #### 3\. Zorin OS From ca1b2bbd22f58cb6e0e3c86722367aa9b393df13 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 24 Jul 2019 21:02:39 +0800 Subject: [PATCH 106/951] PRF @geekpi --- .../20190703 Parse arguments with Python.md | 59 ++++++++----------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/translated/tech/20190703 Parse arguments with Python.md b/translated/tech/20190703 Parse arguments with Python.md index 142e759574..5bda8f8292 100644 --- a/translated/tech/20190703 Parse arguments with Python.md +++ b/translated/tech/20190703 Parse arguments with Python.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Parse arguments with Python) @@ -9,59 +9,55 @@ 使用 Python 解析参数 ====== -使用 argparse 模块像专业人士一样解析参数。 -![COBOL punch card][1] + +> 使用 argparse 模块像专业人士一样解析参数。 + +![](https://img.linux.net.cn/data/attachment/album/201907/24/210351h99gzcttqmk7c7mx.jpg) 如果你在使用 [Python][2] 进行开发,你可能会在终端中使用命令,即使只是为了启动 Python 脚本或使用 [pip][3] 安装 Python 模块。命令可能简单而单一: - ``` -`$ ls` +$ ls ``` 命令也可能需要参数: - ``` -`$ ls example` +$ ls example ``` 命令也可以有选项或标志: - ``` -`$ ls --color example` +$ ls --color example ``` 有时选项也有参数: - ``` -`$ sudo firewall-cmd  --list-all --zone home` +$ sudo firewall-cmd  --list-all --zone home ``` ### 参数 POSIX shell 会自动将你输入的内容作为命令分成数组。例如,这是一个简单的命令: - ``` -`$ ls example` +$ ls example ``` -命令 **ls** 的位置是 **$0**,参数 **example** 位置是 **$1**。 +命令 `ls` 的位置是 `$0`,参数 `example` 位置是 `$1`。 -你_可以_写一个循环迭代每项。确定它是否是命令、选项还是参数。并据此采取行动。幸运的是,已经有一个名为 [argparse][4] 的模块。 +你**可以**写一个循环迭代每项。确定它是否是命令、选项还是参数。并据此采取行动。幸运的是,已经有一个名为 [argparse][4] 的模块。 -### Argparse +### argparse -argparse 模块很容易集成到 Python 程序中,并有多种便利功能。例如,如果你的用户更改选项的顺序或使用一个不带参数的选项(称为_布尔_,意味着选项可以打开或关闭设置),然后另一个需要参数(例如 **\--color red**),argparse 可以处理多种情况。如果你的用户忘记了所需的选项,那么 argparse 模块可以提供友好的错误消息。 +argparse 模块很容易集成到 Python 程序中,并有多种便利功能。例如,如果你的用户更改选项的顺序或使用一个不带参数的选项(称为**布尔**,意味着选项可以打开或关闭设置),然后另一个需要参数(例如 `--color red`),argparse 可以处理多种情况。如果你的用户忘记了所需的选项,那么 argparse 模块可以提供友好的错误消息。 -要在应用中使用 argparse,首先要定义为用户提供的选项。你可以接受几种不同的参数,但语法一致又简单。 +要在应用中使用 argparse,首先要定义为用户提供的选项。你可以接受几种不同的参数,而语法一致又简单。 这是一个简单的例子: - ``` #!/usr/bin/env python import argparse @@ -77,22 +73,20 @@ def getOptions(args=sys.argv[1:]):     return options ``` -此示例代码创建一个名为 **getOptions** 的函数,并告诉 Python 查看每个可能的参数,前面有一些可识别的字符串(例如 **\--input** 或者 **-i**)。 Python 找到的任何选项都将作为 **options** 对象从函数中返回(**options** 是一个任意名称,且没有特殊含义。它只是一个包含函数已解析的所有参数的摘要的数据对象)。 +此示例代码创建一个名为 `getOptions` 的函数,并告诉 Python 查看每个可能的参数,前面有一些可识别的字符串(例如 `--input` 或者 `-i`)。 Python 找到的任何选项都将作为 `options` 对象从函数中返回(`options` 是一个任意名称,且没有特殊含义。它只是一个包含函数已解析的所有参数的摘要的数据对象)。 -默认情况下,Python 将用户给出的任何参数视为字符串。如果需要提取整数(数字),则必须指定选项 **type=int**,如示例代码中的 **\--number** 选项。 +默认情况下,Python 将用户给出的任何参数视为字符串。如果需要提取整数(数字),则必须指定选项 `type=int`,如示例代码中的 `--number` 选项。 -如果你有一个只是关闭和打开功能的参数,那么你必须使用 **boolean** 类型,就像示例代码中的 **\--verbose** 标志一样。这种选项只保存 **True** 或 **False**,用户用来指定是否使用标志。如果使用该选项,那么会激活 **stored_true**。 - -当 **getOptions** 函数运行时,你就可以使用 **options** 对象的内容,并让程序根据用户调用命令的方式做出决定。你可以使用测试打印语句查看**选项**的内容。将其添加到示例文件的底部: +如果你有一个只是关闭和打开功能的参数,那么你必须使用 `boolean` 类型,就像示例代码中的 `--verbose` 标志一样。这种选项只保存 `True` 或 `False`,用户用来指定是否使用标志。如果使用该选项,那么会激活 `stored_true`。 +当 `getOptions` 函数运行时,你就可以使用 `options` 对象的内容,并让程序根据用户调用命令的方式做出决定。你可以使用测试打印语句查看 `options` 的内容。将其添加到示例文件的底部: ``` -`print(getOptions())` +print(getOptions()) ``` 然后带上参数运行代码: - ``` $ python3 ./example.py -i foo -n 4 Namespace(input='foo', number=4, output=None, verbose=False) @@ -100,8 +94,7 @@ Namespace(input='foo', number=4, output=None, verbose=False) ### 检索值 -示例代码中的 **options** 对象包含了用户提供的选项后面的值(或派生的布尔值)。例如,在示例代码中,可以通过 **options.number** 来检索 **\--number**。 - +示例代码中的 `options` 对象包含了用户提供的选项后面的值(或派生的布尔值)。例如,在示例代码中,可以通过 `options.number` 来检索 `--number`。 ``` options = getOptions(sys.argv[1:]) @@ -118,12 +111,11 @@ print(options.number) # 这里插入你的 Python 代码 ``` -示例中的布尔选项 **\--verbose** 是通过测试 **options.verbose** 是否为 True(意味着用户使用了 **\--verbose** 标志)或 False(用户没有使用 **\--verbose** 标志),并采取相应的措施。 +示例中的布尔选项 `--verbose` 是通过测试 `options.verbose` 是否为 `True`(意味着用户使用了 `--verbose` 标志)或 `False`(用户没有使用 `--verbose` 标志),并采取相应的措施。 ### 帮助和反馈 -argparse 还包含一个内置的 **\--help**(简称 **-h**)选项,它提供了有关如何使用命令的提示。这是从你的代码派生的,因此生成此帮助系统不需要额外的工作: - +argparse 还包含一个内置的 `--help`(简写 `-h`)选项,它提供了有关如何使用命令的提示。这是从你的代码派生的,因此生成此帮助系统不需要额外的工作: ``` $ ./example.py --help @@ -144,11 +136,10 @@ optional arguments: ### 像专业人士一样用 Python 解析 -这是一个简单的示例,来演示如何在 Python 应用中的解析参数以及如何快速有效地记录它的语法。下次编写 Python 脚本时,请使用 argparse 为其提供一些选项。 你以后会感谢自己,你的命令不会像一个快速的 hack,更像是一个“真正的” Unix 命令! +这是一个简单的示例,来演示如何在 Python 应用中的解析参数以及如何快速有效地记录它的语法。下次编写 Python 脚本时,请使用 argparse 为其提供一些选项。你以后会感到自得,你的命令不会像一个快速的临时脚本,更像是一个“真正的” Unix 命令! 以下是可用于测试的示例代码: - ``` #!/usr/bin/env python3 # GNU All-Permissive License @@ -188,7 +179,7 @@ via: https://opensource.com/article/19/7/parse-arguments-python 作者:[Seth Kenlon][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 8b078431859af4a4b5cf0863c8b37b79269e36c8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 24 Jul 2019 21:03:19 +0800 Subject: [PATCH 107/951] PUB @geekpi https://linux.cn/article-11144-1.html --- .../20190703 Parse arguments with Python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190703 Parse arguments with Python.md (99%) diff --git a/translated/tech/20190703 Parse arguments with Python.md b/published/20190703 Parse arguments with Python.md similarity index 99% rename from translated/tech/20190703 Parse arguments with Python.md rename to published/20190703 Parse arguments with Python.md index 5bda8f8292..f4f240a4ae 100644 --- a/translated/tech/20190703 Parse arguments with Python.md +++ b/published/20190703 Parse arguments with Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11144-1.html) [#]: subject: (Parse arguments with Python) [#]: via: (https://opensource.com/article/19/7/parse-arguments-python) [#]: author: (Seth Kenlon https://opensource.com/users/seth/users/notsag) From 2fbfc29635a697e67884f4b2f60f96fc9adfcb8a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 24 Jul 2019 23:20:04 +0800 Subject: [PATCH 108/951] TSL --- ... Best Linux Distributions for Beginners.md | 60 +++++++++---------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/sources/tech/20190518 Best Linux Distributions for Beginners.md b/sources/tech/20190518 Best Linux Distributions for Beginners.md index 2a1639ac5c..6581de73ea 100644 --- a/sources/tech/20190518 Best Linux Distributions for Beginners.md +++ b/sources/tech/20190518 Best Linux Distributions for Beginners.md @@ -75,79 +75,75 @@ Windows 7 爱好者如果真的没有升级到微软 Windows 10 的话,那将 请在这里查看 [Linux Mint][18],看看 Cinnamon 版。 -#### 3\. Zorin OS +#### 3、Zorin OS -A majority of computer users are Windows users. And when a [Windows user gets a Linux][2], there’s a fair amount of ‘unlearning process’ that user must go through. A huge amount of operations have been fixed in our muscle memory. For example, the mouse reaching to the lower left corner of the screen (Start) everytime you want to launch an application. So if we could find something that eases these issues on Linux, it’s half a battle won. Enter Zorin OS. +大多数计算机用户是 Windows 用户。当 [Windows 用户拿到一个 Linux][2] 时,他必须经历相当多的“学习过程”。大量的操作已经形成了我们的肌肉记忆。例如,每次要启动应用程序时,鼠标都会到达屏幕的左下角(“开始”菜单)。因此,如果我们能够在 Linux 上找到一些可以缓解这些问题的东西,那就成功了一半了。进入 Zorin OS。 ![][19] -Zorin OS is an Ubuntu-based, highly polished Linux distribution, entirely made for Windows refugees. Although pretty much every Linux distro is usable by everybody, some people might tend to be reluctant when the desktop looks too alien. Zorin OS dodges past this obstacle because of its similarities with Windows appearance wise. +Zorin OS 是一个基于 Ubuntu 的高度优化的 Linux 发行版,完全是为 Windows 难民制作的。虽然几乎每个 Linux 发行版都可供任何人使用,但是当桌面看起来太陌生时,有些人可能会不情愿。Zorin OS 避开了这个障碍,因为它与 Windows 外观明显相似。 -Package managers are something of a new concept to Linux newcomers. That’s why Zorin OS comes with a huge (I mean really huge) list of pre-installed software. Anything you need, there’s good chance it’s already installed on Zorin OS. As if that was not enough, [Wine and PlayOnLinux][20] come pre-installed so you can run your loved Windows software and [games][21] here too. +软件包管理器对 Linux 新手来说是一个新概念。这就是为什么 Zorin OS 带有一个巨大的(我的意思是真的很大)预安装软件列表。你需要的任何东西,很有可能它已经安装在 Zorin OS 上。好像这还不够,[Wine 和 PlayOnLinux][20] 也预先安装好了,所以你也可以在这里运行你喜爱的 Windows 软件和[游戏][21]。 ![][22] -Zorin OS comes with an amazing theme engine called the ‘Zorin look changer’. It offers some heavy customization options with presets to make your OS look like Windows 7, XP, 2000 or even a Mac for that matter. You’re going to feel home. +Zorin OS 配备了一款名为 “Zorin look changer” 的惊人的主题引擎。它提供了一些重要的自定义选项和预设,使你的操作系统看起来像 Windows 7、XP、2000 甚至是 Mac。你会有宾至如归的感觉。 ![][23] -These features make Zorin OS the _**best Linux distro for beginners**_ , isn’t it? Do check out the [Zorin OS website][24] to know more and download the OS. +正是这些功能使 Zorin OS 成为**适合初学者的最佳 Linux 发行版**。查看 [Zorin OS 网站][24]以了解更多信息并下载该操作系统。 -#### 4\. Elementary OS +#### 4、Elementary OS -Since we have taken a look at Linux distros for Windows users, let’s swing by something for MacOS users too. Elementary OS very quickly rose to fame and now is always included in the list of top distros, all thanks to its aesthetic essence. Inspired by MacOS looks, Elementary OS is one of the most beautiful Linux distros. +由于我们已经看过了给 Windows 用户准备的 Linux 发行版,让我们为 MacOS 用户提供一些东西。Elementary OS 成名非常迅速,现在总是被列入顶级发行列表,这一切都归功于其美学本质。受 MacOS 外观的启发,Elementary OS 是最美丽的 Linux 发行版之一。 ![][25] -Elementary OS is another Ubuntu-based operating system which means the operating system itself is unquestionably stable. Elementary OS features the Pantheon desktop environment. You can immediately notice the resemblance to MacOS desktop. This is an advantage to MacOS users switching to Linux as they will much comfortable with the desktop and this really eases the process of coping to this change. +Elementary OS 是另一个基于 Ubuntu 的操作系统,这意味着操作系统本身无疑是稳定的。Elementary OS 带有 Pantheon 桌面环境。你会马上注意到与 MacOS 桌面的相似之处。这对于转换到 Linux 的 MacOS 用户来说是一个优势,因为他们会非常熟悉桌面,这确实简化了应对此变化的过程。 ![][26] -The menu is simple and customizable according to user preferences. The operating system is zero intrusive so you can really focus on your work. It comes with a very small number of pre-installed software. So, any new user will not be repulsed by huge bloat. But hey, it’s got everything you need out of the box. For more software, Elementary OS provides a neat AppCenter. It is highly accessible and simple. Everything at one place. You can get all the software you want and perform upgrades in clicks. +它的菜单简单,可根据用户喜好自定义。该操作系统是零侵入性的,因此你可以真正专注于工作。它附带了非常少量的预安装软件。因此,任何新用户都不会被庞杂的内容所击退。但是,嘿,它具备开箱即用所需要的一切。如果需要更多软件,Elementary OS 提供了一个整洁的 AppCenter。它易于访问且简单易用。一切都在一个地方。你可以一键获得所需的所有软件和升级。 -[][27] +经验表明,[Elementary OS][28] 真的是一个很棒的软件。绝对值得[试一试][28]。 -Suggested read How to Install and Use Slack in Linux +#### 5、inux Mint Mate -Experience wise, [Elementary OS][28] is really a great piece of software. Definitely give [it a try.][28] - -#### 5\. Linux Mint Mate - -A good number of people who come to Linux are looking to revive older computers. With Windows 10, many computers that had decent specs just some years ago have become incompetent. A quick google will suggest you install Linux on such computers. In that way, you can keep them running up to the mark for the near future. Linux Mint Mate is a great Linux distro if you are looking for something to run your older computers. +许多来到 Linux 的人都希望让旧电脑焕发新生。随着 Windows 10 的普及,几年前许多具有不错配置的计算机已经变得无力应对。在谷歌上快速搜索一下会建议你在这样的电脑上安装 Linux。通过这种方式,你可以保持它们在之后一段时间仍旧能保持水准。如果你正在寻找可以运行旧计算机的东西,Linux Mint Mate 是一个很棒的 Linux 发行版。 ![][29] -Linux Mint Mate is very light, resource efficient but still a polished distro. It can run smoothly on computers with less muscle power. The desktop environment does not come with bells and jingles. But in no way is it functionally inferior to any other desktop environments. The operating system is non-intrusive and allows you to have a productive computing experience without getting in your way. +Linux Mint Mate 非常轻便,资源利用效率高,而仍然是一个漂亮的发行版。它可以在计算能力较弱的计算机上平稳运行。桌面环境没有各种花哨的东西。但它在功能上和任何其他桌面环境相比毫不逊色。这个操作系统是非侵入式的,允许你在无需改变习惯的情况下获得高效的计算体验。 -Again, the Linux Mint Mate is based on Ubuntu and has the advantage of huge base solid Ubuntu software repository. It comes with a minimum number of necessities pre-installed. Easy driver installation and setting management are made available. +同样,Linux Mint Mate 基于 Ubuntu,具有巨大的坚实的 Ubuntu 软件存储库的优势。它预装了最少数量的必需软件。提供了简便的驱动程序安装和设置管理。 -You can run Linux Mint Mate even if you have 512 MB RAM and 9 GB hard disk space (the more the merrier). +即使你只有 512 MB 的内存和 9 GB 的硬盘空间(当然是越多越好),你也可以运行 Linux Mint Mate。 -The Mate desktop environment is really simple to use with no twists in the tale. This is really a huge plus point for Linux beginners. All the more reason to [try out Linux Mint Mate][30]. +Mate 桌面环境非常简单易用,没有什么费解的地方。对于 Linux 初学者来说,这确实是一个巨大的优势。 更有理由 [尝试 Linux Mint Mate][30]。 -#### 6\. Manjaro Linux +#### 6、Manjaro Linux -Ok. Any long time Linux user will say guiding a newcomer even in the general direction of Arch Linux is a sin. But hear me out. +好吧。任何一个 Linux 的老用户都会说,即使只是在大方向上,引导新手接触 Arch Linux 也是一种罪过。但是听我说。 -Arch is considered experts-only Linux because of it’s highly complex installation procedure. Manajro and Arch Linux have a common origin. But they differ extensively in everything else. +Arch 被认为是专家级 Linux,因为它的安装过程非常复杂。Manajro 和 Arch Linux 有着共同的起源。但它们在其他方面存在很大差异。 ![][31] -Manajro Linux has an extremely beginner friendly installation procedure. A lot of things are automated like driver installation using ‘Hardware detection’. Manjaro hugely negates the hardware driver hassles that torments a lot of other Linux distros. And even if you face any issues, Manjaro has an amazing community support. +Manajro Linux 具有非常适合初学者的安装程序。许多事情都是自动化的,比如使用“硬件检测”进行驱动程序安装。Manjaro 极大地解决了困扰许多其他 Linux 发行版的硬件驱动程序的麻烦。即使你遇到任何问题,Manjaro 也有很棒的社区支持。 -Manjaro has its own software repository which maintains the latest of software. While providing up to date software to users is a priority, guaranteed stability is not at all compromised. This is one of the prime differences between Arch and Manjaro. Manjaro delays package releases to make sure they are absolutely stable and no regression will be caused. You can also access the Arch User Repository on Manjaro, so anything and everything you need, is always available. +Manjaro 拥有自己的软件存储库,维护了最新的软件。虽然向用户提供最新软件是一个优先事项,但它可以保证稳定性并不会受到损害。这是 Arch 和 Manjaro 之间的主要区别之一。Manjaro 延迟软件包发布以确保它们绝对稳定并且不会导致回退。你还可以访问 Manjaro 上的 Arch User Repository(AUR),因此你可以随时获得所需的一切。 -If you want to know more about Manjaro features, do read my colleague [John’s experience with Manjaro Linux and why he is hooked][32] to it. +如果你想了解更多有关 Manjaro 功能的信息,请阅读我的同事 [John 的 Manjaro Linux 经历以及为什么他会被它迷住][32]。 ![][33] -Manjaro Linux comes in XFCE, KDE, Gnome, Cinnamon and a host of more desktop environments. Do check out the [official website][34]. +Manjaro Linux 有 XFCE、KDE、Gnome、Cinnamon 以及更多桌面环境,请查看[官方网站][34]。 -To install any of the above 6 operating systems, you need to create a bootable USB stick. If you are currently using Windows [use this guide to do so][35]. Mac OS users may [follow this guide][36]. +要安装上述 6 个操作系统中的任何一个,你需要创建一个可启动的 U 盘。如果你当前正在使用 Windows [请使用本指南][35]。Mac OS 用户可以[遵循本指南][36]。 -**Your choice for the best Linux distro for beginners?** +### 您选择哪个最适合初学者的 Linux 发行版? -Linux might come with a learning curve, but that’s not something anybody ever regretted. Go ahead get an ISO and check out Linux. If you are already a Linux user, do share this article and help someone fall in love with Linux in this season of love. Cheers. +Linux 可能会有学习曲线,但这并不是每个人都会后悔的。获得一个 ISO 文件并体验一下 Linux 吧。如果你已经是 Linux 用户,请分享这篇文章,并帮助有人在这个爱的季节爱上 Linux。干杯。 -------------------------------------------------------------------------------- @@ -155,7 +151,7 @@ via: https://itsfoss.com/best-linux-beginners/ 作者:[Aquil Roshan][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[wxy](https://github.com/wxy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d1c7cb26488eb43ee08005452df2a2abf3a8b26b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 25 Jul 2019 00:51:39 +0800 Subject: [PATCH 109/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190725=20How=20?= =?UTF-8?q?to=20Enable=20Canonical=20Kernel=20Livepatch=20Service=20on=20U?= =?UTF-8?q?buntu=20LTS=20System=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md --- ... Livepatch Service on Ubuntu LTS System.md | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md diff --git a/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md new file mode 100644 index 0000000000..d7e58a24c1 --- /dev/null +++ b/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md @@ -0,0 +1,153 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System?) +[#]: via: (https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System? +====== + +Canonical was introduced Live patch Service in Ubuntu 14.04 LTS system. + +Live patching service allows you to install and apply critical Linux kernel security updates without rebooting your system. + +This means, you don’t need to reboot your system after applying the kernel patches. + +But usually, we need to reboot the Linux server after installing the kernel patches to available for the system to use. + +Live patching is pretty fast. Most kernel fixes apply in seconds without any issues. + +Canonical live patch service is available for user upto 3 systems without any cost. + +You can enable Canonical Live patch in both variants desktop and server, through the command line. + +This live patching system is intended to address high and critical Linux kernel security vulnerabilities. + +Refer the following table for [supported systems][1] and other details. + +Ubuntu Release | Arch | Kernel Version | Kernel Variants +---|---|---|--- +Ubuntu 18.04 LTS | 64-bit x86 | 4.15 | GA generic and lowlatency kernel variants only +Ubuntu 16.04 LTS | 64-bit x86 | 4.4 | GA generic and lowlatency kernel variants only +Ubuntu 14.04 LTS | 64-bit x86 | 4.4 | Hardware Enablement kernel only + +**`Note:`**` ` Canonical Livepatch Service in Ubuntu 14.04 LTS requires users to run the Ubuntu v4.4 kernel in Trusty. Please reboot into this kernel if you are not currently running to use the service. + +To do so, follow the below procedures. + +### How To Get Live patch Token? + +Navigate to [Canonical Live patch service page][2] and choose `Ubuntu user` if you want to use the free service. + +It will be applicable upto 3 systems. If you are an `UA customer`, then select Ubuntu Advantage customer. Finally click Get your Live patch token. +[![][3]![][3]][4] + +Make sure you already have account in `Ubuntu One`. If no, you can create a new one. + +After logged in, you will get a secret key for your account. +[![][3]![][3]][5] + +### Install Snap Daemon in Your System + +The live patching system is handled through a snap package. So, make sure you have the “snap daemon” installed on your Ubuntu system. + +``` +$ sudo apt update + +$ sudo apt install snapd +``` + +### How To Install & Configure Live patch Service in Your System? + +Install the canonical-livepatch daemon by running the below command. + +``` +$ sudo snap install canonical-livepatch + +canonical-livepatch 9.4.1 from Canonical* installed +``` + +Run the following command to enable live kernel patches on an Ubuntu machine. + +``` +$ sudo canonical-livepatch enable xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e + +Successfully enabled device. Using machine-token: xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e +``` + +Run the below command to find the status of your livepatched machine. + +``` +$ sudo canonical-livepatch status + +client-version: 9.4.1 +architecture: x86_64 +cpu-model: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz +last-check: 2019-07-24T12:30:04+05:30 +boot-time: 2019-07-24T12:11:06+05:30 +uptime: 19m11s +status: +- kernel: 4.15.0-55.60-generic + running: true + livepatch: + checkState: checked + patchState: nothing-to-apply + version: "" + fixes: "" +``` + +Run the above same command with the `--verbose` switch to get more information about live patched machine. + +``` +$ sudo canonical-livepatch status --verbose +``` + +Execute the below command, if you would like to run the patch manually. + +``` +$ sudo canonical-livepatch refresh + +Before refresh: + +kernel: 4.15.0-55.60-generic +fully-patched: true +version: "" + +After refresh: + +kernel: 4.15.0-55.60-generic +fully-patched: true +version: "" +``` + +You will be getting one of the below status in the `patchState` output. + + * **applied:** There are no vulnerabilities found + * **nothing-to-apply:** Vulnerabilities are found and patched successfully + * **kernel-upgrade-required:** Livepatch cannot install a patch to fix the vulnerability + + + +Make a note, installing a kernel patch is different from upgrading/installing a new kernel on system. If you have installed new kernel then you have to reboot the system to activate the new kernel. + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/ + +作者:[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://wiki.ubuntu.com/Kernel/Livepatch +[2]: https://auth.livepatch.canonical.com/ +[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[4]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-1.jpg +[5]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-2.jpg From f6b5353084fb6cf5d4c3f48ff1c6aa3d1715f80f Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 25 Jul 2019 08:47:45 +0800 Subject: [PATCH 110/951] translated --- ...Ethernet for easier networking mobility.md | 126 ------------------ ...Ethernet for easier networking mobility.md | 126 ++++++++++++++++++ 2 files changed, 126 insertions(+), 126 deletions(-) delete mode 100644 sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md create mode 100644 translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md diff --git a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md deleted file mode 100644 index bcde06e8a1..0000000000 --- a/sources/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md +++ /dev/null @@ -1,126 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bond WiFi and Ethernet for easier networking mobility) -[#]: via: (https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/) -[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) - -Bond WiFi and Ethernet for easier networking mobility -====== - -![][1] - -Sometimes one network interface isn’t enough. Network bonding allows multiple network connections to act together with a single logical interface. You might do this because you want more bandwidth than a single connection can handle. Or maybe you want to switch back and forth between your wired and wireless networks without losing your network connection. - -The latter applies to me. One of the benefits to working from home is that when the weather is nice, it’s enjoyable to work from a sunny deck instead of inside. But every time I did that, I lost my network connections. IRC, SSH, VPN — everything goes away, at least for a moment while some clients reconnect. This article describes how I set up network bonding on my Fedora 30 laptop to seamlessly move from the wired connection my laptop dock to a WiFi connection. - -In Linux, interface bonding is handled by the bonding kernel module. Fedora does not ship with this enabled by default, but it is included in the kernel-core package. This means that enabling interface bonding is only a command away: - -``` -sudo modprobe bonding -``` - -Note that this will only have effect until you reboot. To permanently enable interface bonding, create a file called _bonding.conf_ in the _/etc/modules-load.d_ directory that contains only the word “bonding”. - -Now that you have bonding enabled, it’s time to create the bonded interface. First, you must get the names of the interfaces you want to bond. To list the available interfaces, run: - -``` -sudo nmcli device status -``` - -You will see output that looks like this: - -``` -DEVICE TYPE STATE CONNECTION -enp12s0u1 ethernet connected Wired connection 1 -tun0 tun connected tun0 -virbr0 bridge connected virbr0 -wlp2s0 wifi disconnected -- -p2p-dev-wlp2s0 wifi-p2p disconnected -- -enp0s31f6 ethernet unavailable -- -lo loopback unmanaged -- -virbr0-nic tun unmanaged -- -``` - -In this case, there are two (wired) Ethernet interfaces available. _enp12s0u1_ is on a laptop docking station, and you can tell that it’s connected from the _STATE_ column. The other, _enp0s31f6_, is the built-in port in the laptop. There is also a WiFi connection called _wlp2s0_. _enp12s0u1_ and _wlp2s0_ are the two interfaces we’re interested in here. (Note that it’s not necessary for this exercise to understand how network devices are named, but if you’re interested you can see the [systemd.net-naming-scheme man page][2].) - -The first step is to create the bonded interface: - -``` -sudo nmcli connection add type bond ifname bond0 con-name bond0 -``` - -In this example, the bonded interface is named _bond0_. The “_con-name bond0_” sets the connection name to _bond0_; leaving this off would result in a connection named _bond-bond0_. You can also set the connection name to something more human-friendly, like “Docking station bond” or “Ben” - -The next step is to add the interfaces to the bonded interface: - -``` -sudo nmcli connection add type ethernet ifname enp12s0u1 master bond0 con-name bond-ethernet -sudo nmcli connection add type wifi ifname wlp2s0 master bond0 ssid Cotton con-name bond-wifi -``` - -As above, the connection name is specified to be [more descriptive][3]. Be sure to replace _enp12s0u1_ and _wlp2s0_ with the appropriate interface names on your system. For the WiFi interface, use your own network name (SSID) where I use “Cotton”. If your WiFi connection has a password (and of course it does!), you’ll need to add that to the configuration, too. The following assumes you’re using [WPA2-PSK][4] authentication - -``` -sudo nmcli connection modify bond-wifi wifi-sec.key-mgmt wpa-psk -sudo nmcli connection edit bond-wif -``` - -The second command will bring you into the interactive editor where you can enter your password without it being logged in your shell history. Enter the following, replacing _password_ with your actual password - -``` -set wifi-sec.psk password -save -quit -``` - -Now you’re ready to start your bonded interface and the secondary interfaces you created - -``` -sudo nmcli connection up bond0 -sudo nmcli connection up bond-ethernet -sudo nmcli connection up bond-wifi -``` - -You should now be able to disconnect your wired or wireless connections without losing your network connections. - -### A caveat: using other WiFi networks - -This configuration works well when moving around on the specified WiFi network, but when away from this network, the SSID used in the bond is not available. Theoretically, one could add an interface to the bond for every WiFi connection used, but that doesn’t seem reasonable. Instead, you can disable the bonded interface: - -``` -sudo nmcli connection down bond0 -``` - -When back on the defined WiFi network, simply start the bonded interface as above. - -### Fine-tuning your bond - -By default, the bonded interface uses the “load balancing (round-robin)” mode. This spreads the load equally across the interfaces. But if you have a wired and a wireless connection, you may want to prefer the wired connection. The “active-backup” mode enables this. You can specify the mode and primary interface when you are creating the interface, or afterward using this command (the bonded interface should be down): - -``` -sudo nmcli connection modify bond0 +bond.options "mode=active-backup,primary=enp12s0u1" -``` - -The [kernel documentation][5] has much more information about bonding options. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/ - -作者:[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://fedoramagazine.org/author/bcotton/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/networkingmobility-816x345.jpg -[2]: https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html -[3]: https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns -[4]: https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#Target_users_(authentication_key_distribution) -[5]: https://www.kernel.org/doc/Documentation/networking/bonding.txt diff --git a/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md new file mode 100644 index 0000000000..797a9abe8b --- /dev/null +++ b/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md @@ -0,0 +1,126 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bond WiFi and Ethernet for easier networking mobility) +[#]: via: (https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/) +[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) + +绑定 WiFi 和以太网,以便于更轻松的网络移动 +====== + +![][1] + +有时一个网络接口是不够的。网络绑定允许将多条网络连接与单个逻辑接口一起工作。你可能因为需要单条连接更多的带宽而需要这么做。或者你可能希望在有线和无线网络之间来回切换而不会丢失网络连接。 + +我是后面一种情况。在家工作的好处之一是,当天气晴朗时,在阳光明媚的阳台而不是在室内工作是很愉快的。但每当我这样做时,我都会失去网络连接。 IRC、SSH、VPN,一切都断开了,客户端重连至少需要一会。本文介绍了如何在 Fedora 30 笔记本上设置网络绑定,以便从笔记本扩展坞的有线连接无缝切换到 WiFi。 + +在 Linux 中,接口绑定由绑定内核模块处理。默认情况下,Fedora 没有启用此功能,但它包含在 kernel-core 软件包中。这意味着启用接口绑定只需一个命令: + +``` +sudo modprobe bonding +``` + +请注意,这只会在你重启之前生效。要永久启用接口绑定,请在 _/etc/modules-load.d_ 目录中创建一个名为 _bonding.conf_ 的文件,该文件仅包含单词 “bonding”。 + +现在你已启用绑定,现在可以创建绑定接口了。首先,你必须获取要绑定的接口的名称。要列出可用的接口,请运行: + +``` +sudo nmcli device status +``` + +你将看到如下输出: + +``` +DEVICE TYPE STATE CONNECTION +enp12s0u1 ethernet connected Wired connection 1 +tun0 tun connected tun0 +virbr0 bridge connected virbr0 +wlp2s0 wifi disconnected -- +p2p-dev-wlp2s0 wifi-p2p disconnected -- +enp0s31f6 ethernet unavailable -- +lo loopback unmanaged -- +virbr0-nic tun unmanaged -- +``` + +在本例中,有两个(有线)以太网接口可用。 _enp12s0u1_ 在笔记本电脑扩展坞上,你可以通过 _STATE_ 列知道它已连接。另一个是 _enp0s31f6_,是笔记本电脑中的内置端口。还有一个名为 _wlp2s0_ 的 WiFi 连接。 _enp12s0u1_ 和 _wlp2s0_ 是我们在这里感兴趣的两个接口。(请注意,本文无需了解网络设备的命名方式,但如果你感兴趣,可以查看 [systemd.net-naming-scheme 手册页][2]。) + +第一步是创建绑定接口: + +``` +sudo nmcli connection add type bond ifname bond0 con-name bond0 +``` + +在此示例中,绑定接口名为 _bond0_。 “_con-name bond0_” 将连接名称设置为 _bond0_。直接这样会有一个名为 _bond-bond0_ 的连接。你还可以将连接名设置得更加人性化,例如 “Docking station bond” 或 “Ben” + +下一步是将接口添加到绑定接口: + +``` +sudo nmcli connection add type ethernet ifname enp12s0u1 master bond0 con-name bond-ethernet +sudo nmcli connection add type wifi ifname wlp2s0 master bond0 ssid Cotton con-name bond-wifi +``` + +如上所示,连接名称被设置为[更具描述性][3]。请务必使用系统上相应的接口名称替换 _enp12s0u1_ 和 _wlp2s0_。对于 WiFi 接口,请使用你自己的网络名称 (SSID)替换我的 “Cotton”。如果你的 WiFi 连接有密码(这当然会有!),你也需要将其添加到配置中。以下假设你使用 [WPA2-PSK][4] 身份验证 + +``` +sudo nmcli connection modify bond-wifi wifi-sec.key-mgmt wpa-psk +sudo nmcli connection edit bond-wif +``` + +第二条命令将进入交互式编辑器,你可以在其中输入密码,而无需将其记录在 shell 历史记录中。输入以下内容,将 _password_ 替换为你的实际密码 + +``` +set wifi-sec.psk password +save +quit +``` + +现在,你可以启动你的绑定接口以及你创建的辅助接口 + +``` +sudo nmcli connection up bond0 +sudo nmcli connection up bond-ethernet +sudo nmcli connection up bond-wifi +``` + +你现在应该能够在不丢失网络连接的情况下断开有线或无线连接。 + +### 警告:使用其他 WiFi 网络时 + +在指定的 WiFi 网络间移动时,此配置很有效,但是当远离此网络时,那么绑定中使用的 SSID 就不可用了。从理论上讲,可以为每个使用的 WiFi 连接添加一个接口,但这似乎并不合理。相反,你可以禁用绑定接口: + +``` +sudo nmcli connection down bond0 +``` + +回到定义的 WiFi 网络时,只需按上述方式启动绑定接口即可。 + +### 微调你的绑定 + +默认情况下,绑定接口使用“负载平衡(round-robin)”模式。 这会在接口上平均分配负载。 但是,如果你有有线和无线连接,你可能希望更喜欢有线连接。 “active-backup” 模式能实现此功能。 你可以在创建接口时指定模式和主接口,或者之后使用此命令(绑定接口应该关闭): + +``` +sudo nmcli connection modify bond0 +bond.options "mode=active-backup,primary=enp12s0u1" +``` + +[kernel 文档][5]提供了有关绑定选项的更多信息。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/ + +作者:[Ben Cotton][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://fedoramagazine.org/author/bcotton/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/networkingmobility-816x345.jpg +[2]: https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html +[3]: https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns +[4]: https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#Target_users_(authentication_key_distribution) +[5]: https://www.kernel.org/doc/Documentation/networking/bonding.txt From 9c8b50a76565cc6cf1fb45c707735443def6b9c3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 25 Jul 2019 08:58:16 +0800 Subject: [PATCH 111/951] translating --- .../20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md b/sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md index f2440f0fb7..1817425816 100644 --- a/sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md +++ b/sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 442322937e8adb0aa4b4d5773a81dd28f2434830 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Jul 2019 09:30:17 +0800 Subject: [PATCH 112/951] PRF @wxy --- ... Best Linux Distributions for Beginners.md | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/sources/tech/20190518 Best Linux Distributions for Beginners.md b/sources/tech/20190518 Best Linux Distributions for Beginners.md index 6581de73ea..69ea4e44da 100644 --- a/sources/tech/20190518 Best Linux Distributions for Beginners.md +++ b/sources/tech/20190518 Best Linux Distributions for Beginners.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Best Linux Distributions for Beginners) @@ -10,11 +10,11 @@ 最适合于初学者的 Linux 发行版 ====== -> 在本文中,我们将看到**最适合于初学者的 Linux 发行版**。这将有助于新 Linux 用户选择他们的第一个发行版。 +> 在本文中,我们将看到**最适合于初学者的 Linux 发行版**。这将有助于 Linux 新用户选择他们的第一个发行版。 -让我们面对现实,[Linux][1] 可能会给新用户带来巨大复杂性。但是,这并不是 Linux 本身带来了这种复杂性。相反,它是导致这种情况的“新奇”因素。并不是怀旧,但我记得第一次使用 Linux 时,我甚至不知道会发生什么。我喜欢它,但最初这对我来说像是逆流游泳一样。 +让我们面对现实,[Linux][1] 可能会给新用户带来巨大的复杂性。但是,带来这种复杂性的并不是 Linux 本身。相反,是“新奇”因素导致了这种情况。并不是怀旧,但我记得第一次使用 Linux 时,我甚至不知道会发生什么。我喜欢它,但最初这对我来说像是逆流游泳一样。 -不知道从何处着手可能是一个令人沮丧的原因,特别是对于那些在 PC 上运行 Windows 之外的其它系统没有概念的人来说如此。 +不知道从何处着手可能是一个令人沮丧的原因,特别是对于那些在 PC 上运行 Windows 之外的其它系统没有概念的人来说。 Linux 不仅仅是一个操作系统,而是一个理念:在这里大家共同成长,也适合于每个人的不同需要。我们已经介绍过: @@ -25,7 +25,7 @@ Linux 不仅仅是一个操作系统,而是一个理念:在这里大家共 * [隐私和匿名的最佳 Linux 发行版][6] * [看起来像 MacOS 的最佳 Linux 发行版][7] -除此之外,还有一些发行版能够满足新人的需求。这里有一些适合初学者的 Linux 发行版。你也可以在视频中观看并[订阅我们的 YouTube 频道][8]以获取更多与 Linux 相关的视频。 +除此之外,还有一些能够特别满足新人需求的发行版。这里有一些这样的适合初学者的 Linux 发行版。你也可以在视频中观看并[订阅我们的 YouTube 频道][8]以获取更多与 Linux 相关的视频。 [视频](https://youtu.be/QC2B2-gCbbI) @@ -35,41 +35,41 @@ Linux 不仅仅是一个操作系统,而是一个理念:在这里大家共 #### 1、Ubuntu -如果你在互联网上研究过 Linux,那么你很可能遇到过 Ubuntu。Ubuntu 是领先的 Linux 发行版之一。 它也是开始 Linux 之旅的完美之选。 +如果你在互联网上研究过 Linux,那么你很可能遇到过 Ubuntu。Ubuntu 是领先的 Linux 发行版之一,它也是开始 Linux 之旅的完美之选。 ![][9] -Ubuntu 被视为人性化的 Linux,这是因为 Ubuntu 在通用可用性上付出了很多努力。Ubuntu 并不要求你用技术的方式去使用它。它打破了 “Linux = 命令行麻烦”这一概念。这是 Ubuntu 飙升到今天的主要优势之一。 +Ubuntu 被视为人性化的 Linux,这是因为 Ubuntu 在通用可用性上付出了很多努力。Ubuntu 并不要求你在技术方面懂得很多才能使用它。它打破了 “Linux = 命令行麻烦”这一概念。这是 Ubuntu 飙升到今天的主要优势之一。 Ubuntu 提供了非常方便的安装程序。这个安装程序以简单的英语(或你想要的任何主要语言)描述安装过程。你甚至可以在实际执行安装过程之前尝试使用 Ubuntu。安装程序提供了简单的选项: -* 删除旧操作系统安装 Ubuntu。 -* 安装 Ubuntu,与 Windows 或任何其他现有操作系统[共存][10](每次启动时都会选择要启动的操作系统)。 +* 删除旧操作系统以安装 Ubuntu。 +* 与 Windows 或任何其他现有操作系统[一起][10]安装 Ubuntu(每次启动时都会提供要启动的操作系统的选择列表)。 * 让高级用户自行配置分区。 *初学者提示:如果你不确定该怎么做,请选择第二个选项。* -Ubuntu 的用户界面名为 GNOME。它既简单又富有成效。你可以通过按 Windows 键搜索从应用程序到文件的任何内容。有什么比这更简单的吗? +Ubuntu 的用户界面采用 GNOME。它简单、高效。你可以通过按 Windows 键搜索从应用程序到文件的任何内容。有什么比这更简单的吗? -没有驱动程序安装问题,因为 Ubuntu 附带了一个硬件检测器,可以检测、下载和安装适用于你的 PC 的最佳驱动程序。此外,安装会附带所有基本软件,如音乐播放器、视频播放器、办公套件和一些消磨时间的游戏。 +没有驱动程序安装问题,因为 Ubuntu 附带硬件检测器,可以检测、下载和安装适用于你的 PC 的最佳驱动程序。此外,安装会附带所有基本软件,如音乐播放器、视频播放器、办公套件和一些消磨时间的游戏。 -Ubuntu 有很好的文档和社区支持。[Ubuntu 论坛][11]和 [Ask Ubuntu][12] 几乎在 Ubuntu 的所有方面都提供了可观的高质量支持。你有的一些问题很有可能已经回答过了,这些答案是适合初学者的。 +Ubuntu 拥有出色的文档和社区支持。[Ubuntu 论坛][11]和 [Ask Ubuntu][12] 几乎在 Ubuntu 的所有方面都提供了可观的高质量支持。你的一些问题很有可能已经得到了回答,这些答案是适合初学者的。 请在[官方网站][13]查看并下载 [Ubuntu][13]。 #### 2、Linux Mint Cinnamon -多年来,Linux Mint 一直是 [Distrowatch][14] 上的**头号** Linux 发行版。我必须说,当之无愧的宝座。Linux Mint 是我个人的最爱之一。它优雅、秀气,提供了卓越的计算体验(开箱即用)。 +多年来,Linux Mint 一直是 [Distrowatch][14] 上的**排名第一的** Linux 发行版。我必须说,这是当之无愧的宝座。Linux Mint 是我个人的最爱之一。它优雅、秀气,提供了卓越的计算体验(开箱即用)。 ![][15] -Linux Mint 具有 Cinnamon 桌面环境。仍处于熟悉 Linux 软件的 Linux 新用户会发现 Cinnamon 非常有用。所有软件都非常易于按类别分组。虽然这不是一个令人兴奋的功能,但对于不了解 Linux 软件名称的新用户来说,这是一个巨大的好处。 +Linux Mint 带有 Cinnamon 桌面环境。仍处于熟悉 Linux 软件阶段的 Linux 新用户会发现 Cinnamon 非常有用。所有软件都按类别分组,非常易于访问。虽然这不是一个令人兴奋的功能,但对于不了解 Linux 软件名称的新用户来说,这是一个巨大的好处。 -Linux Mint 很快。在旧电脑上运行良好。Linux Mint 建立在坚如磐石的 Ubuntu 基础之上。它使用与 Ubuntu 相同的软件存储库。关于 Ubuntu 软件存储库,Ubuntu 推送的软件仅供广泛测试后使用。这意味着用户不必处理一些新软件容易出现的意外崩溃和故障,对于新的 Linux 用户来说这可能是一个真正的禁忌。 +Linux Mint 很快,在旧电脑上也运行良好。Linux Mint 建立在坚如磐石的 Ubuntu 基础之上。它使用与 Ubuntu 相同的软件存储库。而对于 Ubuntu 软件存储库,仅在广泛测试后 Ubuntu 才会将软件推送在其中。这意味着用户不必处理某些新软件容易出现的意外崩溃和故障,对于新的 Linux 用户来说这可能是一个真正不可接受的。 ![][17] -Windows 7 爱好者如果真的没有升级到微软 Windows 10 的话,那将会发现 Linux Mint 的可爱。 Linux Mint 桌面非常类似于 Windows 7 桌面。类似的工具栏、类似的菜单、类似的托盘图标都绝对会使 Windows 用户感到十分熟悉。 +Windows 7 爱好者如果没有真的升级到微软 Windows 10 的话,那将会发现 Linux Mint 的可爱。 Linux Mint 桌面非常类似于 Windows 7 桌面。类似的工具栏、类似的菜单、类似的托盘图标都绝对会使 Windows 用户感到十分熟悉。 就个人而言,我更倾向于向 Linux 世界的新人推荐 Linux Mint,因为 Linux Mint 确实给用户留下了足够的印象,会让他们接受它。对我来说,Linux Mint 应该是面向初学者的 Linux 列表中的首位。 @@ -77,61 +77,61 @@ Windows 7 爱好者如果真的没有升级到微软 Windows 10 的话,那将 #### 3、Zorin OS -大多数计算机用户是 Windows 用户。当 [Windows 用户拿到一个 Linux][2] 时,他必须经历相当多的“学习过程”。大量的操作已经形成了我们的肌肉记忆。例如,每次要启动应用程序时,鼠标都会到达屏幕的左下角(“开始”菜单)。因此,如果我们能够在 Linux 上找到一些可以缓解这些问题的东西,那就成功了一半了。进入 Zorin OS。 +大多数计算机用户是 Windows 用户。当 [Windows 用户拿到一个 Linux][2] 时,他必须经历相当多的“去知识过程”。大量的操作已经固定在我们的肌肉记忆当中。例如,每次要启动应用程序时,鼠标都会移动屏幕的左下角(“开始”菜单)。因此,如果我们能够在 Linux 上找到一些可以缓解这些问题的东西,那就成功了一半了。进入 Zorin OS。 ![][19] -Zorin OS 是一个基于 Ubuntu 的高度优化的 Linux 发行版,完全是为 Windows 难民制作的。虽然几乎每个 Linux 发行版都可供任何人使用,但是当桌面看起来太陌生时,有些人可能会不情愿。Zorin OS 避开了这个障碍,因为它与 Windows 外观明显相似。 +Zorin OS 是一款基于 Ubuntu 的高度打磨的 Linux 发行版,完全是为 Windows 难民制作的。尽管几乎每个 Linux 发行版都可供任何人使用,但是当桌面看起来太陌生时,有些人可能会不情愿使用。Zorin OS 避开了这个障碍,因为它与 Windows 外观明显相似。 -软件包管理器对 Linux 新手来说是一个新概念。这就是为什么 Zorin OS 带有一个巨大的(我的意思是真的很大)预安装软件列表。你需要的任何东西,很有可能它已经安装在 Zorin OS 上。好像这还不够,[Wine 和 PlayOnLinux][20] 也预先安装好了,所以你也可以在这里运行你喜爱的 Windows 软件和[游戏][21]。 +对 Linux 新手来说,软件包管理器是一个新概念。这就是为什么 Zorin OS 带有一个巨大的(我的意思是真的很大)预安装软件列表。你需要的任何东西,很有可能都已经安装在 Zorin OS 上了。好像这还不够,[Wine 和 PlayOnLinux][20] 也预先安装好了,所以你也可以在这里运行你喜爱的 Windows 软件和[游戏][21]。 ![][22] -Zorin OS 配备了一款名为 “Zorin look changer” 的惊人的主题引擎。它提供了一些重要的自定义选项和预设,使你的操作系统看起来像 Windows 7、XP、2000 甚至是 Mac。你会有宾至如归的感觉。 +Zorin OS 配备了一款名为 “Zorin look changer” 的惊人的主题引擎。它提供了一些重要的自定义选项和预设,可以使你的操作系统看起来像 Windows 7、XP、2000 甚至是 Mac,你会有宾至如归的感觉。 ![][23] -正是这些功能使 Zorin OS 成为**适合初学者的最佳 Linux 发行版**。查看 [Zorin OS 网站][24]以了解更多信息并下载该操作系统。 +正是这些功能使 Zorin OS 成为**适合初学者的最佳 Linux 发行版**。查看 [Zorin OS 网站][24]以了解更多信息和下载该操作系统。 #### 4、Elementary OS -由于我们已经看过了给 Windows 用户准备的 Linux 发行版,让我们为 MacOS 用户提供一些东西。Elementary OS 成名非常迅速,现在总是被列入顶级发行列表,这一切都归功于其美学本质。受 MacOS 外观的启发,Elementary OS 是最美丽的 Linux 发行版之一。 +我们已经看过了给 Windows 用户准备的 Linux 发行版,让我们为 MacOS 用户也提供一些东西。Elementary OS 成名非常迅速,现在总是被列入顶级发行列表之中,这一切都归功于其美学本质。其灵感来自于 MacOS,Elementary OS 是最美丽的 Linux 发行版之一。 ![][25] -Elementary OS 是另一个基于 Ubuntu 的操作系统,这意味着操作系统本身无疑是稳定的。Elementary OS 带有 Pantheon 桌面环境。你会马上注意到与 MacOS 桌面的相似之处。这对于转换到 Linux 的 MacOS 用户来说是一个优势,因为他们会非常熟悉桌面,这确实简化了应对此变化的过程。 +Elementary OS 是又一个基于 Ubuntu 的操作系统,这意味着操作系统本身无疑是稳定的。Elementary OS 带有 Pantheon 桌面环境。你马上就会注意到它与 MacOS 桌面的相似之处。这对于转换到 Linux 的 MacOS 用户来说是一个优势,因为他们会对桌面非常适应,这确实简化了应对此变化的过程。 ![][26] -它的菜单简单,可根据用户喜好自定义。该操作系统是零侵入性的,因此你可以真正专注于工作。它附带了非常少量的预安装软件。因此,任何新用户都不会被庞杂的内容所击退。但是,嘿,它具备开箱即用所需要的一切。如果需要更多软件,Elementary OS 提供了一个整洁的 AppCenter。它易于访问且简单易用。一切都在一个地方。你可以一键获得所需的所有软件和升级。 +它的菜单简单,可根据用户喜好自定义。该操作系统是零侵入性的,因此你可以真正专注于工作。它附带了非常少量的预安装软件。因此,新用户都不会被庞杂的内容吓跑。但是,嘿,它具备开箱即用所需要的一切。如果需要更多软件,Elementary OS 提供了一个整洁的 AppCenter。它易于访问且简单易用,一切都在一个地方,你可以一键获得所需的所有软件和升级。 经验表明,[Elementary OS][28] 真的是一个很棒的软件。绝对值得[试一试][28]。 -#### 5、inux Mint Mate +#### 5、Linux Mint Mate -许多来到 Linux 的人都希望让旧电脑焕发新生。随着 Windows 10 的普及,几年前许多具有不错配置的计算机已经变得无力应对。在谷歌上快速搜索一下会建议你在这样的电脑上安装 Linux。通过这种方式,你可以保持它们在之后一段时间仍旧能保持水准。如果你正在寻找可以运行旧计算机的东西,Linux Mint Mate 是一个很棒的 Linux 发行版。 +许多来了解 Linux 的人都希望让旧电脑焕发新生。随着 Windows 10 的普及,几年前许多具有不错配置的计算机已经变得无力应对。在谷歌上快速搜索一下会建议你在这样的电脑上安装 Linux。通过这种方式,你可以让它们在之后一段时间仍旧能保持水准。如果你正在寻找可以运行在旧计算机上的操作系统,Linux Mint Mate 是一个很棒的 Linux 发行版。 ![][29] -Linux Mint Mate 非常轻便,资源利用效率高,而仍然是一个漂亮的发行版。它可以在计算能力较弱的计算机上平稳运行。桌面环境没有各种花哨的东西。但它在功能上和任何其他桌面环境相比毫不逊色。这个操作系统是非侵入式的,允许你在无需改变习惯的情况下获得高效的计算体验。 +Linux Mint Mate 非常轻便,资源利用效率高,而仍然是一个漂亮的发行版。它可以在计算能力较弱的计算机上平稳运行。桌面环境没有各种花哨的东西。但它在功能上和任何其他桌面环境相比毫不逊色。这个操作系统是非侵入式的,允许你获得高效的计算体验而不会妨碍你。 -同样,Linux Mint Mate 基于 Ubuntu,具有巨大的坚实的 Ubuntu 软件存储库的优势。它预装了最少数量的必需软件。提供了简便的驱动程序安装和设置管理。 +同样,Linux Mint Mate 基于 Ubuntu,具有巨大而坚实的 Ubuntu 软件存储库的优势。它预装了最少数量的必需软件。提供了简便的驱动程序安装和设置管理。 即使你只有 512 MB 的内存和 9 GB 的硬盘空间(当然是越多越好),你也可以运行 Linux Mint Mate。 -Mate 桌面环境非常简单易用,没有什么费解的地方。对于 Linux 初学者来说,这确实是一个巨大的优势。 更有理由 [尝试 Linux Mint Mate][30]。 +Mate 桌面环境非常简单易用,没有什么费解的地方。对于 Linux 初学者来说,这确实是一个巨大的优势,更有理由 [尝试 Linux Mint Mate][30]。 #### 6、Manjaro Linux -好吧。任何一个 Linux 的老用户都会说,即使只是在大方向上,引导新手接触 Arch Linux 也是一种罪过。但是听我说。 +好吧。任何一个 Linux 的老用户都会说,即使只是在大方向上,引导新手接触 Arch Linux 都是一种罪过。但是听我说。 -Arch 被认为是专家级 Linux,因为它的安装过程非常复杂。Manajro 和 Arch Linux 有着共同的起源。但它们在其他方面存在很大差异。 +Arch 被认为是专家级 Linux,因为它的安装过程非常复杂。Manajro 和 Arch Linux 有着共同的起源,但它们在其他方面存在很大差异。 ![][31] -Manajro Linux 具有非常适合初学者的安装程序。许多事情都是自动化的,比如使用“硬件检测”进行驱动程序安装。Manjaro 极大地解决了困扰许多其他 Linux 发行版的硬件驱动程序的麻烦。即使你遇到任何问题,Manjaro 也有很棒的社区支持。 +Manajro Linux 具有非常适合初学者的安装程序。许多事情都是自动化的,比如使用“硬件检测”进行驱动程序安装。Manjaro 极大地解决了困扰许多其它 Linux 发行版的硬件驱动程序的麻烦。即使你遇到任何问题,Manjaro 也有很棒的社区支持。 -Manjaro 拥有自己的软件存储库,维护了最新的软件。虽然向用户提供最新软件是一个优先事项,但它可以保证稳定性并不会受到损害。这是 Arch 和 Manjaro 之间的主要区别之一。Manjaro 延迟软件包发布以确保它们绝对稳定并且不会导致回退。你还可以访问 Manjaro 上的 Arch User Repository(AUR),因此你可以随时获得所需的一切。 +Manjaro 拥有自己的软件存储库,其维护了最新的软件。虽然优先向用户提供最新软件,但它是以保证稳定性不会受到损害为前提的。这是 Arch 和 Manjaro 之间的主要区别之一。Manjaro 延迟软件包的发布以确保它们绝对稳定并且不会导致回退。你还可以访问 Manjaro 上的 Arch User Repository(AUR),因此你可以随时获得所需的一切。 如果你想了解更多有关 Manjaro 功能的信息,请阅读我的同事 [John 的 Manjaro Linux 经历以及为什么他会被它迷住][32]。 @@ -143,7 +143,7 @@ Manjaro Linux 有 XFCE、KDE、Gnome、Cinnamon 以及更多桌面环境,请 ### 您选择哪个最适合初学者的 Linux 发行版? -Linux 可能会有学习曲线,但这并不是每个人都会后悔的。获得一个 ISO 文件并体验一下 Linux 吧。如果你已经是 Linux 用户,请分享这篇文章,并帮助有人在这个爱的季节爱上 Linux。干杯。 +Linux 可能会有学习曲线,但这是一件不会让每个人都感到后悔的事情。进一步获得一个 ISO 文件并体验一下 Linux 吧。如果你已经是 Linux 用户,请分享这篇文章,并帮助人们在这个爱的季节爱上 Linux 吧。加油! -------------------------------------------------------------------------------- @@ -152,7 +152,7 @@ via: https://itsfoss.com/best-linux-beginners/ 作者:[Aquil Roshan][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 8044ecce7667697dabdfa6880e9c8e9c28da2b88 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Jul 2019 10:29:05 +0800 Subject: [PATCH 113/951] TSL&PRF:20190518 Best Linux Distributions for Beginners.md @wxy --- .../tech/20190518 Best Linux Distributions for Beginners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {sources => translated}/tech/20190518 Best Linux Distributions for Beginners.md (99%) diff --git a/sources/tech/20190518 Best Linux Distributions for Beginners.md b/translated/tech/20190518 Best Linux Distributions for Beginners.md similarity index 99% rename from sources/tech/20190518 Best Linux Distributions for Beginners.md rename to translated/tech/20190518 Best Linux Distributions for Beginners.md index 69ea4e44da..01104e566a 100644 --- a/sources/tech/20190518 Best Linux Distributions for Beginners.md +++ b/translated/tech/20190518 Best Linux Distributions for Beginners.md @@ -141,7 +141,7 @@ Manjaro Linux 有 XFCE、KDE、Gnome、Cinnamon 以及更多桌面环境,请 要安装上述 6 个操作系统中的任何一个,你需要创建一个可启动的 U 盘。如果你当前正在使用 Windows [请使用本指南][35]。Mac OS 用户可以[遵循本指南][36]。 -### 您选择哪个最适合初学者的 Linux 发行版? +### 你选择哪个最适合初学者的 Linux 发行版? Linux 可能会有学习曲线,但这是一件不会让每个人都感到后悔的事情。进一步获得一个 ISO 文件并体验一下 Linux 吧。如果你已经是 Linux 用户,请分享这篇文章,并帮助人们在这个爱的季节爱上 Linux 吧。加油! From fc7b653f1b7af45f9bcc402a38d98391e8bcdec0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Jul 2019 10:32:53 +0800 Subject: [PATCH 114/951] PUB @wxy https://linux.cn/article-11145-1.html --- .../20190518 Best Linux Distributions for Beginners.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190518 Best Linux Distributions for Beginners.md (99%) diff --git a/translated/tech/20190518 Best Linux Distributions for Beginners.md b/published/20190518 Best Linux Distributions for Beginners.md similarity index 99% rename from translated/tech/20190518 Best Linux Distributions for Beginners.md rename to published/20190518 Best Linux Distributions for Beginners.md index 01104e566a..e4d374a273 100644 --- a/translated/tech/20190518 Best Linux Distributions for Beginners.md +++ b/published/20190518 Best Linux Distributions for Beginners.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11145-1.html) [#]: subject: (Best Linux Distributions for Beginners) [#]: via: (https://itsfoss.com/best-linux-beginners/) [#]: author: (Aquil Roshan https://itsfoss.com/author/aquil/) From 81ceed9037c39f3f48b67dc17641878b26da9413 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 25 Jul 2019 17:18:18 +0800 Subject: [PATCH 115/951] APL:20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel --- ...ol To Run Commands On Cluster Nodes In Parallel.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md b/sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md index 8f69143d36..e03e6de988 100644 --- a/sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md +++ b/sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -7,16 +7,11 @@ [#]: via: (https://www.2daygeek.com/clustershell-clush-run-commands-on-cluster-nodes-remote-system-in-parallel-linux/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -ClusterShell – A Nifty Tool To Run Commands On Cluster Nodes In Parallel +ClusterShell:一个在集群节点上并行运行命令的好工具 ====== -We had written two articles in the past to run commands on multiple remote server in parallel. +我们过去曾写过两篇如何并行地在多个远程服务器上运行命令的文章:这些是[并行 SSH(PSSH)][1] 和 [分布式 Shell(DSH)][2]。今天,我们将讨论相同类型的主题,但它允许我们在群集节点上执行相同的操作。你可能会想,我可以编写一个小的 shell 脚本来实现这个目的,而不是安装这些第三方软件包。 -These are **[Parallel SSH (PSSH)][1]** or **[Distributed Shell (DSH)][2]**. - -Today also, we are going to discuss about the same kind of topic but it allows us to perform the same on cluster nodes as well. - -You may think, i can write a small shell script to archive this instead of installing these third party packages. Of course you are right and if you are going to run some commands in 10-15 remote systems then you don’t need to use this. From 6e53d2b75b31b1f833d952bc3311ee475ec2c35a Mon Sep 17 00:00:00 2001 From: 0x996 Date: Thu, 25 Jul 2019 19:34:10 +1000 Subject: [PATCH 116/951] translated: 20190717 Mastering user groups on Linux --- ...20190717 Mastering user groups on Linux.md | 225 ------------------ ...20190717 Mastering user groups on Linux.md | 225 ++++++++++++++++++ 2 files changed, 225 insertions(+), 225 deletions(-) delete mode 100644 sources/tech/20190717 Mastering user groups on Linux.md create mode 100644 translated/tech/20190717 Mastering user groups on Linux.md diff --git a/sources/tech/20190717 Mastering user groups on Linux.md b/sources/tech/20190717 Mastering user groups on Linux.md deleted file mode 100644 index 82f9cca815..0000000000 --- a/sources/tech/20190717 Mastering user groups on Linux.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (0x996) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Mastering user groups on Linux) -[#]: via: (https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Mastering user groups on Linux -====== -Managing user groups on Linux systems is easy, but the commands can be more flexible than you might be aware. -![Scott 97006 \(CC BY 2.0\)][1] - -User groups play an important role on Linux systems. They provide an easy way for a select groups of users to share files with each other. They also allow sysadmins to more effectively manage user privileges, since they can assign privileges to groups rather than individual users. - -While a user group is generally created whenever a user account is added to a system, there’s still a lot to know about how they work and how to work with them. - -**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** - -### One user, one group? - -Most user accounts on Linux systems are set up with the user and group names the same. The user "jdoe" will be set up with a group named "jdoe" and will be the only member of that newly created group. The user’s login name, user id, and group id will be added to the **/etc/passwd** and **/etc/group** files when the account is added, as shown in this example: - -``` -$ sudo useradd jdoe -$ grep jdoe /etc/passwd -jdoe:x:1066:1066:Jane Doe:/home/jdoe:/bin/sh -$ grep jdoe /etc/group -jdoe:x:1066: -``` - -The values in these files allow the system to translate between the text (jdoe) and numeric (1066) versions of the user id — jdoe is 1066 and 1066 is jdoe. - -The assigned UID (user id) and GID (group id) for each user are generally the same and configured sequentially. If Jane Doe in the above example were the most recently added user, the next new user would likely be assigned 1067 as their user and group IDs. - -### GID = UID? - -UIDs and GIDs can get of out sync. For example, if you add a group using the **groupadd** command without specifying a group id, your system will assign the next available group id (in this case, 1067). The next user to be added to the system would then get 1067 as a UID but 1068 as a GID. - -You can avoid this issue by specifying a smaller group id when you add a group rather than going with the default. In this command, we add a new group and provide a GID that is smaller than the range used for user accounts. - -``` -$ sudo groupadd -g 500 devops -``` - -If it works better for you, you can specify a shared group when you create accounts. For example, you might want to assign new development staff members to a devops group instead of putting each one in their own group. - -``` -$ sudo useradd -g staff bennyg -$ grep bennyg /etc/passwd -bennyg:x:1064:50::/home/bennyg:/bin/sh -``` - -### Primary and secondary groups - -There are actually two types of groups — primary and secondary. - -The **primary group** is the one that’s recorded in the **/etc/passwd** file, configured when an account is set up. When a user creates a file, it’s their primary group that is associated with it. - -``` -$ whoami -jdoe -$ grep jdoe /etc/passwd -jdoe:x:1066:1066:John Doe:/home/jdoe:/bin/bash - ^ - | - +-------- primary group -$ touch newfile -$ ls -l newfile --rw-rw-r-- 1 jdoe jdoe 0 Jul 16 15:22 newfile - ^ - | - +-------- primary group -``` - -**Secondary groups** are those that users might be added to once they already have accounts. Secondary group memberships show up in the /etc/group file. - -``` -$ grep devops /etc/group -devops:x:500:shs,jadep - ^ - | - +-------- secondary group for shs and jadep -``` - -The **/etc/group** file assigns names to user groups (e.g., 500 = devops) and records secondary group members. - -### Preferred convention - -The convention of having each user a member of their own group and optionally a member of any number of secondary groups allows users to more easily separate files that are personal from those they need to share with co-workers. When a user creates a file, members of the various user groups they belong to don't necessarily have access. A user will have to use the **chgrp** command to associate a file with a secondary group. - -### There’s no place like /home - -One important detail when adding a new account is that the **useradd** command does not necessarily add a home directory for a new user. If you want this step to be taken only some of the time, you can add **-m** (think of this as the “make home” option) with your useradd commands. - -``` -$ sudo useradd -m -g devops -c "John Doe" jdoe2 -``` - -The options in this command: - - * **-m** creates the home directory and populates it with start-up files - * **-g** specifies the group to assign the user to - * **-c** adds a descriptor for the account (usually the person’s name) - - - -If you want a home directory to be created _all_ of the time, you can change the default behavior by editing the **/etc/login.defs** file. Change or add a setting for the CREATE_HOME variable and set it to “yes”: - -``` -$ grep CREATE_HOME /etc/login.defs -CREATE_HOME yes -``` - -Another option is to set yourself up with an alias so that **useradd** always uses the -m option. - -``` -$ alias useradd=’useradd -m’ -``` - -Make sure you add the alias to your ~/.bashrc or similar start-up file to make it permanent. - -### Looking into /etc/login.defs - -Here’s a command to list all the setting in the /etc/login.defs file. The **grep** commands are hiding comments and blank lines. - -``` -$ cat /etc/login.defs | grep -v "^#" | grep -v "^$" -MAIL_DIR /var/mail -FAILLOG_ENAB yes -LOG_UNKFAIL_ENAB no -LOG_OK_LOGINS no -SYSLOG_SU_ENAB yes -SYSLOG_SG_ENAB yes -FTMP_FILE /var/log/btmp -SU_NAME su -HUSHLOGIN_FILE .hushlogin -ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games -TTYGROUP tty -TTYPERM 0600 -ERASECHAR 0177 -KILLCHAR 025 -UMASK 022 -PASS_MAX_DAYS 99999 -PASS_MIN_DAYS 0 -PASS_WARN_AGE 7 -UID_MIN 1000 -UID_MAX 60000 -GID_MIN 1000 -GID_MAX 60000 -LOGIN_RETRIES 5 -LOGIN_TIMEOUT 60 -CHFN_RESTRICT rwh -DEFAULT_HOME yes -CREATE_HOME yes <=== -USERGROUPS_ENAB yes -ENCRYPT_METHOD SHA512 -``` - -Notice the various settings in this file determine the range of user ids to be used along with password aging and other setting (e.g., umask). - -### How to display a user’s groups - -Users can be members of multiple groups for various reasons. Group membership gives a user access to group-owned files and directories, and sometimes this behavior is critical. To generate a list of the groups that some user belongs to, use the **groups** command. - -``` -$ groups jdoe -jdoe : jdoe adm admin cdrom sudo dip plugdev lpadmin staff sambashare -``` - -You can list your own groups by typing “groups” without an argument. - -### How to add users to groups - -If you want to add an existing user to another group, you can do that with a command like this: - -``` -$ sudo usermod -a -G devops jdoe -``` - -You can also add a user to multiple groups by specifying the groups in a comma-separated list: - -``` -$ sudo usermod -a -G devops,mgrs jdoe -``` - -The **-a** argument means “add” while **-G** lists the groups. - -You can remove a user from a group by editing the **/etc/group** file and removing the username from the list. The usermod command may also have an option for removing a member from a group. - -``` -fish:x:16:nemo,dory,shark - | - V -fish:x:16:nemo,dory -``` - -### Wrap-up - -Adding and managing user groups isn't particularly difficult, but consistency in how you configure accounts can make it easier in the long run. - -**[ Now see: [Must-know Linux Commands][3] ]** - -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/3409781/mastering-user-groups-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://images.idgesg.net/images/article/2019/07/carrots-100801917-large.jpg -[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua -[3]: https://www.networkworld.com/article/3391029/must-know-linux-commands.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/translated/tech/20190717 Mastering user groups on Linux.md b/translated/tech/20190717 Mastering user groups on Linux.md new file mode 100644 index 0000000000..6595649ea7 --- /dev/null +++ b/translated/tech/20190717 Mastering user groups on Linux.md @@ -0,0 +1,225 @@ +[#]: collector: (lujun9972) +[#]: translator: (0x996) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Mastering user groups on Linux) +[#]: via: (https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +掌握 Linux 用户组 +====== +在 Linux 系统中管理用户组并不费力,但相关命令可能比你所知的更为灵活。 +![Scott 97006 \(CC BY 2.0\)][1] + +在 Linux 系统中用户组起着重要作用。用户组提供了一种简单方法供一组用户互相共享文件。用户组也允许系统管理员更加有效地管理用户权限,因为管理员可以将权限分配给用户组而不是逐一分配给单个用户。 + +尽管通常只要在系统中添加用户账户就会创建用户组,关于用户组如何工作以及如何运用用户组还有很多需要了解的。 + +**[ 两分钟 Linux 技巧:[ 观看这些 2 分钟视频学习如何精通一大批 Linux 命令 ][2] ]** + +### 一个用户,一个用户组? + +Linux 系统中多数用户账户被设为用户名与用户组名相同。用户 "jdoe" 会被赋予一个名为 "jdoe" 的用户组,且成为该新建用户组的唯一成员。如本例所示,该用户的登录名,用户 id 和用户组 id 在新建账户时会被添加到 **/etc/passwd** 和 **/etc/group** 文件中: + +``` +$ sudo useradd jdoe +$ grep jdoe /etc/passwd +jdoe:x:1066:1066:Jane Doe:/home/jdoe:/bin/sh +$ grep jdoe /etc/group +jdoe:x:1066: +``` + +这些文件中的配置使系统得以在文本(jdoe)和数字(1066)这两种用户 id 形式之间互相转换—— jdoe 就是 1006,且 1006 就是 jdoe。 + +分配给每个用户的 UID(用户 id)和 GID(用户组 id)通常是一样的并且顺序递增。若上例中 Jane Doe 是最近添加的用户,分配给下一个新用户的用户 id 和用户组 id 很可能都是 1067。 + +### GID = UID? + +UID 和 GID 可能不一致。例如,如果你用 **groupadd** 命令添加一个用户组而不指定用户组 id,系统会分配下一个可用的用户组 id(在本例中为 1067)。下一个添加到系统中的用户其 UID 会是 1067 而 GID 则为 1068。 + +你可以避免这个问题,方法是添加用户组的时候指定一个较小的用户组 id 而不是接受默认值。在下面的命令中我们添加一个用户组并提供一个 GID,这个 GID 小于应用于用户账户的 GID 取值范围。 + +``` +$ sudo groupadd -g 500 devops +``` + +创建账户时你可以指定一个共享用户组,如果这样对你更合适的话。例如你可能想把新来的开发人员加入同一个 DevOps 用户组而不是一人一个用户组。 + +``` +$ sudo useradd -g staff bennyg +$ grep bennyg /etc/passwd +bennyg:x:1064:50::/home/bennyg:/bin/sh +``` + +### 主要用户组primary group次要用户组secondary group + +用户组实际上有两种——主要用户组和次要用户组 + +**主要用户组**是保存在 /etc/passwd 文件中的用户组,该用户组在账户创建时配置。当用户创建一个文件,用户的主要用户组与此文件关联。 + +``` +$ whoami +jdoe +$ grep jdoe /etc/passwd +jdoe:x:1066:1066:John Doe:/home/jdoe:/bin/bash + ^ + | + +-------- 主要用户组 +$ touch newfile +$ ls -l newfile +-rw-rw-r-- 1 jdoe jdoe 0 Jul 16 15:22 newfile + ^ + | + +-------- 主要用户组 +``` + +用户一旦拥有账户之后被加入的那些用户组是**次要用户组**。次要用户组成员关系在 /etc/group 文件中显示。 + +``` +$ grep devops /etc/group +devops:x:500:shs,jadep + ^ + | + +-------- shs 和 jadep 的次要用户组 +``` + +**/etc/group** 文件给用户组分配组名称(例如 500 = devops)并记录次要用户组成员。 + +### 首选的准则 + +每个用户是他自己的主要用户组成员并可以成为任意多个次要用户组成员这样一种准则允许用户更加容易地将个人文件和需要与同事分享的文件分开。当用户创建一个文件时,用户所属的不同用户组的成员不一定有访问权限。用户必须用 **chgrp** 命令将文件和次要用户组关联起来。 + +### 哪里也不如自己的家目录/home + +添加新账户时一个重要的细节是 **useradd** 命令并不一定为新用户添加一个家目录。若你只有某些时候想为用户添加家目录,你可以在 useradd 命令中加入 **-m**选项(可以把它想象成“安家”选项) + +``` +$ sudo useradd -m -g devops -c "John Doe" jdoe2 +``` + +此命令中的选项如下: + +* **-m** 创建家目录并在其中生成初始文件 +* **-g** 指定用户归属的用户组 +* **-c** 添加账户描述信息(通常是用户的姓名) + + + +若你希望总是创建家目录,你可以编辑 **/etc/login.defs** 文件来更改默认工作方式。更改或添加 CREATE_HOME 变量并将其设置为 "yes": + +``` +$ grep CREATE_HOME /etc/login.defs +CREATE_HOME yes +``` + +另一种方法是用自己的账户设置别名从而让 **useradd** 一直带有 -m 选项。 + +``` +$ alias useradd=’useradd -m’ +``` + +确保将该别名添加到你的 ~/.bashrc 文件或类似的启动文件中以使其永久生效。 + +### 深入了解 /etc/login.defs + +下面这个命令可列出 /etc/login.defs 文件中的全部设置。**grep**命令会隐藏所有注释和空行。 + +``` +$ cat /etc/login.defs | grep -v "^#" | grep -v "^$" +MAIL_DIR /var/mail +FAILLOG_ENAB yes +LOG_UNKFAIL_ENAB no +LOG_OK_LOGINS no +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes +FTMP_FILE /var/log/btmp +SU_NAME su +HUSHLOGIN_FILE .hushlogin +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +TTYGROUP tty +TTYPERM 0600 +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 +UID_MIN 1000 +UID_MAX 60000 +GID_MIN 1000 +GID_MAX 60000 +LOGIN_RETRIES 5 +LOGIN_TIMEOUT 60 +CHFN_RESTRICT rwh +DEFAULT_HOME yes +CREATE_HOME yes <=== +USERGROUPS_ENAB yes +ENCRYPT_METHOD SHA512 +``` + +注意此文件中的各种设置会决定用户 id 的取值范围以及密码使用期限和其他设置(如 umask)。 + +### 如何显示用户所属的用户组 + +出于各种原因用户可能是多个用户组的成员。用户组成员身份给与用户对用户组拥有的文件和目录的访问权限,有时候这种工作方式是至关重要的。要生成某个用户所属用户组的清单,用 **groups** 命令即可。 + +``` +$ groups jdoe +jdoe : jdoe adm admin cdrom sudo dip plugdev lpadmin staff sambashare +``` + +你可以键入不带任何参数的“groups”来列出你自己的用户组。 + +### 如何添加用户至用户组 + +如果你想添加一个已有用户至别的用户组,你可以仿照下面的命令操作: + +``` +$ sudo usermod -a -G devops jdoe +``` + +你也可以指定逗号分隔的用户组列表来添加一个用户至多个用户组: + +``` +$ sudo usermod -a -G devops,mgrs jdoe +``` + +参数 **-a** 意思是“添加”,**-G** 指定用户组列表 + +你可以编辑 **/etc/group** 文件将用户名从用户组成员名单中删除,从而将用户从用户组中移除。usermod 命令或许也有个选项用于从用户组中删除某个成员。 + +``` +fish:x:16:nemo,dory,shark + | + V +fish:x:16:nemo,dory +``` + +### 提要 + +添加和管理用户组并非特别困难,但长远来看配置账户时的一致性可使这项工作更容易些。 + +**[ 延伸阅读:[必会的 Linux 命令][3] ]** + +加入 Network World 的 [Facebook][4] 和 [LinkedIn][5] 社区,对最重要的话题发表你的评论。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html + +作者:[Sandra Henry-Stocker][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/0x996) +校对:[校对者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://images.idgesg.net/images/article/2019/07/carrots-100801917-large.jpg +[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua +[3]: https://www.networkworld.com/article/3391029/must-know-linux-commands.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From c224fb0247f9d149e5953771cca232398ac38202 Mon Sep 17 00:00:00 2001 From: WWWN Date: Thu, 25 Jul 2019 21:11:07 +0800 Subject: [PATCH 117/951] translating --- ...to Create a User Account Without useradd Command in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md index 2f8d92bb28..bad72ea709 100644 --- a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md +++ b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (hello-wn) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9d0e25e652cc07c68bae27774353128e4481550f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 00:55:59 +0800 Subject: [PATCH 118/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20Introd?= =?UTF-8?q?ucing=20Fedora=20CoreOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190724 Introducing Fedora CoreOS.md --- .../20190724 Introducing Fedora CoreOS.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sources/tech/20190724 Introducing Fedora CoreOS.md diff --git a/sources/tech/20190724 Introducing Fedora CoreOS.md b/sources/tech/20190724 Introducing Fedora CoreOS.md new file mode 100644 index 0000000000..070573f74e --- /dev/null +++ b/sources/tech/20190724 Introducing Fedora CoreOS.md @@ -0,0 +1,120 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Introducing Fedora CoreOS) +[#]: via: (https://fedoramagazine.org/introducing-fedora-coreos/) +[#]: author: (Benjamin Gilbert https://fedoramagazine.org/author/bgilbert/) + +Introducing Fedora CoreOS +====== + +![The Fedora CoreOS logo on a gray background.][1] + +The Fedora CoreOS team is excited to [announce the first preview release][2] of Fedora CoreOS, a new Fedora edition built specifically for running containerized workloads securely and at scale. It’s the successor to both [Fedora Atomic Host][3] and [CoreOS Container Linux][4]. Fedora CoreOS combines the provisioning tools, automatic update model, and philosophy of Container Linux with the packaging technology, OCI support, and SELinux security of Atomic Host. + +Read on for more details about this exciting new release. + +### Why Fedora CoreOS? + +Containers allow workloads to be reproducibly deployed to production and automatically scaled to meet demand. The isolation provided by a container means that the host OS can be small. It only needs a Linux kernel, systemd, a container runtime, and a few additional services such as an SSH server. + +While containers can be run on a full-sized server OS, an operating system built specifically for containers can provide functionality that a general purpose OS cannot. Since the required software is minimal and uniform, the entire OS can be deployed as a unit with little customization. And, since containers are deployed across multiple nodes for redundancy, the OS can update itself automatically and then reboot without interrupting workloads. + +Fedora CoreOS is built to be the secure and reliable host for your compute clusters. It’s designed specifically for running containerized workloads without regular maintenance, automatically updating itself with the latest OS improvements, bug fixes, and security updates. It provisions itself with Ignition, runs containers with Podman and Moby, and updates itself atomically and automatically with rpm-ostree. + +### Provisioning immutable infrastructure + +Whether you run in the cloud, virtualized, or on bare metal, a Fedora CoreOS machine always begins from the same place: a [generic OS image][5]. Then, during the first boot, Fedora CoreOS uses _Ignition_ to provision the system. Ignition reads an _Ignition config_ from cloud user data or a remote URL, and uses it to create disk partitions and file systems, users, files and systemd units. + +To provision a machine: + + 1. Write a [Fedora CoreOS Config][6] (FCC), a YAML document that specifies the desired configuration of a machine. FCCs support all Ignition functionality, and also provide additional syntax (“sugar”) that makes it easier to specify typical configuration changes. + 2. Use the [Fedora CoreOS Config Transpiler][7] to [validate your FCC and convert it to an Ignition config][8]. + 3. Launch a Fedora CoreOS machine and [pass it the Ignition config][9]. If the machine boots successfully, provisioning has completed without errors. + + + +Fedora CoreOS is designed to be managed as _immutable infrastructure_. After a machine is provisioned, you should not modify _/etc_ or otherwise reconfigure the machine. Instead, modify the FCC and use it to provision a replacement machine. + +This is similar to how you’d manage a container: container images are not updated in place, but rebuilt from scratch and redeployed. This approach makes it easy to scale out when load increases. Simply use the same Ignition config to launch additional machines. + +### Automatic updates + +By default, Fedora CoreOS automatically downloads new OS releases, atomically installs them, and reboots into them. Releases roll out gradually over time. We can even stop a rollout if we discover a problem in a new release. Upgrades between Fedora releases are treated as any other update, and are automatically applied without user intervention. + +The Linux ecosystem evolves quickly, and software updates can bring undesired behavior changes. However, for automatic updates to be trustworthy, they cannot break existing machines. To avoid this, Fedora CoreOS takes a two-pronged approach. First, we automatically test each change to the OS. However, automatic testing can’t catch all regressions, so Fedora CoreOS also ships multiple independent _release streams_: + + * The _testing_ stream is a regular snapshot of the current Fedora release, plus updates. + * After a _testing_ release has been available for two weeks, it is sent to the _stable_ stream. Bugs discovered in _testing_ will be fixed before a release is sent to _stable_. + * The _next_ stream is a regular snapshot of the upcoming Fedora release, allowing additional time for testing larger changes. + + + +All three streams receive security updates and critical bugfixes, and are intended to be safe for production use. Most machines should run the _stable_ stream, since that receives the most testing. However, users should run a few percent of their nodes on the _next_ and _testing_ streams, and report problems to the [issue tracker][10]. This helps ensure that bugs that only affect certain workloads or certain hardware are fixed before they reach _stable_. + +### Telemetry + +To help direct our development efforts, Fedora CoreOS will perform some telemetry by default. A service called _[fedora-coreos-pinger][11]_ will periodically collect non-identifying information about the machine, such as the OS version, cloud platform, and instance type, and report it to servers controlled by the Fedora project. + +No unique identifiers will be reported or collected, and the data will only be used in aggregate to answer questions about how Fedora CoreOS is being used. We will prominently document that this collection is occurring and how to disable it. We will also tell you how to help the project by reporting additional detail, including information that might identify the machine. + +### Current status of Fedora CoreOS + +Fedora CoreOS is still under active development, and some planned functionality is not available in the first preview release: + + * Only the _testing_ stream currently exists; the _next_ and _stable_ streams are not yet available. + * Several cloud and virtualization platforms are not yet available. Only x86_64 is currently supported. + * Booting a live Fedora CoreOS system via network (PXE) or CD is not yet supported. + * We are actively discussing plans for closer integration with Kubernetes distributions, including OKD. + * Fedora CoreOS Config Transpiler will gain more sugar over time. + * Telemetry is not yet active. + * Documentation is still under development. + + + +**While Fedora CoreOS is intended for production use, preview releases should _not_ be used in production. Fedora CoreOS may change in incompatible ways during the preview period. There is no guarantee that a preview release will successfully update to a later preview release, or to a stable release.** + +### The future + +We expect the preview period to continue for about six months. At the end of the preview, we will declare Fedora CoreOS stable and encourage its use in production. + +CoreOS Container Linux will be maintained until about six months after Fedora CoreOS is declared stable. We’ll announce the exact timing later this year. During the preview period, we’ll publish tools and documentation to help Container Linux users migrate to Fedora CoreOS. + +[Fedora Atomic Host will be maintained][12] until the end of life of Fedora 29, expected in late November. Before then, Fedora Atomic Host users should migrate to Fedora CoreOS. + +### Getting involved in Fedora CoreOS + +To try out the new release, head over to the [download page][5] to get OS images or cloud image IDs. Then use the [quick start guide][13] to get a machine running quickly. Finally, get involved! You can report bugs and missing features to the [issue tracker][10]. You can also discuss Fedora CoreOS in [Fedora Discourse][14], the [development mailing list][15], or in #fedora-coreos on Freenode. + +Welcome to Fedora CoreOS, and let us know what you think! + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/introducing-fedora-coreos/ + +作者:[Benjamin Gilbert][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/bgilbert/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/introducing-fedora-coreos-816x345.png +[2]: https://getfedora.org/coreos/ +[3]: https://www.projectatomic.io/ +[4]: https://coreos.com/os/docs/latest/ +[5]: https://getfedora.org/coreos/download/ +[6]: https://github.com/coreos/fcct/blob/master/docs/configuration-v1_0.md +[7]: https://github.com/coreos/fcct/releases +[8]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/#_generating_ignition_configs +[9]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/#_launching_fedora_coreos +[10]: https://github.com/coreos/fedora-coreos-tracker/issues +[11]: https://github.com/coreos/fedora-coreos-pinger/ +[12]: https://fedoramagazine.org/announcing-fedora-coreos/ +[13]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/ +[14]: https://discussion.fedoraproject.org/c/server/coreos +[15]: https://lists.fedoraproject.org/archives/list/coreos@lists.fedoraproject.org/ From 62109a730c879426f7ac1dcfad8bc83616eefec2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:14:42 +0800 Subject: [PATCH 119/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190725=2024=20s?= =?UTF-8?q?ysadmin=20job=20interview=20questions=20you=20should=20know?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190725 24 sysadmin job interview questions you should know.md --- ...job interview questions you should know.md | 292 ++++++++++++++++++ 1 file changed, 292 insertions(+) create mode 100644 sources/tech/20190725 24 sysadmin job interview questions you should know.md diff --git a/sources/tech/20190725 24 sysadmin job interview questions you should know.md b/sources/tech/20190725 24 sysadmin job interview questions you should know.md new file mode 100644 index 0000000000..c80bf8f86e --- /dev/null +++ b/sources/tech/20190725 24 sysadmin job interview questions you should know.md @@ -0,0 +1,292 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (24 sysadmin job interview questions you should know) +[#]: via: (https://opensource.com/article/19/7/sysadmin-job-interview-questions) +[#]: author: (DirectedSoul https://opensource.com/users/directedsoul) + +24 sysadmin job interview questions you should know +====== +Have a sysadmin job interview coming up? Read this article for some +questions you might encounter and possible answers. +![Question and answer.][1] + +As a geek who always played with computers, a career after my masters in IT was a natural choice. So, I decided the sysadmin path was the right one. In the process of my career, I have grown quite familiar with the job interview process. Here is a look at what to expect, the general career path, and a set of common questions and my answers to them. + +### Typical sysadmin tasks and duties + +Organizations need someone who understands the basics of how a system works so that they can keep their data safe, and keep their services running smoothly. You might ask: "Wait, isn’t there more that a sysadmin can do?" + +You are right. Now, in general, let’s look at what might be a typical sysadmin’s day-to-day tasks. Depending on their company’s needs and the person’s skill level, a sysadmin’s tasks vary from managing desktops, laptops, networks, and servers, to designing the organization’s IT policies. Sometimes sysadmins are even in charge of purchasing and placing orders for new IT equipment. + +Those seeking system administration as their career paths might find it difficult to keep their skills and knowledge up to date, as rapid changes in the IT field are inevitable. The next natural question that arises out of anyone’s mind is how IT professionals keep up with the latest updates and skills. + +### Low difficulty questions + +Here are some of the more basic questions you will encounter, and my answers: + + 1. What are the first five commands you type on a *nix server after login? + + + +> * **lsblk** to see information on all block devices +> * **who** to see who is logged into the server +> * **top** to get a sense of what is running on the server +> * **df -khT** to view the amount of disk space available on the server +> * **netstat** to see what TCP network connections are active +> + + + 2. How do you make a process run in the background, and what are the advantages of doing so? + + + +> You can make a process run in the background by adding the special character **&** at the end of the command. Generally, applications that take too long to execute, and don’t require user interaction are sent to the background so that we can continue our work in the terminal. ([Citation][2]) + + 3. Is running these commands as root a good or bad idea? + + + +> Running (everything) as root is bad due to two major issues. The first is _risk_. Nothing prevents you from making a careless mistake when you are logged in as **root**. If you try to change the system in a potentially harmful way, you need to use **sudo**, which introduces a pause (while you’re entering the password) to ensure that you aren’t about to make a mistake. +> +> The second reason is _security_. Systems are harder to hack if you don’t know the admin user’s login information. Having access to root means you already have one half of the working set of admin credentials. + + 4. What is the difference between **rm** and **rm -rf**? + + + +> The **rm** command by itself only deletes the named files (and not directories). With **-rf** you add two additional features: The **-r**, **-R**, or --**recursive** flag recursively deletes the directory’s contents, including hidden files and subdirectories, and the **-f**, or --**force**, flag makes **rm** ignore nonexistent files, and never prompt for confirmation. + + 5. **Compress.tgz** has a file size of approximately 15GB. How can you list its contents, and how do you list them only for a specific file? + + + +> To list the file’s contents: +> +> **tar tf archive.tgz** +> +> To extract a specific file: +> +> **tar xf archive.tgz filename** + +### Medium difficulty questions + +Here are some harder questions you might encounter, and my answers: + + 6. What is RAID? What is RAID 0, RAID 1, RAID 5, RAID 6, and RAID 10? + + + +> A RAID (Redundant Array of Inexpensive Disks) is a technology used to increase the performance and/or reliability of data storage. The RAID levels are: +> +> * RAID 0: Also known as disk striping, which is a technique that breaks up a file, and spreads the data across all of the disk drives in a RAID group. There are no safeguards against failure. ([Citation][3]) +> * RAID 1: A popular disk subsystem that increases safety by writing the same data on two drives. Called _mirroring_, RAID1 does not increase write performance, but read performance may increase up to the sum of each disks’ performance. Also, if one drive fails, the second drive is used, and the failed drive is manually replaced. After replacement, the RAID controller duplicates the contents of the working drive onto the new one. +> * RAID 5: A disk subsystem that increases safety by computing parity data and increasing speed. RAID 5 does this by interleaving data across three or more drives (striping). Upon failure of a single drive, subsequent reads can be calculated from the distributed parity such that no data is lost. +> * RAID 6: Which extends RAID 5 by adding another parity block. This level requires a minimum of four disks, and can continue to execute read/write with any two concurrent disk failures. RAID 6 does not have a performance penalty for reading operations, but it does have a performance penalty on write operations because of the overhead associated with parity calculations. +> * RAID 10: Also known as RAID 1+0, RAID 10 combines disk mirroring and disk striping to protect data. It requires a minimum of four disks, and stripes data across mirrored pairs. As long as one disk in each mirrored pair is functional, data can be retrieved. If two disks in the same mirrored pair fail, all data will be lost because there is no parity in the striped sets. ([Citation][4]) +> + + + 7. Which port is used for the **ping** command? + + + +> The **ping** command uses ICMP. Specifically, it uses ICMP echo requests and ICMP echo reply packets. +> +> ICMP does not use either UDP or TCP communication services: Instead, it uses raw IP communication services. This means that the ICMP message is carried directly in an IP datagram data field. + + 8. What is the difference between a router and a gateway? What is the default gateway? + + + +> _Router_ describes the general technical function (layer 3 forwarding), or a hardware device intended for that purpose, while _gateway_ describes the function for the local segment (providing connectivity to elsewhere). You could also state that you "set up a router as a gateway." Another term is _hop_, which describes forwarding between subnets. +> +> The term _default gateway_ is used to mean the router on your LAN, which has the responsibility of being the first point of contact for traffic to computers outside the LAN. + + 9. Explain the boot process for Linux. + + + +> BIOS -> Master Boot Record (MBR) -> GRUB -> the kernel -> init -> runlevel + + 10. How do you check the error messages while the server is booting up? + + + +> Kernel messages are always stored in the kmsg buffer, visible via the **dmesg** command. +> +> Boot issues and errors call for a system administrator to look into certain important files, in conjunction with particular commands, which are each handled differently by different versions of Linux: +> +> * **/var/log/boot.log** is the system boot log, which contains all that unfolded during the system boot. +> * **/var/log/messages** stores global system messages, including the messages logged during system boot. +> * **/var/log/dmesg** contains kernel ring buffer information. +> + + + 11. What is the difference between a symbolic link and a hard link? + + + +> A _symbolic_ or _soft link_ is an actual link to the original file, whereas a _hard link_ is a mirror copy of the original file. If you delete the original file, the soft link has no value, because it then points to a non-existent file. In the case of a hard link, it is entirely the opposite. If you delete the original file, the hard link still contains the data from the original file. ([Citation][5]) + + 12. How do you change kernel parameters? What kernel options might you need to tune? + + + +> To set the kernel parameters in Unix-like systems, first edit the file **/etc/sysctl.conf**. After making the changes, save the file and run the **sysctl -p** command. This command makes the changes permanent without rebooting the machine + + 13. Explain the **/proc** filesystem. + + + +> The **/proc** filesystem is virtual, and provides detailed information about the kernel, hardware, and running processes. Since **/proc** contains virtual files, it is called the _virtual file system_. These virtual files have unique qualities. Most of them are listed as zero bytes in size. +> +> Virtual files such as **/proc/interrupts**, **/proc/meminfo**, **/proc/mounts** and **/proc/partitions** provide an up-to-the-moment glimpse of the system’s hardware. Others, such as **/proc/filesystems** and the **/proc/sys** directory provide system configuration information and interfaces. + + 14. How do you run a script as another user without their password? + + + +> For example, if you were editing the sudoers file (such as **/private/etc/sudoers**), you might use **visudo** to add the following: +> +> [**user1 ALL=(user2) NOPASSWD: /opt/scripts/bin/generate.sh**][2] + + 15. What is the UID 0 toor account? Have you been compromised? + + + +> The toor user is an alternative superuser account, where toor is root spelled backward. It is intended to be used with a non-standard shell, so the default shell for root does not need to change. +> +> This purpose is important. Shells which are not part of the base distribution, but are instead installed from ports or packages, are installed in **/usr/local/bin**; which, by default, resides on a different file system. If root’s shell is located in **/usr/local/bin** and the file system containing **/usr/local/bin** is not mounted, root could not log in to fix a problem, and the sysadmin would have to reboot into single-user mode to enter the shell’s path. + +### Advanced questions + +Here are the even more difficult questions you may encounter: + + 16. How does **tracert** work and what protocol does it use? + + + +> The command **tracert**—or **traceroute** depending on the operating system—allows you to see exactly what routers you touch as you move through the chain of connections to your final destination. If you end up with a problem where you can’t connect to or **ping** your final destination, a **tracert** can help in that you can tell exactly where the chain of connections stops. ([Citation][6]) +> +> With this information, you can contact the correct people; whether it be your own firewall, your ISP, your destination’s ISP, or somewhere in the middle. The **tracert** command—like **ping**—uses the ICMP protocol, but also can use the first step of the TCP three-way handshake to send SYN requests for a response. + + 17. What is the main advantage of using **chroot**? When and why do we use it? What is the purpose of the **mount /dev**, **mount /proc**, and **mount /sys** commands in a **chroot** environment?  + + + +> An advantage of having a **chroot** environment is that the filesystem is isolated from the physical host, since **chroot** has a separate filesystem inside your filesystem. The difference is that **chroot** uses a newly created root (**/**) as its root directory. +> +> A **chroot** jail lets you isolate a process and its children from the rest of the system. It should only be used for processes that don’t run as **root**, as **root** users can break out of the jail easily. +> +> The idea is that you create a directory tree where you copy or link in all of the system files needed for the process to run. You then use the **chroot()** system call to tell it the root directory now exists at the base of this new tree, and then start the process running in that **chroot**’d environment. Since the command then can’t reference paths outside the modified root directory, it can’t perform operations (read, write, etc.) maliciously on those locations. ([Citation][7]) + + 18. How do you protect your system from getting hacked? + + + +> By following the principle of least privileges and these practices: +> +> * Encrypt with public keys, which provides excellent security. +> * Enforce password complexity. +> * Understand why you are making exceptions to the rules above. +> * Review your exceptions regularly. +> * Hold someone to account for failure. (It keeps you on your toes.) ([Citation][8]) +> + + + 19. What is LVM, and what are the advantages of using it? + + + +> LVM, or Logical Volume Management, uses a storage device management technology that gives users the power to pool and abstract the physical layout of component storage devices for easier and flexible administration. Using the device mapper Linux kernel framework, the current iteration (LVM2) can be used to gather existing storage devices into groups and allocate logical units from the combined space as needed. + + 20. What are sticky ports? + + + +> Sticky ports are one of the network administrator’s best friends and worst headaches. They allow you to set up your network so that each port on a switch only permits one (or a number that you specify) computer to connect on that port, by locking it to a particular MAC address. + + 21. Explain port forwarding? + + + +> When trying to communicate with systems on the inside of a secured network, it can be very difficult to do so from the outside—and with good reason. Therefore, the use of a port forwarding table within the router itself, or other connection management device, can allow specific traffic to automatically forward to a particular destination. For example, if you had a web server running on your network and you wanted to grant access to it from the outside, you would set up port forwarding to port 80 on the server in question. This would mean that anyone entering your IP address in a web browser would connect to the server’s website immediately. +> +> Please note, it is usually not recommended to allow access to a server from the outside directly into your network. + + 22. What is a false positive and false negative in the case of IDS? + + + +> When the Intrusion Detection System (IDS) device generates an alert for an intrusion which has actually not happened, this is false positive. If the device has not generated any alert and the intrusion has actually happened, this is the case of a false negative. + + 23. Explain **:(){ :|:& };:** and how to stop this code if you are already logged into the system? + + + +> This is a fork bomb. It breaks down as follows: +> +> * **:()** defines the function, with **:** as the function name, and the empty parenthesis shows that it will not accept any arguments. +> * **{ }** shows the beginning and end of the function definition. +> * **:|:** loads a copy of the function **:** into memory, and pipes its output to another copy of the **:** function, which also has to be loaded into memory. +> * **&** makes the previous item a background process, so that the child processes will not get killed even though the parent gets auto-killed. +> * **:** at the end executes the function again, and hence the chain reaction begins. +> + +> +> The best way to protect a multi-user system is to use Privileged Access Management (PAM) to limit the number of processes a user can use. +> +> The biggest problem with a fork bomb is the fact it takes up so many processes. So, we have two ways of attempting to fix this if you are already logged into the system. One option is to execute a SIGSTOP command to stop the process, such as: +> +> **killall -STOP -u user1** +> +> If you can’t use the command line due to all processes being used, you will have to use **exec** to force it to run: +> +> **exec killall -STOP -u user1** +> +> With fork bombs, your best option is preventing them from becoming too big of an issue in the first place + + 24. What is OOM killer and how does it decide which process to kill first? + + + +> If memory is exhaustively used up by processes to the extent that possibly threatens the system’s stability, then the out of memory (OOM) killer comes into the picture. +> +> An OOM killer first has to select the best process(es) to kill. _Best_ here refers to the process which will free up the maximum memory upon being killed, and is also the least important to the system. The primary goal is to kill the least number of processes to minimize the damage done, and at the same time maximize the amount of memory freed. +> +> To facilitate this goal, the kernel maintains an oom_score for each of the processes. You can see the oom_score of each of the processes in the **/proc** filesystem under the **pid** directory: +> +> **$ cat /proc/10292/oom_score** +> +> The higher the value of oom_score for any process, the higher its likelihood is of being killed by the OOM Killer in an out-of-memory situation. ([Citation][9]) + +### Conclusion + +System administration salaries have a [wide range][10] with some sites mentioning $70,000 to $100,000 a year, depending on the location, the size of the organization, and your education level plus years of experience. In the end, the system administration career path boils down to your interest in working with servers and solving cool problems. Now, I would say go ahead and achieve your dream path. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/sysadmin-job-interview-questions + +作者:[DirectedSoul][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/directedsoul +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_HowToFish_520x292.png?itok=DHbdxv6H (Question and answer.) +[2]: https://github.com/trimstray/test-your-sysadmin-skills +[3]: https://www.waytoeasylearn.com/2016/05/netapp-filer-tutorial.html +[4]: https://searchstorage.techtarget.com/definition/RAID-10-redundant-array-of-independent-disks +[5]: https://www.answers.com/Q/What_is_hard_link_and_soft_link_in_Linux +[6]: https://www.wisdomjobs.com/e-university/network-administrator-interview-questions.html +[7]: https://unix.stackexchange.com/questions/105/chroot-jail-what-is-it-and-how-do-i-use-it +[8]: https://serverfault.com/questions/391370/how-to-prevent-zero-day-attacks +[9]: https://unix.stackexchange.com/a/153586/8369 +[10]: https://blog.netwrix.com/2018/07/23/systems-administrator-salary-in-2018-how-much-can-you-earn/ From 0519c0997c8bc10ac700165fe5c8b99995c08f20 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:15:43 +0800 Subject: [PATCH 120/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190725=20Introd?= =?UTF-8?q?uction=20to=20GNU=20Autotools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190725 Introduction to GNU Autotools.md --- .../20190725 Introduction to GNU Autotools.md | 263 ++++++++++++++++++ 1 file changed, 263 insertions(+) create mode 100644 sources/tech/20190725 Introduction to GNU Autotools.md diff --git a/sources/tech/20190725 Introduction to GNU Autotools.md b/sources/tech/20190725 Introduction to GNU Autotools.md new file mode 100644 index 0000000000..5eb41ad803 --- /dev/null +++ b/sources/tech/20190725 Introduction to GNU Autotools.md @@ -0,0 +1,263 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Introduction to GNU Autotools) +[#]: via: (https://opensource.com/article/19/7/introduction-gnu-autotools) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +Introduction to GNU Autotools +====== +If you're not using Autotools yet, this tutorial will change the way you +deliver your code. +![Linux kernel source code \(C\) in Visual Studio Code][1] + +Have you ever downloaded the source code for a popular software project that required you to type the almost ritualistic **./configure; make && make install** command sequence to build and install it? If so, you’ve used [GNU Autotools][2]. If you’ve ever looked into some of the files accompanying such a project, you’ve likely also been terrified at the apparent complexity of such a build system. + +Good news! GNU Autotools is a lot simpler to set up than you think, and it’s GNU Autotools itself that generates those 1,000-line configuration files for you. Yes, you can write 20 or 30 lines of installation code and get the other 4,000 for free. + +### Autotools at work + +If you’re a user new to Linux looking for information on how to install applications, you do not have to read this article! You’re welcome to read it if you want to research how software is built, but if you’re just installing a new application, go read my article about [installing apps on Linux][3]. + +For developers, Autotools is a quick and easy way to manage and package source code so users can compile and install software. Autotools is also well-supported by major packaging formats, like DEB and RPM, so maintainers of software repositories can easily prepare a project built with Autotools. + +Autotools works in stages: + + 1. First, during the **./configure** step, Autotools scans the host system (the computer it’s being run on) to discover the default settings. Default settings include where support libraries are located, and where new software should be placed on the system. + 2. Next, during the **make** step, Autotools builds the application, usually by converting human-readable source code into machine language. + 3. Finally, during the **make install** step, Autotools copies the files it built to the appropriate locations (as detected during the configure stage) on your computer. + + + +This process seems simple, and it is, as long as you use Autotools. + +### The Autotools advantage + +GNU Autotools is a big and important piece of software that most of us take for granted. Along with [GCC (the GNU Compiler Collection)][4], Autotools is the scaffolding that allows Free Software to be constructed and installed to a running system. If you’re running a [POSIX][5] system, it’s not an understatement to say that most of your operating system exists as runnable software on your computer because of these projects. + +In the likely event that your pet project isn’t an operating system, you might assume that Autotools is overkill for your needs. But, despite its reputation, Autotools has lots of little features that may benefit you, even if your project is a relatively simple application or series of scripts. + +#### Portability + +First of all, Autotools comes with portability in mind. While it can’t make your project work across all POSIX platforms (that’s up to you, as the coder), Autotools can ensure that the files you’ve marked for installation get installed to the most sensible locations on a known platform. And because of Autotools, it’s trivial for a power user to customize and override any non-optimal value, according to their own system. + +With Autotools, all you need to know is what files need to be installed to what general location. It takes care of everything else. No more custom install scripts that break on any untested OS. + +#### Packaging + +Autotools is also well-supported. Hand a project with Autotools over to a distro packager, whether they’re packaging an RPM, DEB, TGZ, or anything else, and their job is simple. Packaging tools know Autotools, so there’s likely to be no patching, hacking, or adjustments necessary. In many cases, incorporating an Autotools project into a pipeline can even be automated. + +### How to use Autotools + +To use Autotools, you must first have Autotools installed. Your distribution may provide one package meant to help developers build projects, or it may provide separate packages for each component, so you may have to do some research on your platform to discover what packages you need to install. + +The components of Autotools are: + + * **automake** + * **autoconf** + * **automake** + * **make** + + + +While you likely need to install the compiler (GCC, for instance) required by your project, Autotools works just fine with scripts or binary assets that don’t need to be compiled. In fact, Autotools can be useful for such projects because it provides a **make uninstall** script for easy removal. + +Once you have all of the components installed, it’s time to look at the structure of your project’s files. + +#### Autotools project structure + +GNU Autotools has very specific expectations, and most of them are probably familiar if you download and build source code often. First, the source code itself is expected to be in a subdirectory called **src**. + +Your project doesn’t have to follow all of these expectations, but if you put files in non-standard locations (from the perspective of Autotools), then you’ll have to make adjustments for that in your Makefile later. + +Additionally, these files are required: + + * **NEWS** + * **README** + * **AUTHORS** + * **ChangeLog** + + + +You don’t have to actively use the files, and they can be symlinks to a monolithic document (like **README.md**) that encompasses all of that information, but they must be present. + +#### Autotools configuration + +Create a file called **configure.ac** at your project’s root directory. This file is used by **autoconf** to create the **configure** shell script that users run before building. The file must contain, at the very least, the **AC_INIT** and **AC_OUTPUT** [M4 macros][6]. You don’t need to know anything about the M4 language to use these macros; they’re already written for you, and all of the ones relevant to Autotools are defined in the documentation. + +Open the file in your favorite text editor. The **AC_INIT** macro may consist of the package name, version, an email address for bug reports, the project URL, and optionally the name of the source TAR file. + +The **[AC_OUTPUT][7]** macro is much simpler and accepts no arguments. + + +``` +AC_INIT([penguin], [2019.3.6], [[seth@example.com][8]]) +AC_OUTPUT +``` + +If you were to run **autoconf** at this point, a **configure** script would be generated from your **configure.ac** file, and it would run successfully. That’s all it would do, though, because all you have done so far is define your project’s metadata and called for a configuration script to be created. + +The next macros you must invoke in your **configure.ac** file are functions to create a [Makefile][9]. A Makefile tells the **make** command what to do (usually, how to compile and link a program). + +The macros to create a Makefile are **AM_INIT_AUTOMAKE**, which accepts no arguments, and **AC_CONFIG_FILES**, which accepts the name you want to call your output file. + +Finally, you must add a macro to account for the compiler your project needs. The macro you use obviously depends on your project. If your project is written in C++, the appropriate macro is **AC_PROG_CXX**, while a project written in C requires **AC_PROG_CC**, and so on, as detailed in the [Building Programs and Libraries][10] section in the Autoconf documentation. + +For example, I might add the following for my C++ program: + + +``` +AC_INIT([penguin], [2019.3.6], [[seth@example.com][8]]) +AC_OUTPUT +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +AC_PROG_CXX +``` + +Save the file. It’s time to move on to the Makefile. + +#### Autotools Makefile generation + +Makefiles aren’t difficult to write manually, but Autotools can write one for you, and the one it generates will use the configuration options detected during the `./configure` step, and it will contain far more options than you would think to include or want to write yourself. However, Autotools can’t detect everything your project requires to build, so you have to add some details in the file **Makefile.am**, which in turn is used by **automake** when constructing a Makefile. + +**Makefile.am** uses the same syntax as a Makefile, so if you’ve ever written a Makefile from scratch, then this process will be familiar and simple. Often, a **Makefile.am** file needs only a few variable definitions to indicate what files are to be built, and where they are to be installed. + +Variables ending in **_PROGRAMS** identify code that is to be built (this is usually considered the _primary_ target; it’s the main reason the Makefile exists). Automake recognizes other primaries, like **_SCRIPTS**, **_DATA**, **_LIBRARIES**, and other common parts that make up a software project. + +If your application is literally compiled during the build process, then you identify it as a binary program with the **bin_PROGRAMS** variable, and then reference any part of the source code required to build it (these parts may be one or more files to be compiled and linked together) using the program name as the variable prefix: + + +``` +bin_PROGRAMS = penguin +penguin_SOURCES = penguin.cpp +``` + +The target of **bin_PROGRAMS** is installed into the **bindir**, which is user-configurable during compilation. + +If your application isn’t actually compiled, then your project doesn’t need a **bin_PROGRAMS** variable at all. For instance, if your project is a script written in Bash, Perl, or a similar interpreted language, then define a **_SCRIPTS** variable instead: + + +``` +bin_SCRIPTS = bin/penguin +``` + +Automake expects sources to be located in a directory called **src**, so if your project uses an alternative directory structure for its layout, you must tell Automake to accept code from outside sources: + + +``` +AUTOMAKE_OPTIONS = foreign subdir-objects +``` + +Finally, you can create any custom Makefile rules in **Makefile.am** and they’ll be copied verbatim into the generated Makefile. For instance, if you know that a temporary value needs to be replaced in your source code before the installation proceeds, you could make a custom rule for that process: + + +``` +all-am: penguin +        touch bin/penguin.sh +        +penguin: bin/penguin.sh +        @sed "s|__datadir__|@datadir@|" $< >bin/$@ +``` + +A particularly useful trick is to extend the existing **clean** target, at least during development. The **make clean** command generally removes all generated build files with the exception of the Automake infrastructure. It’s designed this way because most users rarely want **make clean** to obliterate the files that make it easy to build their code. + +However, during development, you might want a method to reliably return your project to a state relatively unaffected by Autotools. In that case, you may want to add this: + + +``` +clean-local: +        @rm config.status configure config.log +        @rm Makefile +        @rm -r autom4te.cache/ +        @rm aclocal.m4 +        @rm compile install-sh missing Makefile.in +``` + +There’s a lot of flexibility here, and if you’re not already familiar with Makefiles, it can be difficult to know what your **Makefile.am** needs. The barest necessity is a primary target, whether that’s a binary program or a script, and an indication of where the source code is located (whether that’s through a **_SOURCES** variable or by using **AUTOMAKE_OPTIONS** to tell Automake where to look for source code). + +Once you have those variables and settings defined, you can try generating your build scripts as you see in the next section, and adjust for anything that’s missing. + +#### Autotools build script generation + +You’ve built the infrastructure, now it’s time to let Autotools do what it does best: automate your project tooling. The way the developer (you) interfaces with Autotools is different from how users building your code do. + +Builders generally use this well-known sequence: + + +``` +$ ./configure +$ make +$ sudo make install +``` + +For that incantation to work, though, you as the developer must bootstrap the build infrastructure. First, run **autoreconf** to generate the configure script that users invoke before running **make**. Use the **–install** option to bring in auxiliary files, such as a symlink to **depcomp**, a script to generate dependencies during the compiling process, and a copy of the **compile** script, a wrapper for compilers to account for syntax variance, and so on. + + +``` +$ autoreconf --install +configure.ac:3: installing './compile' +configure.ac:2: installing './install-sh' +configure.ac:2: installing './missing' +``` + +With this development build environment, you can then create a package for source code distribution: + + +``` +$ make dist +``` + +The **dist** target is a rule you get for "free" from Autotools. +It’s a feature that gets built into the Makefile generated from your humble **Makefile.am** configuration. This target produces a **tar.gz** archive containing all of your source code and all of the essential Autotools infrastructure so that people downloading the package can build the project. + +At this point, you should review the contents of the archive carefully to ensure that it contains everything you intend to ship to your users. You should also, of course, try building from it yourself: + + +``` +$ tar --extract --file penguin-0.0.1.tar.gz +$ cd penguin-0.0.1 +$ ./configure +$ make +$ DESTDIR=/tmp/penguin-test-build make install +``` + +If your build is successful, you find a local copy of your compiled application specified by **DESTDIR** (in the case of this example, **/tmp/penguin-test-build**). + + +``` +$ /tmp/example-test-build/usr/local/bin/example +hello world from GNU Autotools +``` + +### Time to use Autotools + +Autotools is a great collection of scripts for a predictable and automated release process. This toolset may be new to you if you’re used to Python or Bash builders, but it’s likely worth learning for the structure and adaptability it provides to your project. + +And Autotools is not just for code, either. Autotools can be used to build [Docbook][11] projects, to keep media organized (I use Autotools for my music releases), documentation projects, and anything else that could benefit from customizable install targets. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/introduction-gnu-autotools + +作者:[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/linux_kernel_clang_vscode.jpg?itok=fozZ4zrr (Linux kernel source code (C) in Visual Studio Code) +[2]: https://www.gnu.org/software/automake/faq/autotools-faq.html +[3]: https://opensource.com/article/18/1/how-install-apps-linux +[4]: https://en.wikipedia.org/wiki/GNU_Compiler_Collection +[5]: https://en.wikipedia.org/wiki/POSIX +[6]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Initializing-configure.html +[7]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Output.html#Output +[8]: mailto:seth@example.com +[9]: https://www.gnu.org/software/make/manual/html_node/Introduction.html +[10]: https://www.gnu.org/software/automake/manual/html_node/Programs.html#Programs +[11]: https://opensource.com/article/17/9/docbook From 6a76acae0e7401438a0b8a5691c56a3752812722 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:16:31 +0800 Subject: [PATCH 121/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190725=20How=20?= =?UTF-8?q?to=20transition=20into=20a=20career=20as=20a=20DevOps=20enginee?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190725 How to transition into a career as a DevOps engineer.md --- ...tion into a career as a DevOps engineer.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/tech/20190725 How to transition into a career as a DevOps engineer.md diff --git a/sources/tech/20190725 How to transition into a career as a DevOps engineer.md b/sources/tech/20190725 How to transition into a career as a DevOps engineer.md new file mode 100644 index 0000000000..f3f97ff6fa --- /dev/null +++ b/sources/tech/20190725 How to transition into a career as a DevOps engineer.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to transition into a career as a DevOps engineer) +[#]: via: (https://opensource.com/article/19/7/how-transition-career-devops-engineer) +[#]: author: (Conor Delanbanque https://opensource.com/users/cdelanbanquehttps://opensource.com/users/daniel-ohhttps://opensource.com/users/herontheclihttps://opensource.com/users/marcobravohttps://opensource.com/users/cdelanbanque) + +How to transition into a career as a DevOps engineer +====== +Whether you're a recent college graduate or a seasoned IT pro looking to +advance your career, these tips can help you get hired as a DevOps +engineer. +![technical resume for hiring new talent][1] + +DevOps engineering is a hot career with many rewards. Whether you're looking for your first job after graduating or seeking an opportunity to reskill while leveraging your prior industry experience, this guide should help you take the right steps to become a [DevOps engineer][2]. + +### Immerse yourself + +Begin by learning the fundamentals, practices, and methodologies of [DevOps][3]. Understand the "why" behind DevOps before jumping into the tools. A DevOps engineer's main goal is to increase speed and maintain or improve quality across the entire software development lifecycle (SDLC) to provide maximum business value. Read articles, watch YouTube videos, and go to local Meetup groups or conferences—become part of the welcoming DevOps community, where you'll learn from the mistakes and successes of those who came before you. + +### Consider your background + +If you have prior experience working in technology, such as a software developer, systems engineer, systems administrator, network operations engineer, or database administrator, you already have broad insights and useful experience for your future role as a DevOps engineer. If you're just starting your career after finishing your degree in computer science or any other STEM field, you have some of the basic stepping-stones you'll need in this transition. + +The DevOps engineer role covers a broad spectrum of responsibilities. Following are the three ways enterprises are most likely to use them: + + * **DevOps engineers with a dev bias** work in a software development role building applications. They leverage continuous integration/continuous delivery (CI/CD), shared repositories, cloud, and containers as part of their everyday work, but they are not necessarily responsible for building or implementing tooling. They understand infrastructure and, in a mature environment, will be able to push their own code into production. + * **DevOps engineers with an ops bias** could be compared to systems engineers or systems administrators. They understand software development but do not spend the core of their day building applications. Instead, they are more likely to be supporting software development teams to automate manual processes and increase efficiencies across human and technology systems. This could mean breaking down legacy code and using less cumbersome automation scripts to run the same commands, or it could mean installing, configuring, or maintaining infrastructure and tooling. They ensure the right tools are installed and available for any teams that need them. They also help to enable teams by teaching them how to leverage CI/CD and other DevOps practices. + * **Site reliability engineers (SRE)** are like software engineers that solve operations and infrastructure problems. SREs focus on creating scalable, highly available, and reliable software systems. + + + +In the ideal world, DevOps engineers will understand all of these areas; this is typical at mature technology companies. However, DevOps roles at top-tier banks and many Fortune 500 companies usually have biases towards dev or ops. + +### Technologies to learn + +DevOps engineers need to know a wide spectrum of technologies to do their jobs effectively. Whatever your background, start with the fundamental technologies you'll need to use and understand as a DevOps engineer. + +#### Operating systems + +The operating system is where everything runs, and having fundamental knowledge is important. [Linux is the operating system][4] you'll most likely use daily, although some organizations use Windows. To get started, you can install Linux at home, where you'll be able to break as much as you want and learn along the way. + +#### Scripting + +Next, pick a language to learn for scripting purposes. There are many to choose from ranging from Python, Go, Java, Bash, PowerShell, Ruby, and C/C++. I suggest [starting with Python][5]; it's one of the most popular for a reason, as it's relatively easy to learn and interpret. Python is often written to follow the fundamentals of object-oriented programming (OOP) and can be used for web development, software development, and creating desktop GUI and business applications. + +#### Cloud + +After [Linux][4] and [Python][5], I think the next thing to study is cloud computing. Infrastructure is no longer left to the "operations guys," so you'll need some exposure to a cloud platform such as Amazon Web Services, Azure, or Google Cloud Platform. I'd start with AWS, as it has an extensive collection of free learning tools that can take you down any track from using AWS as a developer, to operations, and even business-facing components. In fact, you might become overwhelmed by how much is on offer. Consider starting with EC2, S3, and VPC, and see where you want to go from there. + +#### Programming languages + +If you come to DevOps with a passion for software development, keep on improving your programming skills. Some good and commonly used languages in DevOps are the same as you would for scripting: Python, Go, Java, Bash, PowerShell, Ruby, and C/C++. You should also become familiar with Jenkins and Git/GitHub, which you'll use frequently within the CI/CD process. + +#### Containers + +Finally, start learning about [containerizing cod][6]e using tools such as Docker and orchestration platforms such as Kubernetes. There are extensive learning resources available for free online, and most cities will have local Meetup groups where you can learn from experienced people in a friendly environment (with pizza and beer!). + +#### What else? + +If you have less experience in development, you can still [get involved in DevOps][3] by applying your passion for automation, increasing efficiency, collaborating with others, and improving your work. I would still suggest learning the tooling described above, but with less emphasis on the coding/scripting languages. It will be useful to learn about Infrastructure-as-a-Service, Platform-as-a-Service, cloud platforms, and Linux. You'll likely be setting up the tools and learning how to build systems that are resilient and fault-tolerant, leveraging them while writing code. + +### Finding a DevOps job + +The job search process will differ depending on whether you've been working in tech and are moving into DevOps or you're a recent graduate beginning your career. + +#### If you're already working in technology + +If you're transitioning from one tech field into a DevOps role, start by exploring opportunities within your current company. Can you reskill by working with another team? Try to shadow other team members, ask for advice, and acquire new skills without leaving your current job. If this isn't possible, you may need to move to another company. If you can learn some of the practices, tools, and technologies listed above, you'll be in a good position to demonstrate relevant knowledge during interviews. The key is to be honest and not set yourself up for failure. Most hiring managers understand that you don't know all the answers; if you can show what you've been learning and explain that you're open to learning more, you should have a good chance to land a DevOps job. + +#### If you're starting your career + +Apply to open opportunities at companies hiring junior DevOps engineers. Unfortunately, many companies say they're looking for more experience and recommend you re-apply when you've gained some. It's the typical, frustrating scenario of "we want more experience," but nobody seems willing to give you the first chance. + +It's not all gloomy though; some companies focus on training and upskilling graduates directly out of the university. For example, [MThree][7], where I work, hires fresh graduates and trains them for eight weeks. When they complete training, participants have solid exposure to the entire SDLC and a good understanding of how it applies in a Fortune 500 environment. Graduates are hired as junior DevOps engineers with MThree's client companies—MThree pays their full-time salary and benefits for the first 18 to 24 months, after which they join the client as direct employees. This is a great way to bridge the gap from the university into a technology career. + +### Summary + +There are many ways to transition to become a DevOps engineer. It is a very rewarding career route that will likely keep you engaged and challenged—and increase your earning potential. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/how-transition-career-devops-engineer + +作者:[Conor Delanbanque][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/cdelanbanquehttps://opensource.com/users/daniel-ohhttps://opensource.com/users/herontheclihttps://opensource.com/users/marcobravohttps://opensource.com/users/cdelanbanque +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/hiring_talent_resume_job_career.png?itok=Ci_ulYAH (technical resume for hiring new talent) +[2]: https://opensource.com/article/19/7/devops-vs-sysadmin +[3]: https://opensource.com/resources/devops +[4]: https://opensource.com/resources/linux +[5]: https://opensource.com/resources/python +[6]: https://opensource.com/article/18/8/sysadmins-guide-containers +[7]: https://www.mthreealumni.com/ From b45963563473ab1d04ee98fb82ec31143483564b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:17:13 +0800 Subject: [PATCH 122/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20Master?= =?UTF-8?q?=20the=20Linux=20'ls'=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190724 Master the Linux -ls- command.md --- .../20190724 Master the Linux -ls- command.md | 352 ++++++++++++++++++ 1 file changed, 352 insertions(+) create mode 100644 sources/tech/20190724 Master the Linux -ls- command.md diff --git a/sources/tech/20190724 Master the Linux -ls- command.md b/sources/tech/20190724 Master the Linux -ls- command.md new file mode 100644 index 0000000000..6785c80eed --- /dev/null +++ b/sources/tech/20190724 Master the Linux -ls- command.md @@ -0,0 +1,352 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Master the Linux 'ls' command) +[#]: via: (https://opensource.com/article/19/7/master-ls-command) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/sambocettahttps://opensource.com/users/scottnesbitthttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/don-watkinshttps://opensource.com/users/sethhttps://opensource.com/users/jamesfhttps://opensource.com/users/seth) + +Master the Linux 'ls' command +====== +Linux's 'ls' command has a staggering number of options that can provide +important information about your files. +![Hand putting a Linux file folder into a drawer][1] + +The **ls** command lists files on a [POSIX][2] system. It's a simple command, often underestimated, not in what it can do (because it really does only one thing), but in how you can optimize your use of it. + +Of the 10 most essential terminal commands to know, the humble **ls** command is in the top three, because **ls** doesn't _just_ list files, it tells you important information about them. It tells you things like who owns a file or directory, when each file was lost or modified, and even what kind of file it is. And then there's its incidental function of giving you a sense of where you are, what nearby objects are lying around, and what you can do with them. + +If your experience with **ls** is limited to whatever your distribution aliases it to in **.bashrc**, then you're probably missing out. + +### GNU or BSD? + +Before looking at the hidden powers of **ls**, you must determine which **ls** command you're running. The two most popular versions are the GNU version, included in the GNU **coreutils** package, and the BSD version. If you're running Linux, then you probably have **ls** installed. If you're running BSD or MacOS, then you have the BSD version. There are differences, for which this article accounts. + +You can find out which version is on your computer with the **\--version** option: + + +``` +`$ ls --version` +``` + +If this returns information about GNU coreutils, then you have the GNU version. If it returns an error, you're probably running the BSD version (run **man ls | head** to be sure). + +You should also investigate what presets your distribution may have in place. Customizations to terminal commands are frequently placed in **$HOME/.bashrc** or **$HOME/.bash_aliases** or **$HOME/.profile**, and they're accomplished by aliasing **ls** to a more complex **ls** command. For example: + + +``` +`alias ls='ls --color'` +``` + +The presets provided by distributions are very helpful, but they do make it difficult to discern what **ls** does on its own and what its additional options provide. Should you ever want to run **ls** and not the alias, you can "escape" the command with a backslash: + + +``` +`$ \ls` +``` + +### Classify + +Run on its own, **ls** simply lists files in as many columns as can fit into your terminal: + + +``` +$ ls ~/example +bunko        jdk-10.0.2 +chapterize   otf2ttf.ff +despacer     overtar.sh +estimate.sh  pandoc-2.7.1 +fop-2.3      safe_yaml +games        tt +``` + +It's useful information, but all of those files look basically the same without the convenience of icons to quickly convey which is a directory, or a text file, or an image, and so on. + +Use the **-F** (or **\--classify** on GNU) to show indicators after each entry that identify the kind of file it is: + + +``` +$ ls ~/example +bunko         jdk-10.0.2/ +chapterize*   otf2ttf.ff* +despacer*     overtar.sh* +estimate.sh   pandoc@ +fop-2.3/      pandoc-2.7.1/ +games/        tt* +``` + +With this option, items listed in your terminal are classified by file type using this shorthand: + + * A slash (**/**) denotes a directory (or "folder"). + * An asterisk (*****) denotes an executable file. This includes a binary file (compiled code) as well as scripts (text files that have [executable permission][3]). + * An at sign (**@**) denotes a symbolic link (or "alias"). + * An equals sign (**=**) denotes a socket. + * On BSD, a percent sign (**%**) denotes a whiteout (a method of file removal on certain file systems). + * On GNU, an angle bracket (**>**) denotes a door (inter-process communication on [Illumos][4] and Solaris). + * A vertical bar (**|**) denotes a [FIFO][5]. + + + +A simpler version of this option is **-p**, which only differentiates a file from a directory. + +### Long list + +Getting a "long list" from **ls** is so common that many distributions alias **ll** to **ls -l**. The long list form provides many important file attributes, such as permissions, the user who owns each file, the group to which the file belongs, the file size in bytes, and the date the file was last changed: + + +``` +$ ls -l +-rwxrwx---. 1 seth users         455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth users         662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth users    20697793 Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth users        6210 May 22 10:22 geteltorito +-rwxrwx---. 1 seth users         177 Nov 12  2018 html4mutt.sh +[...] +``` + +If you don't think in bytes, add the **-h** flag (or **\--human** in GNU) to translate file sizes to more human-friendly notation: + + +``` +$ ls --human +-rwxrwx---. 1 seth users    455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth seth     662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth users    20M Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth seth    6.1K May 22 10:22 geteltorito +-rwxrwx---. 1 seth users    177 Nov 12  2018 html4mutt.sh +``` + +You can see just a little less information by showing only the owner column with **-o** or only the group column with **-g**: + + +``` +$ ls -o +-rwxrwx---. 1 seth    455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth    662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth    20M Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth   6.1K May 22 10:22 geteltorito +-rwxrwx---. 1 seth    177 Nov 12  2018 html4mutt.sh +``` + +Combine both options to show neither. + +### Time and date format + +The long list format of **ls** usually looks like this: + + +``` +-rwxrwx---. 1 seth users         455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth users         662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth users    20697793 Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth users        6210 May 22 10:22 geteltorito +-rwxrwx---. 1 seth users         177 Nov 12  2018 html4mutt.sh +``` + +The names of months aren't easy to sort, both computationally or (depending on whether your brain tends to prefer strings or integers) by recognition. You can change the format of the time stamp with the **\--time-style** option plus the name of a format. Available formats are: + + * full-iso (1970-01-01 21:12:00) + * long-iso (1970-01-01 21:12) + * iso (01-01 21:12) + * locale (uses your locale settings) + * posix-STYLE (replace STYLE with a locale definition) + + + +You can also create a custom style using the formal notation of the **date** command. + +### Sort by time + +Usually, the **ls** command sorts alphabetically. You can make it sort according to which file was most recently changed (the newest is listed first) with the **-t** option. + +For example: + + +``` +$ touch foo bar baz +$ ls +bar  baz  foo +$ touch foo +$ ls -t +foo bar baz +``` + +### List type + +The standard output of **ls** balances readability with space efficiency, but sometimes you want your file list in a specific arrangement. + +For a comma-separated list of files, use **-m**: + + +``` +ls -m ~/example +bar, baz, foo +``` + +To force one file per line, use the **-1** option (that's the number one, not a lowercase L): + + +``` +$ ls -1 ~/bin/ +bar +baz +foo +``` + +To sort entries by file extension rather than the filename, use **-X** (that's a capital X): + + +``` +$ ls +bar.xfc  baz.txt  foo.asc +$ ls -X +foo.asc  baz.txt  bar.xfc +``` + +### Hide the clutter + +There are a few entries in some **ls** listings that you may not care about. For instance, the metacharacters **.** and **..** represent "here" and "back one level," respectively. If you're familiar with navigating in a terminal, you probably already know that each directory refers to itself as **.** and to its parent as **..**, so you don't need to be constantly reminded of it when you use the **-a** option to show hidden files. + +To show almost all hidden files (the **.** and **..** excluded), use the **-A** option: + + +``` +$ ls -a +. +.. +.android +.atom +.bash_aliases +[...] +$ ls -A +.android +.atom +.bash_aliases +[...] +``` + +With many good Unix tools, there's a tradition of saving backup files by appending some special character to the name of the file being saved. For instance, in Vim, backups get saved with the **~** character appended to the name. + +These kinds of backup files have saved me from stupid mistakes on several occasions, but after years of enjoying the sense of security they provide, I don't feel the need to have visual evidence that they exist. I trust Linux applications to generate backup files (if they claim to do so), and I'm happy to take it on faith that they exist. + +To hide backup files from view, use **-B** or **\--ignore-backups** to conceal common backup formats (this option is not available in BSD **ls**): + + +``` +$ ls +bar.xfc  baz.txt  foo.asc~  foo.asc +$ ls -B +bar.xfc  baz.txt  foo.asc +``` + +Of course, the backup file still exists; it's just filtered out so that you don't have to look at it. + +GNU Emacs saves backup files (unless otherwise configured) with a hash character (**#**) at the start and end of the file name (**#file#**). Other applications may use a different style. It doesn't matter what pattern is used, because you can create your own exclusions with the **\--hide** option: + + +``` +$ ls +bar.xfc  baz.txt  #foo.asc#  foo.asc +$ ls --hide="#*#" +bar.xfc  baz.txt  foo.asc +``` + +### List directories with recursion + +The contents of directories are not listed with the **ls** command unless you run **ls** on that directory specifically: + + +``` +$ ls -F +example/  quux*  xyz.txt +$ ls -R +quux  xyz.txt + +./example: +bar.xfc  baz.txt  #foo.asc#  foo.asc +``` + +### Make it permanent with an alias + +The **ls** command is probably the command used most often during any given shell session. It's your eyes and ears, providing you with context and confirming the results of commands. While it's useful to have lots of options, part of the beauty of **ls** is its brevity: two characters and the Return key, and you know exactly where you are and what's nearby. If you have to stop to think about (much less type) several different options, it becomes less convenient, so typically even the most useful options are left off. + +The solution is to alias your **ls** command so that when you use it, you get the information you care about the most. + +To create an alias for a command in the Bash shell, create a file in your home directory called **.bash_aliases** (you must include the dot at the beginning). In this file, list the command you want to create an alias for and then the alias you want to create. For example: + + +``` +`alias ls='ls -A -F -B --human --color'` +``` + +This line causes your Bash shell to interpret the **ls** command as **ls -A -F -B --human --color**. + +You aren't limited to redefining existing commands. You can create your own aliases: + + +``` +alias ll='ls -l' +alias la='ls -A' +alias lh='ls -h' +``` + +For aliases to work, your shell must know that the **.bash_aliases** configuration file exists. Open the **.bashrc** file in an editor (or create it, if it doesn't exist), and include this block of code: + + +``` +if [ -e $HOME/.bash_aliases ]; then +    source $HOME/.bash_aliases +fi +``` + +Each time **.bashrc** is loaded (which is any time a new Bash shell is launched), Bash will load **.bash_aliases** into your environment. You can close and relaunch your Bash session or just force it to do that now: + + +``` +`$ source ~/.bashrc` +``` + +If you forget whether you have aliased a command, the **which** command tells you: + + +``` +$ which ls +alias ls='ls -A -F -B --human --color' +        /usr/bin/ls +``` + +If you've aliased the **ls** command to itself with options, you can override your own alias at any time by prefacing **ls** with a backslash. For instance, in the example alias, backup files are hidden using the **-B** option, which means there's no way to back up files with the **ls** command. Override the alias to see the backup files: + + +``` +$ ls +bar  baz  foo +$ \ls +bar  baz  baz~  foo +``` + +### Do one thing and do it well + +The **ls** command has a staggering number of options, many of which are niche or highly dependent upon the terminal you use. Take a look at **info ls** on GNU systems or **man ls** on GNU or BSD systems for more options. + +You might find it strange that a system famous for the premise that each tool "does one thing and does it well" would weigh down its most common command with 50 options. But **ls** does only one thing: it lists files. And with 50 options to allow you to control how you receive that list, **ls** does its one job very, _very_ well. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/master-ls-command + +作者:[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/sethhttps://opensource.com/users/sambocettahttps://opensource.com/users/scottnesbitthttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/don-watkinshttps://opensource.com/users/sethhttps://opensource.com/users/jamesfhttps://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/article/19/6/understanding-linux-permissions +[4]: https://www.illumos.org/ +[5]: https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics) From 4e55da25ce9a7482f31aded5d35d113ed5579caf Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:18:52 +0800 Subject: [PATCH 123/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20How=20?= =?UTF-8?q?to=20make=20an=20old=20computer=20useful=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190724 How to make an old computer useful again.md --- ...ow to make an old computer useful again.md | 192 ++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 sources/tech/20190724 How to make an old computer useful again.md diff --git a/sources/tech/20190724 How to make an old computer useful again.md b/sources/tech/20190724 How to make an old computer useful again.md new file mode 100644 index 0000000000..68748a93b6 --- /dev/null +++ b/sources/tech/20190724 How to make an old computer useful again.md @@ -0,0 +1,192 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to make an old computer useful again) +[#]: via: (https://opensource.com/article/19/7/how-make-old-computer-useful-again) +[#]: author: (Howard Fosdick https://opensource.com/users/howtechhttps://opensource.com/users/don-watkinshttps://opensource.com/users/suehlehttps://opensource.com/users/aseem-sharmahttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/dragonbitehttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesfhttps://opensource.com/users/seth) + +How to make an old computer useful again +====== +Refurbish an old machine with these step-by-step instructions. +![Person typing on a 1980's computer][1] + +Have an old computer gathering dust in your basement? Why not put it to use? A backup machine could come in handy if your primary computer fails and you want to be online with a larger screen than your smartphone. Or it could act as a cheap secondary computer shared by the family. You could even make it into a retro gaming box. + +You can take any computer up to a dozen years old and—with the right software—perform many of the same tasks you can with new machines. Open source software is the key. + +I've refurbished computers for two decades, and in this article, I'll share how I do it. We're talking about dual-core laptops and desktops between five and 12 years old. + +### Verify the hardware + +Step one is to verify that your hardware all works. Overlooking a problem here could cause you big headaches later. + +Dust kills electronics, so open up the box and clean out the dirt. [Compressed air][2] comes in handy. Be careful that you're [grounded][3] whenever you touch the machine. And _don't_ rub anything with a cleaning cloth. Even a static shock so small you won't feel it can destroy circuitry. + +Then close the clean computer and verify that all the hardware works. Test: + + * Memory + * Disk + * Motherboard + * Peripherals (DVD drive, USB ports, sound, etc.) + + + +Run any diagnostic tests in the computer's boot panels (the [UEFI][4] or [BIOS][5] panels). [This list][6] tells you which program function (PF) key to press to access those panels for your computer. + +Free resource kits like [Hirens BootCD][7] or [Ultimate Boot CD][8] enable you to test what your boot panels don't. They contain hundreds of testing programs; all are free, but not all are open source. You don't have to install anything to run these kits because they'll boot from a USB thumb drive or DVD drive. + +Be thorough! Run the extended tests for memory and disk—not just the short tests. Let them run overnight. That's the only way to catch transient (sporadic) errors. + +If you find problems, my [Quick guide to fixing hardware][9] will help you solve the most common hardware issues. + +### Select the software + +The key to refurbishing is to install software appropriate for the hardware resources you have. The three essential hardware resources are: + + 1. Processor (number of cores and speed) + 2. Memory + 3. Video memory + + + +You can identify your computer's resources in its boot-time UEFI/BIOS panels. Write down your findings so that you don't forget them. Then, look up your processor at [CPU Benchmark][10]. That website gives you background on your CPU plus a CPU Mark that indicates its performance. + +Now that you know your hardware's power, you're ready to select software that it can efficiently run. Your software choices are divided into four critical areas: + + 1. Operating system (OS) + 2. Desktop environment (DE) + 3. Browser + 4. Applications + + + +A good Linux distribution covers all four. Don't be tempted to run an unsupported version of Windows like 8, Vista, or XP just because it's already on the computer! The [risk][11] of malware is too great. You're much better off with a more virus-resistant, up-to-date operating system. + +How about Windows 7? [Extended support][12] ends January 14, 2020, meaning you get security fixes only until that date. After that, zilch. Now is the perfect time to migrate off Windows 7. + +Linux's big benefit is that it offers [many distros][13] specifically designed for older hardware. Plus, its design decouples [DEs][14] from the OS, so you can mix and match the two. This is important because DEs heavily impact low-end system performance. (With Windows and MacOS, the OS version you run dictates the DE.) + +Other Linux advantages: Its thousands of apps are free and open source, so you don't have to worry about activation and licensing. And Linux is portable. You can copy, move, or clone the OS and applications across partitions, disks, devices, or computers. (Windows binds itself to the computer it's installed on via its Registry.) + +### What can your refurbished computer do? + +We're talking dual-core machines dating from about 2006 to 2013, especially [Intel Core 2][15] CPUs and [AMD Athlon 64 X2][16] family processors. Most have a [CPU Mark][10] of between 1,000 and 4,000. You can often pick up these machines for a song, yet they're still powerful enough to run lightweight Linux software. + +One caution: be sure your computer has at least 2GB of memory. Upgrade the RAM if you have to. End users on my refurbished machines typically use between 0.5 and 2GB of RAM (exclusive of data buffering); rarely do they go over 2 gig. So if you can bump memory to 2GB, your system won't be forced to _swap_, or substitute disk for memory. That's critical for good performance. + +For example, I removed 1GB RAM from the decade-old rebuild I'm writing this article on, which dropped memory down to 1GB. The machine slowed to a crawl. Web surfing and other tasks became frustrating, even painful. I popped the memory stick back in and, with 2GB RAM, the desktop instantly reverted to its usable self. + +With a 2 gig dual-core computer, most people can do whatever they want, so long as they run a lightweight distro and browser. You can web surf, email, edit documents, do spreadsheets, watch YouTube videos, bid on eBay auctions, post on social media, listen to podcasts, view photo collections, manage home finance and personal scheduling, play games, and more. + +### Limitations + +What can't these older computers do? Their concurrency is less than state-of-the-art machines. So run a fast browser and block ads, because that's what slows down web surfing. If your virtual private network (VPN) can block ads for you and offload that work from your processor, that's ideal. Disable autoplay of videos, Flash, and animation. Surf with a couple of tabs open rather than 20. Install a browser extension so you can toggle JavaScript. + +Direct the processors to what you're working on; don't keep a ton of apps open or run lots of stuff in the background. High-end graphics and video editing may be slow. Virtual machine hosting is out. + +How about games? The open source software repositories offer literally thousands of games. That's why I listed video memory as one of the three essential hardware resources. If your box doesn't have a video card, it likely has only 32 or 64MB of VRAM. Bump that to 256 or 512MB by adding a video card, and you'll find that processor-intensive games run much better. [Here's how][17] to see how much VRAM your computer has. Be sure to get a card that fits your computer's [video slot][18] (AGP, PCI-Express, or PCI) and has the right [cable connector][19] (VGA, DVI, or HDMI). + +#### What about Windows compatibility? + +People often ask about Windows compatibility. First, there's a [Linux equivalent][20] for every Windows program. + +Second, if you really must run a specific Windows program, you can usually do that on Linux using [Wine][21]. Look up your application in the [Wine database][22] to verify it runs under Wine and learn any special install tricks. Then the auxiliary tools [Winetricks][23] or [PlayOnLinux][24] will help you with installation and setup. + +Wine's other benefit is that it runs programs from old Windows versions like Vista, XP, ME/98/95, and 3.1. I know a guy who set up a fantastic game box running his old XP games. You can even run thousands of [free DOS programs][25] using [DOSBox.][26] One caution: if Windows programs can run, so can Windows [viruses][27]. You must protect your Wine environment inside Linux just as you would any other Windows environment. + +How about compatibility with Microsoft Office? I use LibreOffice and routinely edit and exchange Word and Excel files without problems. You must, however, avoid using obscure or specialized features. + +### Which distro? + +Assuming Linux is the OS, you need to select a DE, browser, and applications. The easy way to do this is to install a distribution that bundles everything you need. + +Remember that you can try out different distros without installing anything by booting from a [live USB][28] thumb drive or DVD. [Here's how to create a bootable Linux][29] from within Linux or Windows. + +I rebuild computers for charity, so I can't assume any knowledge on the part of my users. I need a distro with these traits: + + * User-friendly + * Lightweight interface + * Bundles lightweight apps + * Big repository + * Solid track record + * Large user community with an active forum + * Stability through long-term support releases (not rolling releases) + * Prioritizes reliability over cutting-edge features + * Configurable by a GUI rather than by text files + + + +Many distros fulfill these criteria. The three I've successfully deployed are [Mint/Xfce][30], [Xubuntu,][31] and [Lubuntu][32]. The first two use the Xfce desktop environment, while the latter runs LXQt. These DEs [use less][33] processor and memory resources than alternatives like GNOME, Unity, KDE, MATE, and Cinnamon. + +Xfce and LXQt are very easy to use. My clients have never seen Linux before, yet they have no trouble using these simple, menu-driven interfaces. + +It's vital to run the fastest, most efficient browser on older equipment. [Many feel][34] Chromium wins the browser race. I also install Firefox Quantum because people are familiar with it and [its performance][35] rivals [that of Chromium][36]. I toss in Opera because it's speedy and has some unique features, like integrated ad-blocking and a free [virtual private network][37]. Opera is free but not open source. + +Whatever browser you use, block ads and trackers! Minimize browser overhead. And don't allow videos or Flash to run without your explicit say-so. + +For applications, I rely on the lightweight apps bundled with Mint/Xfce, Xubuntu, and Lubuntu. They address every possible need. + +### Go for it + +Will you be happy with your rebuild? The computers I've been using lately are both over a decade old. One has an Intel dual-core processor ([eMachines T5274a][38]) while the other features an AMD Athlon 64 x2 processor ([HP dc5750][39]). Both have 2 gig memory. They're as effective for my office workload as my quad-core i5 with 16GB RAM. The only function I miss when using them is the ability to host virtual machines. + +We live in an amazing era. You can take a five- to 12-year-old computer and, with a little effort, restore it to practical use. What could be more fun? + +Having recently co-authored a book about building things with the Raspberry Pi ( Raspberry Pi Hacks... + +I can see the brightness of curiosity in my six year old niece Shuchi's eyes when she explores a... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/how-make-old-computer-useful-again + +作者:[Howard Fosdick][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/howtechhttps://opensource.com/users/don-watkinshttps://opensource.com/users/suehlehttps://opensource.com/users/aseem-sharmahttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/dragonbitehttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesfhttps://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]: https://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=compressed+air+for+computers&rh=i%3Aaps%2Ck%3Acompressed+air+for+computers +[3]: https://www.wikihow.com/Ground-Yourself-to-Avoid-Destroying-a-Computer-with-Electrostatic-Discharge +[4]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface +[5]: http://en.wikipedia.org/wiki/BIOS +[6]: http://www.disk-image.com/faq-bootmenu.htm +[7]: http://www.hirensbootcd.org/download/ +[8]: http://www.ultimatebootcd.com/ +[9]: http://www.rexxinfo.org/Quick_Guide/Quick_Guide_To_Fixing_Computer_Hardware +[10]: http://www.cpubenchmark.net/ +[11]: https://askleo.com/unsupported-software-really-mean/ +[12]: http://home.bt.com/tech-gadgets/computing/windows-7/windows-7-support-end-11364081315419 +[13]: https://fossbytes.com/best-lightweight-linux-distros/ +[14]: http://en.wikipedia.org/wiki/Desktop_environment +[15]: https://en.wikipedia.org/wiki/Intel_Core_2 +[16]: https://en.wikipedia.org/wiki/Athlon_64_X2 +[17]: http://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/ +[18]: https://www.onlinecomputertips.com/support-categories/hardware/493-pci-vs-agp-vs-pci-express-video-cards/ +[19]: https://silentpc.com/articles/video-connectors +[20]: http://wiki.linuxquestions.org/wiki/Linux_software_equivalent_to_Windows_software +[21]: https://en.wikipedia.org/wiki/Wine_%28software%29 +[22]: https://appdb.winehq.org/ +[23]: https://en.wikipedia.org/wiki/Winetricks +[24]: https://en.wikipedia.org/wiki/PlayOnLinux +[25]: https://archive.org/details/softwarelibrary_msdos +[26]: https://en.wikipedia.org/wiki/DOSBox +[27]: https://wiki.winehq.org/FAQ#Is_Wine_malware-compatible.3F +[28]: https://www.howtogeek.com/howto/linux/create-a-bootable-ubuntu-usb-flash-drive-the-easy-way/ +[29]: https://unetbootin.github.io/ +[30]: https://linuxmint.com/ +[31]: https://xubuntu.org/ +[32]: https://lubuntu.me/ +[33]: https://www.makeuseof.com/tag/best-lean-linux-desktop-environment-lxde-vs-xfce-vs-mate/ +[34]: https://www.zdnet.com/article/chrome-is-the-most-popular-web-browser-of-all/ +[35]: https://www.laptopmag.com/articles/firefox-quantum-vs-chrome +[36]: https://www.zdnet.com/article/just-how-fast-is-firefox-quantum/ +[37]: http://en.wikipedia.org/wiki/Virtual_private_network +[38]: https://www.cnet.com/products/emachines-t5274/specs/ +[39]: https://community.spiceworks.com/products/7727-hewlett-packard-dc5750-microtower From 1876a49c2ef9585637faabde24323f2e780dbe35 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:19:49 +0800 Subject: [PATCH 124/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=203=20ty?= =?UTF-8?q?pes=20of=20metric=20dashboards=20for=20DevOps=20teams?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190724 3 types of metric dashboards for DevOps teams.md --- ...s of metric dashboards for DevOps teams.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/tech/20190724 3 types of metric dashboards for DevOps teams.md diff --git a/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md b/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md new file mode 100644 index 0000000000..06b97408e7 --- /dev/null +++ b/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md @@ -0,0 +1,82 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (3 types of metric dashboards for DevOps teams) +[#]: via: (https://opensource.com/article/19/7/dashboards-devops-teams) +[#]: author: (Daniel Oh https://opensource.com/users/daniel-ohhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/heronthecli) + +3 types of metric dashboards for DevOps teams +====== +Dashboards help DevOps teams observe and monitor systems to improve +performance. +![metrics and data shown on a computer screen][1] + +Metrics dashboards enable [DevOps][2] teams to monitor the entire DevOps platform so they can respond to issues in real-time, which is critical in the event of downtime or disruption in the production environment or application services. + +DevOps dashboards aggregate metrics from multiple observation tools to create monitoring reports for dev and ops teams. They also allow teams to track multiple metrics, such as service deployment times, bugs, errors, work items, backlogs, and more. + +The three categories of metrics dashboards described below help DevOps teams observe and monitor systems and thereby improve performance. + +### Agile project management dashboards + +This type of dashboard visualizes work items for DevOps teams to optimize workflows in agile projects. The dashboard should be designed for maximizing team collaboration efficiency, visualizing work, and providing flexible views—just like we used to use sticky notes on a whiteboard to share project progress, issues, and backlogs. + + * [Kanban boards][3] enable DevOps teams to create cards, labels, assignments, and columns for continuous delivery of agile projects. + * [Burndown charts][4] visualize uncompleted work or backlogs in a specified time period and provide the team's current velocity and trajectory, metrics that are typically used in agile and DevOps project management. + * [Jira boards][5] enable DevOps teams to create issues, plan sprints, and generate team stories. These flexible dashboards also allow the team to prioritize individual and team tasks in full context; provide visibility to view, report, and track work in progress; and help improve team performance. + * [GitHub project boards][6] help prioritize the team's tasks. They also support pull requests so team members can add information related to DevOps projects. + + + +### Application monitoring dashboards + +Developers are responsible for improving application and services performance and developing new functions. An app monitoring dashboard enables developers to produce bugfixes, enhance features, and release security patches as soon as possible within a continuous integration/continuous development (CI/CD) pipeline. These dashboards should also visualize request patterns, elapsed time, errors, and network topology. + + * [Jaeger][7] enables developers to trace the number of requests, response time for each request, and more. It also improves monitoring and tracing of cloud-native apps on a distributed networking system with the [Istio service mesh][8]. + * [OpenCensus][9] allows the team to view data on the host where an application is running, but it also has a pluggable export system for exporting data to central aggregators. + + + +### DevOps platform observation dashboard + +You might have combined technologies and tools to build a DevOps platform in the cloud or on-premises, but Linux container management tools, such as Kubernetes and OpenShift, are the foundation of a successful DevOps platform. This is because a Linux container's immutability and portability make it faster and easier to move from app development to building, testing, and deployment in production. + +DevOps platform observation dashboards enable the ops teams to orchestrate application containers and software-defined infrastructure, like networking ([SDN][10]) and storage ([SDS][11]), by collecting numeric time-series data from machine or node failures and services errors. These dashboards also visualize multi-dimensional data formats and query data patterns. + + * [Prometheus dashboards][12] scrape metrics from nodes in the platform or directly in running containerized applications. They allow DevOps teams to build a metric-based monitoring system and dashboard to observe microservices' client/server workloads to identify abnormal node failures. + * [Grafana boards][13] allow DevOps organizations to utilize event-driven metrics and visualize multiple panels, including service response duration, request volume, client/server workloads, network traffic flow, and more. DevOps teams can share metrics panels easily in a variety of ways as well as take the snapshot that encodes current monitoring data and share it with other teams. + + + +### Summary + +These dashboards visualize metrics on how your DevOps team works and can help identify current or potential issues in team collaboration, application delivery, and platform health status. They also enable DevOps teams to enhance their capabilities in areas such as fast app delivery, secured runtimes, and automated CI/CD. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/dashboards-devops-teams + +作者:[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-ohhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/heronthecli +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://opensource.com/resources/devops +[3]: https://opensource.com/article/19/1/productivity-tool-taskboard +[4]: https://openpracticelibrary.com/practice/burndown/ +[5]: https://www.atlassian.com/software/jira +[6]: https://opensource.com/life/15/11/short-introduction-github +[7]: https://www.jaegertracing.io/ +[8]: https://opensource.com/article/19/3/getting-started-jaeger +[9]: https://opencensus.io/ +[10]: https://opensource.com/article/18/11/intro-software-defined-networking +[11]: https://opensource.com/business/14/10/sage-weil-interview-openstack-ceph +[12]: https://opensource.com/article/18/12/introduction-prometheus +[13]: https://opensource.com/article/17/8/linux-grafana From 56adde9b2cc2ab195b930aa4589b21742593adeb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:20:44 +0800 Subject: [PATCH 125/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190725=20IoT?= =?UTF-8?q?=E2=80=99s=20role=20in=20expanding=20drone=20use?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190725 IoT-s role in expanding drone use.md --- ...90725 IoT-s role in expanding drone use.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sources/talk/20190725 IoT-s role in expanding drone use.md diff --git a/sources/talk/20190725 IoT-s role in expanding drone use.md b/sources/talk/20190725 IoT-s role in expanding drone use.md new file mode 100644 index 0000000000..a9281dcf40 --- /dev/null +++ b/sources/talk/20190725 IoT-s role in expanding drone use.md @@ -0,0 +1,61 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (IoT’s role in expanding drone use) +[#]: via: (https://www.networkworld.com/article/3410564/iots-role-in-expanding-drone-use.html) +[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) + +IoT’s role in expanding drone use +====== +Collision avoidance technology that uses internet of things (IoT) connectivity, AI, machine learning, and computer vision could be the key to expanding drone applications. +![Thinkstock][1] + +As faithful readers of [TechWatch][2] (love you, Mom) may know, the rollout of many companies’ ambitious drone delivery services has not gone as quickly as promised. Despite recent signs of progress in Australia and the United States—not to mention [clever ideas for burger deliveries to cars stuck in traffic][3]—drone delivery remains a long way from becoming a viable option in the vast majority of use cases. And the problem affects many areas of drone usage, not just the heavily hyped drone delivery applications. + +According to [Grace McKenzie][4], director of operations and controller at [Iris Automation][5], one key restriction to economically viable drone deliveries is that the “skies are not safe enough for many drone use cases.” + +Speaking at a recent [SF New Tech “Internet of Everything” event in San Francisco][6], McKenzie said fear of collisions with manned aircraft is the big reason why the Federal Aviation Association (FAA) and international regulators typically prohibit drones from flying beyond the line of the sight of the remote pilot. Obviously, she added, that restriction greatly constrains where and how drones can make deliveries and is working to keep the market from growing test and pilot programs into full-scale commercial adoption. + +**[ Read also: [No, drone delivery still isn’t ready for prime time][7] | Get regularly scheduled insights: [Sign up for Network World newsletters][8] ]** + +### Detect and avoid technology is critical + +Iris Automation, not surprisingly, is in the business of creating workable collision avoidance systems for drones in an attempt to solve this issue. Variously called “detect and avoid” or “sense and avoid” technologies, these automated solutions are required for “beyond visual line of sight” (BVLOS) drone operations. There are multiple issues in play. + +As explained on Iris’ website, “Drone pilots are skilled aviators, but even they struggle to see and avoid obstacles and aircraft when operating drones at extended range [and] no pilot on board means low situational awareness. This risk is huge, and the potential conflicts can be extremely dangerous.” + +As “a software company with a hardware problem,” McKenzie said, Iris’ systems use artificial intelligence (AI), machine learning, computer vision, and IoT connectivity to identify and focus on the “small group of pixels that could be a risk.” Working together, those technologies are creating an “exponential curve” in detect-and-avoid technology improvements, she added. The result? Drones that “see better than a human pilot,” she claimed. + +### Bigger market and new use cases for drones + +It’s hardly an academic issue. “Not being able to show adequate mitigation of operational risk means regulators are forced to limit drone uses and applications to closed environments,” the company says. + +Solving this problem would open up a wide range of industrial and commercial applications for drones. Far beyond delivering burritos, McKenzie said that with confidence in drone “sense and avoid” capabilities, drones could be used for all kinds of aerial data gathering, from inspecting hydro-electric dams, power lines, and railways to surveying crops to fighting forest fires and conducting search-and-rescue operations. + +Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3410564/iots-role-in-expanding-drone-use.html + +作者:[Fredric 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://www.networkworld.com/author/Fredric-Paul/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2018/01/drone_delivery_package_future-100745961-large.jpg +[2]: https://www.networkworld.com/blog/techwatch/ +[3]: https://www.networkworld.com/article/3396188/the-traffic-jam-whopper-project-may-be-the-coolestdumbest-iot-idea-ever.html +[4]: https://www.linkedin.com/in/withgracetoo/ +[5]: https://www.irisonboard.com/ +[6]: https://sfnewtech.com/event/iot/ +[7]: https://www.networkworld.com/article/3390677/drone-delivery-not-ready-for-prime-time.html +[8]: https://www.networkworld.com/newsletters/signup.html +[9]: https://www.facebook.com/NetworkWorld/ +[10]: https://www.linkedin.com/company/network-world From 1c9755f0c4f38cf518dcc62c583e7fb8397d24a3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:21:18 +0800 Subject: [PATCH 126/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190725=20Storag?= =?UTF-8?q?e=20management=20a=20weak=20area=20for=20most=20enterprises?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190725 Storage management a weak area for most enterprises.md --- ...gement a weak area for most enterprises.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/talk/20190725 Storage management a weak area for most enterprises.md diff --git a/sources/talk/20190725 Storage management a weak area for most enterprises.md b/sources/talk/20190725 Storage management a weak area for most enterprises.md new file mode 100644 index 0000000000..859c1caa32 --- /dev/null +++ b/sources/talk/20190725 Storage management a weak area for most enterprises.md @@ -0,0 +1,82 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Storage management a weak area for most enterprises) +[#]: via: (https://www.networkworld.com/article/3411400/storage-management-a-weak-area-for-most-enterprises.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Storage management a weak area for most enterprises +====== +Survey finds companies are adopting technology for such things as AI, machine learning, edge computing and IoT, but still use legacy storage that can't handle those workloads. +![Miakievy / Getty Images][1] + +Stop me if you’ve heard this before: Companies are racing to a new technological paradigm but are using yesterday’s tech to do it. + +I know. Shocking. + +A survey of more than 300 storage professionals by storage vendor NGD Systems found only 11% of the companies they talked to would give themselves an “A” grade for their compute and storage capabilities. + +Why? The chief reason given is that while enterprises are rapidly deploying technologies for edge networks, real-time analytics, machine learning, and internet of things (IoT) projects, they are still using legacy storage solutions that are not designed for such data-intensive workloads. More than half — 54% — said their processing of edge applications is a bottleneck, and they want faster and more intelligent storage solutions. + +**[ Read also: [What is NVMe, and how is it changing enterprise storage][2] ]** + +### NVMe SSD use increases, but doesn't solve all needs + +It’s not all bad news. The study, entitled ["The State of Storage and Edge Computing"][3] and conducted by Dimensional Research, found 60% of storage professionals are using NVMe SSDs to speed up the processing of large data sets being generated at the edge. + +However, this has not solved their needs. As artificial intelligence (AI) and other data-intensive deployments increase, data needs to be moved over increasingly longer distances, which causes network bottlenecks and delays analytic results. And edge computing systems tend to have a smaller footprint than a traditional data center, so they are performance constrained. + +The solution is to process the data where it is ingested, in this case, the edge device. Separate the wheat from the chafe and only send relevant data upstream to a data center to be processed. This is called computational storage, processing data where it is stored rather than moving it around. + +According to the survey, 89% of respondents said they expect real value from computational storage. Conveniently, NGD is a vendor of computational storage systems. So, yes, this is a self-serving finding. This happens a lot. That doesn’t mean they don’t have a valid point, though. Processing the data where it lies is the point of edge computing. + +Among the survey’s findings: + + * 55% use edge computing + * 71% use edge computing for real-time analytics + * 61% said the cost of traditional storage solutions continues to plague their applications + * 57% said faster access to storage would improve their compute abilities + + + +The study also found that [NVMe][2] is being adopted very quickly but is being hampered by price. + + * 86% expect storage’s future to rely on NVMe SSDs + * 60% use NVMe SSDs in their work environments + * 63% said NVMe SSDs helped with superior storage speed + * 67% reported budget and cost as issues preventing the use of NVMe SSDs + + + +That last finding is why so many enterprises are hampered in their work. For whatever reason they are using old storage systems rather than new NVMe systems, and it hurts them. + +### GPUs won't improve workload performance + +One interesting finding: 70% of respondents said they are using GPUs to help improve workload performance, but NGD said those are no good. + +“We were not surprised to find that while more than half of respondents are actively using edge computing, more than 70% are using legacy GPUs, which will not reduce the network bandwidth, power and footprint necessary to analyze mass data-sets in real time,” said Nader Salessi, CEO and founder of NGD Systems, in a statement. + +That’s because GPUs lend themselves well to repetitive tasks and parallel processing jobs, while computational storage is very much a serial processing job, with the task constantly changing. So while some processing jobs will benefit from a GPU, a good number will not and the GPU is essentially wasted. + +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/3411400/storage-management-a-weak-area-for-most-enterprises.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://images.idgesg.net/images/article/2019/02/edge_computing_by_miakievy_gettyimages-957694592_2400x1600-100788315-large.jpg +[2]: https://www.networkworld.com/article/3280991/what-is-nvme-and-how-is-it-changing-enterprise-storage.html +[3]: https://ngd.dnastaging.net/brief/NGD_Systems_Storage_Edge_Computing_Survey_Report +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From 73bb7c0fce96b1a2c135bcc8b117efdea81ded29 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:22:11 +0800 Subject: [PATCH 127/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20Report?= =?UTF-8?q?s:=20As=20the=20IoT=20grows,=20so=20do=20its=20threats=20to=20D?= =?UTF-8?q?NS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md --- ...the IoT grows, so do its threats to DNS.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md diff --git a/sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md b/sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md new file mode 100644 index 0000000000..d9647304b9 --- /dev/null +++ b/sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md @@ -0,0 +1,78 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Reports: As the IoT grows, so do its threats to DNS) +[#]: via: (https://www.networkworld.com/article/3411437/reports-as-the-iot-grows-so-do-its-threats-to-dns.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Reports: As the IoT grows, so do its threats to DNS +====== +ICANN and IBM's security researchers separately spell out how the growth of the internet of things will increase opportunities for malicious actors to attack the Domain Name System with hyperscale botnets and worm their malware into the cloud. +The internet of things is shaping up to be a more significant threat to the Domain Name System through larger IoT botnets, unintentional adverse effects of IoT-software updates and the continuing development of bot-herding software. + +The Internet Corporation for Assigned Names and Numbers (ICANN) and IBM’s X-Force security researchers have recently issued reports outlining the interplay between DNS and IoT that includes warnings about the pressure IoT botnets will put on the availability of DNS systems. + +**More about DNS:** + + * [DNS in the cloud: Why and why not][1] + * [DNS over HTTPS seeks to make internet use more private][2] + * [How to protect your infrastructure from DNS cache poisoning][3] + * [ICANN housecleaning revokes old DNS security key][4] + + + +ICANN’s Security and Stability Advisory Committee (SSAC) wrote in a [report][5] that “a significant number of IoT devices will likely be IP enabled and will use the DNS to locate the remote services they require to perform their functions. As a result, the DNS will continue to play the same crucial role for the IoT that it has for traditional applications that enable human users to interact with services and content,” ICANN stated. “The  role of  the  DNS  might  become  even  more  crucial  from  a  security  and  stability perspective with IoT devices interacting with people’s physical environment.” + +IoT represents both an opportunity and a risk to the DNS, ICANN stated. “It is an opportunity because the DNS provides functions and data that can help make the IoT more secure, stable, and transparent, which is critical given the IoT's interaction with the physical world. It is a risk because various measurement studies suggest that IoT devices may stress the DNS, for instance, because of complex DDoS attacks carried out by botnets that grow to hundreds of thousands or in the future millions of infected IoT devices within hours,” ICANN stated. + +Unintentional DDoS attacks + +One risk is that the IoT could place new burdens on the DNS. “For example, a software update for a popular IP-enabled IoT device that causes the device to use the DNS more frequently (e.g., regularly lookup random domain names to check for network availability) could stress the DNS in individual networks when millions of devices automatically install the update at the same time,” ICANN stated. + +While this is a programming error from the perspective of individual devices, it could result in a significant attack vector from the perspective of DNS infrastructure operators. Incidents like this have already occurred on a small scale, but they may occur more frequently in the future due to the growth of heterogeneous IoT devices from manufacturers that equip their IoT devices with controllers that use the DNS, ICANN stated. + +Massively larger botnets, threat to clouds + +The report also suggested that the scale of IoT botnets could grow from hundreds of thousands of devices to millions. The best known IoT botnet is Mirai, responsible for DDoS attacks involving 400,000 to 600,000 devices. The Hajime botnet hovers around 400K infected IoT devices but has not launched any DDoS attacks yet. But as the IoT grows, so will the botnets and as a result larger DDoS attacks. + +Cloud-connected IoT devices could endanger cloud resources. “IoT devices connected to cloud architecture could allow Mirai adversaries to gain access to cloud servers. They could infect a server with additional malware dropped by Mirai or expose all IoT devices connected to the server to further compromise,” wrote Charles DeBeck,  a senior cyber threat intelligence strategic analyst with [IBM X-Force Incident Response][6] in a recent report.  + + “As organizations increasingly adopt cloud architecture to scale efficiency and productivity, disruption to a cloud environment could be catastrophic.” + +For enterprises that are rapidly adopting both IoT technology and cloud architecture, insufficient security controls could expose the organization to elevated risk, calling for the security committee to conduct an up-to-date risk assessment, DeBeck stated. + +Attackers continue malware development + +“Since this activity is highly automated, there remains a strong possibility of large-scale infection of IoT devices in the future,” DeBeck stated. “Additionally, threat actors are continuing to expand their targets to include new types of IoT devices and may start looking at industrial IoT devices or connected wearables to increase their footprint and profits.” + +Botnet bad guys are also developing new Mirai variants and IoT botnet malware outside of the Mirai family to target IoT devices, DeBeck stated. + +To continue reading this article register now + +[Get Free Access][7] + +[Learn More][8]   Existing Users [Sign In][7] + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3411437/reports-as-the-iot-grows-so-do-its-threats-to-dns.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/3273891/hybrid-cloud/dns-in-the-cloud-why-and-why-not.html +[2]: https://www.networkworld.com/article/3322023/internet/dns-over-https-seeks-to-make-internet-use-more-private.html +[3]: https://www.networkworld.com/article/3298160/internet/how-to-protect-your-infrastructure-from-dns-cache-poisoning.html +[4]: https://www.networkworld.com/article/3331606/security/icann-housecleaning-revokes-old-dns-security-key.html +[5]: https://www.icann.org/en/system/files/files/sac-105-en.pdf +[6]: https://securityintelligence.com/posts/i-cant-believe-mirais-tracking-the-infamous-iot-malware-2/?cm_mmc=OSocial_Twitter-_-Security_Security+Brand+and+Outcomes-_-WW_WW-_-SI+TW+blog&cm_mmca1=000034XK&cm_mmca2=10009814&linkId=70790642 +[7]: javascript:// +[8]: https://www.networkworld.com/learn-about-insider/ From 36a4e30a95cb2002799b36cc2485a035b64a62ec Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:22:59 +0800 Subject: [PATCH 128/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20How=20?= =?UTF-8?q?BMW=E2=80=99s=20new=20annual=20fee=20for=20Apple=20CarPlay=20co?= =?UTF-8?q?uld=20define=20the=20IoT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190724 How BMW-s new annual fee for Apple CarPlay could define the IoT.md --- ... for Apple CarPlay could define the IoT.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20190724 How BMW-s new annual fee for Apple CarPlay could define the IoT.md diff --git a/sources/talk/20190724 How BMW-s new annual fee for Apple CarPlay could define the IoT.md b/sources/talk/20190724 How BMW-s new annual fee for Apple CarPlay could define the IoT.md new file mode 100644 index 0000000000..6a73b041d5 --- /dev/null +++ b/sources/talk/20190724 How BMW-s new annual fee for Apple CarPlay could define the IoT.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How BMW’s new annual fee for Apple CarPlay could define the IoT) +[#]: via: (https://www.networkworld.com/article/3411478/how-bmws-new-annual-fee-for-apple-carplay-could-define-the-iot.html) +[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) + +How BMW’s new annual fee for Apple CarPlay could define the IoT +====== +BMW's plans to charge for Apple CarPlay access illustrates the promise—and the pitfalls—of the internet of things (IoT). +![Apple][1] + +Apple calls CarPlay “[the ultimate co-pilot][2].” BMW calls it the “smart and fast way to conveniently use your iPhone features while in your car. ... You can control your iPhone and use apps with the touchscreen display, the iDrive Controller or voice commands.” + +However you describe it, though, Apple’s CarPlay system suddenly finds itself in the center of what could be a defining conversation about the future of the internet of things (IoT). + +You see, the German luxury carmaker’s plans to charge $80 a year to access CarPlay have suddenly become the talk of the internet, from [tech blogs][3] to [car sites][4]. The hue and cry makes CarPlay the perfect illustration of the promise—and the pitfalls—of the IoT. + +**[ [Learn more:][5] Download a PDF bundle of five essential articles about IoT in the enterprise ]** + +First, the facts: BMW’s website now reveals that beginning with the 2019 model year, it’s turning the CarPlay interface between iPhones and the vehicle’s infotainment system into a subscription service. While most car manufacturers that offer CarPlay make it available free of charge, owners of the “ultimate driving machine,” will get free access for only the first year. After that, [BMW drivers will need to pony up $80 a year—or $300 for 20 years][6]—to keep using it. + +### An “outrageous” fee? + +Some observers are labeling the new fee “[outrageous][7],” and it’s not yet clear what Apple thinks about BMW’s pricing policy. For me, though, it’s both a shining example of the amazing new revenue opportunities generated by the IoT, and a terrifying warning of how the IoT could add new cost and complexity to everyday activities. + +Look at this as a glass half full, and BMW is cleverly finding a new revenue stream by offering valuable functionality to a target market that has already demonstrated a willingness to pay for high-end functionality. The IoT and connected cars offer a new and better experience, and BMW is leveraging that to boost its business. It’s the power of capitalism at work, and if BMW drivers don’t value the CarPlay functionality, no one is forcing them to buy it. + +In some ways, the subscription business model is similar to that of [satellite radio][8] or GM’s [OnStar][9] system. The automaker builds in the equipment needed to offer the service, and car owners can choose to avail themselves of it if they feel it’s worthwhile. Or not. + +### A particular bit of usury + +But that’s only one perspective on what’s happening here. Look at it another way, and you could paint a very different picture. For one thing, as noted above, other car makers that offer CarPlay do not charge anything extra for it. BMWs are relatively expensive vehicles, and nickel-and-diming affluent consumers does not seem like a path to great customer loyalty. Think of the annoyance surrounding the fact that budget motels typically make Wi-Fi available for free, while luxury properties charge guests through the nose. (With the [rise of 5G networks][10], though, that particular bit of usury may not last much longer.) + +Making matters worse, CarPlay is really just internal connectivity between your iPhone and your car’s infotainment system. There’s no actual _service_ involved, and no real justification for a separate fee, other than the fact that BMW _can_ charge for it. It seems more like getting charged a monthly fee to connect your own phone to your own big-screen TV (like Apple’s AirPlay) or hooking up your smart light fixture to your home assistant or—I don’t know—putting your lamp on your coffee table! It just doesn’t feel right. + +### Dangerous long-term implications? + +Sure, if this kind of thing takes off in the larger world of the IoT, it could lead to a significant amount of new revenue—at least in the short run. But over time, it could easily backfire, encouraging consumers to view IoT vendors as greedy and to question the costs and benefits of everything from smart houses to connected enterprises. That could turn out to be a drag on the overall IoT market. + +That would be a shame, and it doesn’t have to be that way. If BMW had merely buried the CarPlay costs in the price of the equipment or options, or in the sticker cost of the car itself, nobody would be worrying about it. But just like breaking out the costs of checked baggage on airplane flights, charging a subscription for CarPlay makes it seem like a combination of bait-and-switch and price gouging. And that’s exactly what the IoT industry _doesn’t_ need. If the goal is to maximize the growth and acceptance of the IoT, vendors should strive to make IoT users feel like they’re getting great functionality at a fair price. + +That’s often exactly what many IoT devices and IoT-based services do, so it shouldn’t be too hard to avoid screwing it up. + +Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3411478/how-bmws-new-annual-fee-for-apple-carplay-could-define-the-iot.html + +作者:[Fredric 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://www.networkworld.com/author/Fredric-Paul/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/06/ios13-carplay-waze-100799546-large.jpg +[2]: https://www.apple.com/ios/carplay/ +[3]: https://www.engadget.com/2019/07/24/bmw-adds-a-80-yearly-subscription-for-apples-carplay/ +[4]: https://www.caranddriver.com/news/a15530125/bmw-to-treat-apple-carplay-as-a-subscription-service-and-charge-customers-an-annual-fee/ +[5]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html +[6]: https://connecteddrive.bmwusa.com/app/index.html#/portal/store/Base_CarPlay +[7]: https://www.cultofmac.com/640578/bmw-carplay-annual-fee/ +[8]: https://www.siriusxm.com/ +[9]: https://www.onstar.com/us/en/home/?ppc=GOOGLE_700000001302986_71700000048879287_58700004855294718_p41772767724&gclid=EAIaIQobChMIi7qn4IDO4wIVJRh9Ch1mlw6tEAAYASAAEgKQf_D_BwE&gclsrc=aw.ds +[10]: http://www.networkworld.com/cms/article/17%20predictions%20about%205G%20networks%20and%20devices +[11]: https://www.facebook.com/NetworkWorld/ +[12]: https://www.linkedin.com/company/network-world From 2dca40115b6a7884468b8746328c983f6c967c96 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:24:40 +0800 Subject: [PATCH 129/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20Data?= =?UTF-8?q?=20centers=20may=20soon=20recycle=20heat=20into=20electricity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190724 Data centers may soon recycle heat into electricity.md --- ... may soon recycle heat into electricity.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/talk/20190724 Data centers may soon recycle heat into electricity.md diff --git a/sources/talk/20190724 Data centers may soon recycle heat into electricity.md b/sources/talk/20190724 Data centers may soon recycle heat into electricity.md new file mode 100644 index 0000000000..92298e1a01 --- /dev/null +++ b/sources/talk/20190724 Data centers may soon recycle heat into electricity.md @@ -0,0 +1,67 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Data centers may soon recycle heat into electricity) +[#]: via: (https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Data centers may soon recycle heat into electricity +====== +Rice University researchers are developing a system that converts waste heat into light and then that light into electricity, which could help data centers reduce computing costs. +![Gordon Mah Ung / IDG][1] + +Waste heat is the scurge of computing. In fact, much of the cost of powering a computer is from creating unwanted heat. That’s because the inefficiencies in electronic circuits, caused by resistance in the materials, generates that heat. The processors, without computing anything, are essentially converting expensively produced electrical energy into waste energy. + +It’s a fundamental problem, and one that hasn’t been going away. But what if you could convert the unwanted heat back into electricity—recycle the heat back into its original energy form? The data center heat, instead of simply disgorging into the atmosphere to be gotten rid of with dubious eco-effects, could actually run more machines. Plus, your cooling costs would be taken care of—there’s nothing to cool because you’ve already grabbed the hot air. + +**[ Read also: [How server disaggregation can boost data center efficiency][2] | Get regularly scheduled insights: [Sign up for Network World newsletters][3] ]** + +Scientists at Rice Univeristy are trying to make that a reality by developing heat scavenging and conversion solutions. + +Currently, the most efficient way to convert heat into electricity is through the use of traditional turbines. + +Turbines “can give you nearly 50% conversion efficiency,” says Chloe Doiron, a graduate student at Rice University and co-lead on the project, in a [news article][4] on the school’s website. Turbines convert the kinetic energy of moving fluids, like steam or combustion gases, into mechanical energy. The moving steam then shifts blades mounted on a shaft, which turns a generator, thus creating the power. + +Not a bad solution. The problem, though, is “those systems are not easy to implement,” the researchers explain. The issue is that turbines are full of moving parts, and they’re big, noisy, and messy. + +### Thermal emitter better than turbines for converting heat to energy + +A better option would be a solid-state, thermal device that could absorb heat at the source and simply convert it, perhaps straight into attached batteries. + +The researchers say a thermal emitter could absorb heat, jam it into tight, easy-to-capture bandwidth and then emit it as light. Cunningly, they would then simply turn the light into electricity, as we see all the time now in solar systems. + +“Thermal photons are just photons emitted from a hot body,” says Rice University professor Junichiro Kono in the article. “If you look at something hot with an infrared camera, you see it glow. The camera is capturing these thermally excited photons.” Indeed, all heated surfaces, to some extent, send out light as thermal radiation. + +The Rice team wants to use a film of aligned carbon nanotubes to do the job. The test system will be structured as an actual solar panel. That’s because solar panels, too, lose energy through heat, so are a good environment in which to work. The concept applies to other inefficient technologies, too. “Anything else that loses energy through heat [would become] far more efficient,” the researchers say. + +Around 20% of industrial energy consumption is unwanted heat, Doiron says. That's a lot of wasted energy. + +### Other heat conversion solutions + +Other heat scavenging devices are making inroads, too. Now-commercially available thermoelectric technology can convert a temperature difference into power, also with no moving parts. They function by exposing a specially made material to heat. [Electrons flow when one part is cold and one is hot][5]. And the University of Utah is working on [silicon for chips that generates electricity][6] as one of two wafers heat up. + +Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.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://images.idgesg.net/images/article/2019/07/flir_20190711t191326-100801627-large.jpg +[2]: https://www.networkworld.com/article/3266624/how-server-disaggregation-could-make-cloud-datacenters-more-efficient.html +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://news.rice.edu/2019/07/12/rice-device-channels-heat-into-light/ +[5]: https://www.networkworld.com/article/2861438/how-to-convert-waste-data-center-heat-into-electricity.html +[6]: https://unews.utah.edu/beat-the-heat/ +[7]: https://www.facebook.com/NetworkWorld/ +[8]: https://www.linkedin.com/company/network-world From de30c34e43c17e6626cc052bb5293b61c806162d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 26 Jul 2019 01:25:35 +0800 Subject: [PATCH 130/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190724=20When?= =?UTF-8?q?=20it=20comes=20to=20the=20IoT,=20Wi-Fi=20has=20the=20best=20se?= =?UTF-8?q?curity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md --- ...to the IoT, Wi-Fi has the best security.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md diff --git a/sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md b/sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md new file mode 100644 index 0000000000..2b5014dfa8 --- /dev/null +++ b/sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md @@ -0,0 +1,88 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (When it comes to the IoT, Wi-Fi has the best security) +[#]: via: (https://www.networkworld.com/article/3410563/when-it-comes-to-the-iot-wi-fi-has-the-best-security.html) +[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) + +When it comes to the IoT, Wi-Fi has the best security +====== +It’s easy to dismiss good ol’ Wi-Fi’s role in internet of things networking. But Wi-Fi has more security advantages than other IoT networking choices. +![Ralph Gaithe / Soifer / Getty Images][1] + +When it comes to connecting internet of things (IoT) devices, there is a wide variety of networks to choose from, each with its own set of capabilities, advantages and disadvantages, and ideal use cases. Good ol’ Wi-Fi is often seen as a default networking choice, available in many places, but of limited range and not particularly suited for IoT implementations. + +According to [Aerohive Networks][2], however, Wi-Fi is “evolving to help IT address security complexities and challenges associated with IoT devices.” Aerohive sells cloud-managed networking solutions and was [acquired recently by software-defined networking company Extreme Networks for some $272 million][3]. And Aerohive's director of product marketing, Mathew Edwards, told me via email that Wi-Fi brings a number of security advantages compared to other IoT networking choices. + +It’s not a trivial problem. According to Gartner, in just the last three years, [approximately one in five organizations have been subject to an IoT-based attack][4]. And as more and more IoT devices come on line, the attack surface continues to grow quickly. + +**[ Also read: [Extreme targets cloud services, SD-WAN, Wi-Fi 6 with $210M Aerohive grab][3] and [Smart cities offer window into the evolution of enterprise IoT technology][5] ]** + +### What makes Wi-Fi more secure for IoT? + +What exactly are Wi-Fi’s IoT security benefits? Some of it is simply 20 years of technological maturity, Edwards said. + +“Extending beyond the physical boundaries of organizations, Wi-Fi has always had to be on the front foot when it comes to securely onboarding and monitoring a range of corporate, guest, and BYOD devices, and is now prepared with the next round of connectivity complexities with IoT,” he said. + +Specifically, Edwards said, “Wi-Fi has evolved … to increase the visibility, security, and troubleshooting of edge devices by combining edge security with centralized cloud intelligence.” + +Just as important, though, new Wi-Fi capabilities from a variety of vendors are designed to help identify and isolate IoT devices to integrate them into the wider network while limiting the potential risks. The goal is to incorporate IoT device awareness and protection mechanisms to prevent breaches and attacks through vulnerable headless devices. Edwards cited Aerohive’s work to “securely onboard IoT devices with its PPSK (private pre-shared key) technology, an authentication and encryption method providing 802.1X-equivalent role-based access, without the equivalent management complexities.” + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][6] ]** + +### The IoT is already here—and so is Wi-Fi + +Unfortunately, enterprise IoT security is not always a carefully planned and monitored operation. + +“Much like BYOD,” Edwards said, “many organizations are dealing with IoT without them even knowing it.” On the plus side, even as “IoT devices have infiltrated many networks , ... administrators are already leveraging some of the tools to protect against IoT threats without them even realizing it.” + +He noted that customers who have already deployed PPSK to secure guest and BYOD networks can easily extend those capabilities to cover IoT devices such as “smart TVs, projectors, printers, security systems, sensors and more.” + +In addition, Edwards said, “vendors have introduced methods to assign performance and security limits through context-based profiling, which is easily extended to IoT devices once the vendor can utilize signatures to identify an IoT device.” + +Once an IoT device is identified and tagged, Wi-Fi networks can assign it to a particular VLAN, set minimum and maximum data rates, data limits, application access, firewall rules, and other protections. That way, Edwards said, “if the device is lost, stolen, or launches a DDoS attack, the Wi-Fi network can kick it off, restrict it, or quarantine it.” + +### Wi-Fi still isn’t for every IoT deployment + +All that hardly turns Wi-Fi into the perfect IoT network. Relatively high costs and limited range mean it won’t find a place in many large-scale IoT implementations. But Edwards says Wi-Fi’s mature identification and control systems can help enterprises incorporate new IoT-based systems and sensors into their networks with more confidence. + +**More about 802.11ax (Wi-Fi 6)** + + * [Why 802.11ax is the next big thing in wireless][7] + * [FAQ: 802.11ax Wi-Fi][8] + * [Wi-Fi 6 (802.11ax) is coming to a router near you][9] + * [Wi-Fi 6 with OFDMA opens a world of new wireless possibilities][10] + * [802.11ax preview: Access points and routers that support Wi-Fi 6 are on tap][11] + + + +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/3410563/when-it-comes-to-the-iot-wi-fi-has-the-best-security.html + +作者:[Fredric 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://www.networkworld.com/author/Fredric-Paul/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/03/hack-your-own-wi-fi_neon-wi-fi_keyboard_hacker-100791531-large.jpg +[2]: http://www.aerohive.com/ +[3]: https://www.networkworld.com/article/3405440/extreme-targets-cloud-services-sd-wan-wifi-6-with-210m-aerohive-grab.html +[4]: https://www.gartner.com/en/newsroom/press-releases/2018-03-21-gartner-says-worldwide-iot-security-spending-will-reach-1-point-5-billion-in-2018. +[5]: https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html +[6]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[7]: https://www.networkworld.com/article/3215907/mobile-wireless/why-80211ax-is-the-next-big-thing-in-wi-fi.html +[8]: https://%20https//www.networkworld.com/article/3048196/mobile-wireless/faq-802-11ax-wi-fi.html +[9]: https://www.networkworld.com/article/3311921/mobile-wireless/wi-fi-6-is-coming-to-a-router-near-you.html +[10]: https://www.networkworld.com/article/3332018/wi-fi/wi-fi-6-with-ofdma-opens-a-world-of-new-wireless-possibilities.html +[11]: https://www.networkworld.com/article/3309439/mobile-wireless/80211ax-preview-access-points-and-routers-that-support-the-wi-fi-6-protocol-on-tap.html +[12]: https://www.facebook.com/NetworkWorld/ +[13]: https://www.linkedin.com/company/network-world From c427a12e87ed66e8e8a76e08c23ac369986f0ff6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 26 Jul 2019 05:31:11 +0800 Subject: [PATCH 131/951] TSL&PRF:20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md --- ...n Commands On Cluster Nodes In Parallel.md | 304 ------------------ ...n Commands On Cluster Nodes In Parallel.md | 293 +++++++++++++++++ 2 files changed, 293 insertions(+), 304 deletions(-) delete mode 100644 sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md create mode 100644 translated/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md diff --git a/sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md b/sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md deleted file mode 100644 index e03e6de988..0000000000 --- a/sources/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md +++ /dev/null @@ -1,304 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (ClusterShell – A Nifty Tool To Run Commands On Cluster Nodes In Parallel) -[#]: via: (https://www.2daygeek.com/clustershell-clush-run-commands-on-cluster-nodes-remote-system-in-parallel-linux/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -ClusterShell:一个在集群节点上并行运行命令的好工具 -====== - -我们过去曾写过两篇如何并行地在多个远程服务器上运行命令的文章:这些是[并行 SSH(PSSH)][1] 和 [分布式 Shell(DSH)][2]。今天,我们将讨论相同类型的主题,但它允许我们在群集节点上执行相同的操作。你可能会想,我可以编写一个小的 shell 脚本来实现这个目的,而不是安装这些第三方软件包。 - - -Of course you are right and if you are going to run some commands in 10-15 remote systems then you don’t need to use this. - -However, the scripts take some time to complete this task as it’s running in a sequential order. - -Think about if you would like to run some commands on 1000+ servers what will be the options? - -In this case your script won’t help you. Also, it would take good amount of time to complete a task. - -So, to overcome this kind of issue and situation. We need to run the command in parallel on remote machines. - -For that, we need use in one of the Parallel applications. I hope this explanation might fulfilled your doubts about parallel utilities. - -### What Is ClusterShell? - -clush stands for [ClusterShell][3]. ClusterShell is an event-driven open source Python library, designed to run local or distant commands in parallel on server farms or on large Linux clusters. - -It will take care of common issues encountered on HPC clusters, such as operating on groups of nodes, running distributed commands using optimized execution algorithms, as well as gathering results and merging identical outputs, or retrieving return codes. - -ClusterShell takes advantage of existing remote shell facilities already installed on your systems, like SSH. - -ClusterShell’s primary goal is to improve the administration of high- performance clusters by providing a lightweight but scalable Python API for developers. It also provides clush, clubak and cluset/nodeset, convenient command-line tools that allow traditional shell scripts to benefit from some of the library features. - -ClusterShell’s written in Python and it requires Python (v2.6+ or v3.4+) to run on your system. - -### How To Install ClusterShell On Linux? - -ClusterShell package is available in most of the distribution official package manager. So, use the distribution package manager tool to install it. - -For **`Fedora`** system, use **[DNF Command][4]** to install clustershell. - -``` -$ sudo dnf install clustershell -``` - -Python 2 module and tools are installed and if it’s default on your system then run the following command to install Python 3 development on Fedora System. - -``` -$ sudo dnf install python3-clustershell -``` - -Make sure you should have enabled the **[EPEL repository][5]** on your system before performing clustershell installation. - -For **`RHEL/CentOS`** systems, use **[YUM Command][6]** to install clustershell. - -``` -$ sudo yum install clustershell -``` - -Python 2 module and tools are installed and if it’s default on your system then run the following command to install Python 3 development on CentOS/RHEL System. - -``` -$ sudo yum install python34-clustershell -``` - -For **`openSUSE Leap`** system, use **[Zypper Command][7]** to install clustershell. - -``` -$ sudo zypper install clustershell -``` - -Python 2 module and tools are installed and if it’s default on your system then run the following command to install Python 3 development on OpenSUSE System. - -``` -$ sudo zypper install python3-clustershell -``` - -For **`Debian/Ubuntu`** systems, use **[APT-GET Command][8]** or **[APT Command][9]** to install clustershell. - -``` -$ sudo apt install clustershell -``` - -### How To Install ClusterShell In Linux Using PIP? - -Use PIP to install ClusterShell because it’s written in Python. - -Make sure you should have enabled the **[Python][10]** and **[PIP][11]** on your system before performing clustershell installation. - -``` -$ sudo pip install ClusterShell -``` - -### How To Use ClusterShell On Linux? - -It’s straight forward and awesome tool compared with other utilities such as pssh and dsh. It has so many options to perform the remote execution in parallel. - -Make sure you should have enabled the **[password less login][12]** on your system before start using clustershell. - -The following configuration file defines system-wide default values. You no need to modify anything here. - -``` -$ cat /etc/clustershell/clush.conf -``` - -If you would like to create a servers group. Here you can go. By default some examples were available so, do the same for your requirements. - -``` -$ cat /etc/clustershell/groups.d/local.cfg -``` - -Just run the clustershell command in the following format to get the information from the given nodes. - -``` -$ clush -w 192.168.1.4,192.168.1.9 cat /proc/version -192.168.1.9: Linux version 4.15.0-45-generic ([email protected]) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 -192.168.1.4: Linux version 3.10.0-957.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018 -``` - -**Option:** - - * **`-w:`** nodes where to run the command. - - - -You can use the regular expressions instead of using full hostname and IPs. - -``` -$ clush -w 192.168.1.[4,9] uname -r -192.168.1.9: 4.15.0-45-generic -192.168.1.4: 3.10.0-957.el7.x86_64 -``` - -Alternatively you can use the following format if you have the servers in the same IP series. - -``` -$ clush -w 192.168.1.[4-9] date -192.168.1.6: Mon Mar 4 21:08:29 IST 2019 -192.168.1.7: Mon Mar 4 21:08:29 IST 2019 -192.168.1.8: Mon Mar 4 21:08:29 IST 2019 -192.168.1.5: Mon Mar 4 09:16:30 CST 2019 -192.168.1.9: Mon Mar 4 21:08:29 IST 2019 -192.168.1.4: Mon Mar 4 09:16:30 CST 2019 -``` - -clustershell allow us to run the command in batch mode. Use the following format to achieve this. - -``` -$ clush -w 192.168.1.4,192.168.1.9 -b -Enter 'quit' to leave this interactive mode -Working with nodes: 192.168.1.[4,9] -clush> hostnamectl ---------------- -192.168.1.4 ---------------- - Static hostname: CentOS7.2daygeek.com - Icon name: computer-vm - Chassis: vm - Machine ID: 002f47b82af248f5be1d67b67e03514c - Boot ID: f9b37a073c534dec8b236885e754cb56 - Virtualization: kvm - Operating System: CentOS Linux 7 (Core) - CPE OS Name: cpe:/o:centos:centos:7 - Kernel: Linux 3.10.0-957.el7.x86_64 - Architecture: x86-64 ---------------- -192.168.1.9 ---------------- - Static hostname: Ubuntu18 - Icon name: computer-vm - Chassis: vm - Machine ID: 27f6c2febda84dc881f28fd145077187 - Boot ID: f176f2eb45524d4f906d12e2b5716649 - Virtualization: oracle - Operating System: Ubuntu 18.04.2 LTS - Kernel: Linux 4.15.0-45-generic - Architecture: x86-64 -clush> free -m ---------------- -192.168.1.4 ---------------- - total used free shared buff/cache available -Mem: 1838 641 217 19 978 969 -Swap: 2047 0 2047 ---------------- -192.168.1.9 ---------------- - total used free shared buff/cache available -Mem: 1993 352 1067 1 573 1473 -Swap: 1425 0 1425 -clush> w ---------------- -192.168.1.4 ---------------- - 09:21:14 up 3:21, 3 users, load average: 0.00, 0.01, 0.05 -USER TTY FROM [email protected] IDLE JCPU PCPU WHAT -daygeek :0 :0 06:02 ?xdm? 1:28 0.30s /usr/libexec/gnome-session-binary --session gnome-classic -daygeek pts/0 :0 06:03 3:17m 0.06s 0.06s bash -daygeek pts/1 192.168.1.6 06:03 52:26 0.10s 0.10s -bash ---------------- -192.168.1.9 ---------------- - 21:13:12 up 3:12, 1 user, load average: 0.08, 0.03, 0.00 -USER TTY FROM [email protected] IDLE JCPU PCPU WHAT -daygeek pts/0 192.168.1.6 20:42 29:41 0.05s 0.05s -bash -clush> quit -``` - -If you would like to run the command on a group of nodes then use the following format. - -``` -$ clush -w @dev uptime -or -$ clush -g dev uptime -or -$ clush --group=dev uptime - -192.168.1.9: 21:10:10 up 3:09, 1 user, load average: 0.09, 0.03, 0.01 -192.168.1.4: 09:18:12 up 3:18, 3 users, load average: 0.01, 0.02, 0.05 -``` - -If you would like to run the command on more than one group of nodes then use the following format. - -``` -$ clush -w @dev,@uat uptime -or -$ clush -g dev,uat uptime -or -$ clush --group=dev,uat uptime - -192.168.1.7: 07:57:19 up 59 min, 1 user, load average: 0.08, 0.03, 0.00 -192.168.1.9: 20:27:20 up 1:00, 1 user, load average: 0.00, 0.00, 0.00 -192.168.1.5: 08:57:21 up 59 min, 1 user, load average: 0.00, 0.01, 0.05 -``` - -clustershell allow us to copy a file to remote machines. To copy local file or directory to the remote nodes in the same location. - -``` -$ clush -w 192.168.1.[4,9] --copy /home/daygeek/passwd-up.sh -``` - -We can verify the same by running the following command. - -``` -$ clush -w 192.168.1.[4,9] ls -lh /home/daygeek/passwd-up.sh -192.168.1.4: -rwxr-xr-x. 1 daygeek daygeek 159 Mar 4 09:00 /home/daygeek/passwd-up.sh -192.168.1.9: -rwxr-xr-x 1 daygeek daygeek 159 Mar 4 20:52 /home/daygeek/passwd-up.sh -``` - -To copy local file or directory to the remote nodes in the different location. - -``` -$ clush -g uat --copy /home/daygeek/passwd-up.sh --dest /tmp -``` - -We can verify the same by running the following command. - -``` -$ clush --group=uat ls -lh /tmp/passwd-up.sh -192.168.1.7: -rwxr-xr-x. 1 daygeek daygeek 159 Mar 6 07:44 /tmp/passwd-up.sh -``` - -To copy file or directory from remote nodes to local system. - -``` -$ clush -w 192.168.1.7 --rcopy /home/daygeek/Documents/magi.txt --dest /tmp -``` - -We can verify the same by running the following command. - -``` -$ ls -lh /tmp/magi.txt.192.168.1.7 --rw-r--r-- 1 daygeek daygeek 35 Mar 6 20:24 /tmp/magi.txt.192.168.1.7 -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/clustershell-clush-run-commands-on-cluster-nodes-remote-system-in-parallel-linux/ - -作者:[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/pssh-parallel-ssh-run-execute-commands-on-multiple-linux-servers/ -[2]: https://www.2daygeek.com/dsh-run-execute-shell-commands-on-multiple-linux-servers-at-once/ -[3]: https://cea-hpc.github.io/clustershell/ -[4]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/ -[5]: https://www.2daygeek.com/install-enable-epel-repository-on-rhel-centos-scientific-linux-oracle-linux/ -[6]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/ -[7]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/ -[8]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ -[9]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ -[10]: https://www.2daygeek.com/3-methods-to-install-latest-python3-package-on-centos-6-system/ -[11]: https://www.2daygeek.com/install-pip-manage-python-packages-linux/ -[12]: https://www.2daygeek.com/linux-passwordless-ssh-login-using-ssh-keygen/ diff --git a/translated/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md b/translated/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md new file mode 100644 index 0000000000..981f045fa8 --- /dev/null +++ b/translated/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md @@ -0,0 +1,293 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (ClusterShell – A Nifty Tool To Run Commands On Cluster Nodes In Parallel) +[#]: via: (https://www.2daygeek.com/clustershell-clush-run-commands-on-cluster-nodes-remote-system-in-parallel-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +ClusterShell:一个在集群节点上并行运行命令的好工具 +====== + +我们过去曾写过两篇如何并行地在多个远程服务器上运行命令的文章:[并行 SSH(PSSH)][1] 和[分布式 Shell(DSH)][2]。今天,我们将讨论相同类型的主题,但它允许我们在集群节点上执行相同的操作。你可能会想,我可以编写一个小的 shell 脚本来实现这个目的,而不是安装这些第三方软件包。 + +当然,你是对的,如果要在十几个远程系统中运行一些命令,那么你不需要使用它。但是,你的脚本需要一些时间来完成此任务,因为它是按顺序运行的。想想你要是在一千多台服务器上运行一些命令会是什么样子?在这种情况下,你的脚本用处不大。此外,完成任务需要很长时间。所以,要克服这种问题和情况,我们需要可以在远程计算机上并行运行命令。 + +为此,我们需要在一个并行应用程序中使用它。我希望这个解释可以解决你对并行实用程序的疑虑。 + +### ClusterShell + +[ClusterShell][3] 是一个事件驱动的开源 Python 库,旨在在服务器场或大型 Linux 集群上并行运行本地或远程命令。(`clush` 即 [ClusterShell][3])。 + +它将处理在 HPC 集群上遇到的常见问题,例如在节点组上操作,使用优化过的执行算法运行分布式命令,以及收集结果和合并相同的输出,或检索返回代码。 + +ClusterShell 可以利用已安装在系统上的现有远程 shell 设施,如 SSH。 + +ClusterShell 的主要目标是通过为开发人员提供轻量级、但可扩展的 Python API 来改进高性能集群的管理。它还提供了 `clush`、`clubak` 和 `cluset`/`nodeset` 等方便的命令行工具,可以让传统的 shell 脚本利用这个库的一些功能。 + +ClusterShell 是用 Python 编写的,它需要 Python(v2.6+ 或 v3.4+)才能在你的系统上运行。 + +### 如何在 Linux 上安装 ClusterShell? + +ClusterShell 包在大多数发行版的官方包管理器中都可用。因此,使用发行版包管理器工具进行安装。 + +对于 Fedora 系统,使用 [DNF 命令][4]来安装 clustershell。 + +``` +$ sudo dnf install clustershell +``` + +如果系统默认是 Python 2,这会安装 Python 2 模块和工具,可以运行以下命令安装 Python 3 开发包。 + +``` +$ sudo dnf install python3-clustershell +``` + +在执行 clustershell 安装之前,请确保你已在系统上启用 [EPEL 存储库][5]。 + +对于 RHEL/CentOS 系统,使用 [YUM 命令][6] 来安装 clustershell。 + +``` +$ sudo yum install clustershell +``` + +如果系统默认是 Python 2,这会安装 Python 2 模块和工具,可以运行以下命令安装 Python 3 开发包。 + +``` +$ sudo yum install python34-clustershell +``` + +对于 openSUSE Leap 系统,使用 [Zypper 命令][7] 来安装 clustershell。 + +``` +$ sudo zypper install clustershell +``` + +如果系统默认是 Python 2,这会安装 Python 2 模块和工具,可以运行以下命令安装 Python 3 开发包。 + +``` +$ sudo zypper install python3-clustershell +``` + +对于 Debian/Ubuntu 系统,使用 [APT-GET 命令][8] 或 [APT 命令][9] 来安装 clustershell。 + +``` +$ sudo apt install clustershell +``` + +### 如何在 Linux 使用 PIP 安装 ClusterShell? + +可以使用 PIP 安装 ClusterShell,因为它是用 Python 编写的。 + +在执行 clustershell 安装之前,请确保你已在系统上启用了 [Python][10] 和 [PIP][11]。 + +``` +$ sudo pip install ClusterShell +``` + +### 如何在 Linux 上使用 ClusterShell? + +与其他实用程序(如 `pssh` 和 `dsh`)相比,它是直接了当的优秀工具。它有很多选项可以在远程并行执行。 + +在开始使用 clustershell 之前,请确保你已启用系统上的[无密码登录][12]。 + +以下配置文件定义了系统范围的默认值。你不需要修改这里的任何东西。 + +``` +$ cat /etc/clustershell/clush.conf +``` + +如果你想要创建一个服务器组,那也可以。默认情况下有一些示例,请根据你的要求执行相同操作。 + +``` +$ cat /etc/clustershell/groups.d/local.cfg +``` + +只需按以下列格式运行 clustershell 命令即可从给定节点获取信息: + +``` +$ clush -w 192.168.1.4,192.168.1.9 cat /proc/version +192.168.1.9: Linux version 4.15.0-45-generic ([email protected]) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 +192.168.1.4: Linux version 3.10.0-957.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018 +``` + +选项: + + * `-w:` 你要运行该命令的节点。 + +你可以使用正则表达式而不是使用完整主机名和 IP: + +``` +$ clush -w 192.168.1.[4,9] uname -r +192.168.1.9: 4.15.0-45-generic +192.168.1.4: 3.10.0-957.el7.x86_64 +``` + +或者,如果服务器位于同一 IP 系列中,则可以使用以下格式: + +``` +$ clush -w 192.168.1.[4-9] date +192.168.1.6: Mon Mar 4 21:08:29 IST 2019 +192.168.1.7: Mon Mar 4 21:08:29 IST 2019 +192.168.1.8: Mon Mar 4 21:08:29 IST 2019 +192.168.1.5: Mon Mar 4 09:16:30 CST 2019 +192.168.1.9: Mon Mar 4 21:08:29 IST 2019 +192.168.1.4: Mon Mar 4 09:16:30 CST 2019 +``` + +clustershell 允许我们以批处理模式运行命令。使用以下格式来实现此目的: + +``` +$ clush -w 192.168.1.4,192.168.1.9 -b +Enter 'quit' to leave this interactive mode +Working with nodes: 192.168.1.[4,9] +clush> hostnamectl +--------------- +192.168.1.4 +--------------- + Static hostname: CentOS7.2daygeek.com + Icon name: computer-vm + Chassis: vm + Machine ID: 002f47b82af248f5be1d67b67e03514c + Boot ID: f9b37a073c534dec8b236885e754cb56 + Virtualization: kvm + Operating System: CentOS Linux 7 (Core) + CPE OS Name: cpe:/o:centos:centos:7 + Kernel: Linux 3.10.0-957.el7.x86_64 + Architecture: x86-64 +--------------- +192.168.1.9 +--------------- + Static hostname: Ubuntu18 + Icon name: computer-vm + Chassis: vm + Machine ID: 27f6c2febda84dc881f28fd145077187 + Boot ID: f176f2eb45524d4f906d12e2b5716649 + Virtualization: oracle + Operating System: Ubuntu 18.04.2 LTS + Kernel: Linux 4.15.0-45-generic + Architecture: x86-64 +clush> free -m +--------------- +192.168.1.4 +--------------- + total used free shared buff/cache available +Mem: 1838 641 217 19 978 969 +Swap: 2047 0 2047 +--------------- +192.168.1.9 +--------------- + total used free shared buff/cache available +Mem: 1993 352 1067 1 573 1473 +Swap: 1425 0 1425 +clush> w +--------------- +192.168.1.4 +--------------- + 09:21:14 up 3:21, 3 users, load average: 0.00, 0.01, 0.05 +USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT +daygeek :0 :0 06:02 ?xdm? 1:28 0.30s /usr/libexec/gnome-session-binary --session gnome-classic +daygeek pts/0 :0 06:03 3:17m 0.06s 0.06s bash +daygeek pts/1 192.168.1.6 06:03 52:26 0.10s 0.10s -bash +--------------- +192.168.1.9 +--------------- + 21:13:12 up 3:12, 1 user, load average: 0.08, 0.03, 0.00 +USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT +daygeek pts/0 192.168.1.6 20:42 29:41 0.05s 0.05s -bash +clush> quit +``` + +如果要在一组节点上运行该命令,请使用以下格式: + +``` +$ clush -w @dev uptime +or +$ clush -g dev uptime +or +$ clush --group=dev uptime + +192.168.1.9: 21:10:10 up 3:09, 1 user, load average: 0.09, 0.03, 0.01 +192.168.1.4: 09:18:12 up 3:18, 3 users, load average: 0.01, 0.02, 0.05 +``` + +如果要在多个节点组上运行该命令,请使用以下格式: + +``` +$ clush -w @dev,@uat uptime +or +$ clush -g dev,uat uptime +or +$ clush --group=dev,uat uptime + +192.168.1.7: 07:57:19 up 59 min, 1 user, load average: 0.08, 0.03, 0.00 +192.168.1.9: 20:27:20 up 1:00, 1 user, load average: 0.00, 0.00, 0.00 +192.168.1.5: 08:57:21 up 59 min, 1 user, load average: 0.00, 0.01, 0.05 +``` + +clustershell 允许我们将文件复制到远程计算机。将本地文件或目录复制到同一个远程节点: + +``` +$ clush -w 192.168.1.[4,9] --copy /home/daygeek/passwd-up.sh +``` + +我们可以通过运行以下命令来验证它: + +``` +$ clush -w 192.168.1.[4,9] ls -lh /home/daygeek/passwd-up.sh +192.168.1.4: -rwxr-xr-x. 1 daygeek daygeek 159 Mar 4 09:00 /home/daygeek/passwd-up.sh +192.168.1.9: -rwxr-xr-x 1 daygeek daygeek 159 Mar 4 20:52 /home/daygeek/passwd-up.sh +``` + +将本地文件或目录复制到不同位置的远程节点: + +``` +$ clush -g uat --copy /home/daygeek/passwd-up.sh --dest /tmp +``` + +我们可以通过运行以下命令来验证它: + +``` +$ clush --group=uat ls -lh /tmp/passwd-up.sh +192.168.1.7: -rwxr-xr-x. 1 daygeek daygeek 159 Mar 6 07:44 /tmp/passwd-up.sh +``` + +将文件或目录从远程节点复制到本地系统: + +``` +$ clush -w 192.168.1.7 --rcopy /home/daygeek/Documents/magi.txt --dest /tmp +``` + +我们可以通过运行以下命令来验证它: + +``` +$ ls -lh /tmp/magi.txt.192.168.1.7 +-rw-r--r-- 1 daygeek daygeek 35 Mar 6 20:24 /tmp/magi.txt.192.168.1.7 +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/clustershell-clush-run-commands-on-cluster-nodes-remote-system-in-parallel-linux/ + +作者:[Magesh Maruthamuthu][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://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/pssh-parallel-ssh-run-execute-commands-on-multiple-linux-servers/ +[2]: https://www.2daygeek.com/dsh-run-execute-shell-commands-on-multiple-linux-servers-at-once/ +[3]: https://cea-hpc.github.io/clustershell/ +[4]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/ +[5]: https://www.2daygeek.com/install-enable-epel-repository-on-rhel-centos-scientific-linux-oracle-linux/ +[6]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/ +[7]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/ +[8]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ +[9]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ +[10]: https://www.2daygeek.com/3-methods-to-install-latest-python3-package-on-centos-6-system/ +[11]: https://www.2daygeek.com/install-pip-manage-python-packages-linux/ +[12]: https://www.2daygeek.com/linux-passwordless-ssh-login-using-ssh-keygen/ From 6e2b66db17499acf8da0c714e557eb6515bb45a0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 26 Jul 2019 05:32:44 +0800 Subject: [PATCH 132/951] PUB @wxy https://linux.cn/article-11147-1.html --- ...fty Tool To Run Commands On Cluster Nodes In Parallel.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md (98%) diff --git a/translated/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md b/published/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md similarity index 98% rename from translated/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md rename to published/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md index 981f045fa8..ed9c481007 100644 --- a/translated/tech/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md +++ b/published/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11147-1.html) [#]: subject: (ClusterShell – A Nifty Tool To Run Commands On Cluster Nodes In Parallel) [#]: via: (https://www.2daygeek.com/clustershell-clush-run-commands-on-cluster-nodes-remote-system-in-parallel-linux/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) @@ -10,6 +10,8 @@ ClusterShell:一个在集群节点上并行运行命令的好工具 ====== +![](https://img.linux.net.cn/data/attachment/album/201907/26/053202pgcgg1y1rc5l5mgg.jpg) + 我们过去曾写过两篇如何并行地在多个远程服务器上运行命令的文章:[并行 SSH(PSSH)][1] 和[分布式 Shell(DSH)][2]。今天,我们将讨论相同类型的主题,但它允许我们在集群节点上执行相同的操作。你可能会想,我可以编写一个小的 shell 脚本来实现这个目的,而不是安装这些第三方软件包。 当然,你是对的,如果要在十几个远程系统中运行一些命令,那么你不需要使用它。但是,你的脚本需要一些时间来完成此任务,因为它是按顺序运行的。想想你要是在一千多台服务器上运行一些命令会是什么样子?在这种情况下,你的脚本用处不大。此外,完成任务需要很长时间。所以,要克服这种问题和情况,我们需要可以在远程计算机上并行运行命令。 From 7d8b897a52b5cef3f8a99fa54d7717c30f1360e3 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 26 Jul 2019 05:41:08 +0800 Subject: [PATCH 133/951] Rename sources/tech/20190725 How to transition into a career as a DevOps engineer.md to sources/talk/20190725 How to transition into a career as a DevOps engineer.md --- ...190725 How to transition into a career as a DevOps engineer.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190725 How to transition into a career as a DevOps engineer.md (100%) diff --git a/sources/tech/20190725 How to transition into a career as a DevOps engineer.md b/sources/talk/20190725 How to transition into a career as a DevOps engineer.md similarity index 100% rename from sources/tech/20190725 How to transition into a career as a DevOps engineer.md rename to sources/talk/20190725 How to transition into a career as a DevOps engineer.md From fc71ff6ae1cd0e2b83292c14f12ad5667e279807 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 26 Jul 2019 06:03:08 +0800 Subject: [PATCH 134/951] PRF @0x996 --- ...20190717 Mastering user groups on Linux.md | 68 +++++++++---------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/translated/tech/20190717 Mastering user groups on Linux.md b/translated/tech/20190717 Mastering user groups on Linux.md index 6595649ea7..5c9e00a5c8 100644 --- a/translated/tech/20190717 Mastering user groups on Linux.md +++ b/translated/tech/20190717 Mastering user groups on Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (0x996) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Mastering user groups on Linux) @@ -9,18 +9,18 @@ 掌握 Linux 用户组 ====== -在 Linux 系统中管理用户组并不费力,但相关命令可能比你所知的更为灵活。 + +> 在 Linux 系统中管理用户组并不费力,但相关命令可能比你所知的更为灵活。 + ![Scott 97006 \(CC BY 2.0\)][1] 在 Linux 系统中用户组起着重要作用。用户组提供了一种简单方法供一组用户互相共享文件。用户组也允许系统管理员更加有效地管理用户权限,因为管理员可以将权限分配给用户组而不是逐一分配给单个用户。 尽管通常只要在系统中添加用户账户就会创建用户组,关于用户组如何工作以及如何运用用户组还有很多需要了解的。 -**[ 两分钟 Linux 技巧:[ 观看这些 2 分钟视频学习如何精通一大批 Linux 命令 ][2] ]** +### 一个用户一个用户组? -### 一个用户,一个用户组? - -Linux 系统中多数用户账户被设为用户名与用户组名相同。用户 "jdoe" 会被赋予一个名为 "jdoe" 的用户组,且成为该新建用户组的唯一成员。如本例所示,该用户的登录名,用户 id 和用户组 id 在新建账户时会被添加到 **/etc/passwd** 和 **/etc/group** 文件中: +Linux 系统中多数用户账户被设为用户名与用户组名相同。用户 `jdoe` 会被赋予一个名为 `jdoe` 的用户组,且成为该新建用户组的唯一成员。如本例所示,该用户的登录名,用户 id 和用户组 id 在新建账户时会被添加到 `/etc/passwd` 和 `/etc/group` 文件中: ``` $ sudo useradd jdoe @@ -30,15 +30,15 @@ $ grep jdoe /etc/group jdoe:x:1066: ``` -这些文件中的配置使系统得以在文本(jdoe)和数字(1066)这两种用户 id 形式之间互相转换—— jdoe 就是 1006,且 1006 就是 jdoe。 +这些文件中的配置使系统得以在文本(`jdoe`)和数字(`1066`)这两种用户 id 形式之间互相转换—— `jdoe` 就是 `1006`,且 `1006` 就是 `jdoe`。 -分配给每个用户的 UID(用户 id)和 GID(用户组 id)通常是一样的并且顺序递增。若上例中 Jane Doe 是最近添加的用户,分配给下一个新用户的用户 id 和用户组 id 很可能都是 1067。 +分配给每个用户的 UID(用户 id)和 GID(用户组 id)通常是一样的,并且顺序递增。若上例中 Jane Doe 是最近添加的用户,分配给下一个新用户的用户 id 和用户组 id 很可能都是 1067。 ### GID = UID? -UID 和 GID 可能不一致。例如,如果你用 **groupadd** 命令添加一个用户组而不指定用户组 id,系统会分配下一个可用的用户组 id(在本例中为 1067)。下一个添加到系统中的用户其 UID 会是 1067 而 GID 则为 1068。 +UID 和 GID 可能不一致。例如,如果你用 `groupadd` 命令添加一个用户组而不指定用户组 id,系统会分配下一个可用的用户组 id(在本例中为 1067)。下一个添加到系统中的用户其 UID 会是 1067 而 GID 则为 1068。 -你可以避免这个问题,方法是添加用户组的时候指定一个较小的用户组 id 而不是接受默认值。在下面的命令中我们添加一个用户组并提供一个 GID,这个 GID 小于应用于用户账户的 GID 取值范围。 +你可以避免这个问题,方法是添加用户组的时候指定一个较小的用户组 id 而不是接受默认值。在下面的命令中我们添加一个用户组并提供一个 GID,这个 GID 小于用于用户账户的 GID 取值范围。 ``` $ sudo groupadd -g 500 devops @@ -52,11 +52,11 @@ $ grep bennyg /etc/passwd bennyg:x:1064:50::/home/bennyg:/bin/sh ``` -### 主要用户组primary group次要用户组secondary group +### 主要用户组和次要用户组 -用户组实际上有两种——主要用户组和次要用户组 +用户组实际上有两种:主要用户组primary group次要用户组secondary group。 -**主要用户组**是保存在 /etc/passwd 文件中的用户组,该用户组在账户创建时配置。当用户创建一个文件,用户的主要用户组与此文件关联。 +主要用户组是保存在 `/etc/passwd` 文件中的用户组,该用户组在账户创建时配置。当用户创建一个文件时,用户的主要用户组与此文件关联。 ``` $ whoami @@ -74,7 +74,7 @@ $ ls -l newfile +-------- 主要用户组 ``` -用户一旦拥有账户之后被加入的那些用户组是**次要用户组**。次要用户组成员关系在 /etc/group 文件中显示。 +用户一旦拥有账户之后被加入的那些用户组是次要用户组。次要用户组成员关系在 `/etc/group` 文件中显示。 ``` $ grep devops /etc/group @@ -84,15 +84,15 @@ devops:x:500:shs,jadep +-------- shs 和 jadep 的次要用户组 ``` -**/etc/group** 文件给用户组分配组名称(例如 500 = devops)并记录次要用户组成员。 +`/etc/group` 文件给用户组分配组名称(例如 `500` = `devops`)并记录次要用户组成员。 ### 首选的准则 -每个用户是他自己的主要用户组成员并可以成为任意多个次要用户组成员这样一种准则允许用户更加容易地将个人文件和需要与同事分享的文件分开。当用户创建一个文件时,用户所属的不同用户组的成员不一定有访问权限。用户必须用 **chgrp** 命令将文件和次要用户组关联起来。 +每个用户是他自己的主要用户组成员,并可以成为任意多个次要用户组成员,这样的一种准则允许用户更加容易地将个人文件和需要与同事分享的文件分开。当用户创建一个文件时,用户所属的不同用户组的成员不一定有访问权限。用户必须用 `chgrp` 命令将文件和次要用户组关联起来。 -### 哪里也不如自己的家目录/home +### 哪里也不如自己的家目录 -添加新账户时一个重要的细节是 **useradd** 命令并不一定为新用户添加一个家目录。若你只有某些时候想为用户添加家目录,你可以在 useradd 命令中加入 **-m**选项(可以把它想象成“安家”选项) +添加新账户时一个重要的细节是 `useradd` 命令并不一定为新用户添加一个家目录/home家目录。若你只有某些时候想为用户添加家目录,你可以在 `useradd` 命令中加入 `-m` 选项(可以把它想象成“安家”选项)。 ``` $ sudo useradd -m -g devops -c "John Doe" jdoe2 @@ -100,30 +100,28 @@ $ sudo useradd -m -g devops -c "John Doe" jdoe2 此命令中的选项如下: -* **-m** 创建家目录并在其中生成初始文件 -* **-g** 指定用户归属的用户组 -* **-c** 添加账户描述信息(通常是用户的姓名) +* `-m` 创建家目录并在其中生成初始文件 +* `-g` 指定用户归属的用户组 +* `-c` 添加账户描述信息(通常是用户的姓名) - - -若你希望总是创建家目录,你可以编辑 **/etc/login.defs** 文件来更改默认工作方式。更改或添加 CREATE_HOME 变量并将其设置为 "yes": +若你希望总是创建家目录,你可以编辑 `/etc/login.defs` 文件来更改默认工作方式。更改或添加 `CREATE_HOME` 变量并将其设置为 `yes`: ``` $ grep CREATE_HOME /etc/login.defs CREATE_HOME yes ``` -另一种方法是用自己的账户设置别名从而让 **useradd** 一直带有 -m 选项。 +另一种方法是用自己的账户设置别名从而让 `useradd` 一直带有 `-m` 选项。 ``` $ alias useradd=’useradd -m’ ``` -确保将该别名添加到你的 ~/.bashrc 文件或类似的启动文件中以使其永久生效。 +确保将该别名添加到你的 `~/.bashrc` 文件或类似的启动文件中以使其永久生效。 ### 深入了解 /etc/login.defs -下面这个命令可列出 /etc/login.defs 文件中的全部设置。**grep**命令会隐藏所有注释和空行。 +下面这个命令可列出 `/etc/login.defs` 文件中的全部设置。下面的 `grep` 命令会隐藏所有注释和空行。 ``` $ cat /etc/login.defs | grep -v "^#" | grep -v "^$" @@ -163,14 +161,14 @@ ENCRYPT_METHOD SHA512 ### 如何显示用户所属的用户组 -出于各种原因用户可能是多个用户组的成员。用户组成员身份给与用户对用户组拥有的文件和目录的访问权限,有时候这种工作方式是至关重要的。要生成某个用户所属用户组的清单,用 **groups** 命令即可。 +出于各种原因用户可能是多个用户组的成员。用户组成员身份给与用户对用户组拥有的文件和目录的访问权限,有时候这种工作方式是至关重要的。要生成某个用户所属用户组的清单,用 `groups` 命令即可。 ``` $ groups jdoe jdoe : jdoe adm admin cdrom sudo dip plugdev lpadmin staff sambashare ``` -你可以键入不带任何参数的“groups”来列出你自己的用户组。 +你可以键入不带任何参数的 `groups` 命令来列出你自己的用户组。 ### 如何添加用户至用户组 @@ -186,9 +184,9 @@ $ sudo usermod -a -G devops jdoe $ sudo usermod -a -G devops,mgrs jdoe ``` -参数 **-a** 意思是“添加”,**-G** 指定用户组列表 +参数 `-a` 意思是“添加”,`-G` 指定用户组列表。 -你可以编辑 **/etc/group** 文件将用户名从用户组成员名单中删除,从而将用户从用户组中移除。usermod 命令或许也有个选项用于从用户组中删除某个成员。 +你可以编辑 `/etc/group` 文件将用户名从用户组成员名单中删除,从而将用户从用户组中移除。`usermod` 命令或许也有个选项用于从用户组中删除某个成员。 ``` fish:x:16:nemo,dory,shark @@ -201,18 +199,14 @@ fish:x:16:nemo,dory 添加和管理用户组并非特别困难,但长远来看配置账户时的一致性可使这项工作更容易些。 -**[ 延伸阅读:[必会的 Linux 命令][3] ]** - -加入 Network World 的 [Facebook][4] 和 [LinkedIn][5] 社区,对最重要的话题发表你的评论。 - -------------------------------------------------------------------------------- via: https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html 作者:[Sandra Henry-Stocker][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/0x996) -校对:[校对者ID](https://github.com/校对者ID) +译者:[0x996](https://github.com/0x996) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5958054b860305900a25b55dac3b5ae7c5e86c39 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 26 Jul 2019 06:03:40 +0800 Subject: [PATCH 135/951] PUB @0x996 https://linux.cn/article-11148-1.html --- .../20190717 Mastering user groups on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190717 Mastering user groups on Linux.md (99%) diff --git a/translated/tech/20190717 Mastering user groups on Linux.md b/published/20190717 Mastering user groups on Linux.md similarity index 99% rename from translated/tech/20190717 Mastering user groups on Linux.md rename to published/20190717 Mastering user groups on Linux.md index 5c9e00a5c8..99c57b5d45 100644 --- a/translated/tech/20190717 Mastering user groups on Linux.md +++ b/published/20190717 Mastering user groups on Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (0x996) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11148-1.html) [#]: subject: (Mastering user groups on Linux) [#]: via: (https://www.networkworld.com/article/3409781/mastering-user-groups-on-linux.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) From 4ec0c115f4a42fcb8ab587b909e22f4097192ef1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 26 Jul 2019 06:15:36 +0800 Subject: [PATCH 136/951] PRF @geekpi --- ...Ethernet for easier networking mobility.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md index 797a9abe8b..5a93634530 100644 --- a/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md +++ b/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md @@ -1,28 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Bond WiFi and Ethernet for easier networking mobility) [#]: via: (https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/) [#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) -绑定 WiFi 和以太网,以便于更轻松的网络移动 +绑定 WiFi 和以太网,以使网络间移动更轻松 ====== ![][1] -有时一个网络接口是不够的。网络绑定允许将多条网络连接与单个逻辑接口一起工作。你可能因为需要单条连接更多的带宽而需要这么做。或者你可能希望在有线和无线网络之间来回切换而不会丢失网络连接。 +有时一个网络接口是不够的。网络绑定允许将多条网络连接与单个逻辑接口一起工作。你可能因为需要给单条连接更多的带宽而这么做,或者你可能希望在有线和无线网络之间来回切换而不会丢失网络连接。 -我是后面一种情况。在家工作的好处之一是,当天气晴朗时,在阳光明媚的阳台而不是在室内工作是很愉快的。但每当我这样做时,我都会失去网络连接。 IRC、SSH、VPN,一切都断开了,客户端重连至少需要一会。本文介绍了如何在 Fedora 30 笔记本上设置网络绑定,以便从笔记本扩展坞的有线连接无缝切换到 WiFi。 +我是后面一种情况。在家工作的好处之一是,当天气晴朗时,在阳光明媚的阳台而不是在室内工作是很愉快的。但每当我这样做时,我都会失去网络连接。IRC、SSH、VPN,一切都断开了,客户端重连至少需要一会。本文介绍了如何在 Fedora 30 笔记本上设置网络绑定,以便从笔记本扩展坞的有线连接无缝切换到 WiFi。 -在 Linux 中,接口绑定由绑定内核模块处理。默认情况下,Fedora 没有启用此功能,但它包含在 kernel-core 软件包中。这意味着启用接口绑定只需一个命令: +在 Linux 中,接口绑定由内核模块 `bonding` 处理。默认情况下,Fedora 没有启用此功能,但它包含在 `kernel-core` 软件包中。这意味着启用接口绑定只需一个命令: ``` sudo modprobe bonding ``` -请注意,这只会在你重启之前生效。要永久启用接口绑定,请在 _/etc/modules-load.d_ 目录中创建一个名为 _bonding.conf_ 的文件,该文件仅包含单词 “bonding”。 +请注意,这只会在你重启之前生效。要永久启用接口绑定,请在 `/etc/modules-load.d` 目录中创建一个名为 `bonding.conf` 的文件,该文件仅包含单词 `bonding`。 现在你已启用绑定,现在可以创建绑定接口了。首先,你必须获取要绑定的接口的名称。要列出可用的接口,请运行: @@ -44,7 +44,7 @@ lo loopback unmanaged -- virbr0-nic tun unmanaged -- ``` -在本例中,有两个(有线)以太网接口可用。 _enp12s0u1_ 在笔记本电脑扩展坞上,你可以通过 _STATE_ 列知道它已连接。另一个是 _enp0s31f6_,是笔记本电脑中的内置端口。还有一个名为 _wlp2s0_ 的 WiFi 连接。 _enp12s0u1_ 和 _wlp2s0_ 是我们在这里感兴趣的两个接口。(请注意,本文无需了解网络设备的命名方式,但如果你感兴趣,可以查看 [systemd.net-naming-scheme 手册页][2]。) +在本例中,有两个(有线)以太网接口可用。 `enp12s0u1` 在笔记本电脑扩展坞上,你可以通过 `STATE` 列知道它已连接。另一个是 `enp0s31f6`,是笔记本电脑中的内置端口。还有一个名为 `wlp2s0` 的 WiFi 连接。 `enp12s0u1` 和 `wlp2s0` 是我们在这里感兴趣的两个接口。(请注意,阅读本文无需了解网络设备的命名方式,但如果你感兴趣,可以查看 [systemd.net-naming-scheme 手册页][2]。) 第一步是创建绑定接口: @@ -52,7 +52,7 @@ virbr0-nic tun unmanaged -- sudo nmcli connection add type bond ifname bond0 con-name bond0 ``` -在此示例中,绑定接口名为 _bond0_。 “_con-name bond0_” 将连接名称设置为 _bond0_。直接这样会有一个名为 _bond-bond0_ 的连接。你还可以将连接名设置得更加人性化,例如 “Docking station bond” 或 “Ben” +在此示例中,绑定接口名为 `bond0`。`con-name bond0` 将连接名称设置为 `bond0`。直接这样做会有一个名为 `bond-bond0` 的连接。你还可以将连接名设置得更加人性化,例如 “Docking station bond” 或 “Ben”。 下一步是将接口添加到绑定接口: @@ -61,14 +61,14 @@ sudo nmcli connection add type ethernet ifname enp12s0u1 master bond0 con-name b sudo nmcli connection add type wifi ifname wlp2s0 master bond0 ssid Cotton con-name bond-wifi ``` -如上所示,连接名称被设置为[更具描述性][3]。请务必使用系统上相应的接口名称替换 _enp12s0u1_ 和 _wlp2s0_。对于 WiFi 接口,请使用你自己的网络名称 (SSID)替换我的 “Cotton”。如果你的 WiFi 连接有密码(这当然会有!),你也需要将其添加到配置中。以下假设你使用 [WPA2-PSK][4] 身份验证 +如上所示,连接名称被设置为[更具描述性][3]。请务必使用系统上相应的接口名称替换 `enp12s0u1` 和 `wlp2s0`。对于 WiFi 接口,请使用你自己的网络名称 (SSID)替换我的 “Cotton”。如果你的 WiFi 连接有密码(这当然会有!),你也需要将其添加到配置中。以下假设你使用 [WPA2-PSK][4] 身份验证 ``` sudo nmcli connection modify bond-wifi wifi-sec.key-mgmt wpa-psk sudo nmcli connection edit bond-wif ``` -第二条命令将进入交互式编辑器,你可以在其中输入密码,而无需将其记录在 shell 历史记录中。输入以下内容,将 _password_ 替换为你的实际密码 +第二条命令将进入交互式编辑器,你可以在其中输入密码,而无需将其记录在 shell 历史记录中。输入以下内容,将 `password` 替换为你的实际密码。 ``` set wifi-sec.psk password @@ -76,7 +76,7 @@ save quit ``` -现在,你可以启动你的绑定接口以及你创建的辅助接口 +现在,你可以启动你的绑定接口以及你创建的辅助接口。 ``` sudo nmcli connection up bond0 @@ -98,13 +98,13 @@ sudo nmcli connection down bond0 ### 微调你的绑定 -默认情况下,绑定接口使用“负载平衡(round-robin)”模式。 这会在接口上平均分配负载。 但是,如果你有有线和无线连接,你可能希望更喜欢有线连接。 “active-backup” 模式能实现此功能。 你可以在创建接口时指定模式和主接口,或者之后使用此命令(绑定接口应该关闭): +默认情况下,绑定接口使用“轮询round-robin”模式。这会在接口上平均分配负载。但是,如果你有有线和无线连接,你可能希望更喜欢有线连接。 `active-backup` 模式能实现此功能。你可以在创建接口时指定模式和主接口,或者之后使用此命令(绑定接口应该关闭): ``` sudo nmcli connection modify bond0 +bond.options "mode=active-backup,primary=enp12s0u1" ``` -[kernel 文档][5]提供了有关绑定选项的更多信息。 +[内核文档][5]提供了有关绑定选项的更多信息。 -------------------------------------------------------------------------------- @@ -113,7 +113,7 @@ via: https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mob 作者:[Ben Cotton][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 d47ae26189d1dea62e776eee9b40b6d6d3117ebf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 26 Jul 2019 06:16:09 +0800 Subject: [PATCH 137/951] PUB @geekpi https://linux.cn/article-11149-1.html --- ...7 Bond WiFi and Ethernet for easier networking mobility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190717 Bond WiFi and Ethernet for easier networking mobility.md (98%) diff --git a/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/published/20190717 Bond WiFi and Ethernet for easier networking mobility.md similarity index 98% rename from translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md rename to published/20190717 Bond WiFi and Ethernet for easier networking mobility.md index 5a93634530..b8528ca1dd 100644 --- a/translated/tech/20190717 Bond WiFi and Ethernet for easier networking mobility.md +++ b/published/20190717 Bond WiFi and Ethernet for easier networking mobility.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11149-1.html) [#]: subject: (Bond WiFi and Ethernet for easier networking mobility) [#]: via: (https://fedoramagazine.org/bond-wifi-and-ethernet-for-easier-networking-mobility/) [#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) From 2d2ebb1d5e52269fd0d82948e846e28c126effc4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 26 Jul 2019 09:52:03 +0800 Subject: [PATCH 138/951] translated --- ... run virtual machines with virt-manager.md | 169 ------------------ ... run virtual machines with virt-manager.md | 169 ++++++++++++++++++ 2 files changed, 169 insertions(+), 169 deletions(-) delete mode 100644 sources/tech/20190722 How to run virtual machines with virt-manager.md create mode 100644 translated/tech/20190722 How to run virtual machines with virt-manager.md diff --git a/sources/tech/20190722 How to run virtual machines with virt-manager.md b/sources/tech/20190722 How to run virtual machines with virt-manager.md deleted file mode 100644 index e9b2f14c2c..0000000000 --- a/sources/tech/20190722 How to run virtual machines with virt-manager.md +++ /dev/null @@ -1,169 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to run virtual machines with virt-manager) -[#]: via: (https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/) -[#]: author: (Marco Sarti https://fedoramagazine.org/author/msarti/) - -How to run virtual machines with virt-manager -====== - -![][1] - -In the beginning there was dual boot, it was the only way to have more than one operating system on the same laptop. At the time, it was difficult for these operating systems to be run simultaneously or interact with each other. Many years passed before it was possible, on common PCs, to run an operating system inside another through virtualization. - -Recent PCs or laptops, including moderately-priced ones, have the hardware features to run virtual machines with performance close to the physical host machine. - -Virtualization has therefore become normal, to test operating systems, as a playground for learning new techniques, to create your own home cloud, to create your own test environment and much more. This article walks you through using Virt Manager on Fedora to setup virtual machines. - -### Introducing QEMU/KVM and Libvirt - -Fedora, like all other Linux systems, comes with native support for virtualization extensions. This support is given by KVM (Kernel based Virtual Machine) currently available as a kernel module. - -QEMU is a complete system emulator that works together with KVM and allows you to create virtual machines with hardware and peripherals. - -Finally [libvirt][2] is the API layer that allows you to administer the infrastructure, ie create and run virtual machines. - -The set of these three technologies, all open source, is what we’re going to install on our Fedora Workstation. - -### Installation - -#### Step 1: install packages - -Installation is a fairly simple operation. The Fedora repository provides the “virtualization” package group that contains everything you need. -``` - -``` - -sudo dnf install @virtualization -``` - -``` - -#### Step 2: edit the libvirtd configuration - -By default the system administration is limited to the root user, if you want to enable a regular user you have to proceed as follows. - -Open the /etc/libvirt/libvirtd.conf file for editing -``` - -``` - -sudo vi /etc/libvirt/libvirtd.conf -``` - -``` - -Set the domain socket group ownership to libvirt -``` - -``` - -unix_sock_group = "libvirt" -``` - -``` - -Adjust the UNIX socket permissions for the R/W socket -``` - -``` - -unix_sock_rw_perms = "0770" -``` - -``` - -#### Step 3: start and enable the libvirtd service -``` - -``` - -sudo systemctl start libvirtd -sudo systemctl enable libvirtd -``` - -``` - -#### Step 4: add user to group - -In order to administer libvirt with the regular user you must add the user to the libvirt group, otherwise every time you start virtual-manager you will be asked for the password for sudo. -``` - -``` - -sudo usermod -a -G libvirt $(whoami) -``` - -``` - -This adds the current user to the group. You must log out and log in to apply the changes. - -### Getting started with virt-manager - -The libvirt system can be managed either from the command line (virsh) or via the virt-manager graphical interface. The command line can be very useful if you want to do automated provisioning of virtual machines, for example with [Ansible][3], but in this article we will concentrate on the user-friendly graphical interface. - -The virt-manager interface is simple. The main form shows the list of connections including the local system connection. - -The connection settings include virtual networks and storage definition. it is possible to define multiple virtual networks and these networks can be used to communicate between guest systems and between the guest systems and the host. - -### Creating your first virtual machine - -To start creating a new virtual machine, press the button at the top left of the main form: - -![][4] - -The first step of the wizard requires the installation mode. You can choose between a local installation media, network boot / installation or an existing virtual disk import: - -![][5] - -Choosing the local installation media the next step will require the ISO image path: - -![ ][6] - -The subsequent two steps will allow you to size the CPU, memory and disk of the new virtual machine. The last step will ask you to choose network preferences: choose the default network if you want the virtual machine to be separated from the outside world by a NAT, or bridged if you want it to be reachable from the outside. Note that if you choose bridged the virtual machine cannot communicate with the host machine. - -Check “Customize configuration before install” if you want to review or change the configuration before starting the setup: - -![][7] - -The virtual machine configuration form allows you to review and modify the hardware configuration. You can add disks, network interfaces, change boot options and so on. Press “Begin installation” when satisfied: - -![][8] - -At this point you will be redirected to the console where to proceed with the installation of the operating system. Once the operation is complete, you will have the working virtual machine that you can access from the console: - -![][9] - -The virtual machine just created will appear in the list of the main form, where you will also have a graph of the CPU and memory occupation: - -![][10] - -libvirt and virt-manager is a powerful tool that allows great customization to your virtual machines with enterprise level management. If something even simpler is desired, note that Fedora Workstation comes with [GNOME Boxes pre-installed and can be sufficient for basic virtualization needs][11]. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ - -作者:[Marco Sarti][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/msarti/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/virt-manager-816x346.jpg -[2]: https://libvirt.org/ -[3]: https://fedoramagazine.org/get-the-latest-ansible-2-8-in-fedora/ -[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-41-45.png -[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-30-53.png -[6]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-42-39.png -[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-43-21.png -[8]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-44-58.png -[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-55-35.png -[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-11-09-22.png -[11]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ diff --git a/translated/tech/20190722 How to run virtual machines with virt-manager.md b/translated/tech/20190722 How to run virtual machines with virt-manager.md new file mode 100644 index 0000000000..3187e2888a --- /dev/null +++ b/translated/tech/20190722 How to run virtual machines with virt-manager.md @@ -0,0 +1,169 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to run virtual machines with virt-manager) +[#]: via: (https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/) +[#]: author: (Marco Sarti https://fedoramagazine.org/author/msarti/) + +如何使用 virt-manager 运行虚拟机 +====== + +![][1] + +在早先年,在同一台笔记本中运行多个操作系统只能双启动。当时,这些操作系统很难同时运行或相互影响。许多年过去了,在普通的 PC 上,可以通过虚拟化在一个系统中运行另一个系统。 + +最近的 PC 或笔记本(包括价格适中的笔记本电脑)都有硬件虚拟化,可以运行性能接近物理主机的虚拟机。 + +虚拟化因此变得常见,它可以用来测试操作系统、学习新技术、创建自己的家庭云、创建自己的测试环境等等。本文将指导你使用 Fedora 上的 Virt Manager 来设置虚拟机。 + +### 介绍 QEMU/KVM 和 Libvirt + +与所有其他 Linux 系统一样,Fedora 附带了虚拟化扩展支持。它由作为内核模块之一的 KVM(基于内核的虚拟机)提供支持。 + +QEMU 是一个完整的系统仿真器,它可与 KVM 协同工作,允许你使用硬件和外部设备创建虚拟机。 + +最后 [libvirt][2] 是能让你管理基础设施的 API 层,即创建和运行虚拟机。 + +这三个技术都是开源的,我们将在 Fedora Workstation 上安装它们。 + +### 安装 + +#### 步骤 1:安装软件包 + +安装是一个相当简单的操作。 Fedora 仓库提供了 “virtualization” 软件包组,其中包含了你需要的所有包。 +``` + +``` + +sudo dnf install @virtualization +``` + +``` + +#### 步骤 2:编辑 libvirtd 配置 + +默认情况下,系统管理仅限于 root 用户,如果要启用常规用户,那么必须按以下步骤操作。 + +打开 /etc/libvirt/libvirtd.conf 进行编辑 +``` + +``` + +sudo vi /etc/libvirt/libvirtd.conf +``` + +``` + +将域套接字组所有者设置为 libvirt +``` + +``` + +unix_sock_group = "libvirt" +``` + +``` + +调整 UNIX 套接字的读写权限 +``` + +``` + +unix_sock_rw_perms = "0770" +``` + +``` + +#### 步骤 3:启动并启用 libvirtd 服务 +``` + +``` + +sudo systemctl start libvirtd +sudo systemctl enable libvirtd +``` + +``` + +#### 步骤 4:将用户添加到组 + +为了管理 libvirt 与普通用户,你必须将用户添加到 libvirt 组,否则每次启动 virtual-manager 时,都会要求你输入 sudo 密码。 +``` + +``` + +sudo usermod -a -G libvirt $(whoami) +``` + +``` + +这会将当前用户添加到组中。你必须注销并重新登录才能应用更改。 + +### 开始使用 virt-manager + +可以通过命令行 (virsh) 或通过 virt-manager 图形界面管理l ibvirt 系统。如果你想做虚拟机自动化配置,那么命令行非常有用,例如使用 [Ansible][3],但在本文中我们将专注于用户友好的图形界面。 + +virt-manager 界面很简单。主窗口显示连接列表,其中包括本地系统连接。 + +连接设置包括虚拟网络和存储定义。你可以定义多个虚拟网络,这些网络可用于在客户端系统之间以及客户端系统和主机之间进行通信。 + +### 创建你的第一个虚拟机 + +要开始创建新虚拟机,请按下主窗口左上角的按钮: + +![][4] + +向导的第一步需要选择安装模式。你可以选择本地安装介质、网络引导/安装或现有虚拟磁盘导入: + +![][5] + +选择本地安装介质,下一步将需要选择 ISO 镜像路径: + +![ ][6] + +随后的两个步能让你调整新虚拟机的 CPU、内存和磁盘大小。最后一步将要求你选择网络选项:如果你希望虚拟机通过 NAT 与外部隔离,请选择默认网络。如果你希望从外部访问虚拟机,那么选择桥接。请注意,如果选择桥接,那么虚拟机则无法与主机通信。 + +如果要在启动设置之前查看或更改配置,请选中“安装前自定义配置”: + +![][7] + +虚拟机配置窗口能让你查看和修改硬件配置。你可以添加磁盘、网络接口、更改引导选项等。满意后按“开始安装”: + +![][8] + +此时,你将被重定向到控制台来继续安装操作系统。操作完成后,你可以从控制台访问虚拟机: + +![][9] + +刚刚创建的虚拟机将出现在主窗口的列表中,你还能看到 CPU 和内存占用率的图表: + +![][10] + +libvirt 和 virt-manager 是功能强大的工具,它们可以以企业级管理为你的虚拟机提供出色的自定义。 如果你需要更简单的东西,请注意 Fedora Workstation [预安装的 GNOME Boxes 已经能够满足基础的虚拟化要求][11]。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ + +作者:[Marco Sarti][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://fedoramagazine.org/author/msarti/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/virt-manager-816x346.jpg +[2]: https://libvirt.org/ +[3]: https://fedoramagazine.org/get-the-latest-ansible-2-8-in-fedora/ +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-41-45.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-09-30-53.png +[6]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-42-39.png +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-43-21.png +[8]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-44-58.png +[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-10-55-35.png +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/Screenshot-from-2019-07-14-11-09-22.png +[11]: https://fedoramagazine.org/getting-started-with-virtualization-in-gnome-boxes/ From 6c3b9f332824874fd4c65e5805413dd0c0c3f35f Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 26 Jul 2019 10:00:49 +0800 Subject: [PATCH 139/951] translating --- ...Office on Linux is a Free Alternative to Microsoft Office.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md b/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md index 6d271a33cf..d7ea912438 100644 --- a/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md +++ b/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 6650a1f6c5a7a2d161d48b3967709cc21a78b97b Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Fri, 26 Jul 2019 17:52:41 +0800 Subject: [PATCH 140/951] Translating Continuous integration testing for the Linux kernel.md --- ...613 Continuous integration testing for the Linux kernel.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md index 556bf9b55c..790d471150 100644 --- a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md @@ -26,9 +26,9 @@ Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14, #### CI 和 Linux -Most modern software repositories have some sort of automated CI testing that tests commits before they find their way into the repository. This automated testing allows the maintainers to find software quality issues, along with most bugs, by reviewing the CI report. Simpler projects, such as a Python library, come with tons of tools to make this process easier. +许多现代软件代码库都采用某种自动化 CI 测试,能够在提交进入代码存储库之前对其进行测试。这种自动化测试运行维护人员通过查看 CI 测试报告来发现软件质量问题已经大多数错误。一些更方便的项目,比如某个 python 库,附带的大量工具使得整个检查过程更简单。 -Linux must be configured and compiled prior to any testing. Doing so takes time and compute resources. In addition, that kernel must boot in a virtual machine or on a bare metal machine for testing. Getting access to certain system architectures requires additional expense or very slow emulation. From there, someone must identify a set of tests which trigger the bug or verify the fix. +在任何测试之前都需要配置和编译 Linux。而这么做将耗费大量的时间和计算资源。此外,Linux 内核必需在虚拟机或者裸机上启动才能进行测试。访问某些体系结构需要额外的开销或者非常慢的仿真。因此,必需有人确定一组能够触发错误或者验证修复的测试组。 #### CKI 团队如何运作? From a272665b8fddd678a1944d66ddeee82d6e93b6fb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 27 Jul 2019 00:53:19 +0800 Subject: [PATCH 141/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190726=20Manage?= =?UTF-8?q?=20your=20passwords=20with=20Bitwarden=20and=20Podman?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md --- ...our passwords with Bitwarden and Podman.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md diff --git a/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md b/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md new file mode 100644 index 0000000000..1218867160 --- /dev/null +++ b/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md @@ -0,0 +1,126 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Manage your passwords with Bitwarden and Podman) +[#]: via: (https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/) +[#]: author: (Eric Gustavsson https://fedoramagazine.org/author/egustavs/) + +Manage your passwords with Bitwarden and Podman +====== + +![][1] + +You might have encountered a few advertisements the past year trying to sell you a password manager. Some examples are [LastPass][2], [1Password][3], or [Dashlane][4]. A password manager removes the burden of remembering the passwords for all your websites. No longer do you need to re-use passwords or use easy-to-remember passwords. Instead, you only need to remember one single password that can unlock all your other passwords for you. + +This can make you more secure by having one strong password instead of many weak passwords. You can also sync your passwords across devices if you have a cloud-based password manager like LastPass, 1Password, or Dashlane. Unfortunately, none of these products are open source. Luckily there are open source alternatives available. + +### Open source password managers + +These alternatives include Bitwarden, [LessPass][5], or [KeePass][6]. Bitwarden is [an open source password manager][7] that stores all your passwords encrypted on the server, which works the same way as LastPass, 1Password, or Dashlane. LessPass is a bit different as it focuses on being a stateless password manager. This means it derives passwords based on a master password, the website, and your username rather than storing the passwords encrypted. On the other side of the spectrum there’s KeePass, a file-based password manager with a lot of flexibility with its plugins and applications. + +Each of these three apps has its own downsides. Bitwarden stores everything in one place and is exposed to the web through its API and website interface. LessPass can’t store custom passwords since it’s stateless, so you need to use their derived passwords. KeePass, a file-based password manager, can’t easily sync between devices. You can utilize a cloud-storage provider together with [WebDAV][8] to get around this, but a lot of clients do not support it and you might get file conflicts if devices do not sync correctly. + +This article focuses on Bitwarden. + +### Running an unofficial Bitwarden implementation + +There is a community implementation of the server and its API called [bitwarden_rs][9]. This implementation is fully open source as it can use SQLite or MariaDB/MySQL, instead of the proprietary Microsoft SQL Server that the official server uses. + +It’s important to recognize some differences exist between the official and the unofficial version. For instance, the [official server has been audited by a third-party][10], whereas the unofficial one hasn’t. When it comes to implementations, the unofficial version lacks [email confirmation and support for two-factor authentication using Duo or email codes][11]. + +Let’s get started running the server with SELinux in mind. Following the documentation for bitwarden_rs you can construct a Podman command as follows: + +``` +$ podman run -d \ + --userns=keep-id \ + --name bitwarden \ + -e SIGNUPS_ALLOWED=false \ + -e ROCKET_PORT=8080 \ + -v /home/egustavs/Bitwarden/bw-data/:/data/:Z \ + -p 8080:8080 \ + bitwardenrs/server:latest +``` + +This downloads the bitwarden_rs image and runs it in a user container under the user’s namespace. It uses a port above 1024 so that non-root users can bind to it. It also changes the volume’s SELinux context with _:Z_ to prevent permission issues with read-write on _/data_. + +If you host this under a domain, it’s recommended to put this server under a reverse proxy with Apache or Nginx. That way you can use port 80 and 443 which points to the container’s 8080 port without running the container as root. + +### Running under systemd + +With Bitwarden now running, you probably want to keep it that way. Next, create a unit file that keeps the container running, automatically restarts if it doesn’t respond, and starts running after a system restart. Create this file as _/etc/systemd/system/bitwarden.service_: + +``` +[Unit] +Description=Bitwarden Podman container +Wants=syslog.service + +[Service] +User=egustavs +Group=egustavs +TimeoutStartSec=0 +ExecStart=/usr/bin/podman run 'bitwarden' +ExecStop=-/usr/bin/podman stop -t 10 'bitwarden' +Restart=always +RestartSec=30s +KillMode=none + +[Install] +WantedBy=multi-user.target +``` + +Now, enable and start it [using][12] _[sudo][12]_: + +``` +$ sudo systemctl enable bitwarden.service && sudo systemctl start bitwarden.service +$ systemctl status bitwarden.service +bitwarden.service - Bitwarden Podman container + Loaded: loaded (/etc/systemd/system/bitwarden.service; enabled; vendor preset: disabled) + Active: active (running) since Tue 2019-07-09 20:23:16 UTC; 1 day 14h ago + Main PID: 14861 (podman) + Tasks: 44 (limit: 4696) + Memory: 463.4M +``` + +Success! Bitwarden is now running under system and will keep running. + +### Adding LetsEncrypt + +It’s strongly recommended to run your Bitwarden instance through an encrypted channel with something like LetsEncrypt if you have a domain. Certbot is a bot that creates LetsEncrypt certificates for us, and they have a [guide for doing this through Fedora][13]. + +After you generate a certificate, you can follow the [bitwarden_rs guide about HTTPS][14]. Just remember to append _:Z_ to the LetsEncrypt volume to handle permissions while not changing the port. + +* * * + +*Photo by _[_CMDR Shane_][15]_ on *[_Unsplash_][16]. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/ + +作者:[Eric Gustavsson][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/egustavs/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/bitwarden-816x345.jpg +[2]: https://www.lastpass.com +[3]: https://1password.com/ +[4]: https://www.dashlane.com/ +[5]: https://lesspass.com/ +[6]: https://keepass.info/ +[7]: https://bitwarden.com/ +[8]: https://en.wikipedia.org/wiki/WebDAV +[9]: https://github.com/dani-garcia/bitwarden_rs/ +[10]: https://blog.bitwarden.com/bitwarden-completes-third-party-security-audit-c1cc81b6d33 +[11]: https://github.com/dani-garcia/bitwarden_rs/wiki#missing-features +[12]: https://fedoramagazine.org/howto-use-sudo/ +[13]: https://certbot.eff.org/instructions +[14]: https://github.com/dani-garcia/bitwarden_rs/wiki/Enabling-HTTPS +[15]: https://unsplash.com/@cmdrshane?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[16]: https://unsplash.com/search/photos/password?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText From 4f4778702267212bf641b27b873b68f67b1e4f8a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 27 Jul 2019 00:54:26 +0800 Subject: [PATCH 142/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190726=20What?= =?UTF-8?q?=20does=20it=20mean=20to=20be=20a=20sysadmin=20hero=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190726 What does it mean to be a sysadmin hero.md --- ...What does it mean to be a sysadmin hero.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/tech/20190726 What does it mean to be a sysadmin hero.md diff --git a/sources/tech/20190726 What does it mean to be a sysadmin hero.md b/sources/tech/20190726 What does it mean to be a sysadmin hero.md new file mode 100644 index 0000000000..bc3148eb63 --- /dev/null +++ b/sources/tech/20190726 What does it mean to be a sysadmin hero.md @@ -0,0 +1,68 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What does it mean to be a sysadmin hero?) +[#]: via: (https://opensource.com/article/19/7/sysadmin-heroics-saving-day) +[#]: author: (Opensource.com https://opensource.com/users/admin) + +What does it mean to be a sysadmin hero? +====== +Two stories from the community on sysadmin heroics: What does it mean to +you? +![Open Force superhero characters][1] + +Sysadmins spend a lot of time preventing and fixing problems. There are certainly times when a sysadmin becomes a hero, whether to their team, department, company, or the general public, though the people they "saved" from trouble may never even know. + +Enjoy these two stories from the community on sysadmin heroics. What does it mean to you? + +* * * + +I worked as a system administrator for a contract with the Army National Guard in the early 2000s. I was involved in a project to pilot a new content management system. This system would enable distribution of online educational materials to classrooms across the country. The state of Montana was chosen for the initial pilot and test phase. I traveled to Montana and deployed several servers running Red Hat Linux plus the content management software in their data centers. + +A few days later, I received a call at my regular office from a worried guardsman with urgent news. One of the servers would not boot. Due to the circumstances, there was no way to easily troubleshoot. + +The testing was scheduled to commence the following week, which left little time to get the server back online. A delay in the project would be costly. I needed to solve the problem fast. Fortunately, we had several identical servers in our local data center. I used one of them to reinstall the operating system and applications, and then configured it identically to the problem server back in Montana. I then pulled the hard drive, packed it safely, and overnighted it to the Montana National Guard Armory. + +The guardsman called me the next morning to say he had the replacement drive. I instructed him on how to remove and replace the boot drive. After doing so, he pressed the power button. We waited for several silent seconds before he informed me that he could see lights and hear the sound of drive activity. I began pinging the server and after a few positive responses, I was able to SSH into it. This was a great sign! + +Everyone was relieved that the server was online again so that testing could get underway. + +If you want to know more about this program, [there is an article here][2]. (It takes a really long time to load for some reason, so I saved it as a PDF just in case.)  + +—_Alan Formy-Duval_ + +* * * + +Humans love good stories. In IT, stories about heroic feats of coding and cabling go back to the first computers and the bugs that lived inside them. They’re all loved. They’re loved more if the audience wasn’t part of the fallout of what created the story. + +Sysadmins tend to be left holding the bag when events turn sour. That fact affords us the often unwanted honor of being cast as the protagonist for one of these stories. Antagonists can be anything from bad weather or dug up cables, to mistyped commands, or simply human error. Because we operate in an industry built around generated conflict and drama, the legendary epics in our industry usually involve sysadmins battling the thoughtless developer. It’s an old trope, but a good one that gets lots of laughs and amazed stares when the stories are told. + +I’ve always been someone who’s loved to share these stories with my peers and friends. The camaraderie and the laughs are important to me. These stories are ice breakers and scene closers when on stage, in a conference room, or just when having a beer with your friends after a hard day. But this year, I’ve begun to think about our storytelling tradition a little differently. The heroes we should be talking about around the water cooler aren’t the sysadmins who fix the problem with a flourish at 3am on Sunday. The true heroes in the industry are the sysadmins who prevent the problem from ever happening at 3pm on a Tuesday. + +When I talk to my customers about building effective solutions, I focus the conversation around two core principles. First, I implore them to not rabbit hole themselves with shiny objects and base their solution around proven, supportable technology. Yes, shiny new tech can provide value in some use cases. But most likely it just adds complexity that drives down stability and maintainability. These factors all work together to ultimately slow down adoption by their end users. + +Platforms that don’t grow are platforms that don’t last. I don’t want to work on a platform that won’t be around for its first upgrade. Violating this principle creates systems that require Herculean efforts to keep alive. No one benefits from that situation, even if you do get a good story out of it. + +The second principle I drive home every time I get a chance is to focus on fundamental knowledge, and understand how the technology we’re implementing actually works. We’ve focused for a long time in our industry on marketing our products as fast to deploy, and easy to manage, but that’s almost always a thin veneer. Every IT system designed by humans will ultimately break at some point in its lifecycle. If you don’t understand what’s happening when that system goes sideways, you don’t have a chance of recovering without writing a new saga to talk about at lunch for weeks to come. + +It took me much longer than I’m comfortable with to figure out that the same hero stories we all enjoyed are a result of not sticking to the fundamental principles that I value the most in any solution I have a hand in creating. So, when Sysadmin Day rolls around this year, I won’t be lifting my glass to the heroes who built a bad system and kept it alive through extreme circumstances and too much caffeine. I’ll tip my hat and share a drink with the boring people in the middle of our industry who specialize in preventing the hero moments. A boring weekend with the on-call phone is the most heroic thing I’m ever going to ask from my sysadmin brethren from now on. + +_—Jamie Duncan_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/sysadmin-heroics-saving-day + +作者:[Opensource.com][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/admin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/superhero_character_open_force.jpg?itok=cndIf6Zw (Open Force superhero characters) +[2]: https://gcn.com/Articles/2002/01/18/National-Guard-will-test-distancelearning-standard.aspx From 8d4059f66ad5d3474d8b880f4927b594aa19fca8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 27 Jul 2019 00:58:56 +0800 Subject: [PATCH 143/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190725=20Report?= =?UTF-8?q?:=20Smart-city=20IoT=20isn=E2=80=99t=20smart=20enough=20yet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md --- ...- Smart-city IoT isn-t smart enough yet.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md diff --git a/sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md b/sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md new file mode 100644 index 0000000000..da6d4ee57a --- /dev/null +++ b/sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Report: Smart-city IoT isn’t smart enough yet) +[#]: via: (https://www.networkworld.com/article/3411561/report-smart-city-iot-isnt-smart-enough-yet.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +Report: Smart-city IoT isn’t smart enough yet +====== +A report from Forrester Research details vulnerabilities affecting smart-city internet of things (IoT) infrastructure and offers some methods of mitigation. +![Aleksandr Durnov / Getty Images][1] + +Security arrangements for smart-city IoT technology around the world are in an alarming state of disrepair, according to a report from Forrester Research that argues serious changes are needed in order to avoid widespread compromises. + +Much of what’s wrong has to do with a lack of understanding on the part of the people in charge of those systems and a failure to follow well-known security best practices, like centralized management, network visibility and limiting attack-surfaces. + +**More on IoT:** + + * [What is the IoT? How the internet of things works][2] + * [What is edge computing and how it’s changing the network][3] + * [Most powerful Internet of Things companies][4] + * [10 Hot IoT startups to watch][5] + * [The 6 ways to make money in IoT][6] + * [What is digital twin technology? [and why it matters]][7] + * [Blockchain, service-centric networking key to IoT success][8] + * [Getting grounded in IoT networking and security][9] + * [Building IoT-ready networks must become a priority][10] + * [What is the Industrial IoT? [And why the stakes are so high]][11] + + + +Those all pose stiff challenges, according to “Making Smart Cities Safe And Secure,” the Forrester report by Merritt Maxim and Salvatore Schiano. The attack surface for a smart city is, by default, enormous, given the volume of Internet-connected hardware involved. Some device, somewhere, is likely to be vulnerable, and with the devices geographically spread out it’s difficult to secure all types of access to them. + +Worse still, some legacy systems can be downright impossible to manage and update in a safe way. Older technology often contains no provision for live updates, and its vulnerabilities can be severe, according to the report. Physical access to some types of devices also remains a serious challenge. The report gives the example of wastewater treatment plants in remote locations in Australia, which were sabotaged by a contractor who accessed the SCADA systems directly. + +In addition to the risk of compromised control systems, the generalized insecurity of smart city IoT makes the vast amounts of data that it generates highly suspect. Improperly configured devices could collect more information than they’re supposed to, including personally identifiable information, which could violate privacy regulations. Also, the data collected is analyzed to glean useful information about such things as parking patterns, water flow and electricity use, and inaccurate or compromised information can badly undercut the value of smart city technology to a given user. + +“Security teams are just gaining maturity in the IT environment with the necessity for data inventory, classification, and flow mapping, together with thorough risk and privacy impact assessments, to drive appropriate protection,” the report says. “In OT environments, they’re even further behind.” + +Yet, despite the fact that IoT planning and implementation doubled between 2017 and 2018, according to Forrester’s data, comparatively little work has been done on the security front. The report lists 13 cyberattacks on smart-city technology between 2014 and 2019 that had serious consequences, including widespread electricity outages, ransomware infections on hospital computers and emergency-service interruptions. + +Still, there are ways forward, according to Forrester. Careful log monitoring can keep administrators abreast of what’s normal and what’s suspicious on their networks. Asset mapping and centralizing control-plane functionality should make it much more difficult for bad actors to insert malicious devices into a smart-city network or take control of less-secure items. And intelligent alerting – the kind that provides contextual information, differentiating between “this system just got rained on and has poor connectivity” and “someone is tampering with this system” – should help cities be more responsive to security threats when they arise. + +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/3411561/report-smart-city-iot-isnt-smart-enough-yet.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://images.idgesg.net/images/article/2019/02/smart_city_smart_cities_iot_internet_of_things_by_aleksandr_durnov_gettyimages-971455374_2400x1600-100788363-large.jpg +[2]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html +[3]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html +[4]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html +[5]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html +[6]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html +[7]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html +[8]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html +[9]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html +[10]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html +[11]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[12]: https://www.facebook.com/NetworkWorld/ +[13]: https://www.linkedin.com/company/network-world From 10f98d11380f1deda5a33656dc1143beb45132ee Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Jul 2019 06:40:53 +0800 Subject: [PATCH 144/951] PRF @geekpi --- ... run virtual machines with virt-manager.md | 50 +++++-------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/translated/tech/20190722 How to run virtual machines with virt-manager.md b/translated/tech/20190722 How to run virtual machines with virt-manager.md index 3187e2888a..478aa3e4de 100644 --- a/translated/tech/20190722 How to run virtual machines with virt-manager.md +++ b/translated/tech/20190722 How to run virtual machines with virt-manager.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to run virtual machines with virt-manager) @@ -12,7 +12,7 @@ ![][1] -在早先年,在同一台笔记本中运行多个操作系统只能双启动。当时,这些操作系统很难同时运行或相互影响。许多年过去了,在普通的 PC 上,可以通过虚拟化在一个系统中运行另一个系统。 +在早些年,在同一台笔记本中运行多个操作系统只能双启动。当时,这些操作系统很难同时运行或彼此交互。许多年过去了,在普通的 PC 上,可以通过虚拟化在一个系统中运行另一个系统。 最近的 PC 或笔记本(包括价格适中的笔记本电脑)都有硬件虚拟化,可以运行性能接近物理主机的虚拟机。 @@ -24,7 +24,7 @@ QEMU 是一个完整的系统仿真器,它可与 KVM 协同工作,允许你使用硬件和外部设备创建虚拟机。 -最后 [libvirt][2] 是能让你管理基础设施的 API 层,即创建和运行虚拟机。 +最后,[libvirt][2] 能让你管理基础设施的 API 层,即创建和运行虚拟机。 这三个技术都是开源的,我们将在 Fedora Workstation 上安装它们。 @@ -33,79 +33,55 @@ QEMU 是一个完整的系统仿真器,它可与 KVM 协同工作,允许你 #### 步骤 1:安装软件包 安装是一个相当简单的操作。 Fedora 仓库提供了 “virtualization” 软件包组,其中包含了你需要的所有包。 -``` ``` - sudo dnf install @virtualization ``` -``` - #### 步骤 2:编辑 libvirtd 配置 默认情况下,系统管理仅限于 root 用户,如果要启用常规用户,那么必须按以下步骤操作。 -打开 /etc/libvirt/libvirtd.conf 进行编辑 -``` +打开 `/etc/libvirt/libvirtd.conf` 进行编辑: ``` - sudo vi /etc/libvirt/libvirtd.conf ``` -``` - -将域套接字组所有者设置为 libvirt -``` +将 UNIX 域套接字组所有者设置为 libvirt: ``` - unix_sock_group = "libvirt" ``` -``` - -调整 UNIX 套接字的读写权限 -``` +调整 UNIX 域套接字的读写权限: ``` - unix_sock_rw_perms = "0770" ``` -``` - #### 步骤 3:启动并启用 libvirtd 服务 -``` ``` - sudo systemctl start libvirtd sudo systemctl enable libvirtd ``` -``` - #### 步骤 4:将用户添加到组 -为了管理 libvirt 与普通用户,你必须将用户添加到 libvirt 组,否则每次启动 virtual-manager 时,都会要求你输入 sudo 密码。 -``` +为了管理 libvirt 与普通用户,你必须将用户添加到 `libvirt` 组,否则每次启动 `virt-manager` 时,都会要求你输入 sudo 密码。 ``` - sudo usermod -a -G libvirt $(whoami) ``` -``` - 这会将当前用户添加到组中。你必须注销并重新登录才能应用更改。 ### 开始使用 virt-manager -可以通过命令行 (virsh) 或通过 virt-manager 图形界面管理l ibvirt 系统。如果你想做虚拟机自动化配置,那么命令行非常有用,例如使用 [Ansible][3],但在本文中我们将专注于用户友好的图形界面。 +可以通过命令行 (`virsh`) 或通过 `virt-manager` 图形界面管理 libvirt 系统。如果你想做虚拟机自动化配置,那么命令行非常有用,例如使用 [Ansible][3],但在本文中我们将专注于用户友好的图形界面。 -virt-manager 界面很简单。主窗口显示连接列表,其中包括本地系统连接。 +`virt-manager` 界面很简单。主窗口显示连接列表,其中包括本地系统连接。 连接设置包括虚拟网络和存储定义。你可以定义多个虚拟网络,这些网络可用于在客户端系统之间以及客户端系统和主机之间进行通信。 @@ -115,7 +91,7 @@ virt-manager 界面很简单。主窗口显示连接列表,其中包括本地 ![][4] -向导的第一步需要选择安装模式。你可以选择本地安装介质、网络引导/安装或现有虚拟磁盘导入: +向导的第一步需要选择安装模式。你可以选择本地安装介质、网络引导/安装或导入现有虚拟磁盘: ![][5] @@ -123,7 +99,7 @@ virt-manager 界面很简单。主窗口显示连接列表,其中包括本地 ![ ][6] -随后的两个步能让你调整新虚拟机的 CPU、内存和磁盘大小。最后一步将要求你选择网络选项:如果你希望虚拟机通过 NAT 与外部隔离,请选择默认网络。如果你希望从外部访问虚拟机,那么选择桥接。请注意,如果选择桥接,那么虚拟机则无法与主机通信。 +随后的两个步骤能让你调整新虚拟机的 CPU、内存和磁盘大小。最后一步将要求你选择网络选项:如果你希望虚拟机通过 NAT 与外部隔离,请选择默认网络。如果你希望从外部访问虚拟机,那么选择桥接。请注意,如果选择桥接,那么虚拟机则无法与主机通信。 如果要在启动设置之前查看或更改配置,请选中“安装前自定义配置”: @@ -141,7 +117,7 @@ virt-manager 界面很简单。主窗口显示连接列表,其中包括本地 ![][10] -libvirt 和 virt-manager 是功能强大的工具,它们可以以企业级管理为你的虚拟机提供出色的自定义。 如果你需要更简单的东西,请注意 Fedora Workstation [预安装的 GNOME Boxes 已经能够满足基础的虚拟化要求][11]。 +libvirt 和 `virt-manager` 是功能强大的工具,它们可以以企业级管理为你的虚拟机提供出色的自定义。如果你需要更简单的东西,请注意 Fedora Workstation [预安装的 GNOME Boxes 已经能够满足基础的虚拟化要求][11]。 -------------------------------------------------------------------------------- @@ -150,7 +126,7 @@ via: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation 作者:[Marco Sarti][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 5fd6149716003f71cdb7ee831de7142f0fb9ab8a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Jul 2019 06:41:18 +0800 Subject: [PATCH 145/951] PUB @geekpi https://linux.cn/article-11151-1.html --- .../20190722 How to run virtual machines with virt-manager.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190722 How to run virtual machines with virt-manager.md (98%) diff --git a/translated/tech/20190722 How to run virtual machines with virt-manager.md b/published/20190722 How to run virtual machines with virt-manager.md similarity index 98% rename from translated/tech/20190722 How to run virtual machines with virt-manager.md rename to published/20190722 How to run virtual machines with virt-manager.md index 478aa3e4de..32f1faea08 100644 --- a/translated/tech/20190722 How to run virtual machines with virt-manager.md +++ b/published/20190722 How to run virtual machines with virt-manager.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11151-1.html) [#]: subject: (How to run virtual machines with virt-manager) [#]: via: (https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/) [#]: author: (Marco Sarti https://fedoramagazine.org/author/msarti/) From 6dac85f5d33e37ce3ddbab56058d2e3271724c95 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Jul 2019 06:47:07 +0800 Subject: [PATCH 146/951] APL:20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System --- ...e Canonical Kernel Livepatch Service on Ubuntu LTS System.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md index d7e58a24c1..486fb2e320 100644 --- a/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md +++ b/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 12ea364e1a28078a2b7006abca3b8610824284eb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Jul 2019 07:21:59 +0800 Subject: [PATCH 147/951] TSL&PRF:20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md --- ... Livepatch Service on Ubuntu LTS System.md | 153 ------------------ ... Livepatch Service on Ubuntu LTS System.md | 139 ++++++++++++++++ 2 files changed, 139 insertions(+), 153 deletions(-) delete mode 100644 sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md create mode 100644 translated/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md diff --git a/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md deleted file mode 100644 index 486fb2e320..0000000000 --- a/sources/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md +++ /dev/null @@ -1,153 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System?) -[#]: via: (https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System? -====== - -Canonical was introduced Live patch Service in Ubuntu 14.04 LTS system. - -Live patching service allows you to install and apply critical Linux kernel security updates without rebooting your system. - -This means, you don’t need to reboot your system after applying the kernel patches. - -But usually, we need to reboot the Linux server after installing the kernel patches to available for the system to use. - -Live patching is pretty fast. Most kernel fixes apply in seconds without any issues. - -Canonical live patch service is available for user upto 3 systems without any cost. - -You can enable Canonical Live patch in both variants desktop and server, through the command line. - -This live patching system is intended to address high and critical Linux kernel security vulnerabilities. - -Refer the following table for [supported systems][1] and other details. - -Ubuntu Release | Arch | Kernel Version | Kernel Variants ----|---|---|--- -Ubuntu 18.04 LTS | 64-bit x86 | 4.15 | GA generic and lowlatency kernel variants only -Ubuntu 16.04 LTS | 64-bit x86 | 4.4 | GA generic and lowlatency kernel variants only -Ubuntu 14.04 LTS | 64-bit x86 | 4.4 | Hardware Enablement kernel only - -**`Note:`**` ` Canonical Livepatch Service in Ubuntu 14.04 LTS requires users to run the Ubuntu v4.4 kernel in Trusty. Please reboot into this kernel if you are not currently running to use the service. - -To do so, follow the below procedures. - -### How To Get Live patch Token? - -Navigate to [Canonical Live patch service page][2] and choose `Ubuntu user` if you want to use the free service. - -It will be applicable upto 3 systems. If you are an `UA customer`, then select Ubuntu Advantage customer. Finally click Get your Live patch token. -[![][3]![][3]][4] - -Make sure you already have account in `Ubuntu One`. If no, you can create a new one. - -After logged in, you will get a secret key for your account. -[![][3]![][3]][5] - -### Install Snap Daemon in Your System - -The live patching system is handled through a snap package. So, make sure you have the “snap daemon” installed on your Ubuntu system. - -``` -$ sudo apt update - -$ sudo apt install snapd -``` - -### How To Install & Configure Live patch Service in Your System? - -Install the canonical-livepatch daemon by running the below command. - -``` -$ sudo snap install canonical-livepatch - -canonical-livepatch 9.4.1 from Canonical* installed -``` - -Run the following command to enable live kernel patches on an Ubuntu machine. - -``` -$ sudo canonical-livepatch enable xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e - -Successfully enabled device. Using machine-token: xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e -``` - -Run the below command to find the status of your livepatched machine. - -``` -$ sudo canonical-livepatch status - -client-version: 9.4.1 -architecture: x86_64 -cpu-model: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz -last-check: 2019-07-24T12:30:04+05:30 -boot-time: 2019-07-24T12:11:06+05:30 -uptime: 19m11s -status: -- kernel: 4.15.0-55.60-generic - running: true - livepatch: - checkState: checked - patchState: nothing-to-apply - version: "" - fixes: "" -``` - -Run the above same command with the `--verbose` switch to get more information about live patched machine. - -``` -$ sudo canonical-livepatch status --verbose -``` - -Execute the below command, if you would like to run the patch manually. - -``` -$ sudo canonical-livepatch refresh - -Before refresh: - -kernel: 4.15.0-55.60-generic -fully-patched: true -version: "" - -After refresh: - -kernel: 4.15.0-55.60-generic -fully-patched: true -version: "" -``` - -You will be getting one of the below status in the `patchState` output. - - * **applied:** There are no vulnerabilities found - * **nothing-to-apply:** Vulnerabilities are found and patched successfully - * **kernel-upgrade-required:** Livepatch cannot install a patch to fix the vulnerability - - - -Make a note, installing a kernel patch is different from upgrading/installing a new kernel on system. If you have installed new kernel then you have to reboot the system to activate the new kernel. - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/ - -作者:[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://wiki.ubuntu.com/Kernel/Livepatch -[2]: https://auth.livepatch.canonical.com/ -[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[4]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-1.jpg -[5]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-2.jpg diff --git a/translated/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/translated/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md new file mode 100644 index 0000000000..ec30de1405 --- /dev/null +++ b/translated/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md @@ -0,0 +1,139 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System?) +[#]: via: (https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +如何在 Ubuntu LTS 系统上启用 Canonical 的内核实时补丁服务 +====== + +Canonical 在 Ubuntu 14.04 LTS 系统中引入了内核实时补丁服务Kernel Livepatch Service。实时补丁服务允许你安装和应用关键的 Linux 内核安全更新,而无需重新启动系统。这意味着,在应用内核补丁程序后,你无需重新启动系统。而通常情况下,我们需要在安装内核补丁后重启 Linux 服务器才能供系统使用。 + +实时修补非常快。大多数内核修复程序只需要几秒钟。Canonical 的实时补丁服务对于不超过 3 个系统的用户无需任何费用。你可以通过命令行在桌面和服务器中启用 Canonical 实时补丁服务。 + +这个实时补丁系统旨在解决高级和关键的 Linux 内核安全漏洞。 + +有关[支持的系统][1]和其他详细信息,请参阅下表。 + +Ubuntu 版本 | 架构 | 内核版本 | 内核变体 +---|---|---|--- +Ubuntu 18.04 LTS | 64-bit x86 | 4.15 | 仅 GA 通用和低电压内核 +Ubuntu 16.04 LTS | 64-bit x86 | 4.4 | 仅 GA 通用和低电压内核 +Ubuntu 14.04 LTS | 64-bit x86 | 4.4 | 仅 Hardware Enablement 内核 + +**注意**:Ubuntu 14.04 中的 Canonical 实时补丁服务 LTS 要求用户在 Trusty 中运行 Ubuntu v4.4 内核。如果你当前没有运行使用该服务,请重新启动到此内核。 + +为此,请按照以下步骤操作。 + +### 如何获取实时补丁令牌? + +导航到 [Canonical 实时补丁服务页面][2],如果要使用免费服务,请选择“Ubuntu 用户”。它适用于不超过 3 个系统的用户。如果你是 “UA 客户” 或多于 3 个系统,请选择 “Ubuntu customer”。最后,单击 “Get your Livepatch token” 按钮。 + +![][4] + +确保你已经在 “Ubuntu One” 中拥有帐号。否则,可以创建一个新的。 + +登录后,你将获得你的帐户密钥。 + +![][5] + +### 在系统中安装 Snap 守护程序 + +实时补丁系统通过快照包安装。因此,请确保在 Ubuntu 系统上安装了 snapd 守护程序。 + +``` +$ sudo apt update +$ sudo apt install snapd +``` + +### 如何系统中安装和配置实时补丁服务? + +通过运行以下命令安装 `canonical-livepatch` 守护程序。 + +``` +$ sudo snap install canonical-livepatch +canonical-livepatch 9.4.1 from Canonical* installed +``` + +运行以下命令以在 Ubuntu 计算机上启用实时内核补丁程序。 + +``` +$ sudo canonical-livepatch enable xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e + +Successfully enabled device. Using machine-token: xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e +``` + +运行以下命令查看实时补丁机器的状态。 + +``` +$ sudo canonical-livepatch status + +client-version: 9.4.1 +architecture: x86_64 +cpu-model: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz +last-check: 2019-07-24T12:30:04+05:30 +boot-time: 2019-07-24T12:11:06+05:30 +uptime: 19m11s +status: +- kernel: 4.15.0-55.60-generic + running: true + livepatch: + checkState: checked + patchState: nothing-to-apply + version: "" + fixes: "" +``` + +使用 `--verbose` 开关运行上述相同的命令,以获取有关实时修补机器的更多信息。 + +``` +$ sudo canonical-livepatch status --verbose +``` + +如果要手动运行补丁程序,请执行以下命令。 + +``` +$ sudo canonical-livepatch refresh + +Before refresh: + +kernel: 4.15.0-55.60-generic +fully-patched: true +version: "" + +After refresh: + +kernel: 4.15.0-55.60-generic +fully-patched: true +version: "" +``` + +`patchState` 会有以下状态之一: + +   * `applied`:未发现任何漏洞 +   * `nothing-to-apply`:成功找到并修补了漏洞 +   * `kernel-upgrade-required`:实时补丁服务无法安装补丁来修复漏洞 + +请注意,安装内核补丁与在系统上升级/安装新内核不同。如果安装了新内核,则必须重新引导系统以激活新内核。 + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/ + +作者:[Magesh Maruthamuthu][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://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://wiki.ubuntu.com/Kernel/Livepatch +[2]: https://auth.livepatch.canonical.com/ +[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[4]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-1.jpg +[5]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-2.jpg From c025f18d1ef97a4a698e134baaf3453de8ef3100 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Jul 2019 08:08:46 +0800 Subject: [PATCH 148/951] PUB @wxy https://linux.cn/article-11152-1.html --- ... Livepatch Service on Ubuntu LTS System.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md diff --git a/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md new file mode 100644 index 0000000000..a37cbef543 --- /dev/null +++ b/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md @@ -0,0 +1,141 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11152-1.html) +[#]: subject: (How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System?) +[#]: via: (https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +如何在 Ubuntu LTS 系统上启用 Canonical 的内核实时补丁服务 +====== + +![](https://img.linux.net.cn/data/attachment/album/201907/27/072251d3dij23lndtuutzr.jpg) + +Canonical 在 Ubuntu 14.04 LTS 系统中引入了内核实时补丁服务Kernel Livepatch Service。实时补丁服务允许你安装和应用关键的 Linux 内核安全更新,而无需重新启动系统。这意味着,在应用内核补丁程序后,你无需重新启动系统。而通常情况下,我们需要在安装内核补丁后重启 Linux 服务器才能供系统使用。 + +实时修补非常快。大多数内核修复程序只需要几秒钟。Canonical 的实时补丁服务对于不超过 3 个系统的用户无需任何费用。你可以通过命令行在桌面和服务器中启用 Canonical 实时补丁服务。 + +这个实时补丁系统旨在解决高级和关键的 Linux 内核安全漏洞。 + +有关[支持的系统][1]和其他详细信息,请参阅下表。 + +Ubuntu 版本 | 架构 | 内核版本 | 内核变体 +---|---|---|--- +Ubuntu 18.04 LTS | 64-bit x86 | 4.15 | 仅 GA 通用和低电压内核 +Ubuntu 16.04 LTS | 64-bit x86 | 4.4 | 仅 GA 通用和低电压内核 +Ubuntu 14.04 LTS | 64-bit x86 | 4.4 | 仅 Hardware Enablement 内核 + +**注意**:Ubuntu 14.04 中的 Canonical 实时补丁服务 LTS 要求用户在 Trusty 中运行 Ubuntu v4.4 内核。如果你当前没有运行使用该服务,请重新启动到此内核。 + +为此,请按照以下步骤操作。 + +### 如何获取实时补丁令牌? + +导航到 [Canonical 实时补丁服务页面][2],如果要使用免费服务,请选择“Ubuntu 用户”。它适用于不超过 3 个系统的用户。如果你是 “UA 客户” 或多于 3 个系统,请选择 “Ubuntu customer”。最后,单击 “Get your Livepatch token” 按钮。 + +![][4] + +确保你已经在 “Ubuntu One” 中拥有帐号。否则,可以创建一个新的。 + +登录后,你将获得你的帐户密钥。 + +![][5] + +### 在系统中安装 Snap 守护程序 + +实时补丁系统通过快照包安装。因此,请确保在 Ubuntu 系统上安装了 snapd 守护程序。 + +``` +$ sudo apt update +$ sudo apt install snapd +``` + +### 如何系统中安装和配置实时补丁服务? + +通过运行以下命令安装 `canonical-livepatch` 守护程序。 + +``` +$ sudo snap install canonical-livepatch +canonical-livepatch 9.4.1 from Canonical* installed +``` + +运行以下命令以在 Ubuntu 计算机上启用实时内核补丁程序。 + +``` +$ sudo canonical-livepatch enable xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e + +Successfully enabled device. Using machine-token: xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e +``` + +运行以下命令查看实时补丁机器的状态。 + +``` +$ sudo canonical-livepatch status + +client-version: 9.4.1 +architecture: x86_64 +cpu-model: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz +last-check: 2019-07-24T12:30:04+05:30 +boot-time: 2019-07-24T12:11:06+05:30 +uptime: 19m11s +status: +- kernel: 4.15.0-55.60-generic + running: true + livepatch: + checkState: checked + patchState: nothing-to-apply + version: "" + fixes: "" +``` + +使用 `--verbose` 开关运行上述相同的命令,以获取有关实时修补机器的更多信息。 + +``` +$ sudo canonical-livepatch status --verbose +``` + +如果要手动运行补丁程序,请执行以下命令。 + +``` +$ sudo canonical-livepatch refresh + +Before refresh: + +kernel: 4.15.0-55.60-generic +fully-patched: true +version: "" + +After refresh: + +kernel: 4.15.0-55.60-generic +fully-patched: true +version: "" +``` + +`patchState` 会有以下状态之一: + +   * `applied`:未发现任何漏洞 +   * `nothing-to-apply`:成功找到并修补了漏洞 +   * `kernel-upgrade-required`:实时补丁服务无法安装补丁来修复漏洞 + +请注意,安装内核补丁与在系统上升级/安装新内核不同。如果安装了新内核,则必须重新引导系统以激活新内核。 + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/ + +作者:[Magesh Maruthamuthu][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://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://wiki.ubuntu.com/Kernel/Livepatch +[2]: https://auth.livepatch.canonical.com/ +[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[4]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-1.jpg +[5]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-2.jpg From 4d950ef14a691c8828016deef4b63455adc20fc9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Jul 2019 08:34:53 +0800 Subject: [PATCH 149/951] PUB --- ... Livepatch Service on Ubuntu LTS System.md | 141 ------------------ 1 file changed, 141 deletions(-) delete mode 100644 published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md diff --git a/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md deleted file mode 100644 index a37cbef543..0000000000 --- a/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md +++ /dev/null @@ -1,141 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-11152-1.html) -[#]: subject: (How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System?) -[#]: via: (https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -如何在 Ubuntu LTS 系统上启用 Canonical 的内核实时补丁服务 -====== - -![](https://img.linux.net.cn/data/attachment/album/201907/27/072251d3dij23lndtuutzr.jpg) - -Canonical 在 Ubuntu 14.04 LTS 系统中引入了内核实时补丁服务Kernel Livepatch Service。实时补丁服务允许你安装和应用关键的 Linux 内核安全更新,而无需重新启动系统。这意味着,在应用内核补丁程序后,你无需重新启动系统。而通常情况下,我们需要在安装内核补丁后重启 Linux 服务器才能供系统使用。 - -实时修补非常快。大多数内核修复程序只需要几秒钟。Canonical 的实时补丁服务对于不超过 3 个系统的用户无需任何费用。你可以通过命令行在桌面和服务器中启用 Canonical 实时补丁服务。 - -这个实时补丁系统旨在解决高级和关键的 Linux 内核安全漏洞。 - -有关[支持的系统][1]和其他详细信息,请参阅下表。 - -Ubuntu 版本 | 架构 | 内核版本 | 内核变体 ----|---|---|--- -Ubuntu 18.04 LTS | 64-bit x86 | 4.15 | 仅 GA 通用和低电压内核 -Ubuntu 16.04 LTS | 64-bit x86 | 4.4 | 仅 GA 通用和低电压内核 -Ubuntu 14.04 LTS | 64-bit x86 | 4.4 | 仅 Hardware Enablement 内核 - -**注意**:Ubuntu 14.04 中的 Canonical 实时补丁服务 LTS 要求用户在 Trusty 中运行 Ubuntu v4.4 内核。如果你当前没有运行使用该服务,请重新启动到此内核。 - -为此,请按照以下步骤操作。 - -### 如何获取实时补丁令牌? - -导航到 [Canonical 实时补丁服务页面][2],如果要使用免费服务,请选择“Ubuntu 用户”。它适用于不超过 3 个系统的用户。如果你是 “UA 客户” 或多于 3 个系统,请选择 “Ubuntu customer”。最后,单击 “Get your Livepatch token” 按钮。 - -![][4] - -确保你已经在 “Ubuntu One” 中拥有帐号。否则,可以创建一个新的。 - -登录后,你将获得你的帐户密钥。 - -![][5] - -### 在系统中安装 Snap 守护程序 - -实时补丁系统通过快照包安装。因此,请确保在 Ubuntu 系统上安装了 snapd 守护程序。 - -``` -$ sudo apt update -$ sudo apt install snapd -``` - -### 如何系统中安装和配置实时补丁服务? - -通过运行以下命令安装 `canonical-livepatch` 守护程序。 - -``` -$ sudo snap install canonical-livepatch -canonical-livepatch 9.4.1 from Canonical* installed -``` - -运行以下命令以在 Ubuntu 计算机上启用实时内核补丁程序。 - -``` -$ sudo canonical-livepatch enable xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e - -Successfully enabled device. Using machine-token: xxxxc4xxxx67xxxxbxxxxbxxxxfbxx4e -``` - -运行以下命令查看实时补丁机器的状态。 - -``` -$ sudo canonical-livepatch status - -client-version: 9.4.1 -architecture: x86_64 -cpu-model: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz -last-check: 2019-07-24T12:30:04+05:30 -boot-time: 2019-07-24T12:11:06+05:30 -uptime: 19m11s -status: -- kernel: 4.15.0-55.60-generic - running: true - livepatch: - checkState: checked - patchState: nothing-to-apply - version: "" - fixes: "" -``` - -使用 `--verbose` 开关运行上述相同的命令,以获取有关实时修补机器的更多信息。 - -``` -$ sudo canonical-livepatch status --verbose -``` - -如果要手动运行补丁程序,请执行以下命令。 - -``` -$ sudo canonical-livepatch refresh - -Before refresh: - -kernel: 4.15.0-55.60-generic -fully-patched: true -version: "" - -After refresh: - -kernel: 4.15.0-55.60-generic -fully-patched: true -version: "" -``` - -`patchState` 会有以下状态之一: - -   * `applied`:未发现任何漏洞 -   * `nothing-to-apply`:成功找到并修补了漏洞 -   * `kernel-upgrade-required`:实时补丁服务无法安装补丁来修复漏洞 - -请注意,安装内核补丁与在系统上升级/安装新内核不同。如果安装了新内核,则必须重新引导系统以激活新内核。 - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/ - -作者:[Magesh Maruthamuthu][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://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://wiki.ubuntu.com/Kernel/Livepatch -[2]: https://auth.livepatch.canonical.com/ -[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[4]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-1.jpg -[5]: https://www.2daygeek.com/wp-content/uploads/2019/07/enable-canonical-livepatch-service-on-ubuntu-lts-system-2.jpg From f9acc0d819ef9162f0b237ebcec6c97e85379852 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 27 Jul 2019 11:29:16 +0800 Subject: [PATCH 150/951] APL:20190712 MTTR is dead, long live CIRT --- sources/tech/20190712 MTTR is dead, long live CIRT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190712 MTTR is dead, long live CIRT.md b/sources/tech/20190712 MTTR is dead, long live CIRT.md index 4ceca78067..2ee1eb19c8 100644 --- a/sources/tech/20190712 MTTR is dead, long live CIRT.md +++ b/sources/tech/20190712 MTTR is dead, long live CIRT.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 68384c5d18518dcf0e989dd9d86dbf8ce635dad5 Mon Sep 17 00:00:00 2001 From: severuspeng Date: Sat, 27 Jul 2019 15:14:13 +0800 Subject: [PATCH 151/951] anonymone apply to translate this paper. --- ...320 An Ubuntu User-s Review Of Dell XPS 13 Ubuntu Edition.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20170320 An Ubuntu User-s Review Of Dell XPS 13 Ubuntu Edition.md b/sources/talk/20170320 An Ubuntu User-s Review Of Dell XPS 13 Ubuntu Edition.md index 61a4c4993c..5e00b887d2 100644 --- a/sources/talk/20170320 An Ubuntu User-s Review Of Dell XPS 13 Ubuntu Edition.md +++ b/sources/talk/20170320 An Ubuntu User-s Review Of Dell XPS 13 Ubuntu Edition.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (anonymone ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 53f033843587d8de36b5577dd7bc3867330a2e36 Mon Sep 17 00:00:00 2001 From: WWWN Date: Sat, 27 Jul 2019 20:11:48 +0800 Subject: [PATCH 152/951] translated by hello-wn --- ...ccount Without useradd Command in Linux.md | 119 ------------------ ...ccount Without useradd Command in Linux.md | 117 +++++++++++++++++ 2 files changed, 117 insertions(+), 119 deletions(-) delete mode 100644 sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md create mode 100644 translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md diff --git a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md deleted file mode 100644 index bad72ea709..0000000000 --- a/sources/tech/20190723 How to Create a User Account Without useradd Command in Linux.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (hello-wn) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Create a User Account Without useradd Command in Linux?) -[#]: via: (https://www.2daygeek.com/linux-user-account-creation-in-manual-method/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -How to Create a User Account Without useradd Command in Linux? -====== - -There are three commands are available in Linux to create an user account. - -Did you ever tried to create a user account in Linux using manual method? - -I mean to say without using an above three commands. - -If you don’t know how to do that? we are here to help you on this and will show you in details. - -Have you wondering, how it’s possible? If yes, don’t worry, as we have mentioned many times that anything can be done on Linux. It is one of the example. - -Yes, we can create it. Are you excited to know more it? - - * **[Three Methods To Create A User Account In Linux?][1]** - * **[Two Methods To Create Bulk Users In Linux][2]** - - - -I don’t want to you to wait any more. Let’s do it right away. - -To do so, first, we need to find out last created UID and GID information. Once you have these information handy then proceed to next step. - -``` -# cat /etc/passwd | tail -1 - -tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash -``` - -Based on the above output. Last created user UID is 1153 and GID is 1154. To experiment this, we are going to add `tuser2` in the system. - -Now, add an entry of user details in /etc/passwd. There are seven fields exist and you need to add required details. - -``` -+-----------------------------------------------------------------------+ -|username:password:UID:GID:Comments:User Home Directory:User Login Shell| -+-----------------------------------------------------------------------+ - | | | | | | | - 1 2 3 4 5 6 7 - -1- Username: This field indicates the User name. Characters length should be between 1 to 32. -2- Password (x): It indicates that encrypted password is stored at /etc/shadow file. -3- User ID: It indicates the user ID (UID) each user should be contain unique UID. UID (0-Zero) is reserved for root, UID (1-99) reserved for system users and UID (100-999) reserved for system accounts/groups -4- Group ID (GID): It indicates the group ID (GID) each group should be contain unique GID is stored at /etc/group file. -5- Comment/User ID Info: It indicates the command field. This field can be used to describe the user information. -6- Home directory (/home/$USER): It indicates the user's home directory. -7- shell (/bin/bash): It indicates the user's shell. -``` - -Add the user information in end of the file. - -``` -# vi /etc/passwd - -tuser2:x:1154:1155:Test User2:/home/tuser2:/bin/bash -``` - -You have to create a group with same name. So, add a group details in /etc/group file as well. - -``` -# vi /etc/group - -tuser2:x:1155: -``` - -Once you done the above two steps, then set a password for user. - -``` -# passwd tuser2 - -Changing password for user tuser2. -New password: -Retype new password: -passwd: all authentication tokens updated successfully. -``` - -Finally, try to login with newly created user. - -``` -# ssh [email protected] - -[email protected]'s password: -Creating directory '/home/tuser2'. - -$ls -la - -total 16 -drwx------. 2 tuser2 tuser2 59 Jun 17 09:46 . -drwxr-xr-x. 15 root root 4096 Jun 17 09:46 .. --rw-------. 1 tuser2 tuser2 18 Jun 17 09:46 .bash_logout --rw-------. 1 tuser2 tuser2 193 Jun 17 09:46 .bash_profile --rw-------. 1 tuser2 tuser2 231 Jun 17 09:46 .bashrc -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/linux-user-account-creation-in-manual-method/ - -作者:[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/linux-user-account-creation-useradd-adduser-newusers/ -[2]: https://www.2daygeek.com/linux-bulk-users-creation-useradd-newusers/ diff --git a/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md new file mode 100644 index 0000000000..1e65b4df16 --- /dev/null +++ b/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md @@ -0,0 +1,117 @@ +[#]: collector: "lujun9972" +[#]: translator: "hello-wn" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "How to Create a User Account Without useradd Command in Linux?" +[#]: via: "https://www.2daygeek.com/linux-user-account-creation-in-manual-method/" +[#]: author: "Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/" + +# 在 Linux 中不使用 useradd 命令如何创建用户账号 + +Linux 中有三个命令可以用来创建用户账号。 + +你尝试过在 Linux 中手动创建用户吗? + +我的意思是不使用上面说的三个命令。 + +如果你不知道怎么做,本文可以手把手教你,并向你展示细节部分。 + +你有没有想过,这怎么可能?别担心,正如我们多次提到的那样,在 Linux 上任何事都可以搞定。这只是其中一例。 + +是的,我们可以做到的。想了解更多吗? + +- **[在 Linux 中创建用户的三种方法][1]** +- **[在 Linux 中批量创建用户的两种方法][2]** + +话不多说,让我们开始吧。 + +首先,我们要找出最后创建的 UID 和 GID 信息。 掌握了这些信息之后,就可以继续下一步。 + +``` +# cat /etc/passwd | tail -1 + +tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash +``` + +根据以上输出,最后创建的用户 UID 是 1153,GID 是 1154。为了试验,我们将在系统中添加 `tuser2` 用户。 + +现在,在`/etc/passwd` 文件中添加一条用户信息。 总共七个字段,你需要添加一些必要信息。 + +``` ++-----------------------------------------------------------------------+ +|username:password:UID:GID:Comments:User Home Directory:User Login Shell| ++-----------------------------------------------------------------------+ + | | | | | | | + 1 2 3 4 5 6 7 + +1- 用户名: 这个字段表示用户名称。字符长度必须在 1 到 32 之间。 +2- 密码 (x): 表示存储在 /etc/shadow 文件中的加密密码。 +3- 用户 ID: 表示用户 ID(UID),每个用户都有独一无二的 UID。UID(0)保留给root用户,UID(1-99)保留给系统用户,UID (100-999)保留给系统账号/组。 +4- 组 ID(GID): 表示 ID(GID) ,每个用户组都有独一无二的 GID,存储在 /etc/group 文件中。 +5- 注释/用户 ID 信息: 表示命令字段,用于描述用户信息。 +6- 主目录 (/home/$USER): 表示用户的主目录。 +7- shell (/bin/bash): 表示用户使用的 shell。 +``` + +在文件最后添加用户信息。 + +``` +# vi /etc/passwd + +tuser2:x:1154:1155:Test User2:/home/tuser2:/bin/bash +``` + +你需要创建相同名字的用户组。同样地,在`/etc/group`文件中添加用户组信息。 + +``` +# vi /etc/group + +tuser2:x:1155: +``` + +做完以上两步之后,给用户设置一个密码。 + +``` +# passwd tuser2 + +Changing password for user tuser2. +New password: +Retype new password: +passwd: all authentication tokens updated successfully. +``` + +最后,试着登录新创建的用户。 + +``` +# ssh [email protected] + +[email protected]'s password: +Creating directory '/home/tuser2'. + +$ls -la + +total 16 +drwx------. 2 tuser2 tuser2 59 Jun 17 09:46 . +drwxr-xr-x. 15 root root 4096 Jun 17 09:46 .. +-rw-------. 1 tuser2 tuser2 18 Jun 17 09:46 .bash_logout +-rw-------. 1 tuser2 tuser2 193 Jun 17 09:46 .bash_profile +-rw-------. 1 tuser2 tuser2 231 Jun 17 09:46 .bashrc +``` + +------ + +via: https://www.2daygeek.com/linux-user-account-creation-in-manual-method/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[hello-wn](https://github.com/hello-wn) +校对:[校对者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/linux-user-account-creation-useradd-adduser-newusers/ + +[2]: https://www.2daygeek.com/linux-bulk-users-creation-useradd-newusers/`'````````` `` ) ) ) From c6483c79548d6ee194c0bf778eaac49d1e4b9df8 Mon Sep 17 00:00:00 2001 From: WWWN Date: Sat, 27 Jul 2019 20:21:37 +0800 Subject: [PATCH 153/951] format link --- ...o Create a User Account Without useradd Command in Linux.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md index 1e65b4df16..920366cad5 100644 --- a/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md +++ b/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md @@ -113,5 +113,4 @@ via: https://www.2daygeek.com/linux-user-account-creation-in-manual-method/ [a]: https://www.2daygeek.com/author/magesh/ [b]: https://github.com/lujun9972 [1]: https://www.2daygeek.com/linux-user-account-creation-useradd-adduser-newusers/ - -[2]: https://www.2daygeek.com/linux-bulk-users-creation-useradd-newusers/`'````````` `` ) ) ) +[2]: https://www.2daygeek.com/linux-bulk-users-creation-useradd-newusers/ From bfe6caf3d8a73aeccdc57546951dbf00b57319e1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 28 Jul 2019 00:52:02 +0800 Subject: [PATCH 154/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190726=20The=20?= =?UTF-8?q?Future=20Of=20Red=20Hat=20At=20IBM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190726 The Future Of Red Hat At IBM.md --- .../20190726 The Future Of Red Hat At IBM.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20190726 The Future Of Red Hat At IBM.md diff --git a/sources/tech/20190726 The Future Of Red Hat At IBM.md b/sources/tech/20190726 The Future Of Red Hat At IBM.md new file mode 100644 index 0000000000..72cfc84a65 --- /dev/null +++ b/sources/tech/20190726 The Future Of Red Hat At IBM.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The Future Of Red Hat At IBM) +[#]: via: (https://www.linux.com/blog/future-red-hat-ibm) +[#]: author: (Swapnil Bhartiya https://www.linux.com/users/swapnil) + +The Future Of Red Hat At IBM +====== + +![][1] + +[Creative Commons Attribution-NonCommercial-NoDerivs][2] + +Swapnil Bhartiya + +IBM has a long history of [working with the open source community][3]. Way back in 1999, [IBM announced a $1billion investment in Linux][4]. IBM is also credited for creating one of the [most innovative advertisements about Linux.][5] But IBM’s acquisition of Red Hat raised some serious and genuine questions around IBM’s commitment to Open Source and the future of Red Hat at the big blue. + +Red Hat CTO, Chris Wright, took it upon himself to address some of these concerns and answer people’s questions in [an AMA (Ask Me Anything) on Reddit.][6] Wright has evolved from being a Linux kernel developer to becoming the CTO of the world’s largest open source company. He has his pulse on both the business and community sides of the open source world. + +**Red vs Blue:** Some of the most pressing questions asked during the AMA were around the future of open source and Red Hat at IBM. Red Hat has its unique identity and branding. You will often see people walking with their red hats on at open source events, you may even notice some permanent tattoos. + +One Redditor asked if there were any plans to overhaul Red Hat branding to make it blue or purple, Wright said, “No, Red Hat is Red. We just announced the evolution of our logo in May, no plans for any other changes. We like the new logo and so do the associates who already got tattoos of it!” + +**Kubernetes:** A Redditor asked about the future of Red Hat OpenShift and OKD (the Origin community distribution of Kubernetes). Wright assured that the acquisition doesn’t have any effect on OpenShift and OKD. Wright said that Red Hat is focused on delivering the industry’s most comprehensive enterprise Kubernetes platform – OpenShift - without changes.  + +As far as community engagement is concerned, “…upstream first development in Kubernetes and community ecosystem development in OKD are part of our product development process. Neither of those change,” he said. “The IBM acquisition can help accelerate the adoption of OpenShift given the increasing scale and reach in sales and services that IBM has.” + +**Conflict of Culture:** IBM and Red Hat are two companies with different, and often conflicting cultures. While Red Hat employees are allowed and encouraged to contribute to open Source, IBMers do not have the same level of freedom. One ex-IBMer asked, “IBM has traditionally had very strict policies regarding contributing to non-IBM open source projects. I understand that Red Hat's culture is quite different in this regard; do you see IBM loosening up in this regard? Or will only the Red Hat division operate differently?” + +Wright said that Red Hat would continue to operate the way it does with respect to allowing Red Hatters to contribute to open source projects.  + +IBM’s CTO of Open Source, Chris Ferris pitched in and said that for the past 5 years or so, the policy for IBMers contributing to open source on their own time was relaxed such that they could do so with their manager’s permission.  + +“In fact, we have been on a steady trend over the past 5 years or more to reduce the process barriers to both contributing to, and consuming open source and we continue to review our policies periodically. With the acquisition now complete, IBM has chosen to adopt the same policy towards contributing to open source on one’s own time as Red Hat has had historically. This is one important way that the Red Hat culture has benefited IBM developers.” + +Adam Kaplan, Senior Software Engineer at Red Hat, contributed to the AMA and said that Red Hat employees are free to contribute as they see fit, even if a said contribution goes against Red Hat's business objectives. + +**Future of Fedora & Gnome:** Red Hat is among the leading contributors to many open source projects that are being used by the larger open source community. Some Redditors expressed fear about the future of such projects that won’t be bringing in any revenue for IBM. + +One user asked about Fedora, which is the upstream for Red Hat Enterprise Linux. Wright assured that Fedora and its path stays the same. “It is an important community Linux distribution and Red Hat's involvement will continue to be the same.” + +Red Hat is one of the major contributors to Gnome, one of the biggest desktop environments for Linux and BSD. When asked about the future of Gnome, Wright said that nothing will change. “Certainly not to what we have contributed. More importantly, our future contributions will follow the same pattern,” he said. “We contribute to open source projects that are part of our product portfolio and focus on the areas that are important to our customers, which includes not just features but also long term maintainability (this becomes important in a codebase when you talk about architectural changes).” + +**Sunset at Oracle:** Some Redditors drew a comparison with Oracle’s acquisition of Sun Microsystems. “I guess the biggest concern among the “Linux community” in general is that Red Hat might go down the path Solaris did after Oracle's acquisition. IBM is viewed as an old school company, a bit like Oracle in that sense. We have learned through press that IBM's plan is to use Red Hat to change IBMs perception and not the other way around. Hope it's true. How do you guys plan on addressing such concerns? + +Wright said that Red Hat would continue to run as an independent company and the team would continue to do what it does best: engage with customers, partners, and open source communities to build open-source solutions.  + +“Those solutions focus on our hybrid cloud strategy. A key part of the acquisition is for IBM and Red Hat to work closely together to advance our customers’ journeys to an open hybrid cloud. You’ve seen mention of IBM’s plans to use Red Hat platforms as part of their offerings, so this is the other key piece here.  We stay independent, we share a vision, and IBM is building from our core platforms,” he said. + +Addressing a similar question that IBM has a history of buying companies and then breaking them up, Wright said, Red Hat will remain committed to the upstream work it does across the board.  “It is a fundamental part of how we develop our software products. Things like Network Manager create desktop usability, and can even be the impetus behind more core distro improvements. The IBM acquisition doesn’t change this at all. I see the future of Red Hat as staying focused on our core mission and continuing to evolve with (upstream first!) open source and our customer's needs,” he said. + +**IBM nukes all Open Source at Red Hat**: One Redditor asked what stops IBM from going nuclear and dismantling all of the open source work Red Hat has done?  + +Wright said that the reality of software is that open source has become the de facto means by which software is developed. “I often refer to this historic acquisition as an acknowledgment that open source has won. So, a simple way to look at this is the $34b value is about how important open source is to IBM’s strategy...again, open source has won!” he said, “Another way to look at it is the value that we’ve created with Red Hat is synonymous with open source. We wouldn’t exist without open source, it’s core to our strategy. And we (both Red Hat and IBM) are deeply vested in Red Hat’s continued success.” + +**Take Away** + +People should remember that by design, open source is protected from any such risk. If a company gets acquired and the code is at risk of being nuked, the community can fork the project and maintain it. Life goes on. Since everything that Red Hat does is open source, people can always take the code-base and maintain it themselves. open source code has escape velocities, it doesn’t go away with the companies that built it. + +After reading the entire AMA, it’s fair to conclude that Red Hat is safe in the hands of IBM. It’s like a drop of color in a glass of water. The entire glass of water turns red. Red Hat has a very strong community-driven, open source culture. It’s very likely that IBM will be the one benefitting and transforming into an even more open source friendly company. + +Rumor has it that one day Red Hat CEO Jim Whitehurst might become the CEO of IBM. When a Redditor asked the same question, whether Whitehurst will succeed Ginni Rometty as the CEO, Wright said, “I certainly don’t have a crystal ball, but I think Jim is a great CEO!” + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/future-red-hat-ibm + +作者:[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/users/swapnil +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/dsc_7800.jpg?itok=Ch1vMOHq (Jim Whitehurst) +[2]: https://www.linux.com/licenses/category/creative-commons-attribution-noncommercial-noderivs +[3]: https://www-03.ibm.com/press/us/en/pressrelease/2262.wss +[4]: https://en.wikipedia.org/wiki/Linux_Technology_Center +[5]: https://www.youtube.com/watch?v=s7dTjpvakmA +[6]: https://www.reddit.com/r/linux/comments/cgu6aj/chris_wright_cto_of_red_hat_is_hosting_an_ama_at/ From 18f4fdd007b3b338188a285cad243a9b1851e41e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 28 Jul 2019 00:53:34 +0800 Subject: [PATCH 155/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190726=20NVMe?= =?UTF-8?q?=20over=20Fabrics=20enterprise=20storage=20spec=20enters=20fina?= =?UTF-8?q?l=20review=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md --- ...torage spec enters final review process.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md diff --git a/sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md b/sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md new file mode 100644 index 0000000000..f14dcd7d67 --- /dev/null +++ b/sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md @@ -0,0 +1,71 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (NVMe over Fabrics enterprise storage spec enters final review process) +[#]: via: (https://www.networkworld.com/article/3411958/nvme-over-fabrics-enterprise-storage-spec-enters-final-review-process.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +NVMe over Fabrics enterprise storage spec enters final review process +====== +The NVMe over Fabric (NVMe-oF) architecture is closer to becoming a formal specification. It's expected improve storage network fabric communications and network performance. +![Gremlin / Getty Images][1] + +NVM Express Inc., the developer of the [NVMe][2] spec for enterprise SSDs, announced that its NVMe-oF architecture has entered a final 45-day review, an important step toward release of a formal specification for enterprise SSD makers. + +NVMe-oF stands for [NVMe over Fabrics][3], a mechanism to transfer data between a host computer and a target SSD or system over a network, such as Ethernet, Fibre Channel (FC), or InfiniBand. NVM Express first released the 1.0 spec of NVMe-oF in 2016, so this is long overdue. + +**[ Read also: [NVMe over Fabrics creates data-center storage disruption][3] ]** + +NVMe has become an important advance in enterprise storage because it allows for intra-network data sharing. Before, when PCI Express-based SSDs first started being used in servers, they could not easily share data with another physical server. The SSD was basically for the machine it was in, and moving data around was difficult. + +With NVMe over Fabrics, it’s possible for one machine to directly reach out to another for data and have it transmitted over a variety of high-speed fabrics rather than just Ethernet. + +### How NVMe-oF 1.1 improves storage network fabric communication + +The NVMe-oF 1.1 architecture is designed to improve storage network fabric communications in several ways: + + * Adds TCP transport supports NVMe-oF on current data center TCP/IP network infrastructure. + * Asynchronous discovery events inform hosts of addition or removal of target ports in a fabric-independent manner. + * Fabric I/O Queue Disconnect enables finer-grain I/O resource management. + * End-to-end (command to response) flow control improves concurrency. + + + +### New enterprise features for NVMe 1.4 + +The organization also announced the release of the NVMe 1.4 base specification with new “enterprise features” described as a further maturation of the protocol. The specification provides important benefits, such as improved quality of service (QoS), faster performance, improvements for high-availability deployments, and scalability optimizations for data centers. + +Among the new features: + + * Rebuild Assist simplifies data recovery and migration scenarios. + * Persistent Event Log enables robust drive history for issue triage and debug at scale. + * NVM Sets and IO Determinism allow for better performance, isolation, and QoS. + * Multipathing enhancements or Asymmetric Namespace Access (ANA) enable optimal and redundant paths to namespaces for high availability and full multi-controller scalability. + * Host Memory Buffer feature reduces latency and SSD design complexity, benefiting client SSDs. + + + +The upgraded NVMe 1.4 base specification and the pending over-fabric spec will be demonstrated at the Flash Memory Summit August 6-8, 2019 in Santa Clara, California. + +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/3411958/nvme-over-fabrics-enterprise-storage-spec-enters-final-review-process.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://images.idgesg.net/images/article/2019/02/big_data_storage_businessman_walks_through_futuristic_data_center_by_gremlin_gettyimages-1098116540_2400x1600-100788347-large.jpg +[2]: https://www.networkworld.com/article/3280991/what-is-nvme-and-how-is-it-changing-enterprise-storage.html +[3]: https://www.networkworld.com/article/3394296/nvme-over-fabrics-creates-data-center-storage-disruption.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From 1d2d1bada05e6fb086456d2621c199860aa60ed1 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Sat, 27 Jul 2019 17:00:40 +0000 Subject: [PATCH 156/951] Revert "IEAST is translating" This reverts commit 57aed462d786e87b5b42b6de2c754bbd2f8aabeb. --- ...ativity – Linux Programs for Drawing and Image Editing.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/tech/20171116 Unleash Your Creativity – Linux Programs for Drawing and Image Editing.md b/sources/tech/20171116 Unleash Your Creativity – Linux Programs for Drawing and Image Editing.md index 0b5576e3a6..c6c50d9b25 100644 --- a/sources/tech/20171116 Unleash Your Creativity – Linux Programs for Drawing and Image Editing.md +++ b/sources/tech/20171116 Unleash Your Creativity – Linux Programs for Drawing and Image Editing.md @@ -1,4 +1,3 @@ -IEAST is translating ### Unleash Your Creativity – Linux Programs for Drawing and Image Editing By: [chabowski][1] @@ -75,11 +74,11 @@ And indeed, the sky’s the limit on how creative a user wants to be when using ( - _**2** votes, average: **5.00** out of 5_ + _**2** votes, average: **5.00** out of 5_ ) - _You need to be a registered member to rate this post._ + _You need to be a registered member to rate this post._ Tags: [drawing][19], [Getting Started with Linux][20], [GIMP][21], [image editing][22], [Images][23], [InkScape][24], [KDE][25], [Krita][26], [Leap 42.3][27], [LibreOffice][28], [Linux Magazine][29], [Okular][30], [openSUSE][31], [PDF][32] Categories: [Desktop][33], [Expert Views][34], [LibreOffice][35], [openSUSE][36] From 64804efecf56c88af804239bd0fbe127af318358 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 08:47:24 +0800 Subject: [PATCH 157/951] PRF @wxy --- .../20190712 MTTR is dead, long live CIRT.md | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/sources/tech/20190712 MTTR is dead, long live CIRT.md b/sources/tech/20190712 MTTR is dead, long live CIRT.md index 2ee1eb19c8..9d591b3ab3 100644 --- a/sources/tech/20190712 MTTR is dead, long live CIRT.md +++ b/sources/tech/20190712 MTTR is dead, long live CIRT.md @@ -1,63 +1,62 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (MTTR is dead, long live CIRT) [#]: via: (https://opensource.com/article/19/7/measure-operational-performance) [#]: author: (Julie Gunderson https://opensource.com/users/juliegund/users/kearnsjd/users/ophir) -MTTR is dead, long live CIRT +MTTR 已死,CIRT 长存 ====== -By focusing on business-impacting incidents, CIRT is a more accurate way -to gauge ops performance. + +> 通过关注影响业务的事件,CIRT 是衡量运维绩效的更准确方法。 + ![Green graph of measurements][1] -The game is changing for the IT ops community, which means the rules of the past make less and less sense. Organizations need accurate, understandable, and actionable metrics in the right context to measure operations performance and drive critical business transformation. +IT 运维圈子的玩法正在发生变化,这意味着过去的规则越来越不合理。机构需要适当环境中的准确的、可理解的、且可操作的指标,以衡量运维绩效并推动关键业务转型。 -The more customers use modern tools and the more variation in the types of incidents they manage, the less sense it makes to smash all those different incidents into one bucket to compute an average resolution time that will represent ops performance, which is what IT has been doing for a long time. +越多的客户使用现代工具,他们管理的事件类型的变化越多,将所有这些不同事件粉碎到一个桶中以计算平均解决时间来表示运维绩效的意义就越少,这就是 IT 一直以来在做的事情。 -### History and metrics +### 历史与指标 -History shows that context is key when analyzing signals to prevent errors and misunderstandings. For example, during the 1980s, Sweden set up a system to analyze hydrophone signals to alert them to Russian submarines in local Sweden waters. The Swedes used an acoustic signature they thought represented a class of Russian submarines—but was actually [gas bubbles][2] released by herring when confronted by a potential predator. This misinterpretation of a metric increased tensions between the countries and almost resulted in a war. +历史表明,在分析信号以防止错误和误解时,背景信息是关键。例如,在 20 世纪 80 年代,瑞典建立了一个分析水听器信号的系统,以提醒他们在瑞典当地水域出现的俄罗斯潜艇。瑞典人使用了他们认为代表一类俄罗斯潜艇的声学特征 —— 但实际上是鲱鱼在遇到潜在捕食者时释放的[气泡声][2]。这种对指标的误解加剧了各国之间的紧张关系,几乎导致了战争。 ![Funny fish cartoon][3] -Mean time to resolve (MTTR) is the main ops performance metric operations managers use to gain insight towards achieving their goals. It is an age-old measure based on systems reliability engineering. MTTR has been adopted across many industries, including manufacturing, facility maintenance, and, more recently, IT ops, where it represents the average time it takes to resolve incidents from the time they were created across a given period of time. +平均解决时间Mean Time To Resolve(MTTR)是运维经理用于获得实现目标洞察力的主要运维绩效指标。这是一项基于系统可靠性工程systems reliability engineering的古老措施。MTTR 已被许多行业采用,包括制造、设施维护以及最近的 IT 运维,它代表了解决在特定时间段内创建的事件所需的平均时间。 -MTTR is calculated by dividing the time it takes to resolve all incidents (from the time of incident creation to time of resolution) by the total number of incidents. +MTTR 的计算方法是将所有事件(从事件创建时间到解决时间)所需的时间除以事件总数。 ![MTTR formula][4] -MTTR is exactly what it says: It's the average across _**all**_ incidents. MTTR smears together both high- and low-urgency incidents. It also repetitively counts each separate, ungrouped incident and results in a biased resolve time. It includes manually resolved and auto-resolved incidents in the same context. It mashes together incidents that are tabled for days (or months) after creation or are even completely ignored. Finally, MTTR includes every little transient burst (incidents that are auto-closed in under 120 seconds), which are either noisy non-issues or quickly resolved by a machine. +正如它所说的,MTTR 是 **所有** 事件的平均值。MTTR 将高紧急事件和低紧急事件混为一谈。它还会重复计算每个单独的、未分组的事件,并得出有效的解决时间。它包括了在相同上下文中手动解决和自动解决的事件。它将在创建了几天(或几个月)甚至完全被忽略的事件混合在一起。最后,MTTR 包括每个小的瞬态突发事件(在 120 秒内自动关闭的事件),这些突发事件要么是非问题噪音,要么已由机器快速解决。 ![Variability in incident types][5] -MTTR takes all incidents, regardless of type, throws them into a single bucket, mashes them all together, and calculates an "average" resolution time across the entire set. This overly simplistic method results in a noisy, erroneous, and misleading indication of how operations is performing. +MTTR 将所有事件(无论何种类型)抛入一个桶中,将它们全部混合在一起,并计算整个集合中的“平均”解决时间。这种过于简单化的方法导致运维执行方式的的噪音、错误和误导性指示。 -### A new way of measuring performance +### 一种衡量绩效的新方法 -Critical incident response time (CIRT) is a new, significantly more accurate method to evaluate operations performance. PagerDuty developed the concept of CIRT, but the methodology is freely available for anyone to use. +关键事件响应时间Critical Incident Response Time(CIRT)是评估运维绩效的一种更准确的新方法。PagerDuty 创立了 CIRT 的概念,但该方法可供所有人免费使用。 -CIRT focuses on the incidents that are most likely to impact business by culling noise from incoming signals using the following techniques: +CIRT 通过使用以下技术剔除来自信号的噪声,其重点关注最有可能影响业务的事件: - 1. Real business-impacting (or potentially impacting) incidents are very rarely low urgency, so rule out all low-urgency incidents. - 2. Real business-impacting incidents are very rarely (if ever) auto-resolved by monitoring tools without the need for human intervention, so rule out incidents that were not resolved by a human. - 3. Short, bursting, and transient incidents that are resolved within 120 seconds are highly unlikely to be real business-impacting incidents, so rule them out. - 4. Incidents that go unnoticed, tabled, or ignored (not acknowledged, not resolved) for a very long time are rarely business-impacting; rule them out. Note: This threshold can be a statistically derived number that is customer-specific (e.g., two standard deviations above the mean) to avoid using an arbitrary number. - 5. Individual, ungrouped incidents generated by separate alerts are not representative of the larger business-impacting incident. Therefore, simulate incident groupings with a very conservative threshold, e.g., two minutes, to calculate response time. +1. 真正影响(或可能影响)业务的事件很少是低紧急事件,因此要排除所有低紧急事件。 +2. 真正影响业务的事件很少(如果有的话)可以无需人为干预而通过监控工具自动解决,因此要排除未由人工解决的事件。 +3. 在 120 秒内解决的短暂、爆发性和瞬态事件几乎不可能是真正影响业务的事件,因此要排除它们。 +4. 长时间未被注意、提交或忽略(未确认、未解决)的事件很少会对业务造成影响;排除它们。注意:此阈值可以是特定于客户的统计推导数字(例如,高于均值的两个标准差),以避免使用任意数字。 +5. 由单独警报产生的个别未分组事件并不代表较大的业务影响事件。因此,模拟具有非常保守的阈值(例如,两分钟)的事件分组以计算响应时间。 +应用这些假设对响应时间有什么影响?简而言之,效果非常非常大! +通过在关键的、影响业务的事件中关注运维绩效,解决时间分布变窄并极大地向左偏移,因为现在它处理类似类型的事件而不是所有事件。 -What effect does applying these assumptions have on response times? In a nutshell, a very, very large effect! +由于 MTTR 计算的响应时间长得多、人为地偏差,因此它是运维绩效较差的一个指标。另一方面,CIRT 是一项有意的措施,专注于对业务最重要的事件。 -By focusing on ops performance during critical, business-impacting incidents, the resolve-time distribution narrows and shifts greatly to the left, because now it is dealing with similar types of incidents rather than all events. +与 CIRT 一起使用的另一个关键措施是确认和解决事故的百分比。这很重要,因为它验证 CIRT(或 MTTA / MTTR)是否值得利用。例如,如果 MTTR 结果很低,比如 10 分钟,那听起来不错,但如果只有 42% 的事件得到解决,那么 MTTR 是可疑的。 -Because MTTR calculates a much longer, artificially skewed response time, it is a poor indicator of operations performance. CIRT, on the other hand, is an intentional measure focused on the incidents that matter most to business. - -An additional critical measure that is wise to use alongside CIRT is the percentage of responders who are acknowledging and resolving incidents. This is important, as it validates whether the CIRT (or MTTA/MTTR for that matter) is worth utilizing. For example, if an MTTR result is low, say 10 minutes, it sounds great, but if only 42% of your responders are resolving their incidents, then that number is suspect. - -In summary, CIRT and the percentage of responders who are acknowledging and resolving incidents form a valuable set of metrics that give you a much better idea of how operations is performing. Gauging performance is the first step to improving performance, so these new measures are key to achieving continuous cycles of measurable improvement for your organization. +总之,CIRT 和确认、解决事件的百分比形成了一组有价值的指标,可以让你更好地了解运营的执行情况。衡量绩效是提高绩效的第一步,因此这些新措施对于实现机构的可持续、可衡量的改进周期至关重要。 -------------------------------------------------------------------------------- @@ -65,8 +64,8 @@ via: https://opensource.com/article/19/7/measure-operational-performance 作者:[Julie Gunderson][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 6cac7479913bc6121d8dcd7b86a7e8ff6f5c52fe Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 08:48:52 +0800 Subject: [PATCH 158/951] TSL --- .../talk}/20190712 MTTR is dead, long live CIRT.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/tech => translated/talk}/20190712 MTTR is dead, long live CIRT.md (100%) diff --git a/sources/tech/20190712 MTTR is dead, long live CIRT.md b/translated/talk/20190712 MTTR is dead, long live CIRT.md similarity index 100% rename from sources/tech/20190712 MTTR is dead, long live CIRT.md rename to translated/talk/20190712 MTTR is dead, long live CIRT.md From a30341e325332c066e73610dab4fe3174ce700ca Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 28 Jul 2019 11:03:48 +0800 Subject: [PATCH 159/951] Translating by MjSeven --- sources/tech/20190723 Getting help for Linux shell built-ins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190723 Getting help for Linux shell built-ins.md b/sources/tech/20190723 Getting help for Linux shell built-ins.md index 621ee44bed..5e75f8c3b5 100644 --- a/sources/tech/20190723 Getting help for Linux shell built-ins.md +++ b/sources/tech/20190723 Getting help for Linux shell built-ins.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From a7702ece6f554dd2bfce9cc3425295cf0d3a1cae Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 28 Jul 2019 15:15:05 +0800 Subject: [PATCH 160/951] PUB (#14749) @wxy https://linux.cn/article-11155-1.html --- .../20190712 MTTR is dead, long live CIRT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20190712 MTTR is dead, long live CIRT.md (98%) diff --git a/translated/talk/20190712 MTTR is dead, long live CIRT.md b/published/20190712 MTTR is dead, long live CIRT.md similarity index 98% rename from translated/talk/20190712 MTTR is dead, long live CIRT.md rename to published/20190712 MTTR is dead, long live CIRT.md index 9d591b3ab3..1055d9e832 100644 --- a/translated/talk/20190712 MTTR is dead, long live CIRT.md +++ b/published/20190712 MTTR is dead, long live CIRT.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11155-1.html) [#]: subject: (MTTR is dead, long live CIRT) [#]: via: (https://opensource.com/article/19/7/measure-operational-performance) [#]: author: (Julie Gunderson https://opensource.com/users/juliegund/users/kearnsjd/users/ophir) From 9dbf55b1f9802b43262008dd994a41f8637d48ef Mon Sep 17 00:00:00 2001 From: WWWN Date: Sun, 28 Jul 2019 15:15:48 +0800 Subject: [PATCH 161/951] translating by hello-wn (#14751) --- .../20190724 3 types of metric dashboards for DevOps teams.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md b/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md index 06b97408e7..e54f0455f7 100644 --- a/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md +++ b/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (hello-wn) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 918d75bea701ca58ad176ae0a392e8d2970e09f7 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 28 Jul 2019 15:21:24 +0800 Subject: [PATCH 162/951] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Getting help for Linux shell built-ins.md | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) rename {sources => translated}/tech/20190723 Getting help for Linux shell built-ins.md (72%) diff --git a/sources/tech/20190723 Getting help for Linux shell built-ins.md b/translated/tech/20190723 Getting help for Linux shell built-ins.md similarity index 72% rename from sources/tech/20190723 Getting help for Linux shell built-ins.md rename to translated/tech/20190723 Getting help for Linux shell built-ins.md index 5e75f8c3b5..602ed7ee84 100644 --- a/sources/tech/20190723 Getting help for Linux shell built-ins.md +++ b/translated/tech/20190723 Getting help for Linux shell built-ins.md @@ -7,39 +7,38 @@ [#]: via: (https://www.networkworld.com/article/3410350/getting-help-for-linux-shell-built-ins.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) -Getting help for Linux shell built-ins +获取有关 Linux shell 内置命令的帮助 ====== -Linux built-ins are commands that are part of a user’s shell. Here's an explanation on how to recognize them and get help on their use. +Linux 内置命令是属于用户 shell 的一部分,本文将告诉你如何识别它们并从它们那获得帮助。 ![Sandra Henry-Stocker][1] -Linux built-ins are commands that are built into the shell, much like shelves that are built into a wall. You won’t find them as stand-alone files the way standard Linux commands are stored in /usr/bin and you probably use quite a few of them without ever questioning how they’re different from commands such as **ls** and **pwd**. +Linux 内置命令是内置于 shell 中的命令,很像内置于墙中的架子。与标准 Linux 命令存储在 /usr/bin 中的方式不同,它们不会作为独立文件被你找到,你可能会使用它们中的相当一部分,但不会质疑它们与 **ls** 和 **pwd** 等命令有何不同。 -Built-ins are used just like other Linux commands. They are likely to run a bit faster than similar commands that are not part of your shell. Bash built-ins include commands such as **alias**, **export** and **bg**. +内置命令与其他 Linux 命令一样使,它们可能比不属于 shell 的类似命令运行得快一些。Bash 内置命令包括 **alias**、**export** 和 **bg** 等。 -**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** +**[ 两分钟 Linux 技巧: [学习如何在 2 分钟视频教程中掌握大量 Linux 命令][2] ]** -As you might suspect, because built-ins are shell-specific, they won't be supplied with man pages. Ask **man** to help with **bg** and you'll see something like this: +正如你担心的那样,因为内置命令是特定于 shell 的,所以它们不会提供手册页。使用 **man** 来查看 **bg**,你会看到这样的东西: ``` $ man bg No manual entry for bg ``` -Another tip-off that a command is a built-in is when you use the **which** command to identify the source of the command. Bash's non-response will remind you that there is no file associated with the built-in: - +判断内置命令的另一个提示是当你使用 **which** 命令来识别命令的来源时,Bash 不会响应,表示没有与内置命令关联的文件: ``` $ which bg $ ``` -If your shell is **/bin/zsh**, on the other hand, you might get a slightly more illuminating response: +如果你的 shell 是 **/bin/zsh**,另一方面,你可能会得到一个更有启发性的响应: ``` % which bg bg: shell built-in command ``` -Additional help is available with bash, but it comes through the use of the **help** command: +bash 提供了额外的帮助,但它是通过使用 **help** 命令实现的: ``` $ help bg @@ -54,7 +53,7 @@ bg: bg [job_spec ...] Returns success unless job control is not enabled or an error occurs. ``` -If you want to see a list of all of the built-ins that bash provides, use the **compgen -b**  command. Pipe the output to column for a nicely formatted listing. +如果你想要查看 bash 提供的所有内置命令的列表,使用 **compgen -b** 命令。通过管道将命令输出到列中,以获得较好格式的清单。 ``` $ compgen -b | column @@ -71,8 +70,7 @@ cd eval jobs readarray true command exec kill readonly type ``` -If you use the **help** command, you’ll see a list of built-ins along with short descriptions. This list is, however, truncated (ending with the **help** command): - +如果你使用 **help** 命令,你将看到一个内置命令列表以及简短描述。但是,这个列表被截断了(以 **help** 命令结尾): ``` $ help GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu) @@ -123,9 +121,9 @@ A star (*) next to a name means that the command is disabled. help [-dms] [pattern ...] { COMMANDS ; } ``` -As you can see from the listings above, the **help** command is itself a built-in. +从上面的清单中可以看出,**help** 命令本身就是内置的。 -You can get more information on any of these built-ins by providing the **help** command with the name of the built-in you're curious about — as in **help dirs**. +你可以通过向 **help** 命令提供你感兴趣的内置命令名称来获取关于它们的更多信息,例如 **help dirs**: ``` $ help dirs @@ -157,7 +155,7 @@ dirs: dirs [-clpv] [+N] [-N] Returns success unless an invalid option is supplied or an error occurs. ``` -Built-ins provide much of the functionality of each shell. Any shell you use will have some built-ins, though how to get information on these built-ins may differ from shell to shell. For **zsh**, for example, you can get a description of built-in commands by using the **man zshbuiltins** command. +内置命令提供了每个 shell 的大部分功能。你使用的任何 shell 都有一些内置命令,但是如何获取这些内置命令的信息可能因 shell 而异。例如,对于 **zsh**,你可以使用 **man zshbuiltins** 命令获得其内置命令的描述。 ``` $ man zshbuiltins @@ -177,7 +175,7 @@ SHELL BUILTIN COMMANDS … ``` -Within this lengthy man page, you will find a list of built-ins with useful descriptions as in this excerpt. +在这个冗长的手册页中,你将找到一个内置命令列表,其中包含有用的描述,如下摘录中所示: ``` bg [ job ... ] @@ -194,13 +192,13 @@ break [ n ] instead of just one. ``` -### Wrap-up +### 最后 -Linux built-ins are essential to each shell and operate like shell-specific commands. If you use a different shell from time to time and notice that some command you often use doesn’t seem to exist or doesn’t work as you were expecting, it just might be that it's one of your normal shell's built-ins. +Linux 内置命令对于每个 shell 都很重要,它的操作类似特定于 shell 的命令一样。如果你经常使用不同的 shell,并注意到你经常使用的某些命令似乎不存在或者不能按预期工作,那么它可能是你使用的其他 shell 之一中的内置命令。 -**[ Also see: [Invaluable tips and tricks for troubleshooting Linux][3] ]** +**[ 另请参考: [Linux 疑难解答的宝贵提示和技巧][3] ]** -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. +加入 [Facebook][4] 和 [Linkedln][5] 上的网络世界社区,对你最关心的话题发表评论。 -------------------------------------------------------------------------------- @@ -208,7 +206,7 @@ via: https://www.networkworld.com/article/3410350/getting-help-for-linux-shell-b 作者:[Sandra Henry-Stocker][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[MjSeven](https://github.com/MjSeven) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b127c2e4def1a18f44509f3289092675edb3b7f8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 19:43:45 +0800 Subject: [PATCH 163/951] PUB @wxy https://linux.cn/article-11152-1.html --- ... Kernel Livepatch Service on Ubuntu LTS System.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) rename {translated/tech => published}/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md (93%) diff --git a/translated/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md similarity index 93% rename from translated/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md rename to published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md index ec30de1405..ebda41f03c 100644 --- a/translated/tech/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md +++ b/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11152-1.html) [#]: subject: (How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System?) [#]: via: (https://www.2daygeek.com/enable-canonical-kernel-livepatch-service-on-ubuntu-lts-system/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) @@ -10,6 +10,8 @@ 如何在 Ubuntu LTS 系统上启用 Canonical 的内核实时补丁服务 ====== +![](https://img.linux.net.cn/data/attachment/album/201907/27/072251d3dij23lndtuutzr.jpg) + Canonical 在 Ubuntu 14.04 LTS 系统中引入了内核实时补丁服务Kernel Livepatch Service。实时补丁服务允许你安装和应用关键的 Linux 内核安全更新,而无需重新启动系统。这意味着,在应用内核补丁程序后,你无需重新启动系统。而通常情况下,我们需要在安装内核补丁后重启 Linux 服务器才能供系统使用。 实时修补非常快。大多数内核修复程序只需要几秒钟。Canonical 的实时补丁服务对于不超过 3 个系统的用户无需任何费用。你可以通过命令行在桌面和服务器中启用 Canonical 实时补丁服务。 @@ -113,9 +115,9 @@ version: "" `patchState` 会有以下状态之一: -   * `applied`:未发现任何漏洞 -   * `nothing-to-apply`:成功找到并修补了漏洞 -   * `kernel-upgrade-required`:实时补丁服务无法安装补丁来修复漏洞 +* `applied`:未发现任何漏洞 +* `nothing-to-apply`:成功找到并修补了漏洞 +* `kernel-upgrade-required`:实时补丁服务无法安装补丁来修复漏洞 请注意,安装内核补丁与在系统上升级/安装新内核不同。如果安装了新内核,则必须重新引导系统以激活新内核。 From c9d037491dcdbbea22371450e0106e8a3ace8a95 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 20:06:37 +0800 Subject: [PATCH 164/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @hello-wn 恭喜你完成了第一篇翻译! --- ...ccount Without useradd Command in Linux.md | 48 +++++++++---------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md index 920366cad5..e12a454e28 100644 --- a/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md +++ b/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md @@ -1,28 +1,25 @@ [#]: collector: "lujun9972" [#]: translator: "hello-wn" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "How to Create a User Account Without useradd Command in Linux?" -[#]: via: "https://www.2daygeek.com/linux-user-account-creation-in-manual-method/" -[#]: author: "Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " +[#]: subject: "How to Create a User Account Without useradd Command in Linux?" +[#]: via: "https://www.2daygeek.com/linux-user-account-creation-in-manual-method/" +[#]: author: "Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/" -# 在 Linux 中不使用 useradd 命令如何创建用户账号 +在 Linux 中不使用 useradd 命令如何创建用户账号 +======== -Linux 中有三个命令可以用来创建用户账号。 - -你尝试过在 Linux 中手动创建用户吗? - -我的意思是不使用上面说的三个命令。 +Linux 中有三个命令可以用来创建用户账号。你尝试过在 Linux 中手动创建用户吗?我的意思是不使用上面说的三个命令。 如果你不知道怎么做,本文可以手把手教你,并向你展示细节部分。 -你有没有想过,这怎么可能?别担心,正如我们多次提到的那样,在 Linux 上任何事都可以搞定。这只是其中一例。 +你可能想,这怎么可能?别担心,正如我们多次提到的那样,在 Linux 上任何事都可以搞定。这只是其中一例。 是的,我们可以做到的。想了解更多吗? -- **[在 Linux 中创建用户的三种方法][1]** -- **[在 Linux 中批量创建用户的两种方法][2]** +- [在 Linux 中创建用户的三种方法][1] +- [在 Linux 中批量创建用户的两种方法][2] 话不多说,让我们开始吧。 @@ -30,7 +27,6 @@ Linux 中有三个命令可以用来创建用户账号。 ``` # cat /etc/passwd | tail -1 - tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash ``` @@ -44,16 +40,16 @@ tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash +-----------------------------------------------------------------------+ | | | | | | | 1 2 3 4 5 6 7 - -1- 用户名: 这个字段表示用户名称。字符长度必须在 1 到 32 之间。 -2- 密码 (x): 表示存储在 /etc/shadow 文件中的加密密码。 -3- 用户 ID: 表示用户 ID(UID),每个用户都有独一无二的 UID。UID(0)保留给root用户,UID(1-99)保留给系统用户,UID (100-999)保留给系统账号/组。 -4- 组 ID(GID): 表示 ID(GID) ,每个用户组都有独一无二的 GID,存储在 /etc/group 文件中。 -5- 注释/用户 ID 信息: 表示命令字段,用于描述用户信息。 -6- 主目录 (/home/$USER): 表示用户的主目录。 -7- shell (/bin/bash): 表示用户使用的 shell。 ``` +1. 用户名:这个字段表示用户名称。字符长度必须在 1 到 32 之间。 +2. 密码(`x`):表示存储在 `/etc/shadow` 文件中的加密密码。 +3. 用户 ID:表示用户的 ID(UID),每个用户都有独一无二的 UID。UID 0 保留给 root 用户,UID 1-99 保留给系统用户,UID 100-999 保留给系统账号/组。 +4. 组 ID:表示用户组的 ID(GID),每个用户组都有独一无二的 GID,存储在 `/etc/group` 文件中。 +5. 注释/用户 ID 信息:这个字段表示备注,用于描述用户信息。 +6. 主目录(`/home/$USER`):表示用户的主目录。 +7. shell(`/bin/bash`):表示用户使用的 shell。 + 在文件最后添加用户信息。 ``` @@ -62,7 +58,7 @@ tuser1:x:1153:1154:Test User:/home/tuser1:/bin/bash tuser2:x:1154:1155:Test User2:/home/tuser2:/bin/bash ``` -你需要创建相同名字的用户组。同样地,在`/etc/group`文件中添加用户组信息。 +你需要创建相同名字的用户组。同样地,在 `/etc/group` 文件中添加用户组信息。 ``` # vi /etc/group @@ -106,7 +102,7 @@ via: https://www.2daygeek.com/linux-user-account-creation-in-manual-method/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] 译者:[hello-wn](https://github.com/hello-wn) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 396bdd71071334970c7360d663374c97c16cdd7b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 20:07:59 +0800 Subject: [PATCH 165/951] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @hello-wn 本文首发地址: https://linux.cn/article-11156-1.html 您的 LCTT 专页地址: https://linux.cn/lctt/hello-wn 请注册领取 LCCN: https://lctt.linux.cn/ --- ... Create a User Account Without useradd Command in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190723 How to Create a User Account Without useradd Command in Linux.md (98%) diff --git a/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md b/published/20190723 How to Create a User Account Without useradd Command in Linux.md similarity index 98% rename from translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md rename to published/20190723 How to Create a User Account Without useradd Command in Linux.md index e12a454e28..3bc9a26c39 100644 --- a/translated/tech/20190723 How to Create a User Account Without useradd Command in Linux.md +++ b/published/20190723 How to Create a User Account Without useradd Command in Linux.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "hello-wn" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-11156-1.html" [#]: subject: "How to Create a User Account Without useradd Command in Linux?" [#]: via: "https://www.2daygeek.com/linux-user-account-creation-in-manual-method/" [#]: author: "Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/" From 7a532000241567bae133148ebaa766aa8a743c6d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 20:48:10 +0800 Subject: [PATCH 166/951] PRF @MjSeven --- ... Getting help for Linux shell built-ins.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/translated/tech/20190723 Getting help for Linux shell built-ins.md b/translated/tech/20190723 Getting help for Linux shell built-ins.md index 602ed7ee84..ed1833deb0 100644 --- a/translated/tech/20190723 Getting help for Linux shell built-ins.md +++ b/translated/tech/20190723 Getting help for Linux shell built-ins.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Getting help for Linux shell built-ins) @@ -9,36 +9,37 @@ 获取有关 Linux shell 内置命令的帮助 ====== -Linux 内置命令是属于用户 shell 的一部分,本文将告诉你如何识别它们并从它们那获得帮助。 -![Sandra Henry-Stocker][1] -Linux 内置命令是内置于 shell 中的命令,很像内置于墙中的架子。与标准 Linux 命令存储在 /usr/bin 中的方式不同,它们不会作为独立文件被你找到,你可能会使用它们中的相当一部分,但不会质疑它们与 **ls** 和 **pwd** 等命令有何不同。 +> Linux 内置命令属于用户 shell 的一部分,本文将告诉你如何识别它们并获取使用它们的帮助。 -内置命令与其他 Linux 命令一样使,它们可能比不属于 shell 的类似命令运行得快一些。Bash 内置命令包括 **alias**、**export** 和 **bg** 等。 +![](https://img.linux.net.cn/data/attachment/album/201907/28/204915bj1wmhxeargx14lt.jpg) -**[ 两分钟 Linux 技巧: [学习如何在 2 分钟视频教程中掌握大量 Linux 命令][2] ]** +Linux 内置命令是内置于 shell 中的命令,很像内置于墙中的书架。与标准 Linux 命令存储在 `/usr/bin` 中的方式不同,你不会找到它们的独立文件,你可能使用过相当多的内置命令,但你不会感觉到它们与 `ls` 和 `pwd` 等命令有何不同。 -正如你担心的那样,因为内置命令是特定于 shell 的,所以它们不会提供手册页。使用 **man** 来查看 **bg**,你会看到这样的东西: +内置命令与其他 Linux 命令一样使用,它们可能要比不属于 shell 的类似命令运行得快一些。Bash 内置命令包括 `alias`、`export` 和 `bg` 等。 + +正如你担心的那样,因为内置命令是特定于 shell 的,所以它们不会提供手册页。使用 `man` 来查看 `bg`,你会看到这样的东西: ``` $ man bg No manual entry for bg ``` -判断内置命令的另一个提示是当你使用 **which** 命令来识别命令的来源时,Bash 不会响应,表示没有与内置命令关联的文件: +判断内置命令的另一个提示是当你使用 `which` 命令来识别命令的来源时,Bash 不会响应,表示没有与内置命令关联的文件: + ``` $ which bg $ ``` -如果你的 shell 是 **/bin/zsh**,另一方面,你可能会得到一个更有启发性的响应: +另一方面,如果你的 shell 是 `/bin/zsh`,你可能会得到一个更有启发性的响应: ``` % which bg bg: shell built-in command ``` -bash 提供了额外的帮助,但它是通过使用 **help** 命令实现的: +bash 提供了额外的帮助信息,但它是通过使用 `help` 命令实现的: ``` $ help bg @@ -53,7 +54,7 @@ bg: bg [job_spec ...] Returns success unless job control is not enabled or an error occurs. ``` -如果你想要查看 bash 提供的所有内置命令的列表,使用 **compgen -b** 命令。通过管道将命令输出到列中,以获得较好格式的清单。 +如果你想要查看 bash 提供的所有内置命令的列表,使用 `compgen -b` 命令。通过管道将命令输出到列中,以获得较好格式的清单。 ``` $ compgen -b | column @@ -70,7 +71,8 @@ cd eval jobs readarray true command exec kill readonly type ``` -如果你使用 **help** 命令,你将看到一个内置命令列表以及简短描述。但是,这个列表被截断了(以 **help** 命令结尾): +如果你使用 `help` 命令,你将看到一个内置命令列表以及简短描述。但是,这个列表被截断了(以 `help` 命令结尾): + ``` $ help GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu) @@ -121,9 +123,9 @@ A star (*) next to a name means that the command is disabled. help [-dms] [pattern ...] { COMMANDS ; } ``` -从上面的清单中可以看出,**help** 命令本身就是内置的。 +从上面的清单中可以看出,`help` 命令本身就是内置的。 -你可以通过向 **help** 命令提供你感兴趣的内置命令名称来获取关于它们的更多信息,例如 **help dirs**: +你可以通过向 `help` 命令提供你感兴趣的内置命令名称来获取关于它们的更多信息,例如 `help dirs`: ``` $ help dirs @@ -155,7 +157,7 @@ dirs: dirs [-clpv] [+N] [-N] Returns success unless an invalid option is supplied or an error occurs. ``` -内置命令提供了每个 shell 的大部分功能。你使用的任何 shell 都有一些内置命令,但是如何获取这些内置命令的信息可能因 shell 而异。例如,对于 **zsh**,你可以使用 **man zshbuiltins** 命令获得其内置命令的描述。 +内置命令提供了每个 shell 的大部分功能。你使用的任何 shell 都有一些内置命令,但是如何获取这些内置命令的信息可能因 shell 而异。例如,对于 `zsh`,你可以使用 `man zshbuiltins` 命令获得其内置命令的描述。 ``` $ man zshbuiltins @@ -196,10 +198,6 @@ break [ n ] Linux 内置命令对于每个 shell 都很重要,它的操作类似特定于 shell 的命令一样。如果你经常使用不同的 shell,并注意到你经常使用的某些命令似乎不存在或者不能按预期工作,那么它可能是你使用的其他 shell 之一中的内置命令。 -**[ 另请参考: [Linux 疑难解答的宝贵提示和技巧][3] ]** - -加入 [Facebook][4] 和 [Linkedln][5] 上的网络世界社区,对你最关心的话题发表评论。 - -------------------------------------------------------------------------------- via: https://www.networkworld.com/article/3410350/getting-help-for-linux-shell-built-ins.html @@ -207,7 +205,7 @@ via: https://www.networkworld.com/article/3410350/getting-help-for-linux-shell-b 作者:[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 7c3a0edea19e475526e481765d6711e6a024521b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 20:48:47 +0800 Subject: [PATCH 167/951] PUB @MjSeven https://linux.cn/article-11158-1.html --- .../20190723 Getting help for Linux shell built-ins.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190723 Getting help for Linux shell built-ins.md (99%) diff --git a/translated/tech/20190723 Getting help for Linux shell built-ins.md b/published/20190723 Getting help for Linux shell built-ins.md similarity index 99% rename from translated/tech/20190723 Getting help for Linux shell built-ins.md rename to published/20190723 Getting help for Linux shell built-ins.md index ed1833deb0..490de661c7 100644 --- a/translated/tech/20190723 Getting help for Linux shell built-ins.md +++ b/published/20190723 Getting help for Linux shell built-ins.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11158-1.html) [#]: subject: (Getting help for Linux shell built-ins) [#]: via: (https://www.networkworld.com/article/3410350/getting-help-for-linux-shell-built-ins.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) From a0e370383944b0979abed5d413498bb5a0974ea2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 22:04:47 +0800 Subject: [PATCH 168/951] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XYenChi @Northurland @warmfrog @amwps290 @name1e5s @lixinyuxx @Jamskr @zianglei @An-DJ @zhangxiangping --- ...open sources part of onboarding process.md | 42 - ...tion, npm token scanning, and more news.md | 84 - ...nciples of resilience for women in tech.md | 1 - ... Did Ada Lovelace-s Program Actually Do.md | 2 - .../20190131 OOP Before OOP with Simula.md | 2 +- ...in Cisco, Palo Alto, F5, Pulse software.md | 76 - ...ojure - Modern dialect of Lisp (Part 1).md | 1784 ----------------- ...1114 Finding Files with mlocate- Part 2.md | 1 - sources/tech/20180416 Cgo and Python.md | 1 - ...e tools to make literature reviews easy.md | 1 - ...Linux Terminals and Online Bash Editors.md | 212 -- ...x kernel- The secrets of Kconfig-kbuild.md | 2 - ... Released After 16 Years of Development.md | 87 - ...How to manage storage on Linux with LVM.md | 1 - ...190304 How to Install MongoDB on Ubuntu.md | 2 +- ...Print JSON With Linux Commandline Tools.md | 2 +- 16 files changed, 3 insertions(+), 2297 deletions(-) delete mode 100644 sources/news/20190619 Codethink open sources part of onboarding process.md delete mode 100644 sources/news/20190622 Cloudflare-s random number generator, robotics data visualization, npm token scanning, and more news.md delete mode 100644 sources/talk/20190412 Gov-t warns on VPN security bug in Cisco, Palo Alto, F5, Pulse software.md delete mode 100644 sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md delete mode 100644 sources/tech/20180725 Best Online Linux Terminals and Online Bash Editors.md delete mode 100644 sources/tech/20181011 The First Beta of Haiku is Released After 16 Years of Development.md diff --git a/sources/news/20190619 Codethink open sources part of onboarding process.md b/sources/news/20190619 Codethink open sources part of onboarding process.md deleted file mode 100644 index 537ded948b..0000000000 --- a/sources/news/20190619 Codethink open sources part of onboarding process.md +++ /dev/null @@ -1,42 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Codethink open sources part of onboarding process) -[#]: via: (https://opensource.com/article/19/6/codethink-onboarding-process) -[#]: author: (Laurence Urhegyi https://opensource.com/users/laurence-urhegyi) - -Codethink open sources part of onboarding process -====== -In other words, how to Git going in FOSS. -![Teacher or learner?][1] - -Here at [Codethink][2], we’ve recently focused our energy into enhancing the onboarding process we use for all new starters at the company. As we grow steadily in size, it’s important that we have a well-defined approach to both welcoming new employees into the company, and introducing them to the organization’s culture. - -As part of this overall onboarding effort, we’ve created [_How to Git going in FOSS_][3]: an introductory guide to the world of free and open source software (FOSS), and some of the common technologies, practices, and principles associated with free and open source software. - -This guide was initially aimed at work experience students and summer interns. However, the document is in fact equally applicable to anyone who is new to free and open source software, no matter their prior experience in software or IT in general. _How to Git going in FOSS_ is hosted on GitLab and consists of several repositories, each designed to be a self-guided walk through. - -Our guide begins with a general introduction to FOSS, including explanations of the history of GNU/Linux, how to use [Git][4] (as well as Git hosting services such as GitLab), and how to use a text editor. The document then moves on to exercises that show the reader how to implement some of the things they’ve just learned. - -_How to Git going in FOSS_ is fully public and available for anyone to try. If you’re new to FOSS or know someone who is, then please have a read-through, and see what you think. If you have any feedback, feel free to raise an issue on GitLab. And, of course, we also welcome contributions. We’re keen to keep improving the guide however possible. One future improvement we plan to make is an additional exercise that is more complex than the existing two, such as potentially introducing the reader to [Continuous Integration][5]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/codethink-onboarding-process - -作者:[Laurence Urhegyi][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/laurence-urhegyi -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?) -[2]: https://www.codethink.co.uk/about.html -[3]: https://gitlab.com/ct-starter-guide -[4]: https://git-scm.com -[5]: https://en.wikipedia.org/wiki/Continuous_integration diff --git a/sources/news/20190622 Cloudflare-s random number generator, robotics data visualization, npm token scanning, and more news.md b/sources/news/20190622 Cloudflare-s random number generator, robotics data visualization, npm token scanning, and more news.md deleted file mode 100644 index af595d310b..0000000000 --- a/sources/news/20190622 Cloudflare-s random number generator, robotics data visualization, npm token scanning, and more news.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cloudflare's random number generator, robotics data visualization, npm token scanning, and more news) -[#]: via: (https://opensource.com/article/19/6/news-june-22) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Cloudflare's random number generator, robotics data visualization, npm token scanning, and more news -====== -Catch up on the biggest open source headlines from the past two weeks. -![Weekly news roundup with TV][1] - -In this edition of our open source news roundup, we take a look Cloudflare's open source random number generator, more open source robotics data, new npm functionality, and more! - -### Cloudflare announces open source random number generator project - -Is there such a thing as a truly random number? Internet security and services provider Cloudflare things so. To prove it, the company has formed [The League of Entropy][2], an open source project to create a generator for random numbers. - -The League consists of Cloudflare and "five other organisations — predominantly universities and security companies." They share random numbers, using an open source tool called [Drand][3] (short for Distributed Randomness Beacon Daemon). The numbers are then "composited into one random number" on the basis that "several random numbers are more random than one random number." While the League's random number generator isn't intended "for any kind of password or cryptographic seed generation," Cloudflare's CEO Matthew Prince points out that if "you need a way of having a known random source, this is a really valuable tool." - -### Cruise open sources robotics data analysis tool - -Projects involved in creating self-driving vehicles generate petabytes of data. And with amounts of data that large comes the challenge of quickly and effectively analyzing it. To make the task easier, General Motors subsidiary Cruise has made its Webviz data visualization tool "[freely available to developers][4] in need of a modular robotics analysis solution." - -Webviz "takes as input any bag file (the message format used by the popular Robot Operating System) and outputs charts and graphs." It "contains a collection of general panels (which visualize data) applicable to most robotics developers," said Esther Weon, a software engineer at Cruise. The company also plans to "release a public API that’ll allow developers to build custom panels themselves." - -The code for Webviz is [available on GitHub][5], where you can download or contribute to the project. - -### npm provides more security - -The team behind npm, the site providing JavaScript package hosting, has a new collaboration with GitHub to automatically scan for exposed tokens that could give hackers access that doesn't belong to them. The project includes a handy automatic revoke of leaked credentials them if are still valid. This could drastically reduce vulnerabilities in the JavaScript community. For instructions on how to participate, see the [original article][6]. - -Note that this news was found via the [Changelog news][7]. - -### Better end of life tracking via open source - -A new project, [endoflife.date][8], aims to overcome the complexity of end of life (EOL) announcements for software. It's part tracker, part public announcement on what good documentation looks like for software. As the README states: "The reason this site exists is because this information is very often hidden away. If you're releasing something on a regular basis: - - 1. List only supported releases. - 2. Give EoL dates/policy if possible. - 3. Hide unsupported releases behind a few extra clicks. - 4. Mention security/active release difference if needed." - - - -Check out the [source code][9] for more information. - -### In other news - - * [Medicine needs to embrace open source][10] - * [Using geospatial data to create safer roads][11] - * [Embracing open source could be a big competitive advantage for businesses][12] - - - -_Thanks, as always, to Opensource.com staff members and moderators for their help this week._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/news-june-22 - -作者:[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/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV) -[2]: https://thenextweb.com/dd/2019/06/17/cloudflares-new-open-source-project-helps-anyone-obtain-truly-random-numbers/ -[3]: https://github.com/dedis/drand -[4]: https://venturebeat.com/2019/06/18/cruise-open-sources-webview-a-tool-for-robotics-data-analysis/ -[5]: https://github.com/cruise-automation/webviz -[6]: https://blog.npmjs.org/post/185680936500/protecting-package-publishers-npm-token-security -[7]: https://changelog.com/news/npm-token-scanning-extending-to-github-NAoe -[8]: https://endoflife.date/ -[9]: https://github.com/captn3m0/endoflife.date -[10]: https://www.zdnet.com/article/medicine-needs-to-embrace-open-source/ -[11]: https://itbrief.co.nz/story/using-geospatial-data-to-create-safer-roads -[12]: https://www.fastcompany.com/90364152/embracing-open-source-could-be-a-big-competitive-advantage-for-businesses diff --git a/sources/talk/20180604 10 principles of resilience for women in tech.md b/sources/talk/20180604 10 principles of resilience for women in tech.md index e5d6b09401..be1960d0c9 100644 --- a/sources/talk/20180604 10 principles of resilience for women in tech.md +++ b/sources/talk/20180604 10 principles of resilience for women in tech.md @@ -1,4 +1,3 @@ -XYenChi is translating 10 principles of resilience for women in tech ====== diff --git a/sources/talk/20180818 What Did Ada Lovelace-s Program Actually Do.md b/sources/talk/20180818 What Did Ada Lovelace-s Program Actually Do.md index fc669a1a3c..8bbb651cfd 100644 --- a/sources/talk/20180818 What Did Ada Lovelace-s Program Actually Do.md +++ b/sources/talk/20180818 What Did Ada Lovelace-s Program Actually Do.md @@ -1,5 +1,3 @@ -Northurland Translating - What Did Ada Lovelace's Program Actually Do? ====== The story of Microsoft’s founding is one of the most famous episodes in computing history. In 1975, Paul Allen flew out to Albuquerque to demonstrate the BASIC interpreter that he and Bill Gates had written for the Altair microcomputer. Because neither of them had a working Altair, Allen and Gates tested their interpreter using an emulator that they wrote and ran on Harvard’s computer system. The emulator was based on nothing more than the published specifications for the Intel 8080 processor. When Allen finally ran their interpreter on a real Altair—in front of the person he and Gates hoped would buy their software—he had no idea if it would work. But it did. The next month, Allen and Gates officially founded their new company. diff --git a/sources/talk/20190131 OOP Before OOP with Simula.md b/sources/talk/20190131 OOP Before OOP with Simula.md index aca160ad2d..cae9d9bd3a 100644 --- a/sources/talk/20190131 OOP Before OOP with Simula.md +++ b/sources/talk/20190131 OOP Before OOP with Simula.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (warmfrog) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/talk/20190412 Gov-t warns on VPN security bug in Cisco, Palo Alto, F5, Pulse software.md b/sources/talk/20190412 Gov-t warns on VPN security bug in Cisco, Palo Alto, F5, Pulse software.md deleted file mode 100644 index b5d5c21ee6..0000000000 --- a/sources/talk/20190412 Gov-t warns on VPN security bug in Cisco, Palo Alto, F5, Pulse software.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Gov’t warns on VPN security bug in Cisco, Palo Alto, F5, Pulse software) -[#]: via: (https://www.networkworld.com/article/3388646/gov-t-warns-on-vpn-security-bug-in-cisco-palo-alto-f5-pulse-software.html#tk.rss_all) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Gov’t warns on VPN security bug in Cisco, Palo Alto, F5, Pulse software -====== -VPN packages from Cisco, Palo Alto, F5 and Pusle may improperly secure tokens and cookies -![Getty Images][1] - -The Department of Homeland Security has issued a warning that some [VPN][2] packages from Cisco, Palo Alto, F5 and Pusle may improperly secure tokens and cookies, allowing nefarious actors an opening to invade and take control over an end user’s system. - -The DHS’s Cybersecurity and Infrastructure Security Agency (CISA) [warning][3] comes on the heels of a notice from Carnegie Mellon's CERT that multiple VPN applications store the authentication and/or session cookies insecurely in memory and/or log files. - -**[Also see:[What to consider when deploying a next generation firewall][4]. Get regularly scheduled insights by [signing up for Network World newsletters][5]]** - -“If an attacker has persistent access to a VPN user's endpoint or exfiltrates the cookie using other methods, they can replay the session and bypass other authentication methods,” [CERT wrote][6]. “An attacker would then have access to the same applications that the user does through their VPN session.” - -According to the CERT warning, the following products and versions store the cookie insecurely in log files: - - * Palo Alto Networks GlobalProtect Agent 4.1.0 for Windows and GlobalProtect Agent 4.1.10 and earlier for macOS0 ([CVE-2019-1573][7]) - * Pulse Secure Connect Secure prior to 8.1R14, 8.2, 8.3R6, and 9.0R2. - - - -The following products and versions store the cookie insecurely in memory: - - * Palo Alto Networks GlobalProtect Agent 4.1.0 for Windows and GlobalProtect Agent 4.1.10 and earlier for macOS0. - * Pulse Secure Connect Secure prior to 8.1R14, 8.2, 8.3R6, and 9.0R2. - * Cisco AnyConnect 4.7.x and prior. - - - -CERT says that Palo Alto Networks GlobalProtect version 4.1.1 [patches][8] this vulnerability. - -In the CERT warning F5 stated it has been aware of the insecure memory storage since 2013 and has not yet been patched. More information can be found [here][9]. F5 also stated it has been aware of the insecure log storage since 2017 and fixed it in version 12.1.3 and 13.1.0 and onwards. More information can be found [here][10]. - -**[[Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][11] ]** - -CERT said it is unaware of any patches at the time of publishing for Cisco AnyConnect and Pulse Secure Connect Secure. - -CERT credited the [National Defense ISAC Remote Access Working Group][12] for reporting the vulnerability. - -Join the Network World communities on [Facebook][13] and [LinkedIn][14] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3388646/gov-t-warns-on-vpn-security-bug-in-cisco-palo-alto-f5-pulse-software.html#tk.rss_all - -作者:[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://images.idgesg.net/images/article/2018/10/broken-chain_metal_link_breach_security-100777433-large.jpg -[2]: https://www.networkworld.com/article/3268744/understanding-virtual-private-networks-and-why-vpns-are-important-to-sd-wan.html -[3]: https://www.us-cert.gov/ncas/current-activity/2019/04/12/Vulnerability-Multiple-VPN-Applications -[4]: https://www.networkworld.com/article/3236448/lan-wan/what-to-consider-when-deploying-a-next-generation-firewall.html -[5]: https://www.networkworld.com/newsletters/signup.html -[6]: https://www.kb.cert.org/vuls/id/192371/ -[7]: https://nvd.nist.gov/vuln/detail/CVE-2019-1573 -[8]: https://securityadvisories.paloaltonetworks.com/Home/Detail/146 -[9]: https://support.f5.com/csp/article/K14969 -[10]: https://support.f5.com/csp/article/K45432295 -[11]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[12]: https://ndisac.org/workinggroups/ -[13]: https://www.facebook.com/NetworkWorld/ -[14]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md b/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md deleted file mode 100644 index 5e5f4df763..0000000000 --- a/sources/tech/20131228 Introduction to Clojure - Modern dialect of Lisp (Part 1).md +++ /dev/null @@ -1,1784 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Introduction to Clojure – Modern dialect of Lisp (Part 1)) -[#]: via: (https://www.creativeapplications.net/tutorials/introduction-to-clojure-part-1/) -[#]: author: (Karsten Schmidt and Ricardo Sanchez https://www.creativeapplications.net/author/karstenricardo/) - -Introduction to Clojure – Modern dialect of Lisp (Part 1) -====== - -![](https://www.creativeapplications.net/wp-content/uploads/2013/12/learnclojure10.jpg) - -### Foreword by [Ricardo Sanchez][1] - -Back in March I had the pleasure to attend Karsten’s workshop at the 2013 [Resonate][2] conference in Belgrade, in it we learned how to work with audio and music while coding live using the Clojure programming language. It was great! I got so addicted to this new way of programming that it made me work on a little tutorial so I can share my experience with newcomers. After I finished my first draft I asked Karsten to do a technical review of it and he very kindly accepted. A couple of weeks months later we managed to expand & transform it into a comprehensive introductory article to Clojure and functional programming with a few very cool examples I hope you’ll enjoy. Without Karsten’s input this tutorial would never have been what it is today – so for that a big THANKS is due to him and the Resonate team for putting together such an awesome event. - -### Foreword by [Karsten Schmidt][3] - -Getting (back) into the [magical world of Lisp][4] had been on my to-do list for a long while, though my first encounter with Clojure in 2011 was through sheer coincidence (if you believe in such things!). It took me only a few hours to realise how this encounter was impeccable timing since there was this nagging feeling that I had become too accustomed to the status quo of the languages I’d been using for the last decade. Most importantly, I instinctively knew, I wanted to learn & use this language for my own work, badly & ASAP. And indeed, I’ve been fortunate enough to be able to use Clojure on several large projects since, from cloud based server apps/renderfarms to OpenGL/CL desktop apps and a [festival identity][5]. What I wasn’t quite prepared for were the many doors (of perception and inquiry) Clojure has opened wide in terms of process, thinking & learning about code from outside the boxes of our so beloved, popular languages & frameworks. Now, having been using it almost daily for 2.5 years, this tutorial, this labour of love, is largely meant to share some findings of this journey so far (though admittedly this first part is more of a crash course) – all in the hope to inspire some like-minded souls from this community, keen to help realising the untapped potential this language & its philosophy bring to the creative drafting table… - -Since this tutorial has grown well beyond the scope of a single article and there’s no [TL;DR][6] version, we will be releasing it in stages over the coming weeks… - -### Introduction - -This tutorial aims at giving you a taste of functional programming with [Clojure][7], a modern dialect of [Lisp][8] designed to run as an hosted language on the Java Virtual Machine (and an increasing number of other host platforms). Based on the [lambda calculus][9] theory developed by [Alonzo Church][10] in 1930s, the family of functional languages has a long history and forms one of the major branches in the big tree of available programming languages today. Largely through developments in hardware and the increasing numbers of cores in CPU chip designs, as well as through the appearance of languages like [Erlang][11], [F#][12], [Haskell][13], [Scala][14] & Clojure, the [functional philosophy][15] has been re-gaining traction in recent years, since it offers a solid and plausible approach to writing safe & scalable code on these modern hardware architectures. Core functional ideas are also slowly infiltrating long established bastions of the [Kingdom of Nouns][16], i.e. through the inclusion of lambda expressions in both the latest versions of [Java 8][17] and [C++11][18]. However, Clojure goes much further and its combined features (e.g. [immutability][19], [laziness][20], [sequence abstractions][21], extensible [protocols][22], [multimethods][23], [macros][24], [async constructs][25], choice of [concurrency primitives][26]) make it an interesting choice for approaching data intensive or distributed applications with a fresh mindset around lightweight modelling. - -### Sections: -1\. Getting to know Clojure -2\. Setting up an environment -3\. Hello world, Hello REPL! -4\. Clojure syntax summarized -5\. Symbols -6\. Vars & namespaces -7\. Functions -8\. Metadata -9\. Truthiness, conditionals & predicates -10\. Data structures -11\. Common data manipulation functions -12\. Sequences -13\. Looping, iteration & recursive processing -14\. Common sequence processing functions -15\. Destructuring -16\. Further reading & references - -### Getting to know Clojure - -Clojure is a young (first release in 2007) and opinionated language whose philosophy challenges/contrasts (just as much as [Rich Hickey][27], Clojure’s author, does) some commonly accepted assumptions about programming and software design. It therefore requires some serious unlearning and rethinking for anyone who’s ever only programmed in Processing, Java, C++ etc. (JavaScript programmers will find some of the ideas more familiar though, since that language too was heavily influenced by older Lisp implementations). So even if after working through this tutorial series you decide Clojure isn’t for you, the new perspectives should provide you with some food for thought and useful knowledge to continue on your journey. - -[As a reward for taking on this learning curve][28], you’ll gain access to ideas and tools, which (not just in our opinion) should excite anyone interested in a more “creative” computing process: a truly interactive programming environment without a write/compile/run cycle and live coding & manipulation even of long running complex systems, a language, which by design, removes an entire class of possible bugs, a super active, helpful community of thousands of users/seekers – and at the very least it will give you some alternative insights to common programming problems, regardless your chosen language. With the JVM as its current main host platform and Clojure’s seamless Java interop features, you’ll have full access to that language’s humungous ecosystem of open source libraries, often in [an easier way than Java itself][29]. Clojure’s sister project [ClojureScript][30] is equally making headway in the JavaScript world and there’re a number of efforts underway to port Clojure to other platforms (incl. [Android][31] and [native compilation via LLVM][32]). - -Clojure’s (and Lisp’s) syntax is a bit like [Marmite][33]: There’re probably as many people who love it as there’re who hate it, though in this case the objections are usually just caused by unfamiliarity. The seemingly large amount of parantheses present is one of the most immediately obvious and eye-grabbing aspects to any novice looking at Clojure/Lisp code. However, being a programming language, this a) is obviously by design, b) not strictly true, and c) is the result of [stripping out most other syntax][34] and special characters known from other languages: I.e. there’re no semicolons, no operator overloading, no curly brackets for defining scope etc. – even commas are optional and considered whitespace! All this leads to some concise, yet readable code and is further enhanced by the number of powerful algorithmic constructs the language offers. - -Whereas in a C-like language a simple function/method definition looks like this: - -``` -// C -void greetings(char *fname, char *lname) { - printf("hello %s %s\n", fname, lname); -} - -// C++ -void greetings(const char *fname, const char *lname) { - std::cout << "hello " << fname << " " << lname << std::endl; -} - -// Java -public void greetings(String fname, String lname) { - System.out.println("hello " + name); -} -``` - -...in Clojure it is: - -``` -(defn greetings [fname lname] - (println "hello" fname lname)) -``` - -Calling this function then: - -``` -// C-style -greetings("Doctor", "Evil"); - -; Clojure -(greetings "Doctor" "Evil") -``` - -Clojure's philosophy to syntax is pure minimalism and boils down to the understanding that every piece of source code, as in any programming language, is merely a definition of an executable tree structure. Writing Clojure is literally defining the nested branches of that tree (identified by brackets, also called [S-expressions][35] or sexp, short for symbolic expressions). Even after a short while, you'll find these brackets seem to become automatic and mentally disappear (especially when using an appropriate text editor w/ support for [bracket matching][36], [rainbow brackets][37] and [structural editing features][38]). - -Also because this tutorial is more of a crash course and limited in scope, we can only provide you with a basic overview of core language features. Throughout the tutorial you will find lots of links for further reading and a list of Clojure related books at the end. Now, without much further ado, let's dive in... - -### Setting up an environment - -As with any programming language, we first need to ensure we've got some proper tooling in place, before we can begin our journey through unknown lands. Since Clojure is just a language and runtime environment, it doesn't have any specific requirements for editors and other useful tools. However, the Clojure community has developed and adopted a number of such tools, which make working with Clojure (even) more fun and the first one we introduce right away: - -### Leiningen - -These days most software projects are using a large number of open source libraries, which themselves often have further dependencies of their own. To anyone having ever worked with a language with an active community, life without a package manager seems like pure hell, trying to manage & install dependencies manually. [Leiningen][39] is the de-facto build tool used by the Clojure community, with its name being an [humorous take][40] on [Ant][41], the former de-facto build tool in the Java world. Lein calls itself a tool for "automating Clojure projects without setting your hair on fire". It's truly one of the easiest ways to get started with Clojure and is so much more than just a package manager, even though in this tutorial we'll be mainly using it as such. So please head over to the [Leiningen][39] website and follow the simple 3-step install procedure (or check your system package manager, e.g. [Homebrew][42] for OSX: `brew install leiningen`). **Regardless, you'll need to have an existing[Java installation][43] (Java 6 or newer) on your machine, before installing Leiningen...** - -> The Clojure community has developed integration plug-ins for several popular editors & IDEs and we will start working with one of them [Counterclockwise][44] in the next part of this tutorial. A list of other options can be found on the [Clojuredoc website][45]. - -### Hello world, Hello REPL! - -As briefly mentioned in the beginning, Clojure provides us with a fully dynamic programming environment, called the REPL: The **(R)**ead, **(E)**valuate, **(P)**rint, **(L)**oop. The REPL reads input from the user, executes it, prints the result of the process, then rinse & repeat... - -The "read" phase converts source code into a data structure (mostly a nested list of lists). During "evaluation" this data structure is first compiled into Java byte code and then executed by the JVM. So unlike some other dynamic languages running on the JVM (e.g. [JRuby][46], [Rhino][47]), Clojure is a compiled language and in many cases can have similar performance characteristics as Java. - -The REPL quickly becomes the main sketch pad and development tool for many Clojure users, a space in which complex code is slowly built up from small parts, which can be immediately tested and experimented with, providing an uninterrupted experience. - -To start a REPL with leiningen, simply type `lein repl` on your command line and after a few moments, you should see a prompt like this: - -``` -$ lein repl -nREPL server started on port 51443 -REPL-y 0.1.10 -Clojure 1.5.1 -Exit: Control+D or (exit) or (quit) -Commands: (user/help) - Docs: (doc function-name-here) - (find-doc "part-of-name-here") - Source: (source function-name-here) - (user/sourcery function-name-here) -Javadoc: (javadoc java-object-or-class-here) -Examples from clojuredocs.org: [clojuredocs or cdoc] - (user/clojuredocs name-here) - (user/clojuredocs "ns-here" "name-here") -user=> _ -``` - -> Btw. The first time `lein` is run, it will download Clojure and possibly a number of other files/libraries. This only happens once and all files are stored/cached in this folder `~/.m2/repository`. REPL startup time will always take a few seconds due to the JVM initializations needed, however a REPL usually doesn't need to be restarted often, so in practice isn't an huge issue. -> -> Should ever end up triggering an action which will make the REPL hang (e.g. trying to display an infinite sequence), you can press `Control+C` to cancel this action. -> -> **If you don't want to (or can't) install Clojure/Leiningen, you can try out all of the examples in this part of the tutorial using the online REPL at[Try Clojure][48].** - -As is traditional, our first piece of Clojure code should be `(println "Hello World")`. So please go ahead and type it at the prompt. Once you hit `Enter`, the **(R)**ead phase of the REPL begins, turning our entered text into a stream of symbols. Provided there're no errors, these symbols are then **(E)**valuated according to the rules of the language, followed by **(P)**rinting the result of that code and **(L)**oop giving us a new prompt for input. - -``` -user=> (println "Hello World") -Hello World -nil -user=> _ -``` - -> **Input - > Process -> Output** -> -> ...is one of the fundamental concepts in programming, especially in functional programming. If you look closely, you might be wondering where that `nil` came from? `nil` is Clojure's equivalent of `null` and here indicates that our `println` actually didn't produce any computational result. In fact, the display of "Hello World" was simply a side-effect of executing `println` (by pushing that string to your system's output stream), but the `println` function gave us no actual value back, which we might pass to another process. We will return to this important distinction later on when we'll talk about truthiness, predicates and pure functions. - -Some other brief examples: - -``` -(+ 1 2) -; 3 -(+ (+ 1 2) (+ 3 4)) -; 10 -(+ 1 2 3 4) -; 10 -``` - -Looks weird, huh? At least no more `nil` is to be seen (of course we expected some results from an addition), and maybe you can already spot a pattern: - - 1. Operations seem to come first (this is called [prefix notation][49]) and - 2. it seems the number of parameters/arguments doesn't matter... - - - -These are the kind of assumptions, you might make coming from an imperative programming background (Java/C etc.), where symbols like `+`, `-`, `/`, `*` or `=` actually are operators, basically symbols with pre-defined, hardcoded meanings and can only appear in certain places within the code. In Clojure however, there're no such operators and `+` is just defined as a standard function and that function accepts indeed a flexible number of params (as do all other basic math operators). - -### Clojure syntax summarized - -The syntax of Clojure/Lisp boils down to just this **one rule** and any Clojure form has this overall structure (no exceptions!): - -``` -(function param1 param2 ... paramN) -``` - -**Note:** Functions are processes and parameters (also called arguments) are their inputs. The number of params depends of course on the function, with some not requiring arguments at all. - -The parentheses define the scope of an S-expression (technically a list, but also a branch in the tree of our program), with its first element interpreted as a function to call. An important thing to consider at this stage is that all the elements (incl. the first) of such an expression can be (and often are) results of other function calls. - -Here we calculate the sum of two products, the [Pythagorean][50] (c2 = a2 + b2) of a fixed triangle with sides a = 4 and b = 8: - -``` -(+ (* 4 4) (* 8 8)) -; 80 -``` - -![AST visualized][51] - -The image shows a visualization of the encoded tree structure we've written. The tree needs to be evaluated from the bottom to the top: The inner forms `(* 4 4)` and `(* 8 8)` are evaluated first before their sum can be computed. Clojure is read inside out. At first this might seem alien, but really just takes getting used to and doesn't prove problematic in practice, since most Clojure functions are often less than 10 lines long. - -### Symbols - -Symbols are used to name things and are at the heart of Clojure. Clojure code is evaluated as a tree of symbols, each of which can be bound to a value, but doesn't need to be. Of course in practice, it mostly means a symbol must have a bound value in order to work with it. Yet there're situations in Clojure when a symbol must remain unevaluated (as is) and we'll describe some of these in more detail when we discuss the `list` data type further below. - -Imagine for a moment to be in Clojure's shoes and we have to evaluate the form `(+ 1 2)`. The Reader simply provides us with a list of 3 symbols `+`, `1` and `2`. The latter two are easily identified as numbers and need no further treatment. The `+` however is a symbol we don't know and therefore need to look up first to obtain its value. Since that symbol is part of the core language, we find out it's bound to a function and then can call it with `1` and `2` as its arguments. Once the function returns, we can replace the whole form `(+ 1 2)` with its result, the value `3`. If this form was part of a larger form/computation, this result is then inserted back into it and the whole process repeats until all remaining forms & symbols have been resolved and a final value has been computed. - -Symbols are conceptually similar to variables in that both provide reusable, named references to data (and code). Yet, variables don't really exist in Clojure. The biggest difference to variables in other languages, is that by default a symbol is bound to a fixed value once, after which it can't be changed. This concept is called... - -#### Immutability - -[Immutability][19] isn't a well known concept among the (imperative) languages, which readers of this blog might be more familiar with. In fact, these languages are mainly built around its opposite, mutability - the ability to define data, pass it around via references/pointers and then change it (usually impacting multiple places of the codebase). The fact, that immutable data is read-only once it's been defined, provides the key feature for truly enabling safe multi-threaded applications and simplifies other programming tasks (e.g. easy comparison of nested values, general testability and the ability to safely reason over a function's behaviour). The presence of immutable data also leads to fundamental questions about the actual need for key topics in object oriented programming, e.g. the need for hiding data through encapsulation and all the resulting complexity is only required if a language doesn't provide features protecting data from direct 3rd party (i.e. user code) manipulation. This problem simply doesn't exist in Clojure! On the other hand immutability too provides one of the most challenging unlearning tasks for people coming from a world of mutable state, since it seems paradoxical to work it into any realworld system requiring constant changes to our data. - -Since no real application can exist without changing its internal state, throughout the course of this tutorial we will show how a) Clojure makes the most of immutability using persistent data structures, b) how actual mutable behaviour can be achieved where it is beneficial and c) show how mutable state can be easily avoided in most parts of a Clojure program. But for now please remember: **Clojure data is immutable by default.** - -> As an aside, unlike other functional languages like [Haskell][52] or [Scheme][53] where all data is truly 100% immutable and changing state can only be achieved through [Closures][54] & [Monads][55], Clojure takes a more pragmatic route and provides a number of mutable data types. However, each of those is intended for certain usage scenarios and we will only discuss two of them (Vars and Atoms) further below. - -#### Symbol bindings - -In most programming languages variables are based on [lexical scope][56]: Depending on the level at which a variable has been declared in a program, its binding is either global or local (e.g. local within a function or class). Clojure also provides lexical scope binding using the `let` form, giving us local, symbolic value bindings only existing within its body. - -The [`let`][57] form has this general structure and the last (often only) expression of its body becomes the final result: - -``` -(let [symbol value - symbol value ...] - body-expressions) -``` - -> Btw. The name `let` comes from mathematical texts, where we often say things like: "Let C be the sum of A and B" etc. To anyone with a previous career in BASIC, this should be familiar too... - -Sticking with our pythagorean example from above, we could wrap the computation inside a `let` form and introduce two symbols `a` and `b`: - -``` -(let [a 4 ; bind symbol a to 4 - b 8] ; bind symbol b to 8 - (+ (* a a) (* b b))) ; use symbols -; 80 - -a ; outside the let form symbol a is undefined -CompilerException java.lang.RuntimeException: Unable to resolve symbol: a in this context -``` - -We will deal with `let` several more times throughout this tutorial. - -### Vars & namespaces - -Being restricted to only lexical scoped symbols defined with `let` is of course a painstaking way of programming, but thankfully isn't the whole truth. The basis of programming is "[Don't repeat yourself][58]" and that implies we need some form of mechanism to refer to existing values/processes defined elsewhere. In Clojure, this mechanism is implemented using Vars, named storage containers holding our data. Vars are named using symbols and can keep any datatype. They're always global within a given namespace, meaning they're visible from anywhere within that namespace and possibly others too. - -Namespaces are an important concept (not only) in Clojure to manage modularity and avoid naming conflicts. They're conceptually similar to [namespaces in C++][59], [packages in Java][60] or [modules in Python][61], although in Clojure have additional dynamic features. All Clojure code is evaluated as namespaced symbols and the language provides a rich set of functions to create, link and manipulate them. You can read more about them on the [Clojure website][62]. In the REPL the prompt will always show which namespace we're currently working in (default `user`). - -Back to Vars now, they're the closest thing to "traditional" variables in other languages, though are not equal: Whereas in many other languages a variable is a direct mapping from a named symbol to a value, in Clojure, symbols are mapped to Var objects, and only the Vars themselves provide a reference to their current values. This is an additional level of indirection, important for working in the dynamic environment of the REPL and in multi-threaded scenarios. For the latter, Vars provide a mechanism to be dynamically rebound to a new value on a per-thread basis and is one of Clojure's concurrency features we will discuss in a future part of this tutorial. - -![Clojure Vars explained][63] - -[`def`][64] is the general form used to define Vars. It is a special form which takes two arguments, but doesn't evaluate the first one and instead takes it literally to create a new Var of that name, which then holds the given value (if any). Vars can also be defined without a value, which keeps them initially unbound and is less common, but is sometimes needed to declare a Var for future reference. - -We used Vars a couple of times already: the `+`, `*` and `let` symbols are all bound to Vars defined in the [`clojure.core`][65] namespace. But let's define two vars ourselves and then pass their values to a process: - -``` -(def a 4) -; #'user/a ; def returns the created var object -a ; just providing a Var's name will return its value -; 4 -(def b 8) -; #'user/b -b -; 8 -(+ (* a a) (* b b)) ; Vars used in a computation -; 80 -``` - -> If we want to refer to a Var itself, rather than its value, we can use the `#'` prefix or the `var` function. - -To explain some more how Vars are used in the light of immutability, let's look at another example: In imperative languages like C, Java, JS etc. we have the `++` operator to increment a variable by one. Clojure has the [`inc`][66] function: It too takes a value and returns the value + 1. So we can apply this to our `a` and see what happens: - -``` -(inc a) ; returns a + 1 -; 5 -``` - -Correct answer. But printing out `a` shows its value is still 4... - -``` -a -; 4 -``` - -This is because `inc` does not operate on the Var `a`, but only is given `a`'s current value `4`. The value returned by `inc` is entirely distinct and our `a` is never touched (apart from reading its value). - -**Vars should only be used to define values in the interactive programming context of the REPL or for pre-defined values in Clojure source files.** When we said that Vars are mutable, then this is only true in that they can be redefined with `def` (and some other advanced functions we won't cover here) to have new values, but practically, a Var should be considered unchangeable. Of course, one could write a function which uses `def` within its body to re-define a var with a new value, however this is considered non-idiomatic, generally bad form and is never seen in the wild. Just don't do it! If this is still confusing, we hope things will make more sense, once we've discussed Clojure's data structures and have seen how mutation of variables is actually not needed in practice. - -### Functions - -In stark contrast to object oriented languages like Java, where classes and objects are the primary unit of computation, Clojure is a functional language with functions at its heart. They're "first class", standalone entities in this language and should be considered equal to any other type of data/value. They're accepted as arguments to other functions and can also be constructed or returned as result from a function call. With functions playing such a key role in Clojure, they can be defined in different ways and be given a name, but don't need to. - -When defining a re-usable function, we most likely want to also give it a name so that we can easily refer to it again. To define a named function we use the built-in form [`defn`][67] (`def`'s sibling and short for "define function") and provide it with all the important things needed: a name, a list of inputs (parameters) and the body of the function (the actual code). In pseudo-code this then looks like this: - -``` -(defn name [parameters] body-expressions) -``` - -...applied to our above example this could be written like this: - -``` -(defn hypot - [a b] - (let [a (* a a) - b (* b b) - c (+ a b)] - (Math/sqrt c))) -``` - -This implementation is not the most concise, but shows how we can use `let` to split up a computation into smaller steps and temporarily redefine symbols. We also make use of [Java interop features][68] to refer to Java's built-in [`Math`][69] class and compute the square root of that expression. According to Pythogoras, this is the actual length of the third side (the [Hypotenuse][70]) of the right-angled triangle given by `a` and `b`. A shorter alternative would be just this: - -``` -(defn hypot [a b] (Math/sqrt (+ (* a a) (* b b)))) -``` - -If you're coming from a C-style language, you might wonder where we define the actual result (or return value) of this function. In Clojure this is implicitly given: **Just as with`let`, the result of the last expression in a function's path of execution is the result.** - -Now that we have defined our first function, we can call it like this: - -``` -(hypot 9 12) ; call fn with 9 & 12 -; 15.0 -(hypot a b) ; call fn with our Vars a=4 & b=8 -; 8.94427190999916 -``` - -#### Anonymous functions - -A function without a name is called an anonymous function. In this case they're defined via the special form [`fn`][71], like this: - -``` -(fn [params] body-expressions) -``` - -Just like `defn`, this form takes a number of parameter names and body expressions. So another alternative would be to use `def` and the `fn` form to achieve the same function definition as above (`defn` is really just a short form of this combo): - -``` -(def hypot (fn [a b] (Math/sqrt (+ (* a a) (* b b))))) -``` - -Anonymous functions are often used with Cloure's data processing features (see further below), for callbacks or if the result of a function is another function, e.g. to pre-configure functions as explained next (readers with a JS background should also find the following familiar): - -Let's take another brief look at the `greetings` function we showed at the beginning of this tutorial: - -``` -(defn greetings [name] (println "hello" name)) -``` - -Now, we assume such a greeting exists in other languages too, so we might want to define a German version as well: - -``` -(defn greetings-de [name] (println "hallo" name)) -``` - -The only difference between the two is the first part of the greeting, so a more reusable alternative would be to redefine `greeting` to use two arguments: - -``` -(defn greetings [hello name] (println hello name)) -; #'user/greetings -(greetings "hello" "toxi") -; hello toxi -``` - -This is one of the situations where anonymous functions come into play, since we could define a `make-greetings` function which takes a single parameter (a greeting) and returns an anonymous function which then only requires a name, instead of a greeting **and** a name. Instead of using `println` we make use of the [`str`][72] function to concatenate values into a single string and return it as result. - -``` -(defn make-greetings - [hello] - (fn [name] - (str hello " " name "!"))) ; str concatenates strings -``` - -With this in place, we can now define a couple of Vars holding such greeters for different languages and then use these directly: - -``` -(def greetings-es (make-greetings "Hola")) -(def greetings-de (make-greetings "Guten Tag,")) -``` - -The new Vars `greetings-es` & `greetings-de` now contain the pre-configured functions returned by `make-greetings` and we can use them like this: - -``` -(greetings-es "Ricardo") -; "Hola Ricardo!" -(greetings-de "Toxi") -; "Guten Tag, Toxi!" -``` - -> We call functions which consume or produce functions [Higher Order functions][73] (HOF) and they play a crucial role in the functional programming world. HOFs like the one above are used to achieve a concept called [Partial application][74] and the mechanism enabling it is called a [Closure][75], which should also explain Clojure's naming. We could also use the [`partial`][76] function to achieve what we've done here manually. - -#### Multiple arities & varargs - -Even though this isn't the place to go into details just yet, Clojure allows functions to provide multiple implementations based on the number of arguments/parameters given. This features enables a function to adjust itself to different usage contexts and also supports functions with a flexible number of parameters (also called varargs, discussed at the end of this article). - -#### Guards - -Errors are an intrinsic aspect of programming, but taking a defensive stance can help catching many of them early on during the design stage, also articulated through the "[Fail fast][77]" philosophy popular amongst software folk. Clojure supports this form of [Design-by-contract][78] approach, allowing us to specify arbitrary guard expressions for our functions and uses them to pre-validate inputs (parameters) and/or the output (post-validation). E.g. we might want to constrain the parameter to our `make-greetings` function to only allow strings with less than 10 characters and ensures the function returns a string... - -``` -(defn make-greetings - [hello] - {:pre [(string? hello) (< (count hello) 10)] ; pre-validation guards - :post [(string? %)]} ; result validation - (fn [name] - (str hello " " name "!"))) -``` - -Guards are given as a Clojure map (discussed further below) with `:pre`/`:post` keys, each containing a vector of boolean-valued expressions (also discussed further below; in our case it's a call to [`string?`][79], a so called predicate function, which only returns `true` if its argument is a string). Since the result of a function is an unnamed value, we use the `%` symbol to refer to it in the post-validatator. Attempting to call this guarded function with a non-string or too long greeting string will now result in an error even before the function executes: - -``` -(make-greetings nil) -; AssertionError Assert failed: (string? hello) ... -(make-greetings "Labas vakaras") ; apologies to Lithuanians... -; AssertionError Assert failed: (< (count hello) 10) -``` - -[Mr. Fogus][80] and [Ian Rumford][81] have some further examples... - -### Metadata - -Before moving on to more exciting topics, let's briefly mention some more optional features of functions: metadata, documentation & type hints. The following function is an extended version of our `make-greetings` fn with these all of these things included: - -``` -(defn make-greetings - "Takes a single argument (a greeting) and returns a fn which also - takes a single arg (a name). When the returned fn is - called, prints out a greeting message to stdout and returns nil." - [^String greeting] - (fn [^String name] - (str greeting " " name "!"))) -``` - -The string given between the function name and parameter list is a doc string and constitutes metadata added to the Var `make-greetings` defined by `defn`. Doc strings are defined for all built-in Clojure functions and generally can be read in the REPL using [`doc`][82]: - -``` -(doc make-greetings) -; ([greeting]) -; Takes a single argument (a greeting) and returns a fn which also -; takes a single arg (a name). When the returned fn is called, -; prints out a greeting message to stdout and returns nil. -``` - -Clojure allows arbitrary metadata to be added to any datatype and this data can be created, read and manipulated with functions like [`meta`][83], [`with-meta`][84] and [`alter-meta`][85]. Please see the [Clojure website][86] for more information. E.g. to show us the complete metadata map for our `make-greetings` Var we can use: - -``` -(meta (var make-greetings)) -; {:arglists ([greeting]), -; :ns #, -; :name make-greetings, -; :doc "Takes a single argument (a greeting)..." -; :line 1, -; :column 1, -; :file "/private/var/..."} -``` - -Type hints attached to the function parameters were the other addition (and form of compiler metadata) used above. By specifying `^String` we indicate to the compiler that the following argument is supposed to be a String. Specifying type hints is optional and is an advanced topic, but can be very important for performance critical code. Again, we will have to refer you to the [Clojure website][87] for further details. - -### Truthiness, conditionals & predicates - -The concept of branching is one of the fundamental aspects in programming. Branching is required whenever we must make a decision at runtime based on some given fact and respond accordingly. In many programming languages, we use the Boolean values `true` and `false` to indicate the success or general "truth" value of something. These values exist in Clojure too, of course. However, in many places **Clojure applies a more general term for what constitutes truth (or "success") and considers any value apart from`false` or `nil` as `true`.** This includes **any** datatype! - -As you might expect, the basic boolean logic operations in Clojure are [`and`][88], [`or`][89] and [`not`][90]. The first two can take any number of arguments and each will be either `truthy` or not: - -``` -(or nil false true) -; true -(or 1 false) ; `or` bails at the first truthy value encountered -; 1 - -(and true nil false) ; `and` bails at the first falsy value encountered -; nil -(and true "foo") ; if all arguments are truthy, `and` returns the last -; "foo" - -(not false) -; true -(not nil) -; true -(not 1) -; false -``` - -An important aspect of `and` & `or` is that both are lazy, i.e. their arguments are only evaluated if any preceeding ones were falsy. Combined with Clojure's definition of truthiness and `and`/`or` returning not just boolean values, it's often possible avoid traditional branching in our code. - -For the cases where we do need proper branching, we can use the `if` and `when` forms: - -[`if`][91] takes a test expression and one or two body expressions of which only one will be executed based on the test result, in pseudo code: - -``` -(if test true-body-expression false-body-expression) -``` - -...in real terms: - -``` -(def age 16) - -(if (>= age 21) - "beer" - "lemonade") -; "lemonade" -``` - -Being restricted to a single form for both the "truthy" and "falsy" branch is one important limitation of the `if` form, but is a reflection of Clojure's focus on using functions and an encouragement to limit side effects (i.e. I/O operations) to be only contained within functions. The second, falsy branch of `if` is also optional and if not needed, it is more idiomatic to use `when` instead. [`when`][92] is somewhat more flexible in these cases, since its body can contain any number of forms to be executed if the test succeeds: - -``` -(when (and (>= age 21) (< age 25)) - (println "Are you sure you're 21?") - (println "Okay, here's your beer. Cheers!")) -``` - -To achieve a similar effect using `if` we can either wrap these two `println`'s in a function or use the [`do`][93] form, which is used as an invisible container for grouping (often side-effecting) actions and it returns the result of its last expression: - -``` -(do - (expression-1) - (expression-2) - ...) -``` - -### Data structures - -Data lies at the heart of any application, big or small. Apart from dealing with primitive data like individual numbers, characters and strings, one of the biggest differences between programming languages (and therefore one of the most important factors for choosing one language over another) is in the ways complex data can be defined and manipulated. As we will see next, this aspect is one of Clojure's highlights, as the language not only provides a rich set of primitives (incl. ratios, big integers, arbitrary precision decimals, unicode characters, regular expressions), but also truly powerful approaches to model & process data, of which we can unfortunately only outline some in the scope of this tutorial. - -Before we discuss the various common data structures, we also need to point out once more that Clojure is an untyped, dynamic, yet compiled language. All of the following data structures can be fully recursive and contain any mixture of data types. - -For reference, a full list of Clojure data structures is available on the [Clojure Website][94] - -#### Lists - -Lists are sequential data containers of multiple values and form the heart of Clojure (and Lisp in general). In fact, the name "Lisp" is short for List Processing. We actually already know by now how lists are defined, having done so many times in the previous sections: Lists can take any number of elements and are defined with `(` and `)` or using the function [`list`][95]. We also know by now that lists are usually evaluated as a function calls, so trying to define a list of only numbers will not work as expected: - -``` -(1 2 3 4) -; ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn -``` - -Because the first element of our list is the number `1` (not a function!), Clojure will give us this error... Here's how & why: - -##### Homoiconicity - -Long story short: **In Clojure, code is data and data is (can be) code.** Languages using the same data structures for code and data are called homoiconic and all Lisps share this feature, as well as other languages like [R][96], [XSLT][97], [PostScript][98] etc. - -To treat code as data, we somehow need to circumvent the evaluation of our list as function call. To that purpose Clojure provides us with a `quote` mechanism to evaluate a data structure literally (as symbolic data). We can do this with any Clojure data structure to recursively stop evaluation of a form as code: - -``` -(quote (1 2 3 4)) -; (1 2 3 4) -'(1 2 3 4) ; the apostrophe is a shorthand for `quote` -; (1 2 3 4) -'(+ 1 2) -; (+ 1 2) -(println "the result is" (+ 1 2)) -; the result is 3 -(println "the result of" '(+ 1 2) "is" (+ 1 2)) -; the result of (+ 1 2) is 3 -``` - -The diagram below shows the impact of quoting and the difference of the resulting trees: - -![AST differences through quoting][99] - -We could also use the `list` function to programatically assemble a list/function (using our previously defined vars `a` and `b`) and then evaluate it with `eval`: - -``` -; first construct a function call using a list of individually quoted symbols -(def a-plus-b (list '+ 'a 'b)) -; #'user/a-plus-b - -a-plus-b ; show resulting list -; (+ a b) - -(eval a-plus-b) ; treat data as code: evaluate... -; 12 - -; treat code as data structure & look at the first item of that list -(first a-plus-b) -; # ; internal representation of `+` fn - -; next treat code as data: replace all occurrences of a & b w/ their square values -; the {...} structure is a map of key => value pairs (discussed below): -; any keys found in the original list are replaced with their values -; so `a` is replaced with (* a a) and `b` with (* b b) -; the map is also quoted to avoid the evaluation of its contents -(replace '{a (* a a) b (* b b)} a-plus-b) -; (+ (* a a) (* b b)) - -; btw. if the map would *not* be quoted, it would be evaluated as: -{a (* a a) b (* b b)} -; {4 16, 8 64} - -(eval (replace '{a (* a a) b (* b b)} a-plus-b)) ; data as code again... -; 80 -``` - -> We will discuss the `first` function in more detail below. - -Right now, you might wonder why this is all worth pointing out. The most dramatic implication of homoiconicity is the enabling of [metaprogramming][100], the programmatic generation & manipulation of code at run time and by doing this, being able to define our own language constructs. It also opens the door to lazy evaluation of code or skipping code entirely depending on context (e.g. what happens with `and`/`or`). Unlike C's pre-processor, which only operates on the original textual representation of the source code (before the compile step and hence is severely limited and potentially more error prone), Lisps give us full access to the actual data structures as they're consumed by the machine. For example this makes Clojure an ideal candidate for [genetic programming][101] or to implement your own [domain specific language][102]. The main forms responsible for these kinds of code transformations are [macros][24] and we will leave them for another tutorial... - -Clojure lists have another important detail to know about: Because they're implemented as independent, linked elements, they can only be efficiently accessed at their head (the beginning of the list) and they don't provide direct, random access to any other elements. This restriction makes them less flexible than the next data structure, but still has some concrete use cases where this limitation doesn't matter: e.g. to implement [stacks][103]. - -#### Vectors - -Since lists in Clojure are both limited in terms of access and are semantically overloaded (as containers of code), it's often more convenient to use another similar data type to store multiple values: vectors. Vectors are literally defined using `[` and `]` or the [`vector`][104] function and are, like lists, a sequential data structure. We already encountered vectors when defining the parameters for our functions above, but just for kicks, here we define a vector with each element using a different data type: number, string, character & keyword (the latter is explained in more detail in the next section) - -``` -[1 "2" \3 :4] -; [1 "2" \3 :4] -``` - -Like lists, vectors can contain any number of elements. Unlike lists, but very much like arrays and vectors in others languages, they can also be accessed randomly using an element index. This can be done in multiple ways: - -``` -(def v [1 2 3 4]) -; #user/v -(get v 0) ; using the `get` function with index 0 -; 1 -(get v 10 -1) ; using `get` with a default value -1 for missing items -; -1 -(v 0) ; using the vector itself as function with index 0 as param -; 1 -``` - -#### Maps & keywords - -Maps are one of the most powerful data structures in Clojure and provide an associative mapping of key/value pairs. They're similar to [HashMaps][105] in Java or some aspects of [JavaScript objects][106], however both keys and values can of course be of any data type (incl. `nil`, functions or maps themselves). The most common data type for map keys however, are keywords. - -Keywords are simply symbols which evaluate to themselves (i.e. they have no other value attached). Within a given namespace only a single instance exists for each defined keyword. They can be created by prefixing a name with `:` or with the [`keyword`][107] function. Keywords can contain almost any character, but no spaces! - -``` -:my-key -; :my-key -(keyword (str "my-" "key")) ; kw built programmatically -; :my-key -``` - -Back to maps now. They are defined with `{` and `}` or the [`hash-map`][108] function (plus a few other variations we will skip here). Here's a map with 3 keys (`:a :b :c`), each having a different data type as its value (also note that `:c`'s map uses strings as keys, much like [JSON][109] objects): - -``` -(def m {:a 23 :b [1 2 3] :c {"name" "toxi" "age" 38}}) -; {:a 23 :b [1 2 3] :c {"name" "toxi" "age" 38}} -``` - -Having defined a map structure, we can now lookup its values using keys. Once again many roads lead to Rome: - -``` -(m :a) ; use the map as function with :a as lookup key -; 23 -(:b m) ; use key :b as function applied to m -; [1 2 3] -(get m :c) ; use get function with :c as key -; {"name" "toxi", "age" 38} -(:foo m) ; lookup a missing key returns nil -; nil -(get m :foo "nada") ; use get with default value for missing keys -; "nada" -``` - -> Note, we can use both maps & keywords as functions, because both implement Clojure's mechanism for function calls. Depending on context, it's good to have both as an option. - -Since the values for `:b` and `:c` are nested data structures, we can continue this further... - -``` -((:b m) 2) -; 3 -((:c m) "name") -; "toxi" -``` - -Although this works, Clojure offers an alternative (nicer) approach, which becomes especially handy if our nesting increases: The [`get-in`][110] function allows us to specify a "path" (as vector) into our data structure to look up a nested value. As we saw already with `get`, this function can be applied to both vectors and maps (or a mixture of both): - -``` -(def db {:toxi {:name "Karsten" - :address {:city "London"} - :urls ["http://toxiclibs.org" "http://thi.ng"]} - :nardove {:name "Ricardo" - :urls ["http://nardove.com"]}}) - -(get-in db [:toxi :address :city]) -; "London" -(get-in db [:nardove :address :city] "I think Bournemouth") -; "I think Bournemouth" -(get-in db [:nardove :urls 0]) -; "http://nardove.com" -``` - -[`select-keys`][111] can be used to extract a sub-set of keys from a map. The new map only contains the keys listed as arguments (if present in the map): - -``` -(select-keys m [:a :b :foo]) ; :foo isn't present in `m` so won't be in result... -; {:a 23 :b [1 2 3]} -``` - -#### Sets - -Sets are incredibly useful whenever we must deal with unique values, but don't care about their ordering. The name comes from [Set theory][112] in Mathematics. A Clojure set is (usually) unordered and will never contain more than a single instance of a given value. We will exploit this fact in the next part of the tutorial to build up our first full example application. Sets are defined like this: - -``` -#{1 2 3 4} -; #{1 2 3 4} -#{1 1 2 3 4} -; IllegalArgumentException Duplicate key: 1 -``` - -Be aware, that the literal definition syntax of sets **doesn't allow duplicate values**. However we can use it's functional equivalent: - -``` -(hash-set 1 1 2 3 4) -; #{1 2 3 4} -``` - -...or we could use the [`set`][113] or [`into`][114] functions to convert another data structure into a set and hence filter out any duplicate values from the original (of course without destroying the original!): - -``` -(def lucky-numbers [1 2 3 4 4 2 1 3]) -; #user/my-vals -(set lucky-numbers) -; #{1 2 3 4} -(into #{} lucky-numbers) -; #{1 2 3 4} -lucky-numbers -; [1 2 3 4 4 2 1 3] -``` - -Since a set can be considered a special kind of map in which keys have no values, but are simply mapped to themselves, we can use the same lookup approaches to check if a value is present or not. - -``` -(get #{1 2 3 4} 3) -; 3 -(#{1 2 3 4} 5) -; nil -(get #{1 2 3 4} 5 :nope) -; :nope -``` - -As a slightly more practical example, let's define a nested set of sets to encode the following mini social graph: - -![Dummy undirected social graph][115] - -``` -(def g - #{#{:toxi :ricardo} - #{:mia :toxi} - #{:filip :toxi} - #{:filip :ricardo}}) -``` - -Let's also define a simple lookup function (a predicate) to check if two people know each other: - -``` -(defn knows? - "Takes a graph and two node names, returns true if the graph contains - a relationship between the nodes (ignoring direction)" - [graph a b] - (not (nil? (graph #{a b})))) -``` - -> The [`nil?`][116] function returns true if its given argument is `nil`. - -Now we can use this function to get some answers (the order of names doesn't matter): - -``` -(knows? g :toxi :filip) -; true -(knows? g :ricardo :toxi) -; true -(knows? g :filip :mia) -; false -``` - -### Common data manipulation functions - -Even in the face of immutability, what good is a data structure, if it can't be manipulated? One of the most often quoted and popular sayings amongst Clojurians is: - -> "It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures." -> \-- Alan J. Perlis - -It neatly sums up Clojure's approach to data processing and is achieved through a number of elegant abstraction mechanisms, allowing dozens of core language functions to work polymorphically with different types of data. [Polymorphism][117] allows for a very small, but powerful API and so reduces cognitive load for the programmer. Because each of the above mentioned data structures has its own peculiarities, the concrete behaviour of the functions discussed below slightly varies and adjusts to each data type. - -#### Adding elements - -Adding new data to existing collections is one of the most common programming tasks and in Clojure is usually done with [`conj`][118]. - -For vectors, new elements are added to the end/tail: - -``` -(conj [1 2 3] 4 5 6) -; [1 2 3 4 5 6] -``` - -For lists, new elements are added to the beginning/head (because it's most efficient), therefore resulting in the opposite value order: - -``` -(conj '(1 2 3) 4 5 6) -; (6 5 4 1 2 3) -``` - -Maps are unordered collections and consist of key/value pairs. To add new pairs to a map, we need to define each as vector: - -``` -(conj {:a 1 :b 2} [:c 3] [:d 4]) -; {:d 4, :c 3, :a 1, :b 2} -``` - -Sets are also unordered and don't allow duplicates, so adding duplicate values will have no effect: - -``` -(conj #{1 2 3} 1 2 4 5) ; only 4 and 5 are added -; #{1 2 3 4 5} -``` - -Another often used alternative exists for maps and vectors, both of which are associative collections: Maps associate keys with values. Vectors associate numeric indices with values. Therefore Clojure provides us with the [`assoc`][119] function to add new or replace existing associations (`assoc` too takes a flexible number of parameters so that more than one such association can be changed in one go): - -``` -(assoc {:a 23} :b 42 :a 88) ; override :a, add :b -; {:a 88 :b 42} -(assoc [1 2 3] 0 10, 3 40) ; override 1st element, add new one (comma is optional) -; [10 2 3 40] -``` - -**Important:** For vectors you can only add new indices directly at the tail position. I.e. if a vector has 3 elements we can add a new value at position 3 (with indices starting at 0, this is actually the 4th element, therefore growing the vector by one). Attempting to `assoc` a greater index will result in an error, be careful: - -``` -(assoc [1 2 3] 10 -1) -; IndexOutOfBoundsException... -``` - -##### Nested data manipulations - -When dealing with nested structures we can use [`assoc-in`][120] and [`update-in`][121] to manipulate elements at any level. E.g. we might want to add Ricardo's current home town to our above mini DB map: - -``` -(assoc-in db [:nardove :address :city] "Bournemouth") -; {:toxi ...... -; :nardove -; {:name "Ricardo", -; :urls ["http://nardove.com"], -; :address {:city "Bournemouth"}}} -``` - -Like `get-in`, `assoc-in` takes a path into the datastructure and adds (or replaces) the value for that key. Whilst doing that it also creates any missing nesting levels automatically (i.e. `:nardove`'s map did not even contain an `:address` key beforehand). - -`update-in` is similar to `assoc-in`, however instead of a fixed value to be inserted into the collection, it takes a function (incl. any additional params) which is being applied to the current value for the key and then uses the result of that function as the new value. E.g. here we use `update-in` and `conj` to add another URL to `:toxi`'s DB entry: - -``` -(update-in db [:toxi :urls] conj "http://toxi.co.uk") -; {:toxi -; {:name "Karsten", -; :urls ["http://toxiclibs.org" "http://thi.ng" "http://toxi.co.uk"], -; :address {:city "London"}} .... -``` - -#### Removing elements - -To remove items from a collection, we can use [`dissoc`][122] (for maps) or [`disj`][123] (disjoin) for sets. If a key to be removed isn't present, both functions have no effect. - -``` -(dissoc {:a 23 :b 42} :b) -; {:a 23} -(disj #{10 20 30} 20) -; #{10 30} -``` - -Lists and vectors only allow for the direct removal near the head or tail, but don't support removing random items: [`pop`][124] applied to a list removes the first item, for vectors the last item. If the collection is empty, `pop` will throw an exception. - -``` -(pop '(1 2 3)) -; (2 3) -(pop [1 2 3]) -; [1 2] -``` - -#### Immutability, one more time - -We've just seen how we can add & remove elements from collections, thus seemingly modifying them - which technically would make them mutable, not immutable. However, as we've seen earlier, **the modified results returned by these functions are not the original collections.** To clarify: - -``` -(def v [1 2 3 4]) -; #'user/v -(def v2 (conj v 5)) -; #'user/v2 -v2 -; [1 2 3 4 5] -v -; [1 2 3 4] -``` - -Our original `v` still exists even though we've added `5` to it! Under the hood Clojure has created a new data structure (bound to `v2`) which is the original collection `v` with `5` added. Thinking like a programmer, your next questions should be immediately: Isn't that incredibly inefficient? What happens if I want to add a value to a vector with 10 million elements? Doesn't it become super slow & memory hungry to copy all of them each time? The short answer is: No. And here's why: - -#### Persistent data structures - -All Clojure data structures are so called [persistent data structures][125] (largely based on the [paper by Chris Okasaki][126]). Internally they're implemented as a tree and therefore can easily provide structural sharing without the need to copy data, which would be the naive solution to achieve immutability. The following diagram illustrates what happens internally for the above example: - -![Structural sharing in persistent datastructures][127] - -Using trees as the internal data structure, our `v2` can share the original contents of `v` and simply add a new leaf to its tree, pointing to the added value `5`. This is very cheap and doesn't cause a huge loss of performance, regardless of the size of the collection. The same principle is applied to all of the mentioned data structures and it's this uniform approach which both enables & requires immutability. - -### Sequences - -This section discusses Clojure's uniform approach to data processing using sequence abstractions. A sequence is a logical view of a data structure. All Clojure data structures can be treated as sequences, but the concept is extended even further and Clojure sequences include Java collections, strings, streams, directory structures and XML trees etc. You can even build your own ones by implementing an interface. The name for sequences in Clojure is [`seq`][128] and any compatible data structure can be explicitly turned into a `seq` using the function with the same name. - -#### The sequence API - -The sequence API is a minimal, low level interface consisting largely of only these four functions: [`first`][129], [`next`][130] to read and [`cons`][131] & [`seq`][128] to create sequences. All of the following functions are built on top of these, but before we get there let's first illustrate their role using a vector and a hash map as an example: - -``` -(def my-vec ["1st" "2nd" "3rd"]) -(def my-map {:a "1st" :b "2nd" :c "3rd"}) -``` - -Any Clojure collection can be turned into a seq, using the `seq` function. If the original collection is empty, `seq` will return `nil`. - -``` -(seq my-vec) -; ("1st" "2nd" "3rd) -(seq my-map) -; ([:a "1st"] [:c "3rd"] [:b "2nd"]) -(seq "creativeapplications.net") ; a string's seq is its characters -; (\c \r \e \a \t \i \v \e \a \p \p \l \i \c \a \t \i \o \n \s \. \n \e \t) -(seq []) -; nil -``` - -Since a map consists of key/value pairs, a map's seq is a seq of its pairs (vectors of 2 elements). And since a map is an unordered collection, the order of elements in its seq is undefined... - -![Sequence API][132] - -##### first - -...returns the first element of a seq (or `nil` if the sequence is empty): - -``` -(first my-vec) -; "1st" -(first my-map) -; [:a "1st"] -(first "hello") ; a string can be turned into a seq as well... -; \h -(first []) ; first of an empty vector/seq returns nil -; nil -``` - -##### next & rest - -As you might have guessed already, `next` returns a seq of all the remaining elements, excluding the first one. Again, if there're no further elements in the seq, `next` also returns `nil`. - -``` -(next my-vec) -; ("2nd" "3rd") -(next my-map) -; ([:c "3rd"] [:b "2nd"]) -``` - -We could now also combine the use of `first` and `next` to retrieve other elements, e.g. the 2nd element is the first element of the seq returned by `next`: - -``` -(first (next my-vec)) -; "2nd" -(first (next (next my-vec))) -; "3rd" -``` - -`rest` is almost identical to `next`, however will always return a seq: If there're no more elements, it will simply return an empty seq instead of `nil`. - -##### cons - -This function is used to prepend elements to a seq. `cons` takes two arguments, a value and an existing seq (or seqable collection) and adds that value at the front. If `nil` is given as the 2nd argument, a new seq is produced: - -``` -(cons 1 nil) -; (1) -(cons 2 (cons 1 nil)) -; (2 1) -(cons \c "ab") -; (\c \a \b) -``` - -### Looping, iteration & recursive processing - -At this point you might be wondering what use these above functions have in practice. Since Clojure offers far more high-level approaches to work with data collections, direct use of these functions in Clojure is actually less common. Yet, before we discuss these higher level functions, please bear with us as we want to illustrate some other important core operations common to all programming languages, one to which Clojure adds its own twist (again): Iteration & recursion. Meet the `loop` construct. - -#### loop & recur - -[`loop`][133] defines a body of code which can be executed repeatedly, e.g. to iterate over the elements of a sequence. This is best illustrated by an example, a loop which takes a vector and produces a seq of the vector's elements in reverse order (Clojure actually provides the [`reverse`][134] function to do the same for us, but we're focussed on `loop` here): - -``` -(loop [result nil, coll [1 2 3 4]] - (if (seq coll) - (let [x (first coll)] - (recur (cons x result) (rest coll))) - ; no more elements, just return result... - result)) -; (4 3 2 1) -``` - -The vector following the `loop` keyword is a binding vector just as we know from `let` and it can be used to bind any number of symbols. In our case we only require two: the initially non-existing `result` sequence (set to `nil`) and `coll`, a vector of numbers to be processed. The other code is the loop's body which is executed repeatedly: At each iteration we first check if our `coll` contains any more elements by calling `seq` (remember, `seq` returns `nil` (and is therefore falsy) when given an empty collection). If there're any elements remaining, we bind `coll`'s `first` element to `x`. What follows next is a call to [`recur`][135], the actual mechanism to trigger the recursive re-execution of the loop, however each time with new values given for the loop's `result` and `coll` symbols. These new values are the updated result sequence (with `x` prepended) and the remainder of the current collection produced via `rest`. Once `rest` returns an empty seq, the loop is finished and `result` is "returned" as final value. - -The combined application of `loop` & `recur` is the most low-level and verbose construct to create iterative behavior in Clojure, but because of that is also the most flexible. The most important restriction however is that `recur` can only be used at the end (tail) of a `loop`'s execution path, meaning there can be no further expressions following `recur` (hence the concept is called [Tail recursion][136]. In the above example you might think the final occurance of `result` violates this restriction, but that is not true: `recur` is the last expression of the "truth branch" of the enclosing `if`, whereas the returned `result` is on its other branch and therefore independent. - -#### doseq - -A more concise way of completely iterating the elements of a collection is offered by [`doseq`][137], however this form is designed to work with/trigger side effects and only returns `nil`. The example iterates over a vector of hashmaps and displays each person's age with some extra formatting: - -``` -(doseq [p [{:name "Ben" :age 42} {:name "Alex"} {:name "Boris" :age 26}]] - (let [name (:name p) - suffix (if (#{\s \x} (last name)) "'" "'s") - age (or (:age p) "rather not say")] - (println (str name suffix " age: " age)))) -; Ben's age: 42 -; Alex' age: rather not say -; Boris' age: 26 -; nil -``` - -The value of `suffix` is based on the [`last`][138] letter of a person's name and is usually `'s` (unless the last letter is in the set `#{\s \x}`). We'd also like the `:age` to be optional and provide a default value if missing... - -#### dotimes - -[`dotimes`][139] is yet another looping construct used for side effects, this time just for simply binding a symbol to a number of iterations: - -``` -(dotimes [i 3] (println i)) -; 0 -; 1 -; 2 -``` - -### Common sequence processing functions - -Now that we've discussed some of the underlying forms and mechanisms, it's time to focus on the more commonly used features of Clojure's sequence processing. - -Loops and iterators are the de-facto tools/patterns to process collections in many imperative languages. This is where idiomatic Clojure probably differs the most, since its functional approach is more focused on the transformation of sequences using a combination of higher order functions and so called: - -#### Pure functions - -A pure function's does not depend on any other data than its inputs and causes no side effects (i.e. I/O operations). This makes them [referentially transparent][140], meaning a function could be replaced with its result without any impact, or in other words, a function is consistently providing the same value, given the same inputs. Pure functions can also be [idempotent][141], meaning a function, if applied multiple times, has no other effects than applying it once. E.g. `(Math/abs -1)` will always provide `1` as a result and `(Math/abs (Math/abs -1))` will not change it, nor will it cause any other effect. - -Pure functions play a key role in functional programming. Their characteristics allow us to compose small, primitive functions into more complex constructs with predictable behaviors. - -##### Memoization of pure functions - -The caching of results of previous calls to a function is called [memoization][142]. This technique is especially useful if these results are produced by a complex/slow process. Clojure provides the [`memoize`][143] HOF to allow any function be memoized, however safe memoization requires those functions to be pure. We can demonstrate this caching effect by simulating a slow function using Java interop and [`Thread/sleep`][144]: - -``` -; simulate long process by sleeping for x 选题模板.txt 中文排版指北.md core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LCTT翻译规范.md LICENSE published README.md scripts sources translated 1000 milliseconds -(defn slow-fn [x] (Thread/sleep (* x 1000)) x) - -(def not-so-slow-fn (memoize slow-fn)) - -(not-so-slow-fn 3) -; 3 -``` - -#### Map-Reduce - -Several years ago, Google published a [paper][145] about their use of the [Map-Reduce algorithm][146]. Whereas this paper was focused on the distributed application of that algorithm running in parallel on thousands of machines, the general approach itself has been around for decades and plays an important role in many functional languages, where it is the de-facto pattern to process data without the need for explicit loops. - -The idea of Map-Reduce is to first transform the elements of an input collection into an intermediate new collection of values, which is then passed to a reduction function, producing a single final result value. This result could be any data type, though, incl. a new collection. - -Even though Map-Reduce is a 2-phase process, each phase can also be applied on its own. I.e. sometimes there's no need for a later reduction or an initial mapping step. - -> Btw. Several modern "NoSQL" database systems (e.g. [CouchDB][147], [MongoDB][148], [Riak][149]) and distributed data processing platforms like [Hadoop][150] also heavily rely on Map-Reduce as underlying mechanism to process & create views of data. So if you ever intent to work with such, it's quite useful knowledge to work through this section, even if you have no further interest in Clojure... - -#### map - -In mathematical terms mapping is the transformation of values through the application of a function. In Clojure the [`map`][151] function is one of the most often used functions. It takes a transformation function and applies it to each element in a given collection/sequence. E.g. The example below takes the function `inc` and a seq of numbers. It then applies `inc` to each number individually and returns a new sequence of the results: - -``` -(map inc [1 2 3 4 5]) -; (2 3 4 5 6) -``` - -![map function visualized][152] - -The transformation function given to `map` can be anything and its also one of the situations where anonymous functions are often used. E.g. Here we produce a seq of square numbers: - -``` -(map (fn [x] (* x x)) [1 2 3 4 5]) -; (1 4 9 16 25) -``` - -As an aside, since anonymous functions are often very short, they can also be defined more concisely (though become less legible). The following is equivalent to the above expression: - -``` -(map #(* % %) [1 2 3 4 5]) -; (1 4 9 16 25) -``` - -Here we use the reader macro `#(..)` to define an anon fn and the symbol `%` to refer to the first (in this case only) argument. If such a function takes more than a single arg, then we can use `%2`, `%3` etc. to refer to these... - -``` -(#(* % %2) 10 2) ; call anon fn with args: 10, 2 -; 20 -``` - -`map` can also be applied to several collections at once. In this case the transformation function needs to accept as many parameters as there are collections. Let's use `map` to build a seq of hashmaps from two vectors of point coordinates and colors. Each time our transformation fn is given a single point (a vector) and a color keyword. The fn simply combines these values into a single map with keys `:pos` and `:color`: - -``` -(map - (fn [p c] {:pos p :color c}) ; transformation fn - [[100 0] [0 -100] [0 100] [200 100]] ; points - [:red :green :blue]) ; colors -; ({:pos [100 0], :color :red} -; {:pos [0 -100], :color :green} -; {:pos [0 100], :color :blue}) -``` - -![map builder][153] - -> **Important:** You might have noticed that our vector of points has one more element than there're colors. In that case, `map` will stop as soon as one of the input collections is exhausted / has no further values. In this case we only have 3 colors, so the last (4th) point is ignored. - -##### Laziness and lazy seqs - -One thing not immediately obvious when experimenting with `map` in the REPL, is that the seq returned by `map` is a so called `lazy-seq`, that is, **the transformation function is actually not applied to our original values until their results are needed**. In other words, `map` is more of a recipe for a computation, but the computation does not ever happen if we don't attempt to use its results. - -To illustrate this better, let's again simulate a slow transformation function which takes 1 second per value. With 5 values in the original collection, our entire processing should take approx. 5 seconds: - -``` -(def results - (map - (fn [x] - (Thread/sleep 1000) - (* x 10)) - [1 2 3 4 5])) -``` - -When this code executes, we can see the REPL **immediately** returned a result, the new Var `user/results`. It did not take 5 seconds, because at this stage we haven't yet attempted to do anything with that new Var - and hence no mapping did take place thus far. [It's plain lazy!][20]. - -Now trying to display the contents of `results` however will force the computation and therefore will take 5 seconds until we can see the mapped values: - -``` -results ; takes ~5secs, world's slowest multiply -; (20 30 40 50 60) -``` - -#### reduce - -[`reduce`][154] is Clojure's natural way of expressing an accumulation over a sequence of values. Like `map` it takes a function, an optional initial result and a sequence whose elements will be passed to the transformation function individually, for example: - -``` -(reduce + 0 [1 2 3 4 5 6 7 8 9 10]) -; 55 -``` - -In this case `reduce` uses the function `+` to combine all values of our seq into the accumulated result one by one. The transformation function must always take 2 arguments: the current result (reduced value) and the next item to be processed. If no initial result is given, the first iteration will consume the first 2 items from the sequence. - -In our case this happens: - -``` -(+ 0 1) ; 0 is the initial result, returns 1 - (+ 1 2) ; 1 is current result, returns 3 - (+ 3 3) ; returns 6 - ; and so on until the seq is exhausted... -``` - -Clojure also provides an alternative to `reduce`, called [`reductions`][155]. Instead of the just final reduction it returns a seq of all intermediate results (here we also use [`range`][156] to create a seq of numbers from 0-9): - -``` -(reduce + (range 10)) -; 45 -(reductions + (range 10)) -; (0 1 3 6 10 15 21 28 36 45) -``` - -![reduce vs. reductions][157] - -#### filter - -[`filter`][158] takes a function and a seq, then applies the function to each element and returns a lazyseq of only the elements the function returned a "truthy" value for. These kind of functions are also called "predicates". - -Clojure has a number of predicate functions which rely on truthiness and they can be easily recognized by their general naming convention, a function name suffixed with `?`. E.g. [`even?`][159] can be used to filter out all even numbers from the seq of numbers 0-9: - -``` -(filter even? (range 10)) -; (0 2 4 6 8) -``` - -![filter][160] - -Since the function needn't strictly return `true` or `false`, we can also use a set as predicate to filter out only values which are present in the set: - -``` -(filter #{1 2 4 8 16 32} (range 10)) -; (1 2 4 8) -``` - -Again we're using data as code, since vectors, maps & sets all can be used as functions and return `nil` if a value isn't present, therefore fulfilling the general contract of a predicate function... - -#### take / drop - -Sometimes we are only interested in a chunk of values from a larger collection. We can use [`take`][161] to retrieve the first `n` elements from a collection as a lazy sequence: - -``` -(take 3 '(a b c d e f)) -; (a b c) -``` - -In contrast, we can use [`drop`][162] to ignore the first `n` elements and give us a lazy sequence of all remaining elements: - -``` -(drop 3 '(a b c d e f)) -; (d e f) -``` - -Clojure has a few other variations on that theme, most notably [`take-last`][163], [`drop-last`][164], [`butlast`][165], [`take-nth`][166], [`take-while`][167] and [`drop-while`][168]. The latter two also take a predicate function and terminate as soon as the predicate returns a "falsy" result: - -``` -(take-while #(< % 5) (range 10)) -; (0 1 2 3 4) -``` - -#### concat & mapcat - -[`concat`][169] splices any number of seqs together into a single new lazy seq. The new `rotate-left` function shows how we can use `concat` with `take`/`drop` to rotate elements in a sequence: - -``` -(concat [1 2 3] '(a b c) {:a "aa" :b "bb}) -; (1 2 3 a b c [:a "aa"] [:b "bb"]) - -(defn rotate-left [n coll] (concat (drop n coll) (take n coll))) -; #'users/rotate-left - -(rotate-left 3 '(a b c d e f g h i)) -; (d e f g h i a b c) -``` - -[`mapcat`][170] is a combination of `map` & `concat`. Like `map` it accepts a transformation function and a (number of) seqs. The mapping function needs to produce a collection for each step which are then concatenated using `concat`: - -``` -; another social graph structure as from above (only w/ more people)... -(def g2 - #{#{:ricardo :toxi} - #{:filip :edu} - #{:filip :toxi} - #{:filip :ricardo} - #{:filip :marija} - #{:toxi :marija} - #{:marija :edu} - #{:edu :toxi}}) - -; step 1: produce a seq of all relations -(map seq g2) -; ((:marija :filip) (:toxi :marija) (:edu :filip) (:ricardo :filip) -; (:toxi :edu) (:toxi :ricardo) (:marija :edu) (:toxi :filip)) - -; step 2: combine rels into single seq -(mapcat seq g2) ; option #1: `seq` as transform fn -(mapcat identity g2) ; option #2: `identity` as transform (same result) -; (:marija :filip :toxi :marija :edu :filip :ricardo :filip :toxi :edu :toxi :ricardo :marija :edu :toxi :filip) - -; step 3: form a set of unique nodes in the graph -(set (mapcat identity g2)) -; #{:toxi :marija :edu :ricardo :filip} - -; step 4: build map of node valence/connectivity -(frequencies (mapcat identity g2)) -; {:marija 3, :filip 4, :toxi 4, :edu 3, :ricardo 2} -``` - -> There're two functions we haven't dealt with so far: [`identity`][171] simply returns the value given as argument. [`frequencies`][172] consumes a seq and returns a map with the seq's unique values as keys and their number of occurrences as values, basically a [histogram][173]. - -`take` & `drop` are also important with respect to one more (optional) property of lazy sequences we haven't mentioned so far: - -##### Infinite sequences - -The concept of infinite data in a non-lazy (i.e. eager) context is obviously unachievable on a machine with finite memory. Laziness, however does enable potential infinity, both in terms of generating and/or consuming. In fact, there're many Clojure functions which exactly do that and without the proper precautions (i.e. combined with `take`, `drop` and friends), they would bring a machine to its knees. So be careful! - -We already have used one of these potentially infinite sequence generators above: [`range`][156] when called without an argument produces a lazyseq of monotonically increasing numbers: `(0 1 2 3 4 ...)` **(Since the REPL always tries to print out the result, do not ever call one of these without guards in the REPL!)** - -Other useful infinite lazyseq generators are: - -[`cycle`][174] delivers a lazyseq by repeating a given seq ad infinitum: - -``` -(take 5 (cycle [1 2 3])) -; (1 2 3 1 2) -(take 10 (take-nth 3 (cycle (range 10)))) -; (0 3 6 9 2 5 8 1 4 7) -``` - -[`repeat`][175] produces a lazyseq of a given value: - -``` -(take 5 (repeat 42)) -; (42 42 42 42 42) -(repeat 5 42) -; (42 42 42 42 42) -``` - -[`repeatedly`][176] produces a lazyseq of the results of calling a function (without arguments) repeatedly: - -``` -(take 5 (repeatedly rand)) -; (0.07610618695828963 0.3862058886976354 0.9787365745813027 0.6499681207528709 0.5344143491834465) -``` - -[`iterate`][177] takes a function and a start argument and produces a lazyseq of values returned by applying the function to the previous result: so (f (f (f x)))... Here to generate powers of 2: - -``` -(take 5 (iterate #(* 2 %) 1)) -; (1 2 4 8 16) -(take 5 (drop 10 (iterate #(* 2 %) 1))) -; (1024 2048 4096 8192 16384) -``` - -Since infinite lazyseqs are values just like any other (but at the same time can't be exhausted) it sometimes it's helpful to think about them as high level recipes for changing program states or triggers of computations. Combined with the various sequence processing functions they provide a truly alternative approach to solving common programming problems. - -#### Sequence (re)combinators - -Here're some more core functions related to combining collections in different ways: - -[`interleave`][178] recombines two sequences in an alternating manner (also lazy): - -``` -(interleave [:clojure :lisp :scheme] [2007 1958 1970]) -; (:clojure 2007 :lisp 1958 :scheme 1970) -``` - -[`interpose`][179] inserts a separator between each element of the original seq: - -``` -(interpose "," #{"cyan" "black" "yellow" "magenta"}) -; ("cyan" "," "magenta" "," "yellow" "," "black") -``` - -[`zipmap`][180] combines two collections into a single hashmap, where the 1st collection is used for keys and the second as values. Let's have some [Roman Numerals][181]: - -``` -; first the individual pieces: -; powers of 10 -(take 10 (iterate #(* 10 %) 1)) -; (1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000) - -; apply powers to 1 & 5 -(take 5 (map (fn [x] [x (* x 5)]) (iterate #(* 10 %) 1))) ; using `map` -; ([1 5] [10 50] [100 500] [1000 5000] [10000 50000]) -(take 5 (mapcat (fn [x] [x (* x 5)]) (iterate #(* 10 %) 1))) ; using `mapcat` -; (1 5 10 50 100) - -; altogether now... -(zipmap - [:I :V :X :L :C :D :M] ; keys - (mapcat (fn [x] [x (* x 5)]) (iterate #(* 10 %) 1))) ; values -; {:M 1000, :D 500, :C 100, :L 50, :X 10, :V 5, :I 1} -``` - -#### for - -Since we've just discussed sequence generators, we also must briefly mention [`for`][182]. Unlike `for` loops in other languages, Clojure's `for` is a so called [List comprehension][183], just another generator of lazyseqs, though one on crack if we may say so... `for` combines the behavior of `map` with lexical binding as we know from `let` and conditional processing. It returns its results as lazyseq. Here we iterate over the seq returned by `(range 4)` and bind `i` to each value successively, then execute `for`'s body to tell us if that current value of `i` is even: - -``` -(for [i (range 4)] {:i i :even (even? i)}) -; ({:i 0, :even true} {:i 1, :even false} {:i 2, :even true} {:i 3, :even false}) -(into {} (for [i (range 4)] [i (even? i)])) -; {0 true, 1 false, 2 true, 3 false} -``` - -`for` can also be used to created nested seqs. This happens automatically when more than one symbol is bound, e.g. here we create positions in a 4x2 grid (the first symbol defines the outer loop, the next one(s) inner loops: - -``` -(for [y (range 2) ; outer loop - x (range 4)] ; inner loop - [x y]) ; result per iteration -; ([0 0] [1 0] [2 0] [3 0] [0 1] [1 1] [2 1] [3 1]) -``` - -The symbol binding part can be further customized with additional bindings to pre-compute values used in the body of `for` and/or we can specify a predicate to skip an iteration (therefore also achieving filtering a la `filter`) or cancel iteration (using `:while`). The next example creates points only along the border of a 4x4 grid (center points are skipped): - -``` -(for [y (range 4) - x (range 4) - :let [border? (or (= 0 x) (= 3 x) (= 0 y) (= 3 y))] - :when border?] ; skip iteration when border? is false - [x y]) -; ([0 0] [1 0] [2 0] [3 0] ; manually formatted to better visualize result... -; [0 1] [3 1] -; [0 2] [3 2] -; [0 3] [1 3] [2 3] [3 3]) -``` - -#### every? / some - -Sometimes we need to check if the values of a collection match certain criteria, e.g. to enforce a restriction. The [`every?`][184] function takes a validation function (predicate) and applies it to all elements of a collection. It only returns true, if the predicate returns a truthy value for all of them. Here we check if all elements in a seq have a `:name` key (remember, keywords can be used as functions!) - -``` -(every? :name [{:name "nardove"} {:name "toxi"} {:age 88}]) -; false -``` - -Or we could write our own predicate and check if all values are multiples of 3, that is a number for which the remainder, [`rem`][185], of a division by 3 is zero: - -``` -(every? #(zero? (rem % 3)) [666 42 99 12]) -; true -``` - -Alternatively, we can use [`some`][186] if we only want to ensure some of the values match a condition. `some` will return the first truthy value returned by the predicate (or `nil` if no items match). Again, we are using data (a set) as predicate fn: - -``` -(some #{3 6 9 12} [1 2 3 4 5 6]) -; 3 -``` - -...or ask if some names are longer than 4 characters: - -``` -(some #(> (count %) 4) ["mia" "nardove" "toxi"]) -; true -(some #(if (> (count %) 4) %) ["mia" "nardove" "toxi"]) -; "nardove" -``` - -#### apply - -So far we have used the phrase "applies a function to x" several times. In short it simply means that a function is called with `x` as its argument. Though, what should we do if we have a function accepting multiple arguments, but have our arguments only in a single collection (i.e. one built with `map` etc.)? - -To stick with some familiar constructs and add a concrete use case, our `hypot` function defined earlier, computes the length of the longest side in a triangle, given the lengths of the 2 other sides. At the same time we could interpret this as the calculation of the distance of a 2d point from the origin in a cartesian coordinate system: One side is the distance along the X-axis and the other the distance in Y. - -Imagine we have a collection of 2d points and we want to measure their distance from the origin (their [magnitude][187]): - -``` -(def points [[0 100] [200 100] [-300 50]]) -; #'user/points -``` - -Now we could use `map` and our `hypot` function to compute the distance/length for each point and produce a new sequence of the results. However, `hypot` so far requires 2 arguments `a` & `b`, but our points are defined as vectors of 2 elements and therefore each point is just a single value (the vector itself). For such situations, Clojure provides us with the `apply` function, allowing a function to accept a collection of values as individual arguments (with possibly additional ones given as well). So whereas the following will produce an error... - -``` -(hypot [200 100]) -; ArityException Wrong number of args (1) passed to: user$hypot -``` - -... using [`apply`][188] will unravel our vector into two individual arguments and call our function correctly: - -``` -(apply hypot [200 100]) -; 223.60679774997897 -``` - -With this in place, we can now plug this into a `map` form and process all our points: - -``` -(map #(apply hypot %) points) -; (100.0 223.60679774997897 304.138126514911) -``` - -To complete an earlier arc of our tutorial, we could also plug this into another `reduce` step to give us the longest distance (using `max` as the reduction function): - -``` -(reduce max (map #(apply hypot %) points)) -; 304.138126514911 -``` - -### Destructuring - -As we've just learned with `apply`, sometimes it is required to adapt our data to a function's specifics. But we can also achieve the opposite and adapt a function to expect a specific data structure and do so without having to jump through hoops painstakingly pulling out individual values from a given collection. Clojure make this very easy using destructuring. - -Destructuring is a way to bind symbols to values in a collection, by replicating the overall structure of the collection and placing the symbols to be bound at the points from which we intend to get a value from in the supplied data structure. A few lines of code will illustrate this much better... - -#### Sequential destructuring - -As we know a vector is just a sequence of values, each of which can be another nested data structure: - -``` -(def nested-data [10 20 [30 40] {:x 1 :y 2}]) ; some test data -``` - -To bind the first 3 items of that input vector to symbols `a`, `b` and `c`, a naive and inelegant solution would be to bind each symbol individually, like this: - -``` -(let [a (nested-data 0) - b (nested-data 1) - c (nested-data 2)] - (prn :a a :b b :c c)) -; :a 10 :b 20 :c [30 40] -``` - -Using sequential destructuring, this can be expressed much more concisely. All we need to do is telling Clojure the symbols' values are part of a sequence, by wrapping them in a vector themselves: - -``` -(let [[a b c] nested-data] (prn :a a :b b :c c)) -; :a 10 :b 20 :c [30 40] -``` - -Sometimes we might need values which are not successive in the collection e.g. say we only care about the 2nd and 4th value: - -``` -(let [[_ b _ d] nested-data] (prn :b b :d d)) -; :b 20 :d {:x 1 :y 2} -``` - -> It's idiomatic to use the `_` symbol to bind values we're not interested in (in this case the 1st and 3rd elements). - -The third element of `nested-data` is another vector. To also restructure its elements, we simply need to replicate the overall structure of `nested-data` and indicate that this 3rd element is a sequence itself. We combine this with another destructuring option, called `:as`, to bind the entire 3rd element to yet another symbol, `third`: - -``` -(let [[_ _ [c d :as third]] nested-data] - (prn third "contains:" c d)) -; [30 40] "contains:" 30 40 -``` - -When attempting to destructure sequences with more symbols than there are values, any symbols with missing values are bound to `nil`: - -``` -(let [[_ _ _ _ missing] nested-data] - (prn "missing?" (nil? missing))) -; "missing?" true -``` - -Likewise, if we're only interested in the first x elements of a seq, we don't need to specify any additional symbols/placeholders. Clojure doesn't care if there're more elements in a seq than destructuring symbols. However, in addition to the initial elements we're interested in, we might still want to hold on to the `rest` of the collection too. This can be done with `&`: - -``` -(let [[a b & more] nested-data] - (println (count more) "more elements:" more)) -; 2 more elements: ([30 40] {:x 1 :y 2}) -``` - -Destructuring can be used almost anywhere whenever Clojure expects a symbol binding form. E.g. in the symbol binding part of a `for` form or to specify the argument list(s) of a function. - -#### Map destructuring - -Maps too can be destructured, though because the lookup of values requires keys, their destructuring form needs to refer to keys as well. Since we used `[` and `]` to specify a sequential destructuring, it should also make sense that we use `{` and `}` for destructuring maps. In the following we destructure the 4th element of `nested-data` and bind this map's `:x` to symbol `a` and `:y` to `b`: - -``` -(let [{a :x b :y} (nested-data 4)] - (prn :a a :b b)) -; :a 1 :b 2 -``` - -If we wanted to use the same symbol names as the keys used in the original map, an alternative is: - -``` -(let [{:keys [x y] :as v} (nested-data 4)] - (prn :x x :y y :v v)) -; :x 1 :y 2 :v {:x 1 :y 2} -``` - -As with sequential destructuring we can use `:as` to also bind the entire map and of course can be done recursively. You can find more examples in [Jay Field's blog post][189] about this matter. - -#### Destructuring and function arities - -A function providing more than one implementation is called a "multi-arity" function and many core Clojure functions are implemented like this to provide maximum flexibility. So finally, let's extend our earlier `hypot` function and turn it into a multi-arity fn, accepting not only two numbers, but also a single seq (w/ minimum two elements) instead: - -``` -(defn hypot - ([[a b]] (hypot a b)) ; destructure the seq and then call itself with the 2 args - ([a b] (Math/sqrt (+ (* a a) (* b b))))) -; #'user/hypot - -(hypot [9 12]) ; no more need for `apply` -; 15.0 -(= (hypot [9 12]) (hypot 9 12)) ; testing other arity... -; true -``` - -> Remember to wrap each arity implementation in its own form, i.e. surround with `(` and `)`. - -### End of part 1 - -Congratulations!!! You made it through to here and we're truly proud of you! Even though we could only give you glimpses of The Clojure Way™ so far, we hope you're excited enough to try out more when we will be applying some of these basics to more practical & visual examples in the next part(s) of this tutorial. In the next part we will start building our first projects and introduce you to [Quil][190], a Clojure wrapper around [Processing][191]. - -In the meantime we recommend that you sharpen your Clojure Skillz by checking out some of the materials below, esp. the [4clojure][192] puzzles are a great way of learning. - -### Further reading & references - -+ Clojure mailing list - main community discussion (~8600 members) -+ clojure-doc.org - great community based collection of guides & tutorials aimed at all levels (incl. setup guides for various tools & platforms) -+ clojuredocs.org - community & example based reference for core Clojure namespaces & functions (learn by example) -+ Clojure cheatsheets - online & PDF versions, incl. ClojureScript -+ Stackoverflow - SO questions tagged w/ Clojure -+ Try Clojure - online playground REPL, no installation needed -+ 4clojure - online learning resource to solve Clojure puzzles of varying difficulties -+ Planet Clojure (Twitter) - Clojure blog aggregator -+ O'Reilly book - IMHO currently most comprehensive & accessible book -+ The Joy of Clojure - another great book, also touching more on the why & how of Clojure's philosophy -+ clojure-toolbox.com - curated list of Clojure projects, grouped by topic -+ clojuresphere.com - autogenerated list of Clojure projects on GitHub, incl. dependency info -+ clojars.org - community repository for open source Clojure libraries (main repo for Leiningen) -+ ClojureWerkz - growing collection of well maintained open source libraries (mainly DB centric projects) - - --------------------------------------------------------------------------------- - -via: https://www.creativeapplications.net/tutorials/introduction-to-clojure-part-1/ - -作者:[Karsten Schmidt and Ricardo Sanchez][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.creativeapplications.net/author/karstenricardo/ -[b]: https://github.com/lujun9972 -[1]: http://nardove.com/ -[2]: http://resonate.io/2013/education -[3]: http://postspectacular.com/ -[4]: http://www.lisperati.com/clojure-spels/casting.html -[5]: http://resonate.io/ -[6]: http://en.wiktionary.org/wiki/TLDR -[7]: http://clojure.org -[8]: http://en.wikipedia.org/wiki/Lisp_(programming_language) -[9]: http://en.wikipedia.org/wiki/Lambda_calculus -[10]: http://en.wikipedia.org/wiki/Alonzo_Church -[11]: http://www.erlang.org/ -[12]: http://fsharp.org/ -[13]: http://haskell.org -[14]: http://scala-lang.org -[15]: http://en.wikipedia.org/wiki/Functional_programming -[16]: http://steve-yegge.blogspot.co.uk/2006/03/execution-in-kingdom-of-nouns.html -[17]: http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html -[18]: http://en.wikipedia.org/wiki/Anonymous_function#C.2B.2B -[19]: http://en.wikipedia.org/wiki/Immutable_object -[20]: http://en.wikipedia.org/wiki/Lazy_evaluation -[21]: http://clojure.org/sequences -[22]: http://clojure.org/protocols -[23]: http://en.wikipedia.org/wiki/Multiple_dispatch -[24]: http://clojure.org/macros -[25]: http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html -[26]: http://clojure.org/concurrent_programming -[27]: http://thechangelog.com/rich-hickeys-greatest-hits/ -[28]: https://twitter.com/yoavrubin/status/226419931435130880 -[29]: http://thinkrelevance.com/blog/2009/10/19/the-case-for-clojure -[30]: https://github.com/clojure/clojurescript -[31]: https://github.com/clojure-android/lein-droid -[32]: https://github.com/halgari/mjolnir/ -[33]: http://en.wikipedia.org/wiki/Marmite -[34]: https://twitter.com/puredanger/status/313507982623268865 -[35]: http://en.wikipedia.org/wiki/S-expression -[36]: http://en.wikipedia.org/wiki/Brace_matching -[37]: https://github.com/jlr/rainbow-delimiters -[38]: https://www.youtube.com/watch?v=D6h5dFyyUX0 -[39]: http://leiningen.org -[40]: http://en.wikipedia.org/wiki/Leiningen_Versus_the_Ants -[41]: http://ant.apache.org -[42]: http://brew.sh/ -[43]: http://www.oracle.com/technetwork/java/javase/downloads/index.html -[44]: http://code.google.com/p/counterclockwise -[45]: http://clojure-doc.org -[46]: http://jruby.org/ -[47]: https://developer.mozilla.org/en/docs/Rhino -[48]: http://tryclj.com -[49]: http://en.wikipedia.org/wiki/Prefix_notation -[50]: http://en.wikipedia.org/wiki/Pythagorean_theorem -[51]: https://www.creativeapplications.net/wp-content/uploads/2013/12/hypot.png -[52]: http://www.haskell.org/ -[53]: http://en.wikipedia.org/wiki/Scheme_(programming_language) -[54]: http://en.wikipedia.org/wiki/Closure_(computer_science) -[55]: http://en.wikipedia.org/wiki/Monad_(functional_programming) -[56]: http://en.wikipedia.org/wiki/Scope_(computer_science#Lexical_scoping) -[57]: http://clojuredocs.org/clojure_core/clojure.core/let -[58]: http://en.wikipedia.org/wiki/Don't_Repeat_Yourself -[59]: http://www.cplusplus.com/doc/tutorial/namespaces/ -[60]: http://en.wikipedia.org/wiki/Java_package -[61]: http://docs.python.org/2/tutorial/modules.html -[62]: http://clojure.org/namespaces -[63]: https://www.creativeapplications.net/wp-content/uploads/2013/04/var.png -[64]: http://clojuredocs.org/clojure_core/clojure.core/def -[65]: http://clojure.github.io/clojure/clojure.core-api.html -[66]: http://clojuredocs.org/clojure_core/clojure.core/inc -[67]: http://clojuredocs.org/clojure_core/clojure.core/defn -[68]: http://clojure.org/java_interop -[69]: http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html -[70]: http://en.wikipedia.org/wiki/Hypotenuse -[71]: http://clojuredocs.org/clojure_core/clojure.core/fn -[72]: http://clojuredocs.org/clojure_core/clojure.core/str -[73]: http://en.wikipedia.org/wiki/Higher-order_function -[74]: http://rosettacode.org/wiki/Partial_function_application -[75]: http://en.wikipedia.org/wiki/Closure_(computer_programming) -[76]: http://clojuredocs.org/clojure_core/clojure.core/partial -[77]: http://en.wikipedia.org/wiki/Fail-fast -[78]: http://en.wikipedia.org/wiki/Design_by_contract -[79]: http://clojuredocs.org/clojure_core/clojure.core/string_q -[80]: http://blog.fogus.me/2009/12/21/clojures-pre-and-post/ -[81]: http://ianrumford.github.io/blog/2012/11/17/first-take-on-contracts-in-clojure/ -[82]: http://clojuredocs.org/clojure_core/clojure.repl/doc -[83]: http://clojuredocs.org/clojure_core/clojure.core/meta -[84]: http://clojuredocs.org/clojure_core/clojure.core/with-meta -[85]: http://clojuredocs.org/clojure_core/clojure.core/alter-meta -[86]: http://clojure.org/metadata -[87]: http://clojure.org/java_interop#Java%20Interop-Type%20Hints -[88]: http://clojuredocs.org/clojure_core/clojure.core/and -[89]: http://clojuredocs.org/clojure_core/clojure.core/or -[90]: http://clojuredocs.org/clojure_core/clojure.core/not -[91]: http://clojuredocs.org/clojure_core/clojure.core/if -[92]: http://clojuredocs.org/clojure_core/clojure.core/when -[93]: http://clojuredocs.org/clojure_core/clojure.core/do -[94]: http://clojure.org/data_structures -[95]: http://clojuredocs.org/clojure_core/clojure.core/list -[96]: http://www.r-project.org/ -[97]: http://en.wikipedia.org/wiki/XSLT -[98]: http://en.wikipedia.org/wiki/PostScript -[99]: https://www.creativeapplications.net/wp-content/uploads/2013/12/quote.png -[100]: http://en.wikipedia.org/wiki/Metaprogramming -[101]: https://gist.github.com/stonegao/1335696 -[102]: http://www.packtpub.com/clojure-for-domain-specific-languages/book -[103]: http://en.wikipedia.org/wiki/Stack_(abstract_data_type) -[104]: http://clojuredocs.org/clojure_core/clojure.core/vector -[105]: http://en.wikipedia.org/wiki/Hash_table -[106]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects -[107]: http://clojuredocs.org/clojure_core/clojure.core/keyword -[108]: http://clojuredocs.org/clojure_core/clojure.core/hash-map -[109]: http://en.wikipedia.org/wiki/JSON -[110]: http://clojuredocs.org/clojure_core/clojure.core/get-in -[111]: http://clojuredocs.org/clojure_core/clojure.core/select-keys -[112]: http://en.wikipedia.org/wiki/Set_theory -[113]: http://clojuredocs.org/clojure_core/clojure.core/set -[114]: http://clojuredocs.org/clojure_core/clojure.core/into -[115]: https://www.creativeapplications.net/wp-content/uploads/2013/12/socialgraph.png -[116]: http://clojuredocs.org/clojure_core/clojure.core/nil_q -[117]: http://en.wikipedia.org/wiki/Polymorphism_(computer_science) -[118]: http://clojuredocs.org/clojure_core/clojure.core/conj -[119]: http://clojuredocs.org/clojure_core/clojure.core/assoc -[120]: http://clojuredocs.org/clojure_core/clojure.core/assoc-in -[121]: http://clojuredocs.org/clojure_core/clojure.core/update-in -[122]: http://clojuredocs.org/clojure_core/clojure.core/dissoc -[123]: http://clojuredocs.org/clojure_core/clojure.core/disj -[124]: http://clojuredocs.org/clojure_core/clojure.core/pop -[125]: http://en.wikipedia.org/wiki/Persistent_data_structure -[126]: http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf -[127]: https://www.creativeapplications.net/wp-content/uploads/2013/04/persistent.png -[128]: http://clojuredocs.org/clojure_core/clojure.core/seq -[129]: http://clojuredocs.org/clojure_core/clojure.core/first -[130]: http://clojuredocs.org/clojure_core/clojure.core/next -[131]: http://clojuredocs.org/clojure_core/clojure.core/cons -[132]: https://www.creativeapplications.net/wp-content/uploads/2013/12/first-rest.png -[133]: http://clojuredocs.org/clojure_core/clojure.core/loop -[134]: http://clojuredocs.org/clojure_core/clojure.core/reverse -[135]: http://clojuredocs.org/clojure_core/clojure.core/recur -[136]: http://en.wikipedia.org/wiki/Tail_recursion -[137]: http://clojuredocs.org/clojure_core/clojure.core/doseq -[138]: http://clojuredocs.org/clojure_core/clojure.core/last -[139]: http://clojuredocs.org/clojure_core/clojure.core/dotimes -[140]: http://en.wikipedia.org/wiki/Referential_transparency_(computer_science) -[141]: http://en.wikipedia.org/wiki/Idempotence -[142]: http://en.wikipedia.org/wiki/Memoization -[143]: http://clojuredocs.org/clojure_core/clojure.core/memoize -[144]: http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#sleep(long) -[145]: http://research.google.com/archive/mapreduce.html -[146]: http://en.wikipedia.org/wiki/Map_Reduce -[147]: http://couchdb.apache.org -[148]: http://www.mongodb.org/ -[149]: http://basho.com/riak/ -[150]: http://en.wikipedia.org/wiki/Apache_Hadoop -[151]: http://clojuredocs.org/clojure_core/clojure.core/map -[152]: https://www.creativeapplications.net/wp-content/uploads/2013/04/map.png -[153]: https://www.creativeapplications.net/wp-content/uploads/2013/12/map-builder-640x259.png -[154]: http://clojuredocs.org/clojure_core/clojure.core/reduce -[155]: http://clojuredocs.org/clojure_core/clojure.core/reductions -[156]: http://clojuredocs.org/clojure_core/clojure.core/range -[157]: https://www.creativeapplications.net/wp-content/uploads/2013/12/reduce-sum.png -[158]: http://clojuredocs.org/clojure_core/clojure.core/filter -[159]: http://clojuredocs.org/clojure_core/clojure.core/even_q -[160]: https://www.creativeapplications.net/wp-content/uploads/2013/12/filter-640x54.png -[161]: http://clojuredocs.org/clojure_core/clojure.core/take -[162]: http://clojuredocs.org/clojure_core/clojure.core/drop -[163]: http://clojuredocs.org/clojure_core/clojure.core/take-last -[164]: http://clojuredocs.org/clojure_core/clojure.core/drop-last -[165]: http://clojuredocs.org/clojure_core/clojure.core/butlast -[166]: http://clojuredocs.org/clojure_core/clojure.core/take-nth -[167]: http://clojuredocs.org/clojure_core/clojure.core/take-while -[168]: http://clojuredocs.org/clojure_core/clojure.core/drop-while -[169]: http://clojuredocs.org/clojure_core/clojure.core/concat -[170]: http://clojuredocs.org/clojure_core/clojure.core/mapcat -[171]: http://clojuredocs.org/clojure_core/clojure.core/identity -[172]: http://clojuredocs.org/clojure_core/clojure.core/frequencies -[173]: http://en.wikipedia.org/wiki/Histogram -[174]: http://clojuredocs.org/clojure_core/clojure.core/cycle -[175]: http://clojuredocs.org/clojure_core/clojure.core/repeat -[176]: http://clojuredocs.org/clojure_core/clojure.core/repeatedly -[177]: http://clojuredocs.org/clojure_core/clojure.core/iterate -[178]: http://clojuredocs.org/clojure_core/clojure.core/interleave -[179]: http://clojuredocs.org/clojure_core/clojure.core/interpose -[180]: http://clojuredocs.org/clojure_core/clojure.core/zipmap -[181]: http://en.wikipedia.org/wiki/Roman_numerals -[182]: http://clojuredocs.org/clojure_core/clojure.core/for -[183]: http://en.wikipedia.org/wiki/List_comprehension -[184]: http://clojuredocs.org/clojure_core/clojure.core/every_q -[185]: http://clojuredocs.org/clojure_core/clojure.core/rem -[186]: http://clojuredocs.org/clojure_core/clojure.core/some -[187]: http://en.wikipedia.org/wiki/Magnitude_(vector) -[188]: http://clojuredocs.org/clojure_core/clojure.core/apply -[189]: http://blog.jayfields.com/2010/07/clojure-destructuring.html -[190]: https://github.com/quil/quil -[191]: http://processing.org -[192]: http://www.4clojure.com/ diff --git a/sources/tech/20171114 Finding Files with mlocate- Part 2.md b/sources/tech/20171114 Finding Files with mlocate- Part 2.md index 7a99b3793a..19c546a917 100644 --- a/sources/tech/20171114 Finding Files with mlocate- Part 2.md +++ b/sources/tech/20171114 Finding Files with mlocate- Part 2.md @@ -1,4 +1,3 @@ -translating by amwps290 Finding Files with mlocate: Part 2 ====== diff --git a/sources/tech/20180416 Cgo and Python.md b/sources/tech/20180416 Cgo and Python.md index 422f510949..e5688d43c8 100644 --- a/sources/tech/20180416 Cgo and Python.md +++ b/sources/tech/20180416 Cgo and Python.md @@ -1,4 +1,3 @@ -translating by name1e5s Cgo and Python ============================================================ diff --git a/sources/tech/20180612 7 open source tools to make literature reviews easy.md b/sources/tech/20180612 7 open source tools to make literature reviews easy.md index 674f4ea44b..96edb68eff 100644 --- a/sources/tech/20180612 7 open source tools to make literature reviews easy.md +++ b/sources/tech/20180612 7 open source tools to make literature reviews easy.md @@ -1,4 +1,3 @@ -translated by lixinyuxx 7 open source tools to make literature reviews easy ====== diff --git a/sources/tech/20180725 Best Online Linux Terminals and Online Bash Editors.md b/sources/tech/20180725 Best Online Linux Terminals and Online Bash Editors.md deleted file mode 100644 index 7f430c3d59..0000000000 --- a/sources/tech/20180725 Best Online Linux Terminals and Online Bash Editors.md +++ /dev/null @@ -1,212 +0,0 @@ -Best Online Linux Terminals and Online Bash Editors -====== -No matter whether you want to practice Linux commands or just analyze/test your shell scripts online, there’s always a couple of online Linux terminals and online bash compilers available. - -This is particularly helpful when you are using the Windows operating system. Though you can [install Linux inside Windows using Windows Subsystem for Linux][1], using online Linux terminals are often more convenient for a quick test. - -![Websites that allow to use Linux Terminal online][2] - -But where can you find free Linux console? Which online Linux shell should you use? - -Fret not, to save you the hassle, here, we have compiled a list of the best online Linux terminals and a separate list of best online bash compilers for you to look at. - -**Note:** All of the online terminals support several browsers that include Google Chrome, Mozilla Firefox, Opera and Microsoft Edge. - -### Best Online Linux Terminals To Practice Linux Commands - -In the first part, I’ll list the online Linux terminals. These websites allow you to run the regular Linux commands in a web browser so that you can practice or test them. Some websites may require you to register and login to save your sessions. - -#### 1. JSLinux - -![online linux terminal - jslinux][3] - -JSLinux is more like a complete Linux emulator instead of just offering you the terminal. As the name suggests, it has been entirely written in JavaScript. You get to choose a console-based system or a GUI-based online Linux system. However, in this case, you would want to launch the console-based system to practice Linux commands. To be able to connect your account, you need to sign up first. - -JSLinux also lets you upload files to the virtual machine. At its core, it utilizes [Buildroot][4] (a tool that helps you to build a complete Linux system for an embedded system). - -[Try JSLinux Terminal][5] - -#### 2. Copy.sh - -![copysh online linux terminal][6] - -Copy.sh offers one of the best online Linux terminals which is fast and reliable to test and run Linux commands. - -Copy.sh is also on [GitHub][7] – and it is being actively maintained, which is a good thing. It also supports other Operating Systems, which includes: - - * Windows 98 - * KolibriOS - * FreeDOS - * Windows 1.01 - * Archlinux - - - -[Try Copy.sh Terminal][8] - -#### 3. Webminal - -![webminal online linux terminal][9] - -Webminal is an impressive online Linux terminal – and my personal favorite when it comes to a recommendation for beginners to practice Linux commands online. - -The website offers several lessons to learn from while you type in the commands in the same window. So, you do not need to refer to another site for the lessons and then switch back or split the screen in order to practice commands. It’s all right there – in a single tab on the browser. - -[Try Webminal Terminal][10] - -#### 4. Tutorialspoint Unix Terminal - -![tutorialspoint linux terminal][11] - -You might be aware of Tutorialspoint – which happens to be one of the most popular websites with high quality (yet free) online tutorials for just about any programming language (and more). - -So, for obvious reasons, they provide a free online Linux console for you to practice commands while referring to their site as a resource at the same time. You also get the ability to upload files. It is quite simple but an effective online terminal. Also, it doesn’t stop there, it offers a lot of different online terminals as well in its [Coding Ground][12] page. - -[Try Unix Terminal Online][13] - -#### 5. JS/UIX - -![js uix online linux terminal][14] - -JS/UIX is yet another online Linux terminal which is written entirely in JavaScript without any plug-ins. It contains an online Linux virtual machine, virtual file-system, shell, and so on. - -You can go through its manual page for the list of commands implemented. - -[Try JS/UX Terminal][15] - -#### 6. CB.VU - -![online linux terminal][16] - -If you are in for a treat with FreeBSD 7.1 stable version, cb.vu is a quite simple solution for that. - -Nothing fancy, just try out the Linux commands you want and get the output. Unfortunately, you do not get the ability to upload files here. - -[Try CB.VU Terminal][17] - -#### 7. Linux Containers - -![online linux terminal][18] - -Linux Containers lets you run a demo server with a 30-minute countdown on which acts as one of the best online Linux terminals. In fact, it’s a project sponsored by Canonical. - -[Try Linux LXD][19] - -#### 8. Codeanywhere - -![online linux terminal][20] - -Codeanywhere is a service which offers cross-platform cloud IDEs. However, in order to run a free Linux virtual machine, you just need to sign up and choose the free plan. And, then, proceed to create a new connection while setting up a container with an OS of your choice. Finally, you will have a free Linux console at your disposal. - -[Try Codeanywhere Editor][21] - -### Best Online Bash Editors - -Wait a sec! Are the online Linux terminals not good enough for Bash scripting? They are. But creating bash scripts in terminal editors and then executing them is not as convinient as using an online Bash editor. - -These bash editors allow you to easily write shell scripts online and you can run them to check if it works or not. - -Let’s see here can you run shell scripts online. - -#### Tutorialspoint Bash Compiler - -![online bash compiler][22] - -As mentioned above, Tutorialspoint also offers an online Bash compiler. It is a very simple bash compiler to execute bash shell online. - -[Try Tutorialspoint Bash Compiler][23] - -#### JDOODLE - -![online bash compiler][24] - -Yet another useful online bash editor to test Bash scripts is JDOODLE. It also offers other IDEs, but we’ll focus on bash script execution here. You get to set the command line arguments and the stdin inputs, and would normally get the result of your code. - -[Try JDOODLE Bash Script Online Tester][25] - -#### Paizo.io - -![paizo online bash editor][26] - -Paizo.io is a good bash online editor that you can try for free. To utilize some of its advanced features like task scheduling, you need to first sign up. It also supports real-time collaboration, but that’s still in the experimental phase. - -[Try Paizo.io Bash Editor][27] - -#### ShellCheck - -![shell check bash check][28] - -An interesting Bash editor which lets you find bugs in your shell script. It is available on [GitHub][29] as well. In addition, you can install ShellCheck locally on [supported platforms][30]. - -[Try ShellCheck][31] - -#### Rextester - -![rextester bash editor][32] - -If you only want a dead simple online bash compiler, Rextester should be your choice. It also supports other programming languages. - -[Try Rextester][33] - -#### Learn Shell - -![online bash shell editor][34] - -Just like [Webminal][35], Learnshell provides you with the content (or resource) to learn shell programming and you could also run/try your code at the same time. It covers the basics and a few advanced topics as well. - -[Try Learn Shell Programming][36] - -### Wrapping Up - -Now that you know of the most reliable and fast online Linux terminals & online bash editors, learn, experiment, and play with the code! - -We might have missed any of your favorite online Linux terminals or maybe the best online bash compiler which you happen to use? Let us know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/online-linux-terminals/ - -作者:[Ankush Das][a] -选题:[lujun9972](https://github.com/lujun9972) -译者:[译者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/ -[1]:https://itsfoss.com/install-bash-on-windows/ -[2]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/online-linux-terminals.jpeg -[3]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/jslinux-online-linux-terminal.jpg -[4]:https://buildroot.org/ -[5]:https://bellard.org/jslinux/ -[6]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/copy-sh-online-linux-terminal.jpg -[7]:https://github.com/copy/v86 -[8]:https://copy.sh/v86/?profile=linux26 -[9]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/webminal.jpg -[10]:http://www.webminal.org/terminal/ -[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/coding-ground-tutorialspoint-online-linux-terminal.jpg -[12]:https://www.tutorialspoint.com/codingground.htm -[13]:https://www.tutorialspoint.com/unix_terminal_online.php -[14]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/JS-UIX-online-linux-terminal.jpg -[15]:http://www.masswerk.at/jsuix/index.html -[16]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/cb-vu-online-linux-terminal.jpg -[17]:http://cb.vu/ -[18]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/linux-containers-terminal.jpg -[19]:https://linuxcontainers.org/lxd/try-it/ -[20]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/codeanywhere-terminal.jpg -[21]:https://codeanywhere.com/editor/ -[22]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/tutorialspoint-bash-compiler.jpg -[23]:https://www.tutorialspoint.com/execute_bash_online.php -[24]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/jdoodle-online-bash-editor.jpg -[25]:https://www.jdoodle.com/test-bash-shell-script-online -[26]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/paizo-io-bash-editor.jpg -[27]:https://paiza.io/en/projects/new?language=bash -[28]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/shell-check-bash-analyzer.jpg -[29]:https://github.com/koalaman/shellcheck -[30]:https://github.com/koalaman/shellcheck#user-content-installing -[31]:https://www.shellcheck.net/# -[32]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/rextester-bash-editor.jpg -[33]:http://rextester.com/l/bash_online_compiler -[34]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/learnshell-online-bash-shell.jpg -[35]:http://www.webminal.org/ -[36]:http://www.learnshell.org/ diff --git a/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md b/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md index 2fd085eda0..8ee4f34897 100644 --- a/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md +++ b/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md @@ -1,5 +1,3 @@ -Translating by Jamskr - Exploring the Linux kernel: The secrets of Kconfig/kbuild ====== Dive into understanding how the Linux config/build system works. diff --git a/sources/tech/20181011 The First Beta of Haiku is Released After 16 Years of Development.md b/sources/tech/20181011 The First Beta of Haiku is Released After 16 Years of Development.md deleted file mode 100644 index b6daaef053..0000000000 --- a/sources/tech/20181011 The First Beta of Haiku is Released After 16 Years of Development.md +++ /dev/null @@ -1,87 +0,0 @@ -The First Beta of Haiku is Released After 16 Years of Development -====== -There are a number of small operating systems out there that are designed to replicate the past. Haiku is one of those. We will look to see where Haiku came from and what the new release has to offer. - -![Haiku OS desktop screenshot][1]Haiku desktop - -### What is Haiku? - -Haiku’s history begins with the now defunct [Be Inc][2]. Be Inc was founded by former Apple executive [Jean-Louis Gassée][3] after he was ousted by CEO [John Sculley][4]. Gassée wanted to create a new operating system from the ground up. BeOS was created with digital media work in mind and was designed to take advantage of the most modern hardware of the time. Originally, Be Inc attempted to create their own platform encompassing both hardware and software. The result was called the [BeBox][5]. After BeBox failed to sell well, Be turned their attention to BeOS. - -In the 1990s, Apple was looking for a new operating system to replace the aging Classic Mac OS. The two contenders were Gassée’s BeOS and Steve Jobs’ NeXTSTEP. In the end, Apple went with NeXTSTEP. Be tried to license BeOS to hardware makers, but [in at least one case][6] Microsoft threatened to revoke a manufacturer’s Windows license if they sold BeOS machines. Eventually, Be Inc was sold to Palm in 2001 for $11 million. BeOS was subsequently discontinued. - -Following the news of Palm’s purchase, a number of loyal fans decided they wanted to keep the operating system alive. The original name of the project was OpenBeOS, but was changed to Haiku to avoid infringing on Palm’s trademarks. The name is a reference to reference to the [haikus][7] used as error messages by many of the applications. Haiku is completely written from scratch and is compatible with BeOS. - -### Why Haiku? - -According to the project’s website, [Haiku][8] “is a fast, efficient, simple to use, easy to learn, and yet very powerful system for computer users of all levels”. Haiku comes with a kernel that have been customized for performance. Like FreeBSD, there is a “single team writing everything from the kernel, drivers, userland services, toolkit, and graphics stack to the included desktop applications and preflets”. - -### New Features in Haiku Beta Release - -A number of new features have been introduced since the release of Alpha 4.1. (Please note that Haiku is a passion project and all the devs are part-time, so some they can’t spend as much time working on Haiku as they would like.) - -![Haiku OS software][9] -HaikuDepot, Haiku’s package manager - -One of the biggest features is the inclusion of a complete package management system. HaikuDepot allows you to sort through many applications. Many are built specifically for Haiku, but a number have been ported to the platform, such as [LibreOffice][10], [Otter Browser][11], and [Calligra][12]. Interestingly, each Haiku package is [“a special type of compressed filesystem image, which is ‘mounted’ upon installation”][13]. There is also a command line interface for package management named `pkgman`. - -Another big feature is an upgraded browser. Haiku was able to hire a developer to work full-time for a year to improve the performance of WebPositive, the built-in browser. This included an update to a newer version of WebKit. WebPositive will now play Youtube videos properly. - -![Haiku OS WebPositive browser][14] -WebPositive, Haiku’s built-in browser - -Other features include: - - * A completely rewritten network preflet - * User interface cleanup - * Media subsystem improvements, including better streaming support, HDA driver improvements, and FFmpeg decoder plugin improvements - * Native RemoteDesktop improved - * Add EFI bootloader and GPT support - * Updated Ethernet & WiFi drivers - * Updated filesystem drivers - * General system stabilization - * Experimental Bluetooth stack - - - -### Thoughts on Haiku OS - -I have been following Haiku for many years. I’ve installed and played with the nightly builds a dozen times over the last couple of years. I even took some time to start learning one of its programming languages, so that I could write apps. But I got busy with other things. - -I’m very conflicted about it. I like Haiku because it is a neat non-Linux project, but it is only just getting features that everyone else takes for granted, like a package manager. - -If you’ve got a couple of minutes, download the [ISO][15] and install it on the virtual machine of your choice. You just might like it. - -Have you ever used Haiku or BeOS? If so, what are your favorite features? Let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][16]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/haiku-os-release/ - -作者:[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://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/10/haiku.jpg -[2]: https://en.wikipedia.org/wiki/Be_Inc. -[3]: https://en.wikipedia.org/wiki/Jean-Louis_Gass%C3%A9e -[4]: https://en.wikipedia.org/wiki/John_Sculley -[5]: https://en.wikipedia.org/wiki/BeBox -[6]: https://birdhouse.org/beos/byte/30-bootloader/ -[7]: https://en.wikipedia.org/wiki/Haiku -[8]: https://www.haiku-os.org/about/ -[9]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/10/haiku-depot.png -[10]: https://www.libreoffice.org/ -[11]: https://itsfoss.com/otter-browser-review/ -[12]: https://www.calligra.org/ -[13]: https://www.haiku-os.org/get-haiku/release-notes/ -[14]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/10/webpositive.jpg -[15]: https://www.haiku-os.org/get-haiku -[16]: http://reddit.com/r/linuxusersgroup diff --git a/sources/tech/20181105 How to manage storage on Linux with LVM.md b/sources/tech/20181105 How to manage storage on Linux with LVM.md index 9c0ee685d6..36cc8d47a0 100644 --- a/sources/tech/20181105 How to manage storage on Linux with LVM.md +++ b/sources/tech/20181105 How to manage storage on Linux with LVM.md @@ -1,4 +1,3 @@ -[zianglei translating] How to manage storage on Linux with LVM ====== Create, expand, and encrypt storage pools as needed with the Linux LVM utilities. diff --git a/sources/tech/20190304 How to Install MongoDB on Ubuntu.md b/sources/tech/20190304 How to Install MongoDB on Ubuntu.md index 30d588ddba..5dad6b0b54 100644 --- a/sources/tech/20190304 How to Install MongoDB on Ubuntu.md +++ b/sources/tech/20190304 How to Install MongoDB on Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (An-DJ) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md b/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md index 16e9c70627..1cc2f14b43 100644 --- a/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md +++ b/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md @@ -1,5 +1,5 @@ [#]: collector: "lujun9972" -[#]: translator: "zhangxiangping " +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 4685f558a459e30d4b17b56670f2762aa419c104 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 22:21:11 +0800 Subject: [PATCH 169/951] APL:20190522 Convert Markdown files to word processor docs using pandoc --- ...onvert Markdown files to word processor docs using pandoc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md b/sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md index 8fab8bfcae..62c55b5a46 100644 --- a/sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md +++ b/sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9eaaf92d0b69b2fff282a47dd7cc26236017efec Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 23:08:15 +0800 Subject: [PATCH 170/951] TSL&PRF @wxy --- ...les to word processor docs using pandoc.md | 119 ---------------- ...les to word processor docs using pandoc.md | 129 ++++++++++++++++++ 2 files changed, 129 insertions(+), 119 deletions(-) delete mode 100644 sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md create mode 100644 translated/tech/20190522 Convert Markdown files to word processor docs using pandoc.md diff --git a/sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md b/sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md deleted file mode 100644 index 62c55b5a46..0000000000 --- a/sources/tech/20190522 Convert Markdown files to word processor docs using pandoc.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Convert Markdown files to word processor docs using pandoc) -[#]: via: (https://opensource.com/article/19/5/convert-markdown-to-word-pandoc) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt/users/jason-van-gumster/users/kikofernandez) - -Convert Markdown files to word processor docs using pandoc -====== -Living that plaintext life? Here's how to create the word processor -documents people ask for without having to work in a word processor -yourself. -![][1] - -If you live your life in [plaintext][2], there invariably comes a time when someone asks for a word processor document. I run into this issue frequently, especially at the Day JobTM. Although I've introduced one of the development teams I work with to a [Docs Like Code][3] workflow for writing and reviewing release notes, there are a small number of people who have no interest in GitHub or working with [Markdown][4]. They prefer documents formatted for a certain proprietary application. - -The good news is that you're not stuck copying and pasting unformatted text into a word processor document. Using **[pandoc][5]** , you can quickly give people what they want. Let's take a look at how to convert a document from Markdown to a word processor format in [Linux][6] using **pandoc.** ​​​​ - -Note that **pandoc** is also available for a wide variety of operating systems, ranging from two flavors of BSD ([NetBSD][7] and [FreeBSD][8]) to Chrome OS, MacOS, and Windows. - -### Converting basics - -To begin, [install **pandoc**][9] on your computer. Then, crack open a console terminal window and navigate to the directory containing the file that you want to convert. - -Type this command to create an ODT file (which you can open with a word processor like [LibreOffice Writer][10] or [AbiWord][11]): - -**pandoc -t odt filename.md -o filename.odt** - -Remember to replace **filename** with the file's actual name. And if you need to create a file for that other word processor (you know the one I mean), replace **odt** on the command line with **docx**. Here's what this article looks like when converted to an ODT file: - -![Basic conversion results with pandoc.][12] - -These results are serviceable, but a bit bland. Let's look at how to add a bit more style to the converted documents. - -### Converting with style - -**pandoc** has a nifty feature enabling you to specify a style template when converting a marked-up plaintext file to a word processor format. In this file, you can edit a small number of styles in the document, including those that control the look of paragraphs, headings, captions, titles and subtitles, a basic table, and hyperlinks. - -Let's look at the possibilities. - -#### Creating a template - -In order to style your documents, you can't just use _any_ template. You need to generate what **pandoc** calls a _reference_ template, which is the template it uses when converting text files to word processor documents. To create this file, type the following in a terminal window: - -**pandoc -o custom-reference.odt --print-default-data-file reference.odt** - -This command creates a file called **custom-reference.odt**. If you're using that other word processor, change the references to **odt** on the command line to **docx**. - -Open the template file in LibreOffice Writer, and then press **F11** to open LibreOffice Writer's **Styles** pane. Although the [pandoc manual][13] advises against making other changes to the file, I change the page size and add headers and footers when necessary. - -#### Using the template - -So, how do you use that template you just created? There are two ways to do this. - -The easiest way is to drop the template in your **/home** directory's **.pandoc** folder—you might have to create the folder first if it doesn't exist. When it's time to convert a document, **pandoc** uses this template file. See the next section on how to choose from multiple templates if you need more than one. - -The other way to use your template is to type this set of conversion options at the command line: - -**pandoc -t odt file-name.md --reference-doc=path-to-your-file/reference.odt -o file-name.odt** - -If you're wondering what a converted file looks like with a customized template, here's an example: - -![A document converted using a pandoc style template.][14] - -#### Choosing from multiple templates - -Many people only need one **pandoc** template. Some people, however, need more than one. - -At my day job, for example, I use several templates—one with a DRAFT watermark, one with a watermark stating FOR INTERNAL USE, and one for a document's final versions. Each type of document needs a different template. - -If you have similar needs, start the same way you do for a single template, by creating the file **custom-reference.odt**. Rename the resulting file—for example, to **custom-reference-draft.odt** —then open it in LibreOffice Writer and modify the styles. Repeat this process for each template you need. - -Next, copy the files into your **/home** directory. You can even put them in the **.pandoc** folder if you want to. - -To select a specific template at conversion time, you'll need to run this command in a terminal: - -**pandoc -t odt file-name.md --reference-doc=path-to-your-file/custom-template.odt -o file-name.odt** - -Change **custom-template.odt** to your template file's name. - -### Wrapping up - -To avoid having to remember a set of options I don't regularly use, I cobbled together some simple, very lame one-line scripts that encapsulate the options for each template. For example, I run the script **todraft.sh** to create a word processor document using the template with a DRAFT watermark. You might want to do the same. - -Here's an example of a script using the template containing a DRAFT watermark: - -`pandoc -t odt $1.md -o $1.odt --reference-doc=~/Documents/pandoc-templates/custom-reference-draft.odt` - -Using **pandoc** is a great way to provide documents in the format that people ask for, without having to give up the command line life. This tool doesn't just work with Markdown, either. What I've discussed in this article also allows you to create and convert documents between a wide variety of markup languages. See the **pandoc** site linked earlier for more details. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/5/convert-markdown-to-word-pandoc - -作者:[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/users/jason-van-gumster/users/kikofernandez -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb -[2]: https://plaintextproject.online/ -[3]: https://www.docslikecode.com/ -[4]: https://en.wikipedia.org/wiki/Markdown -[5]: https://pandoc.org/ -[6]: /resources/linux -[7]: https://www.netbsd.org/ -[8]: https://www.freebsd.org/ -[9]: https://pandoc.org/installing.html -[10]: https://www.libreoffice.org/discover/writer/ -[11]: https://www.abisource.com/ -[12]: https://opensource.com/sites/default/files/uploads/pandoc-wp-basic-conversion_600_0.png (Basic conversion results with pandoc.) -[13]: https://pandoc.org/MANUAL.html -[14]: https://opensource.com/sites/default/files/uploads/pandoc-wp-conversion-with-tpl_600.png (A document converted using a pandoc style template.) diff --git a/translated/tech/20190522 Convert Markdown files to word processor docs using pandoc.md b/translated/tech/20190522 Convert Markdown files to word processor docs using pandoc.md new file mode 100644 index 0000000000..fc2729bcf3 --- /dev/null +++ b/translated/tech/20190522 Convert Markdown files to word processor docs using pandoc.md @@ -0,0 +1,129 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Convert Markdown files to word processor docs using pandoc) +[#]: via: (https://opensource.com/article/19/5/convert-markdown-to-word-pandoc) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt/users/jason-van-gumster/users/kikofernandez) + +使用 pandoc 将 Markdown 转换为格式化文档 +====== + +> 生活在普通文本世界么?以下是无需使用文字处理器而创建别人要的格式化文档的方法。 + +![][1] + +如果你生活在[普通文本][2]世界里,总会有人要求你提供格式化文档。我就经常遇到这个问题,特别是在 Day JobTM。虽然我已经给与我合作的开发团队之一介绍了用于撰写和审阅发行说明的 [Docs Like Code][3] 工作流程,但是还有少数人对 GitHub 和使用 [Markdown][4] 没有兴趣,他们更喜欢为特定的专有应用格式化的文档。 + +好消息是,你不会被卡在将未格式化的文本复制粘贴到文字处理器的问题当中。使用 [pandoc][5],你可以快速地给人们他们想要的东西。让我们看看如何使用 pandoc 将文档从 Markdown 转换为 Linux 中的文字处理器格式。 + +请注意,pandoc 也可用于从两种 BSD([NetBSD][7] 和 [FreeBSD][8])到 Chrome OS、MacOS 和 Windows 等的各种操作系统。 + +### 基本转换 + +首先,在你的计算机上[安装 pandoc][9]。然后,打开控制台终端窗口,并导航到包含要转换的文件的目录。 + +输入此命令以创建 ODT 文件(可以使用 [LibreOffice Writer][10] 或 [AbiWord][11] 等字处理器打开): + +``` +pandoc -t odt filename.md -o filename.odt +``` + +记得用实际文件名称替换 `filename`。如果你需要为其他文字处理器(你知道我的意思)创建一个文件,替换命令行的 `odt` 为 `docx`。以下是本文转换为 ODT 文件时的内容: + +![Basic conversion results with pandoc.][12] + +这些转换结果虽然可用,但有点乏味。让我们看看如何为转换后的文档添加更多样式。 + +### 带样式转换 + +`pandoc` 有一个漂亮的功能,使你可以在将带标记的纯文本文件转换为字处理器格式时指定样式模板。在此文件中,你可以编辑文档中的少量样式,包括控制段落、文章标题和副标题、段落标题、说明、基本的表格和超链接的样式。 + +让我们来看看能做什么。 + +#### 创建模板 + +要设置文档样式,你不能只是使用任何一个模板就行。你需要生成 pandoc 称之为引用模板的文件,这是将文本文件转换为文字处理器文档时使用的模板。要创建此文件,请在终端窗口中键入以下内容: + +``` +pandoc -o custom-reference.odt --print-default-data-file reference.odt +``` + +此命令创建一个名为 `custom-reference.odt` 的文件。如果你正在使用其他文字处理程序,请将命令行中的 “odt” 更改为 “docx”。 + +在 LibreOffice Writer 中打开模板文件,然后按 `F11` 打开 LibreOffice Writer 的 “样式” 窗格。虽然 [pandoc 手册][13]建议不要对该文件进行其他更改,但我会在必要时更改页面大小并添加页眉和页脚。 + +#### 使用模板 + +那么,你要如何使用刚刚创建的模板?有两种方法可以做到这一点。 + +最简单的方法是将模板放在家目录的 `.pandoc` 文件夹中,如果该文件夹不存在,则必须先创建该文件夹。当转换文档时,`pandoc` 会使用此模板文件。如果你需要多个模板,请参阅下一节了解如何从多个模板中进行选择。 + +使用模板的另一种方法是在命令行键入以下转换选项: + +``` +pandoc -t odt file-name.md --reference-doc=path-to-your-file/reference.odt -o file-name.odt +``` + +如果你想知道使用自定义模板转换后的文件是什么样的,这是一个示例: + +![A document converted using a pandoc style template.][14] + +#### 选择模板 + +很多人只需要一个 `pandoc` 模板,但是,有些人需要不止一个。 + +例如,在我的日常工作中,我使用了几个模板:一个带有 DRAFT 水印,一个带有表示内部使用的水印,另一个用于文档的最终版本。每种类型的文档都需要不同的模板。 + +如果你有类似的需求,可以像使用单个模板一样创建文件 `custom-reference.odt`,将生成的文件重命名为例如 `custom-reference-draft.odt` 这样的名字,然后在 LibreOffice Writer 中打开它并修改样式。对你需要的每个模板重复此过程。 + +接下来,将文件复制到家目录中。如果你愿意,你甚至可以将它们放在 `.pandoc` 文件夹中。 + +要在转换时选择特定模板,你需要在终端中运行此命令: + +``` +pandoc -t odt file-name.md --reference-doc=path-to-your-file/custom-template.odt -o file-name.odt +``` + +改变 `custom-template.odt` 为你的模板文件名。 + +### 结语 + +为了不用记住我不经常使用的一组选项,我拼凑了一些简单的、非常蹩脚的单行脚本,这些脚本封装了每个模板的选项。例如,我运行脚本 `todraft.sh` 以使用带有 DRAFT 水印的模板创建文字处理器文档。你可能也想要这样做。 + +以下是使用包含 DRAFT 水印的模板的脚本示例: + +``` +pandoc -t odt $1.md -o $1.odt --reference-doc=~/Documents/pandoc-templates/custom-reference-draft.odt +``` + +使用 pandoc 是一种不必放弃命令行生活而以人们要求的格式提供文档的好方法。此工具也不仅适用于 Markdown。我在本文中讨论的内容还可以让你在各种标记语言之间创建和转换文档。有关更多详细信息,请参阅前面链接的 [pandoc 官网][5]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/5/convert-markdown-to-word-pandoc + +作者:[Scott Nesbitt][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://opensource.com/users/scottnesbitt/users/jason-van-gumster/users/kikofernandez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb +[2]: https://plaintextproject.online/ +[3]: https://www.docslikecode.com/ +[4]: https://en.wikipedia.org/wiki/Markdown +[5]: https://pandoc.org/ +[6]: /resources/linux +[7]: https://www.netbsd.org/ +[8]: https://www.freebsd.org/ +[9]: https://pandoc.org/installing.html +[10]: https://www.libreoffice.org/discover/writer/ +[11]: https://www.abisource.com/ +[12]: https://opensource.com/sites/default/files/uploads/pandoc-wp-basic-conversion_600_0.png (Basic conversion results with pandoc.) +[13]: https://pandoc.org/MANUAL.html +[14]: https://opensource.com/sites/default/files/uploads/pandoc-wp-conversion-with-tpl_600.png (A document converted using a pandoc style template.) From 78750f72ea92cb61ea89f275f4190b97397c1448 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 28 Jul 2019 23:26:17 +0800 Subject: [PATCH 171/951] APL --- sources/tech/20190724 Master the Linux -ls- command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190724 Master the Linux -ls- command.md b/sources/tech/20190724 Master the Linux -ls- command.md index 6785c80eed..91a99e27d1 100644 --- a/sources/tech/20190724 Master the Linux -ls- command.md +++ b/sources/tech/20190724 Master the Linux -ls- command.md @@ -1,11 +1,11 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Master the Linux 'ls' command) [#]: via: (https://opensource.com/article/19/7/master-ls-command) -[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/sambocettahttps://opensource.com/users/scottnesbitthttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/don-watkinshttps://opensource.com/users/sethhttps://opensource.com/users/jamesfhttps://opensource.com/users/seth) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) Master the Linux 'ls' command ====== From 282faee5ea0adcc5c4ad304f913905cf55623a1d Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Jul 2019 08:59:51 +0800 Subject: [PATCH 172/951] translated --- ... enable DNS-over-HTTPS (DoH) in Firefox.md | 117 ------------------ ... enable DNS-over-HTTPS (DoH) in Firefox.md | 117 ++++++++++++++++++ 2 files changed, 117 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md create mode 100644 translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md diff --git a/sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md b/sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md deleted file mode 100644 index 1817425816..0000000000 --- a/sources/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to enable DNS-over-HTTPS (DoH) in Firefox) -[#]: via: (https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-firefox/) -[#]: author: (Catalin Cimpanu https://www.zdnet.com/meet-the-team/us/catalin.cimpanu/) - -How to enable DNS-over-HTTPS (DoH) in Firefox -====== - -The DNS-over-HTTPS (DoH) protocol is currently the talk of the town, and the Firefox browser is the only one to support it. - -However, the feature is not enabled by default for Firefox users, who will have to go through many hoops and modify multiple settings before they can get the DoH up and running. - -But before we go into a step-by-step tutorial on how someone can enable DoH support in Firefox, let's describe what it does first. - -### How DNS-over-HTTPS works - -The DNS-over-HTTPS protocol works by taking a domain name that a user has typed in their browser and sending a query to a DNS server to learn the numerical IP address of the web server that hosts that specific site. - -This is how normal DNS works, too. However, DoH takes the DNS query and sends it to a DoH-compatible DNS server (resolver) via an encrypted HTTPS connection on port 443, rather than plaintext on port 53. - -This way, DoH hides DNS queries inside regular HTTPS traffic, so third-party observers won't be able to sniff traffic and tell what DNS queries users have run and infer what websites they are about to access. - -Further, a secondary feature of DNS-over-HTTPS is that the protocol works at the app level. Apps can come with internally hardcoded lists of DoH-compatible DNS resolvers where they can send DoH queries. - -This mode of operation bypasses the default DNS settings that exist at the OS level, which, in most cases are the ones set by local internet service providers (ISPs). - -This also means that apps that support DoH can effectively bypass local ISPs traffic filters and access content that may be blocked by a local telco or local government -- and a reason why DoH is currently hailed as a boon for users' privacy and security. - -This is one of the reasons that DoH has gained quite the popularity in less than two years after it launched, and a reason why a group of [UK ISPs nominated Mozilla for the award of 2019 Internet Vilain][1] for its plans to support the DoH protocol, which they said would thwart their efforts in filtering bad traffic. - -As a response, and due to the complex situation in the UK where the government blocks access to copyright-infringing content, and where ISPs voluntarily block access to child abuse website, [Mozilla has decided not to enable this feature by default for British users][2]. - -The below step-by-step guide will show Firefox users in the UK and Firefox users all over the world how to enable the feature right now, and not wait until Mozilla enables it later down the road -- if it will ever do. There are two methods of enabling DoH support in Firefox. - -### Method 1 - via the Firefox settings - -**Step 1:** Go to the Firefox menu, choose **Tools** , and then **Preferences**. Optionally type **about:preferences** in the URL bar and press enter. This will open the Firefox prerences section. - -**Step 2:** In the **General** section, scroll down to the **Network Settings** panel, and press the **Settings** button. - -![DoH section in Firefox settings][3] - -Image: ZDNet - -**Step 3:** In the popup, scroll down and select " **Enable DNS over HTTPS** ," then configure your desired DoH resolver. You can use the built in Cloudflare resolver (a company with which Mozilla has [reached an agreement][4] to log less data about Firefox users), or use one of your choice, [from this list][4]. - -![DoH section in Firefox settings][5]![DoH section in Firefox settings][6] - -Image: ZDNet - -### Method 2 - via about:config - -**Step 1:** Type **about:config** in the URL bar and press Enter to access Firefox's hidden configuration panel. Here users will need to enable and modify three settings. - -**Step 2:** The first setting is **network.trr.mode**. This turns on DoH support. This setting supports four values: - - * 0 - Default value in standard Firefox installations (currently is 5, which means DoH is disabled) - * 1 - DoH is enabled, but Firefox picks if it uses DoH or regular DNS based on which returns faster query responses - * 2 - DoH is enabled, and regular DNS works as a backup - * 3 - DoH is enabled, and regular DNS is disabled - * 5 - DoH is disabled - - - -A value of 2 works best. - -![DoH in Firefox][5]![DoH in Firefox][7] - -Image: ZDNet - -**Step 3:** The second setting that needs to be modified is **network.trr.uri**. This is the URL of the DoH-compatible DNS server where Firefox will send DoH DNS queries. By default, Firefox uses Cloudflare's DoH service located at . However, users can use their own DoH server URL. They can select one from the many available servers, [from this list, here][8]. The reason why Mozilla uses Cloudflare in Firefox is because the companies [reached an agreement][4] following which Cloudflare would collect very little data on DoH queries coming from Firefox users. - -![DoH in Firefox][5]![DoH in Firefox][9] - -Image: ZDNet - -**Step 4:** The third setting is optional and you can skip this one. But if things don't work, you can use this one as a backup for Step 3. The option is called **network.trr.bootstrapAddress** and is an input field where users can enter the numerical IP address of the DoH-compatible DNS resolver they entered in Step 3. For Cloudflare, that would be 1.1.1.1. For Google's service, that would be 8.8.8.8. If you used another DoH resolver's URL, you'll need to track down that server's IP and enter it here, if ever necesarry. - -![DoH in Firefox][5]![DoH in Firefox][10] - -Image: ZDNet - -Normally, the URL entered in Step 3 should be enough, though. - -Settings should apply right away, but in case they don't work, give Firefox a restart. - -Article source: [Mozilla Wiki][11] - - --------------------------------------------------------------------------------- - -via: https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-firefox/ - -作者:[Catalin Cimpanu][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.zdnet.com/meet-the-team/us/catalin.cimpanu/ -[b]: https://github.com/lujun9972 -[1]: https://www.zdnet.com/article/uk-isp-group-names-mozilla-internet-villain-for-supporting-dns-over-https/ -[2]: https://www.zdnet.com/article/mozilla-no-plans-to-enable-dns-over-https-by-default-in-the-uk/ -[3]: https://zdnet1.cbsistatic.com/hub/i/2019/07/07/df30c7b0-3a20-4de7-8640-3dea6d249a49/121bd379b6232e1e2a97c35ea8c7764e/doh-settings-1.png -[4]: https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/privacy-policy/firefox/ -[5]: -[6]: https://zdnet3.cbsistatic.com/hub/i/2019/07/07/8608af28-2a28-4ff1-952b-9b6d2deb1ea6/b1fc322caaa2c955b1a2fb285daf0e42/doh-settings-2.png -[7]: https://zdnet1.cbsistatic.com/hub/i/2019/07/06/0232b3a7-82c6-4a6f-90c1-faf0c090254c/6db9b36509021c460fcc7fe825bb74c5/doh-1.png -[8]: https://github.com/curl/curl/wiki/DNS-over-HTTPS#publicly-available-servers -[9]: https://zdnet2.cbsistatic.com/hub/i/2019/07/06/4dd1d5c1-6fa7-4f5b-b7cd-b544748edfed/baa7a70ac084861d94a744a57a3147ad/doh-2.png -[10]: https://zdnet1.cbsistatic.com/hub/i/2019/07/06/8ec20a28-673c-4a17-8195-16579398e90a/538fe8420f9b24724aeb4a6c8d4f0f0f/doh-3.png -[11]: https://wiki.mozilla.org/Trusted_Recursive_Resolver diff --git a/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md b/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md new file mode 100644 index 0000000000..9f4e00f905 --- /dev/null +++ b/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md @@ -0,0 +1,117 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to enable DNS-over-HTTPS (DoH) in Firefox) +[#]: via: (https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-firefox/) +[#]: author: (Catalin Cimpanu https://www.zdnet.com/meet-the-team/us/catalin.cimpanu/) + +如何在 Firefox 中启用 DNS-over-HTTPS(DoH) +====== + +DNS-over-HTTPS(DoH)协议目前是谈论的焦点,Firefox 是唯一支持它的浏览器。 + +但是,Firefox 默认不启用此功能,用户必须经历许多步骤并修改多个设置才能启动并运行 DoH。 + +在开始如何在 Firefox 中启用 DoH 支持的分步教程之前,让我们先描述它的原理。 + +### DNS-over-HTTPS 的工作原理 + +DNS-over-HTTPS 协议通过获取用户在浏览器中输入的域名,并向 DNS 服务器发送查询,以了解托管该站点的 Web 服务器的 IP 地址。 + +这也是正常 DNS 的工作原理。但是,DoH 通过 443 端口的加密 HTTPS 连接接受 DNS 查询将其发送到兼容 DoH 的 DNS 服务器(解析器),而不是在 53 端口上发送纯文本。 + +这样,DoH 就会在常规 HTTPS 流量中隐藏 DNS 查询,因此第三方监听者将无法嗅探流量,并了解用户的 DNS 查询,从而推断他们将要访问的网站。 + +此外,DNS-over-HTTPS 的第二个特性是协议工作在应用层。应用可以带上内部硬编码的 DoH 兼容的 DNS 解析器列表,从而向它们发送 DoH 查询。 + +这种操作模式绕过了系统级别的默认 DNS 设置,在大多数情况下,这些设置是由本地 Internet 服务提供商(ISP)设置的。 + +这也意味着支持 DoH 的应用可以有效地绕过本地 ISP 流量过滤器并访问可能被本地电信公司或当地政府阻止的内容 - 这也是 DoH 目前被誉为用户隐私和安全的福音的原因。 + +这是 DoH 在推出后不到两年的时间里获得相当大的普及的原因之一,同时也是一群[英国 ISP 因为 Mozilla 计划支持 DoH 协议提名它获得 2019 年的“互联网小人” (Internet Villian)][1]的,ISP 认为 DoH 协议会阻碍他们过滤不良流量的努力。 + +作为回应,并且由于英国政府阻止访问侵犯版权内容的复杂情况,以及 ISP 自愿阻止访问虐待儿童网站的情况,[Mozilla 已决定不为英国用户默认启用此功能][2]。 + +下面的分步指南将向英国和世界各地的 Firefox 用户展示如何立即启用该功能,而不用等到 Mozilla 将来启用它,如果它会这么做的话。在 Firefox 中有两种启用 DoH 支持的方法。 + +### 方法 1:通过 Firefox 设置 + +**步骤 1:**进入 Firefox 菜单,选择**工具**,然后选择**首选项**。 可选在 URL 栏中输入 **about:preferences**,然后按下回车。这将打开 Firefox 首选项部分。 + +**步骤 2:**在**常规**中,向下滚动到**网络设置**,然后按**设置**按钮。 + +![DoH section in Firefox settings][3] + +图片:ZDNet + +**步骤3:**在弹出窗口中,向下滚动并选择“ **Enable DNS over HTTPS**”,然后配置你需要的 DoH 解析器。你可以使用内置的 Cloudflare 解析器(该公司与 Mozilla [达成协议][4],记录更少的 Firefox 用户数据),或者你可以在[这个列表][4]中选择一个。 + +![DoH section in Firefox settings][6] + +图片:ZDNet + +### 方法 2:通过 about:config + +**步骤 1:**在 URL 栏中输入 **about:config**,然后按回车访问 Firefox 的隐藏配置面板。在这里,用户需要启用和修改三个设置。 + +**步骤 2:**第一个设置是 **network.trr.mode**。这打开了 DoH 支持。此设置支持四个值: + + * 0 - 标准 Firefox 安装中的默认值(当前为 5,表示禁用 DoH) +  * 1 - 启用 DoH,但 Firefox 依据哪个请求更快返回选择使用 DoH 或者常规 DNS +  * 2 - 启用 DoH,常规 DNS 作为备用 +  * 3 - 启用 DoH,并禁用常规 DNS +  * 5 - 禁用 DoH + + + +值为 2 工作得最好 + +![DoH in Firefox][7] + +图片:ZDNet + +**步骤3:**需要修改的第二个设置是 **network.trr.uri**。这是与 DoH 兼容的 DNS 服务器的 URL,Firefox 将向它发送 DoH DNS 查询。默认情况下,Firefox 使用 Cloudflare 的 DoH服务,地址是:。但是,用户可以使用自己的 DoH 服务器 URL。他们可以从[这个列表][8]中选择其中一个可用的。Mozilla 在 Firefox 中使用 Cloudflare 的原因是因为与这家公司[达成了协议][4],之后 Cloudflare 将收集来自 Firefox 用户的 DoH 查询的非常少的数据。 + +[DoH in Firefox][9] + +图片:ZDNet + +**步骤4:**第三个设置是可选的,你可以跳过此设置。 但是如果设置不起作用,你可以使用此作为步骤 3 的备用。该选项名为 **network.trr.bootstrapAddress**,它是一个输入字段,用户可以输入步骤 3 中兼容 DoH 的 DNS 解析器的 IP 地址。对于 Cloudflare,它是 1.1.1.1。 对于 Google 服务,它是 8.8.8.8。 如果你使用了另一个 DoH 解析器的 URL,如果有必要的话,你需要追踪那台服务器的 IP 地址并输入。 + +![DoH in Firefox][10] + +图片:ZDNet + +通常,在步骤 3 中输入的 URL 应该足够了。 + +Settings should apply right away, but in case they don't work, give Firefox a restart. +设置应该立即生效,但如果它们不起作用,请重新启动 Firefox。 + +文章来源:[Mozilla Wiki][11] + + +-------------------------------------------------------------------------------- + +via: https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-firefox/ + +作者:[Catalin Cimpanu][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.zdnet.com/meet-the-team/us/catalin.cimpanu/ +[b]: https://github.com/lujun9972 +[1]: https://www.zdnet.com/article/uk-isp-group-names-mozilla-internet-villain-for-supporting-dns-over-https/ +[2]: https://www.zdnet.com/article/mozilla-no-plans-to-enable-dns-over-https-by-default-in-the-uk/ +[3]: https://zdnet1.cbsistatic.com/hub/i/2019/07/07/df30c7b0-3a20-4de7-8640-3dea6d249a49/121bd379b6232e1e2a97c35ea8c7764e/doh-settings-1.png +[4]: https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/privacy-policy/firefox/ +[6]: https://zdnet3.cbsistatic.com/hub/i/2019/07/07/8608af28-2a28-4ff1-952b-9b6d2deb1ea6/b1fc322caaa2c955b1a2fb285daf0e42/doh-settings-2.png +[7]: https://zdnet1.cbsistatic.com/hub/i/2019/07/06/0232b3a7-82c6-4a6f-90c1-faf0c090254c/6db9b36509021c460fcc7fe825bb74c5/doh-1.png +[8]: https://github.com/curl/curl/wiki/DNS-over-HTTPS#publicly-available-servers +[9]: https://zdnet2.cbsistatic.com/hub/i/2019/07/06/4dd1d5c1-6fa7-4f5b-b7cd-b544748edfed/baa7a70ac084861d94a744a57a3147ad/doh-2.png +[10]: https://zdnet1.cbsistatic.com/hub/i/2019/07/06/8ec20a28-673c-4a17-8195-16579398e90a/538fe8420f9b24724aeb4a6c8d4f0f0f/doh-3.png +[11]: https://wiki.mozilla.org/Trusted_Recursive_Resolver From 65ae2ac51d522a02e5a2b98fa5fe1cb7a565c475 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 29 Jul 2019 09:14:53 +0800 Subject: [PATCH 173/951] translating --- sources/tech/20190304 How to Install MongoDB on Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190304 How to Install MongoDB on Ubuntu.md b/sources/tech/20190304 How to Install MongoDB on Ubuntu.md index 5dad6b0b54..8f7e3676e0 100644 --- a/sources/tech/20190304 How to Install MongoDB on Ubuntu.md +++ b/sources/tech/20190304 How to Install MongoDB on Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From a66ae04cb9a1e854cebe4f802820487aa6a38a41 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 29 Jul 2019 10:53:15 +0800 Subject: [PATCH 174/951] TSL&PRF @wxy --- .../20190724 Master the Linux -ls- command.md | 352 ------------------ .../20190724 Master the Linux -ls- command.md | 328 ++++++++++++++++ 2 files changed, 328 insertions(+), 352 deletions(-) delete mode 100644 sources/tech/20190724 Master the Linux -ls- command.md create mode 100644 translated/tech/20190724 Master the Linux -ls- command.md diff --git a/sources/tech/20190724 Master the Linux -ls- command.md b/sources/tech/20190724 Master the Linux -ls- command.md deleted file mode 100644 index 91a99e27d1..0000000000 --- a/sources/tech/20190724 Master the Linux -ls- command.md +++ /dev/null @@ -1,352 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Master the Linux 'ls' command) -[#]: via: (https://opensource.com/article/19/7/master-ls-command) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Master the Linux 'ls' command -====== -Linux's 'ls' command has a staggering number of options that can provide -important information about your files. -![Hand putting a Linux file folder into a drawer][1] - -The **ls** command lists files on a [POSIX][2] system. It's a simple command, often underestimated, not in what it can do (because it really does only one thing), but in how you can optimize your use of it. - -Of the 10 most essential terminal commands to know, the humble **ls** command is in the top three, because **ls** doesn't _just_ list files, it tells you important information about them. It tells you things like who owns a file or directory, when each file was lost or modified, and even what kind of file it is. And then there's its incidental function of giving you a sense of where you are, what nearby objects are lying around, and what you can do with them. - -If your experience with **ls** is limited to whatever your distribution aliases it to in **.bashrc**, then you're probably missing out. - -### GNU or BSD? - -Before looking at the hidden powers of **ls**, you must determine which **ls** command you're running. The two most popular versions are the GNU version, included in the GNU **coreutils** package, and the BSD version. If you're running Linux, then you probably have **ls** installed. If you're running BSD or MacOS, then you have the BSD version. There are differences, for which this article accounts. - -You can find out which version is on your computer with the **\--version** option: - - -``` -`$ ls --version` -``` - -If this returns information about GNU coreutils, then you have the GNU version. If it returns an error, you're probably running the BSD version (run **man ls | head** to be sure). - -You should also investigate what presets your distribution may have in place. Customizations to terminal commands are frequently placed in **$HOME/.bashrc** or **$HOME/.bash_aliases** or **$HOME/.profile**, and they're accomplished by aliasing **ls** to a more complex **ls** command. For example: - - -``` -`alias ls='ls --color'` -``` - -The presets provided by distributions are very helpful, but they do make it difficult to discern what **ls** does on its own and what its additional options provide. Should you ever want to run **ls** and not the alias, you can "escape" the command with a backslash: - - -``` -`$ \ls` -``` - -### Classify - -Run on its own, **ls** simply lists files in as many columns as can fit into your terminal: - - -``` -$ ls ~/example -bunko        jdk-10.0.2 -chapterize   otf2ttf.ff -despacer     overtar.sh -estimate.sh  pandoc-2.7.1 -fop-2.3      safe_yaml -games        tt -``` - -It's useful information, but all of those files look basically the same without the convenience of icons to quickly convey which is a directory, or a text file, or an image, and so on. - -Use the **-F** (or **\--classify** on GNU) to show indicators after each entry that identify the kind of file it is: - - -``` -$ ls ~/example -bunko         jdk-10.0.2/ -chapterize*   otf2ttf.ff* -despacer*     overtar.sh* -estimate.sh   pandoc@ -fop-2.3/      pandoc-2.7.1/ -games/        tt* -``` - -With this option, items listed in your terminal are classified by file type using this shorthand: - - * A slash (**/**) denotes a directory (or "folder"). - * An asterisk (*****) denotes an executable file. This includes a binary file (compiled code) as well as scripts (text files that have [executable permission][3]). - * An at sign (**@**) denotes a symbolic link (or "alias"). - * An equals sign (**=**) denotes a socket. - * On BSD, a percent sign (**%**) denotes a whiteout (a method of file removal on certain file systems). - * On GNU, an angle bracket (**>**) denotes a door (inter-process communication on [Illumos][4] and Solaris). - * A vertical bar (**|**) denotes a [FIFO][5]. - - - -A simpler version of this option is **-p**, which only differentiates a file from a directory. - -### Long list - -Getting a "long list" from **ls** is so common that many distributions alias **ll** to **ls -l**. The long list form provides many important file attributes, such as permissions, the user who owns each file, the group to which the file belongs, the file size in bytes, and the date the file was last changed: - - -``` -$ ls -l --rwxrwx---. 1 seth users         455 Mar  2  2017 estimate.sh --rwxrwxr-x. 1 seth users         662 Apr 29 22:27 factorial --rwxrwx---. 1 seth users    20697793 Jun 29  2018 fop-2.3-bin.tar.gz --rwxrwxr-x. 1 seth users        6210 May 22 10:22 geteltorito --rwxrwx---. 1 seth users         177 Nov 12  2018 html4mutt.sh -[...] -``` - -If you don't think in bytes, add the **-h** flag (or **\--human** in GNU) to translate file sizes to more human-friendly notation: - - -``` -$ ls --human --rwxrwx---. 1 seth users    455 Mar  2  2017 estimate.sh --rwxrwxr-x. 1 seth seth     662 Apr 29 22:27 factorial --rwxrwx---. 1 seth users    20M Jun 29  2018 fop-2.3-bin.tar.gz --rwxrwxr-x. 1 seth seth    6.1K May 22 10:22 geteltorito --rwxrwx---. 1 seth users    177 Nov 12  2018 html4mutt.sh -``` - -You can see just a little less information by showing only the owner column with **-o** or only the group column with **-g**: - - -``` -$ ls -o --rwxrwx---. 1 seth    455 Mar  2  2017 estimate.sh --rwxrwxr-x. 1 seth    662 Apr 29 22:27 factorial --rwxrwx---. 1 seth    20M Jun 29  2018 fop-2.3-bin.tar.gz --rwxrwxr-x. 1 seth   6.1K May 22 10:22 geteltorito --rwxrwx---. 1 seth    177 Nov 12  2018 html4mutt.sh -``` - -Combine both options to show neither. - -### Time and date format - -The long list format of **ls** usually looks like this: - - -``` --rwxrwx---. 1 seth users         455 Mar  2  2017 estimate.sh --rwxrwxr-x. 1 seth users         662 Apr 29 22:27 factorial --rwxrwx---. 1 seth users    20697793 Jun 29  2018 fop-2.3-bin.tar.gz --rwxrwxr-x. 1 seth users        6210 May 22 10:22 geteltorito --rwxrwx---. 1 seth users         177 Nov 12  2018 html4mutt.sh -``` - -The names of months aren't easy to sort, both computationally or (depending on whether your brain tends to prefer strings or integers) by recognition. You can change the format of the time stamp with the **\--time-style** option plus the name of a format. Available formats are: - - * full-iso (1970-01-01 21:12:00) - * long-iso (1970-01-01 21:12) - * iso (01-01 21:12) - * locale (uses your locale settings) - * posix-STYLE (replace STYLE with a locale definition) - - - -You can also create a custom style using the formal notation of the **date** command. - -### Sort by time - -Usually, the **ls** command sorts alphabetically. You can make it sort according to which file was most recently changed (the newest is listed first) with the **-t** option. - -For example: - - -``` -$ touch foo bar baz -$ ls -bar  baz  foo -$ touch foo -$ ls -t -foo bar baz -``` - -### List type - -The standard output of **ls** balances readability with space efficiency, but sometimes you want your file list in a specific arrangement. - -For a comma-separated list of files, use **-m**: - - -``` -ls -m ~/example -bar, baz, foo -``` - -To force one file per line, use the **-1** option (that's the number one, not a lowercase L): - - -``` -$ ls -1 ~/bin/ -bar -baz -foo -``` - -To sort entries by file extension rather than the filename, use **-X** (that's a capital X): - - -``` -$ ls -bar.xfc  baz.txt  foo.asc -$ ls -X -foo.asc  baz.txt  bar.xfc -``` - -### Hide the clutter - -There are a few entries in some **ls** listings that you may not care about. For instance, the metacharacters **.** and **..** represent "here" and "back one level," respectively. If you're familiar with navigating in a terminal, you probably already know that each directory refers to itself as **.** and to its parent as **..**, so you don't need to be constantly reminded of it when you use the **-a** option to show hidden files. - -To show almost all hidden files (the **.** and **..** excluded), use the **-A** option: - - -``` -$ ls -a -. -.. -.android -.atom -.bash_aliases -[...] -$ ls -A -.android -.atom -.bash_aliases -[...] -``` - -With many good Unix tools, there's a tradition of saving backup files by appending some special character to the name of the file being saved. For instance, in Vim, backups get saved with the **~** character appended to the name. - -These kinds of backup files have saved me from stupid mistakes on several occasions, but after years of enjoying the sense of security they provide, I don't feel the need to have visual evidence that they exist. I trust Linux applications to generate backup files (if they claim to do so), and I'm happy to take it on faith that they exist. - -To hide backup files from view, use **-B** or **\--ignore-backups** to conceal common backup formats (this option is not available in BSD **ls**): - - -``` -$ ls -bar.xfc  baz.txt  foo.asc~  foo.asc -$ ls -B -bar.xfc  baz.txt  foo.asc -``` - -Of course, the backup file still exists; it's just filtered out so that you don't have to look at it. - -GNU Emacs saves backup files (unless otherwise configured) with a hash character (**#**) at the start and end of the file name (**#file#**). Other applications may use a different style. It doesn't matter what pattern is used, because you can create your own exclusions with the **\--hide** option: - - -``` -$ ls -bar.xfc  baz.txt  #foo.asc#  foo.asc -$ ls --hide="#*#" -bar.xfc  baz.txt  foo.asc -``` - -### List directories with recursion - -The contents of directories are not listed with the **ls** command unless you run **ls** on that directory specifically: - - -``` -$ ls -F -example/  quux*  xyz.txt -$ ls -R -quux  xyz.txt - -./example: -bar.xfc  baz.txt  #foo.asc#  foo.asc -``` - -### Make it permanent with an alias - -The **ls** command is probably the command used most often during any given shell session. It's your eyes and ears, providing you with context and confirming the results of commands. While it's useful to have lots of options, part of the beauty of **ls** is its brevity: two characters and the Return key, and you know exactly where you are and what's nearby. If you have to stop to think about (much less type) several different options, it becomes less convenient, so typically even the most useful options are left off. - -The solution is to alias your **ls** command so that when you use it, you get the information you care about the most. - -To create an alias for a command in the Bash shell, create a file in your home directory called **.bash_aliases** (you must include the dot at the beginning). In this file, list the command you want to create an alias for and then the alias you want to create. For example: - - -``` -`alias ls='ls -A -F -B --human --color'` -``` - -This line causes your Bash shell to interpret the **ls** command as **ls -A -F -B --human --color**. - -You aren't limited to redefining existing commands. You can create your own aliases: - - -``` -alias ll='ls -l' -alias la='ls -A' -alias lh='ls -h' -``` - -For aliases to work, your shell must know that the **.bash_aliases** configuration file exists. Open the **.bashrc** file in an editor (or create it, if it doesn't exist), and include this block of code: - - -``` -if [ -e $HOME/.bash_aliases ]; then -    source $HOME/.bash_aliases -fi -``` - -Each time **.bashrc** is loaded (which is any time a new Bash shell is launched), Bash will load **.bash_aliases** into your environment. You can close and relaunch your Bash session or just force it to do that now: - - -``` -`$ source ~/.bashrc` -``` - -If you forget whether you have aliased a command, the **which** command tells you: - - -``` -$ which ls -alias ls='ls -A -F -B --human --color' -        /usr/bin/ls -``` - -If you've aliased the **ls** command to itself with options, you can override your own alias at any time by prefacing **ls** with a backslash. For instance, in the example alias, backup files are hidden using the **-B** option, which means there's no way to back up files with the **ls** command. Override the alias to see the backup files: - - -``` -$ ls -bar  baz  foo -$ \ls -bar  baz  baz~  foo -``` - -### Do one thing and do it well - -The **ls** command has a staggering number of options, many of which are niche or highly dependent upon the terminal you use. Take a look at **info ls** on GNU systems or **man ls** on GNU or BSD systems for more options. - -You might find it strange that a system famous for the premise that each tool "does one thing and does it well" would weigh down its most common command with 50 options. But **ls** does only one thing: it lists files. And with 50 options to allow you to control how you receive that list, **ls** does its one job very, _very_ well. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/master-ls-command - -作者:[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/sethhttps://opensource.com/users/sambocettahttps://opensource.com/users/scottnesbitthttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/don-watkinshttps://opensource.com/users/sethhttps://opensource.com/users/jamesfhttps://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) -[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[3]: https://opensource.com/article/19/6/understanding-linux-permissions -[4]: https://www.illumos.org/ -[5]: https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics) diff --git a/translated/tech/20190724 Master the Linux -ls- command.md b/translated/tech/20190724 Master the Linux -ls- command.md new file mode 100644 index 0000000000..89e0cb1b7d --- /dev/null +++ b/translated/tech/20190724 Master the Linux -ls- command.md @@ -0,0 +1,328 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Master the Linux 'ls' command) +[#]: via: (https://opensource.com/article/19/7/master-ls-command) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +精通 Linux 的 ls 命令 +====== + +> Linux 的 ls 命令拥有数量惊人的选项,可以提供有关文件的重要信息。 + +![Hand putting a Linux file folder into a drawer][1] + +`ls` 命令可以列出一个 [POSIX][2] 系统上的文件。这是一个简单的命令,但它经常被低估,不是它能做什么(因为它确实只做了一件事),而是你该如何优化对它的使用。 + +要知道在最重要的 10 个终端命令中,这个简单的 `ls` 命令可以排进前三,因为 `ls` 不会*只是*列出文件,它还会告诉你有关它们的重要信息。它会告诉你诸如拥有文件或目录的人、每个文件修改的时间、甚至是什么类型的文件。它的附带功能能让你了解你在哪里、附近有些什么,以及你可以用它们做什么。 + +如果你对 `ls` 的体验仅限于你的发行版在 `.bashrc` 中的别名,那么你可能错失了它。 + +### GNU 还是 BSD? + +在了解 `ls` 的隐藏能力之前,你必须确定你正在运行哪个 `ls` 命令。有两个最流行的版本:包含在 GNU coreutils 包中的 GNU 版本,以及 BSD 版本。如果你正在运行 Linux,那么你很可能已经安装了 GNU 版本的 `ls`(LCTT 译注:几乎可以完全确定)。如果你正在运行 BSD 或 MacOS,那么你有的是 BSD 版本。本文会介绍它们的不同之处。 + +你可以使用 `--version` 选项找出你计算机上的版本: + +``` +$ ls --version +``` + +如果它返回有关 GNU coreutils 的信息,那么你拥有的是 GNU 版本。如果它返回一个错误,你可能正在运行的是 BSD 版本(运行 `man ls | head` 以确定)。 + +你还应该调查你的发行版可能具有哪些预设选项。终端命令的自定义通常放在 `$HOME/.bashrc` 或 `$HOME/.bash_aliases` 或 `$HOME/.profile` 中,它们是通过将 `ls` 别名化为更复杂的 `ls` 命令来完成的。例如: + +``` +alias ls='ls --color' +``` + +发行版提供的预设非常有用,但它们确实很难分辨出哪些是 `ls` 本身的特性,哪些是它的附加选项提供的。你要是想要运行 `ls` 命令本身而不是它的别名,你可以用反斜杠“转义”命令: + +``` +$ \ls +``` + +### 分类 + +单独运行 `ls` 会以适合你终端的列数列出文件: + +``` +$ ls ~/example +bunko        jdk-10.0.2 +chapterize   otf2ttf.ff +despacer     overtar.sh +estimate.sh  pandoc-2.7.1 +fop-2.3      safe_yaml +games        tt +``` + +这是有用的信息,但所有这些文件看起来基本相同,没有方便的图标来快速表示出哪个是目录、文本文件或图像等等。 + +使用 `-F`(或 GNU 上的长选项 `--classify`)以在每个条目之后显示标识文件类型的指示符: + +``` +$ ls ~/example +bunko         jdk-10.0.2/ +chapterize*   otf2ttf.ff* +despacer*     overtar.sh* +estimate.sh   pandoc@ +fop-2.3/      pandoc-2.7.1/ +games/        tt* +``` + +使用此选项,终端中列出的项目使用简写符号来按文件类型分类: + +* 斜杠(`/`)表示目录(或“文件夹”)。 +* 星号(`*`)表示可执行文件。这包括二进制文件(编译代码)以及脚本(具有[可执行权限][3]的文本文件)。 +* 符号(`@`)表示符号链接(或“别名”)。 +* 等号(`=`)表示套接字。 +* 在 BSD 上,百分号(`%`)表示涂改whiteout(某些文件系统上的文件删除方法)。 +* 在 GNU 上,尖括号(`>`)表示door([Illumos][4] 和 Solaris上的进程间通信)。 +* 竖线(`|`)表示 [FIFO][5] 管道。 +   +这个选项的一个更简单的版本是 `-p`,它只区分文件和目录。 + +(LCTT 译注:在支持彩色的终端上,使用 `--color` 选项可以以不同的颜色来区分文件类型,但要注意如果将输出导入到管道中,则颜色消失。) + +### 长列表 + +从 `ls` 获取“长列表”的做法是如此常见,以至于许多发行版将 `ll` 别名为 `ls -l`。长列表提供了许多重要的文件属性,例如权限、拥有每个文件的用户、文件所属的组、文件大小(以字节为单位)以及文件上次更改的日期: + +``` +$ ls -l +-rwxrwx---. 1 seth users         455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth users         662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth users    20697793 Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth users        6210 May 22 10:22 geteltorito +-rwxrwx---. 1 seth users         177 Nov 12  2018 html4mutt.sh +[...] +``` + +如果你不想以字节为单位,请添加 `-h` 标志(或 GNU 中的 `--human`)以将文件大小转换为更加人性化的表示方法: + +``` +$ ls --human +-rwxrwx---. 1 seth users    455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth seth     662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth users    20M Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth seth    6.1K May 22 10:22 geteltorito +-rwxrwx---. 1 seth users    177 Nov 12  2018 html4mutt.sh +``` + +要看到更少的信息,你可以带有 `-o` 选项只显示所有者的列,或带有 `-g` 选项只显示所属组的列: + +``` +$ ls -o +-rwxrwx---. 1 seth    455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth    662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth    20M Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth   6.1K May 22 10:22 geteltorito +-rwxrwx---. 1 seth    177 Nov 12  2018 html4mutt.sh +``` + +也可以将两个选项组合使用以显示两者。 + +### 时间和日期格式 + +`ls` 的长列表格式通常如下所示: + +``` +-rwxrwx---. 1 seth users         455 Mar  2  2017 estimate.sh +-rwxrwxr-x. 1 seth users         662 Apr 29 22:27 factorial +-rwxrwx---. 1 seth users    20697793 Jun 29  2018 fop-2.3-bin.tar.gz +-rwxrwxr-x. 1 seth users        6210 May 22 10:22 geteltorito +-rwxrwx---. 1 seth users         177 Nov 12  2018 html4mutt.sh +``` + +月份的名字不便于排序,无论是通过计算还是识别(取决于你的大脑是否倾向于喜欢字符串或整数)。你可以使用 `--time-style` 选项和格式名称更改时间戳的格式。可用格式为: + +* `full-iso`:ISO 完整格式(1970-01-01 21:12:00) +* `long-iso`:ISO 长格式(1970-01-01 21:12) +* `iso`:iso 格式(01-01 21:12) +* `locale`:本地化格式(使用你的区域设置) +* `posix-STYLE`:POSIX 风格(用区域设置定义替换 `STYLE`) + +你还可以使用 `date` 命令的正式表示法创建自定义样式。 + +### 按时间排序 + +通常,`ls` 命令按字母顺序排序。你可以使用 `-t` 选项根据文件的最近更改的时间(最新的文件最先列出)进行排序。 + +例如: + +``` +$ touch foo bar baz +$ ls +bar  baz  foo +$ touch foo +$ ls -t +foo bar baz +``` + +### 列出方式 + +`ls` 的标准输出平衡了可读性和空间效率,但有时你需要按照特定方式排列的文件列表。 + +要以逗号分隔文件列表,请使用 `-m`: + +``` +ls -m ~/example +bar, baz, foo +``` + +要强制每行一个文件,请使用 `-1` 选项(这是数字 1,而不是小写的 L): + +``` +$ ls -1 ~/bin/ +bar +baz +foo +``` + +要按文件扩展名而不是文件名对条目进行排序,请使用 `-X`(这是大写 X): + +``` +$ ls +bar.xfc  baz.txt  foo.asc +$ ls -X +foo.asc  baz.txt  bar.xfc +``` + +### 隐藏杂项 + +在某些 `ls` 列表中有一些你可能不关心的条目。例如,元字符 `.` 和 `..` 分别代表“本目录”和“父目录”。如果你熟悉在终端中如何切换目录,你可能已经知道每个目录都将自己称为 `.`,并将其父目录称为 `..`,因此当你使用 `-a` 选项显示隐藏文件时并不需要它经常提醒你。 + +要显示几乎所有隐藏文件(`.` 和 `..` 除外),请使用 `-A` 选项: + +``` +$ ls -a +. +.. +.android +.atom +.bash_aliases +[...] +$ ls -A +.android +.atom +.bash_aliases +[...] +``` + +有许多优秀的 Unix 工具有保存备份文件的传统,它们会在保存文件的名称后附加一些特殊字符作为备份文件。例如,在 Vim 中,备份会以在文件名后附加 `~` 字符的文件名保存。 + +这些类型的备份文件已经多次使我免于愚蠢的错误,但是经过多年享受它们提供的安全感后,我觉得不需要用视觉证据来证明它们存在。我相信 Linux 应用程序可以生成备份文件(如果它们声称这样做的话),我很乐意相信它们存在 —— 而不用必须看到它们。 + +要隐藏备份文件,请使用 `-B` 或 `--ignore-backups` 隐藏常用备份格式(此选项在 BSD 的 `ls` 中不可用): + +``` +$ ls +bar.xfc  baz.txt  foo.asc~  foo.asc +$ ls -B +bar.xfc  baz.txt  foo.asc +``` + +当然,备份文件仍然存在;它只是过滤掉了,你不必看到它。 + +除非另有配置,GNU Emacs 在文件名的开头和结尾添加哈希字符(`#`)来保存备份文件(`#file#`)。其他应用程序可能使用不同的样式。使用什么模式并不重要,因为你可以使用 `--hide` 选项创建自己的排除项: + +``` +$ ls +bar.xfc  baz.txt  #foo.asc#  foo.asc +$ ls --hide="#*#" +bar.xfc  baz.txt  foo.asc +``` + +### 递归地列出目录 + +除非你在指定目录上运行 `ls`,否则子目录的内容不会与 `ls` 命令一起列出: + +``` +$ ls -F +example/  quux*  xyz.txt +$ ls -R +quux  xyz.txt + +./example: +bar.xfc  baz.txt  #foo.asc#  foo.asc +``` + +### 使用别名使其永久化 + +`ls` 命令可能是 shell 会话期间最常使用的命令。这是你的眼睛和耳朵,为你提供上下文信息和确认命令的结果。虽然有很多选项很有用,但 `ls` 之美的一部分就是简洁:两个字符和回车键,你就知道你到底在哪里以及附近有什么。如果你不得不停下思考(更不用说输入)几个不同的选项,它会变得不那么方便,所以通常情况下,即使最有用的选项也不会用了。 + +解决方案是为你的 `ls` 命令添加别名,以便在使用它时,你可以获得最关心的信息。 + +要在 Bash shell 中为命令创建别名,请在主目录中创建名为 `.bash_aliases` 的文件(必须在开头包含 `.`)。 在此文件中,列出要创建的别名,然后是要为其创建别名的命令。例如: + +``` +alias ls='ls -A -F -B --human --color' +``` + +这一行导致你的 Bash shell 将 `ls` 命令解释为 `ls -A -F -B --human --color`。 + +你不必仅限于重新定义现有命令,还可以创建自己的别名: + +``` +alias ll='ls -l' +alias la='ls -A' +alias lh='ls -h' +``` + +要使别名起作用,shell 必须知道 `.bash_aliases` 配置文件存在。在编辑器中打开 `.bashrc` 文件(如果它不存在则创建它),并包含以下代码块: + +``` +if [ -e $HOME/.bash_aliases ]; then +    source $HOME/.bash_aliases +fi +``` + +每次加载 `.bashrc`(这是一个新的 Bash shell 启动的时候),Bash 会将 `.bash_aliases` 加载到你的环境中。你可以关闭并重新启动 Bash 会话,或者直接强制它执行此操作: + +``` +$ source ~/.bashrc +``` + +如果你忘了你是否有别名命令,`which` 命令可以告诉你: + +``` +$ which ls +alias ls='ls -A -F -B --human --color' +        /usr/bin/ls +``` + +如果你将 `ls` 命令别名为带有选项的 `ls` 命令,则可以通过将反斜杠前缀到 `ls` 前来覆盖你的别名。例如,在示例别名中,使用 `-B` 选项隐藏备份文件,这意味着无法使用 `ls` 命令显示备份文件。 可以覆盖该别名以查看备份文件: + +``` +$ ls +bar  baz  foo +$ \ls +bar  baz  baz~  foo +``` + +### 做一件事,把它做好 + +`ls` 命令有很多选项,其中许多是特定用途的或高度依赖于你所使用的终端。在 GNU 系统上查看 `info ls`,或在 GNU 或 BSD 系统上查看 `man ls` 以了解更多选项。 + +你可能会觉得奇怪的是,一个以每个工具“做一件事,把它做好”的前提而闻名的系统会让其最常见的命令背负 50 个选项。但是 `ls` 只做一件事:它列出文件,而这 50 个选项允许你控制接收列表的方式,`ls` 的这项工作做得非常、*非常*好。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/master-ls-command + +作者:[Seth Kenlon][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://opensource.com/users/sethhttps://opensource.com/users/sambocettahttps://opensource.com/users/scottnesbitthttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/don-watkinshttps://opensource.com/users/sethhttps://opensource.com/users/jamesfhttps://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/article/19/6/understanding-linux-permissions +[4]: https://www.illumos.org/ +[5]: https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics) From c680232fc85e699c2063f202bababc67ef714879 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 29 Jul 2019 10:57:29 +0800 Subject: [PATCH 175/951] PUB @wxy https://linux.cn/article-11159-1.html --- .../20190724 Master the Linux -ls- command.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190724 Master the Linux -ls- command.md (98%) diff --git a/translated/tech/20190724 Master the Linux -ls- command.md b/published/20190724 Master the Linux -ls- command.md similarity index 98% rename from translated/tech/20190724 Master the Linux -ls- command.md rename to published/20190724 Master the Linux -ls- command.md index 89e0cb1b7d..3744fa3906 100644 --- a/translated/tech/20190724 Master the Linux -ls- command.md +++ b/published/20190724 Master the Linux -ls- command.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11159-1.html) [#]: subject: (Master the Linux 'ls' command) [#]: via: (https://opensource.com/article/19/7/master-ls-command) [#]: author: (Seth Kenlon https://opensource.com/users/seth) @@ -12,7 +12,7 @@ > Linux 的 ls 命令拥有数量惊人的选项,可以提供有关文件的重要信息。 -![Hand putting a Linux file folder into a drawer][1] +![](https://img.linux.net.cn/data/attachment/album/201907/29/105754ii3874q2ww7lo882.jpg) `ls` 命令可以列出一个 [POSIX][2] 系统上的文件。这是一个简单的命令,但它经常被低估,不是它能做什么(因为它确实只做了一件事),而是你该如何优化对它的使用。 From bef287456d0af96f3c2ca4ca9d10270e69724ca5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 29 Jul 2019 11:33:16 +0800 Subject: [PATCH 176/951] PUB @wxy https://linux.cn/article-11160-1.html --- ...vert Markdown files to word processor docs using pandoc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190522 Convert Markdown files to word processor docs using pandoc.md (98%) diff --git a/translated/tech/20190522 Convert Markdown files to word processor docs using pandoc.md b/published/20190522 Convert Markdown files to word processor docs using pandoc.md similarity index 98% rename from translated/tech/20190522 Convert Markdown files to word processor docs using pandoc.md rename to published/20190522 Convert Markdown files to word processor docs using pandoc.md index fc2729bcf3..381510d7a7 100644 --- a/translated/tech/20190522 Convert Markdown files to word processor docs using pandoc.md +++ b/published/20190522 Convert Markdown files to word processor docs using pandoc.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11160-1.html) [#]: subject: (Convert Markdown files to word processor docs using pandoc) [#]: via: (https://opensource.com/article/19/5/convert-markdown-to-word-pandoc) [#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt/users/jason-van-gumster/users/kikofernandez) From 2e83ca29a13782d3ea77411f87118be76e628ec2 Mon Sep 17 00:00:00 2001 From: canhetingsky <2380348167@qq.com> Date: Mon, 29 Jul 2019 16:32:16 +0800 Subject: [PATCH 177/951] translating by canhetingsky --- ...20180924 5 ways to play old-school games on a Raspberry Pi.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md b/sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md index 539ac42082..ab9618dd31 100644 --- a/sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md +++ b/sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md @@ -1,3 +1,4 @@ +canhetingsky is translating 5 ways to play old-school games on a Raspberry Pi ====== From 9ee727320bca781f256ce49b161cd7b09aca6b01 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Mon, 29 Jul 2019 21:24:05 +0800 Subject: [PATCH 178/951] Translating by MjSeven --- .../20190705 Learn object-oriented programming with Python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190705 Learn object-oriented programming with Python.md b/sources/tech/20190705 Learn object-oriented programming with Python.md index b617517526..3d647c2041 100644 --- a/sources/tech/20190705 Learn object-oriented programming with Python.md +++ b/sources/tech/20190705 Learn object-oriented programming with Python.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4bad93104bccc767a1ab7d3028e5951cf35e4455 Mon Sep 17 00:00:00 2001 From: canhetingsky <2380348167@qq.com> Date: Mon, 29 Jul 2019 22:13:16 +0800 Subject: [PATCH 179/951] translated by canhetingsky --- ...play old-school games on a Raspberry Pi.md | 170 ------------------ ...play old-school games on a Raspberry Pi.md | 169 +++++++++++++++++ 2 files changed, 169 insertions(+), 170 deletions(-) delete mode 100644 sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md create mode 100644 translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md diff --git a/sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md b/sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md deleted file mode 100644 index ab9618dd31..0000000000 --- a/sources/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md +++ /dev/null @@ -1,170 +0,0 @@ -canhetingsky is translating -5 ways to play old-school games on a Raspberry Pi -====== - -Relive the golden age of gaming with these open source platforms for Raspberry Pi. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/arcade_game_gaming.jpg?itok=84Rjk_32) - -They don't make 'em like they used to, do they? Video games, I mean. - -Sure, there's a bit more grunt in the gear now. Princess Zelda used to be 16 pixels in each direction; there's now enough graphics power for every hair on her head. Today's processors could beat up 1988's processors in a cage-fight deathmatch without breaking a sweat. - -But you know what's missing? The fun. - -You've got a squillion and one buttons to learn just to get past the tutorial mission. There's probably a storyline, too. You shouldn't need a backstory to kill bad guys. All you need is jump and shoot. So, it's little wonder that one of the most enduring popular uses for a Raspberry Pi is to relive the 8- and 16-bit golden age of gaming in the '80s and early '90s. But where to start? - -There are a few ways to play old-school games on the Pi. Each has its strengths and weaknesses, which I'll discuss here. - -### Retropie - -[Retropie][1] is probably the most popular retro-gaming platform for the Raspberry Pi. It's a solid all-rounder and a great default option for emulating classic desktop and console gaming systems. - -#### What is it? - -Retropie is built to run on [Raspbian][2]. It can also be installed over an existing Raspbian image if you'd prefer. It uses [EmulationStation][3] as a graphical front-end for a library of open source emulators, including the [Libretro][4] emulators. - -You don't need to understand a word of that to play your games, though. - -#### What's great about it - -It's very easy to get started. All you need to do is burn the image to an SD card, configure your controllers, copy your games over, and start killing bad guys. - -The huge user base means that there is a wealth of support and information out there, and active online communities to turn to for questions. - -In addition to the emulators that come installed with the Retropie image, there's a huge library of emulators you can install from the package manager, and it's growing all the time. Retropie also offers a user-friendly menu system to manage this, saving you time. - -From the Retropie menu, it's easy to add Kodi and the Raspbian desktop, which comes with the Chromium web browser. This means your retro-gaming rig is also good for home theatre, [YouTube][5], [SoundCloud][6], and all those other “lounge room computer” goodies. - -Retropie also has a number of other customization options: You can change the graphics in the menus, set up different control pad configurations for different emulators, make your Raspberry Pi file system visible to your local Windows network—all sorts of stuff. - -Retropie is built on Raspbian, which means you have the Raspberry Pi's most popular operating system to explore. Most Raspberry Pi projects and tutorials you find floating around are written for Raspbian, making it easy to customize and install new things on it. I've used my Retropie rig as a wireless bridge, installed MIDI synthesizers on it, taught myself a bit of Python, and more—all without compromising its use as a gaming machine. - -#### What's not so great about it - -Retropie's simple installation and ease of use is, in a way, a double-edged sword. You can go for a long time with Retropie without ever learning simple stuff like `sudo apt-get`, which means you're missing out on a lot of the Raspberry Pi experience. - -It doesn't have to be this way; the command line is still there under the hood when you want it, but perhaps users are a bit too insulated from a Bash shell that's ultimately a lot less scary than it looks. Retropie's main menu is operable only with a control pad, which can be annoying when you don't have one plugged in because you've been using the system for things other than gaming. - -#### Who's it for? - -Anyone who wants to get straight into some gaming, anyone who wants the biggest and best library of emulators, and anyone who wants a great way to start exploring Linux when they're not playing games. - -### Recalbox - -[Recalbox][7] is a newer open source suite of emulators for the Raspberry Pi. It also supports other ARM-based small-board computers. - -#### What is it? - -Like Retropie, Recalbox is built on EmulationStation and Libretro. Where it differs is that it's not built on Raspbian, but on its own flavor of Linux: RecalboxOS. - -#### What's great about it - -The setup for Recalbox is even easier than for Retropie. You don't even need to image an SD card; simply copy some files over and go. It also has out-of-the-box support for some game controllers, getting you to Level 1 that little bit faster. Kodi comes preinstalled. This is a ready-to-go gaming and media rig. - -#### What's not so great about it - -Recalbox has fewer emulators than Retropie, fewer customization options, and a smaller user community. - -Your Recalbox rig is probably always just going to be for emulators and Kodi, the same as when you installed it. If you feel like getting deeper into Linux, you'll probably want a new SD card for Raspbian. - -#### Who's it for? - -Recalbox is great if you want the absolute easiest retro gaming experience and can happily go without some of the more obscure gaming platforms, or if you are intimidated by the idea of doing anything a bit technical (and have no interest in growing out of that). - -For most opensource.com readers, Recalbox will probably come in most handy to recommend to your not-so-technical friend or relative. Its super-simple setup and overall lack of options might even help you avoid having to help them with it. - -### Roll your own - -Ok, if you've been paying attention, you might have noticed that both Retropie and Recalbox are built from many of the same open source components. So what's to stop you from putting them together yourself? - -#### What is it? - -Whatever you want it to be, baby. The nature of open source software means you could use an existing emulator suite as a starting point, or pilfer from them at will. - -#### What's great about it - -If you have your own custom interface in mind, I guess there's nothing to do but roll your sleeves up and get to it. This is also a way to install emulators that haven't quite found their way into Retropie yet, such as [BeebEm][8] or [ArcEm][9]. - -#### What's not so great about it - -Well, it's a bit of work, isn't it? - -#### Who's it for? - -Hackers, tinkerers, builders, seasoned hobbyists, and such. - -### Native RISC OS gaming - -Now here's a dark horse: [RISC OS][10], the original operating system for ARM devices. - -#### What is it? - -Before ARM went on to become the world's most popular CPU architecture, it was originally built to be the heart of the Acorn Archimedes. That's kind of a forgotten beast nowadays, but for a few years it was light years ahead as the most powerful desktop computer in the world, and it attracted a lot of games development. - -Because the ARM processor in the Pi is the great-grandchild of the one in the Archimedes, we can still install RISC OS on it, and with a little bit of work, get these games running. This is different to the emulator options we've covered so far because we're playing our games on the operating system and CPU architecture for which they were written. - -#### What's great about it - -It's the perfect introduction to RISC OS. This is an absolute gem of an operating system and well worth checking out in its own right. - -The fact that you're using much the same operating system as back in the day to load and play your games makes your retro gaming rig just that little bit more of a time machine. This definitely adds some charm and retro value to the project. - -There are a few superb games that were released only on the Archimedes. The massive hardware advantage of the Archimedes also means that it often had the best graphics and smoothest gameplay of a lot of multi-platform titles. The rights holders to many of these games have been generous enough to make them legally available for free download. - -#### What's not so great about it - -Once you have installed RISC OS, it still takes a bit of elbow grease to get the games working. Here's a [guide to getting started][11]. - -This is definitely not a great all-rounder for the lounge room. There's nothing like [Kodi][12]. There's a web browser, [NetSurf][13], but it's struggling to catch up to the modern web. You won't get the range of titles to play as you would with an emulator suite. RISC OS Open is free for hobbyists to download and use and much of the source code has been made open. But despite the name, it's not a 100% open source operating system. - -#### Who's it for? - -This one's for novelty seekers, absolute retro heads, people who want to explore an interesting operating system from the '80s, people who are nostalgic for Acorn machines from back in the day, and people who want a totally different retro gaming project. - -### Command line gaming - -Do you really need to install an emulator or an exotic operating system just to relive the glory days? Why not just install some native linux games from the command line? - -#### What is it? - -There's a whole range of native Linux games tested to work on the [Raspberry Pi][14]. - -#### What's great about it - -You can install most of these from packages using the command line and start playing. Easy. If you've already got Raspbian up and running, it's probably your fastest path to getting a game running. - -#### What's not so great about it - -This isn't, strictly speaking, actual retro gaming. Linux was born in 1991 and took a while longer to come together as a gaming platform. This isn't quite gaming from the classic 8- and 16-bit era; these are ports and retro-influenced games that were built later. - -#### Who's it for? - -If you're just after a bucket of fun, no problem. But if you're trying to relive the actual era, this isn't quite it. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/9/retro-gaming-raspberry-pi - -作者:[James Mawson][a] -选题:[lujun9972](https://github.com/lujun9972) -译者:[译者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/dxmjames -[1]: https://retropie.org.uk/ -[2]: https://www.raspbian.org/ -[3]: https://emulationstation.org/ -[4]: https://www.libretro.com/ -[5]: https://www.youtube.com/ -[6]: https://soundcloud.com/ -[7]: https://www.recalbox.com/ -[8]: http://www.mkw.me.uk/beebem/ -[9]: http://arcem.sourceforge.net/ -[10]: https://opensource.com/article/18/7/gentle-intro-risc-os -[11]: https://blog.dxmtechsupport.com.au/playing-badass-acorn-archimedes-games-on-a-raspberry-pi/ -[12]: https://kodi.tv/ -[13]: https://www.netsurf-browser.org/ -[14]: https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794 diff --git a/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md b/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md new file mode 100644 index 0000000000..1c861f67d3 --- /dev/null +++ b/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md @@ -0,0 +1,169 @@ +在树莓派上玩老式游戏的 5 种方法 +====== + +使用这些用于树莓派的开源平台来重温游戏的黄金时代。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/arcade_game_gaming.jpg?itok=84Rjk_32) + +他们不像过去那样制造他们,是吗?我指的是电子游戏。 + +当然,现在的设备有点普通。赛达尔公主在过去每个方向有 16 个像素,现在她头上的每根头发都有足够的图像处理能力。今天的处理器可以在一场不费吹灰之力的战斗中打败 1988 年的处理器。 + +但是你知道缺少什么吗?乐趣。 + +你已经有了一个标准和一个按钮来学习只是为了完成教程任务。可能也有故事情节。你不应该需要一个故事情节来杀死坏人。你需要的只是跳跃和射击。因此,毫不奇怪,树莓派最持久的流行用途之一是重新体验 80 年代和 90 年代早期 8 位和 16 位游戏的黄金时代。但从哪里开始呢? + +在树莓派上有几种方法可以玩老式游戏。每一种都有自己的优点和缺点,我将在这里讨论。 + +### Retropie + +[Retropie][1] 可能是树莓派上最受欢迎的复古游戏平台。它是一个可靠的万能选手,是模拟经典桌面和控制台游戏系统的绝佳选择。 + +#### 它是什么? + +Retropie 可以在 [Raspbian][2] 上运行。如果你愿意,它也可以安装在现有的 Raspbian 映像上。它使用 [EmulationStation][3] 作为开源仿真器库(包括 [Libretro][4] 仿真器)的图形前端。 + +不过,玩游戏并不需要理解上面任何一个词。 + +#### 它有什么好处 + +入门很容易。你需要做的就是将映像刻录到 SD 卡,配置你的控制器,复制游戏,然后开始杀死坏人。 + +庞大的用户群意味着那里有大量的支持和信息,以及活跃的在线社区可以求助问题。 + +除了随 Retropie 映像一起安装的仿真器之外,还有一个可以从包管理器安装的庞大的仿真器库,并且它一直在增长。Retropie 还提供用户友好的菜单系统来管理,节省您的时间。 + +从 Retropie 菜单中,可以轻松添加 Kodi 和 Raspbian 桌面,它随 Chromium 网络浏览器一起提供。这意味着您的复古游戏装备也适用于家庭影院,[YouTube](https://www.youtube.com/),[SoundCloud](https://soundcloud.com/) 以及所有其它“休息室电脑”的产品。 + +Retropie 还有许多其它自定义选项:你可以更改菜单中的图形,为不同的模拟器设置不同的控制板配置,使你的树莓派文件系统的所有内容对你的本地 Windows 网络可见。 + +Retropie 建立在 Raspbian 上,这意味着你可以使用树莓派最受欢迎的操作系统进行探索。你所发现的大多数树莓派项目和教程都是为 Raspbian 编写的,因此可以轻松地自定义和安装新内容。我已经使用我的 Retropie 装备作为无线桥接器,在上面安装了 MIDI 合成器,自学了一些 Python,更重要的是 ,所有这些都没有影响它作为游戏机的用途。 + +#### 它有什么不太好的 + +Retropie 的简单安装和易用性在某种程度上是一把双刃剑。你可以玩 Retropie 很长时间,甚至不需要学习像`sudo apt-get` 这样简单的东西,但这意味着你正在错过了很多树莓派的体验。 + +它不一定是这样的; 当你需要它时,命令行仍然存在于打字机的罩子下,但是也许用户与 Bash shell 有点隔离,而 Bash shell 最终并没有看上去那么可怕。Retropie 的主菜单只能通过控制键盘操作,当你没有插入一个键盘时,这可能很烦人,因为你一直在使用系统进行游戏以外的事情。 + +#### 它适用于谁? + +任何想直接进入游戏领域的人,任何想拥有最大最好的模拟器库的人,以及任何想在不玩游戏的时候开始探索 Linux 的人。 + +### Recalbox + +[Recalbox][7] 是树莓派的一个较新的开源模拟器套件。它还支持其它基于 ARM 的小型计算机。 + +#### 它是什么? + +与 Retropie 一样, Recalbox 基于 EmulationStation 和 Libretro 。它的不同之处在于它不是基于Raspbian 构建的,而是基于它自己的 Linux:RecalboxOS。 + +#### 它有什么好处 + +Recalbox 的设置比 Retropie 更容易。你甚至不需要对 SD 卡进行映像处理; 只需复制一些文件即可。它还为一些游戏控制器提供开箱即用的支持,让你更快地达到1级。Kodi 是预装了。这是一个现成的游戏和媒体平台。 + +#### 它有什么不太好的 + +Recalbox 比 Retropie 拥有更少的仿真器,更少的自定义选项和更小的用户社区。 + +你的 Recalbox 装备可能总是用于模拟器和 Kodi,与安装时相同。如果你想深入了解 Linux,你可能需要为 Raspbian 提供一个新的SD卡。 + +#### 它适用于谁? + +如果你想要绝对最简单的复古游戏体验,并且可以在没有一些更加模糊的游戏平台的情况下愉快地使用,或者如果你因为做一些技术性的想法而感到害怕(并且没有兴趣从中发展出来),那么 Recalbox 非常棒 。 + +对于大多数 opensource.com 读者来说,Recalbox 可能最方便推荐给你那些不太技术的朋友或亲戚。它超级简单的设置和整体缺乏选项甚至可以帮助你避免不得不帮助他们。 + +### 制作你自己的 + +好的,如你一直在关注的话,你可能已经注意到 Retropie 和 Recalbox 都是由许多相同的开源组件构建的。那么是什么阻止你自己把它们放在一起呢? + +#### 它是什么? + +无论你想要什么,宝贝。开源软件的本质意味着你可以使用现有的模拟器套件作为起点,或者随意使用它们。 + +#### 它有什么好处 + +如果你有自己的自定义界面,我想除了卷起袖子去做,别无事可做。这也是安装仿真器的一种方法,仿真器还没有完全进入到 Retropie 中,例如 [BeebEm](http://www.mkw.me.uk/beebem/) 或 [ArcEm](http://arcem.sourceforge.net/)。 + +#### 它有什么不太好的 + +嗯,工作量有点大,不是吗? + +#### 它适用于谁? + +黑客,修改者,开发者,经验丰富的业余爱好者等。 + +## 本机 RISC 操所系统 游戏 + +现在有一匹黑马:[RISC 操作系统](https://opensource.com/article/18/7/gentle-intro-risc-os),ARM设备的原始操作系统。 + +#### 它是什么? + +在ARM成为世界上最受欢迎的 CPU 架构之前,它最初是作为 Acorn Archimedes 的核心而构建的。现在这是一种被遗忘的野兽,但几年来它作为世界上最强大的台式计算机已经领先了很多年,并且吸引了大量的游戏开发。 + +因为树莓派中的 ARM 处理器是Archimedes 的曾孙,我们仍然可以在其上安装 RISC OS,只要做一点工作,就可以让这些游戏运行起来。这与我们到目前为止所涵盖的仿真器选项不同,因为我们在操作系统和 CPU 架构上玩我们的游戏。 + +#### 它有什么好处 + +这是 RISC 操作系统的完美介绍。这绝对是操作系统的瑰宝,非常值得一试。 + +事实上,你使用的操作系统和以前的几乎相同,以加载和玩你的游戏,这使得你的复古游戏装备成为一个时间机器。这无疑为项目增添了一些魅力和复古价值。 + +有一些精彩的游戏只在 Archimedes 上发布。Archimedes 的巨大硬件优势也意味着它通常拥有许多多平台游戏的最佳图形和最流畅的游戏体验。许多游戏的版权持有者非常慷慨,可以合法地免费下载。 + +#### 它有什么不太好的 + +一旦你安装了 RISC 操作系统,它仍然需要一些努力才能让游戏运行起来。这是 [入门指南](https://blog.dxmtechsupport.com.au/playing-badass-acorn-archimedes-games-on-a-raspberry-pi/)。 + +对于休息室来说,这绝对不是一个很好的全方位服务。没有什么比 [Kodi](https://kodi.tv/) 更好的了。有一个网络浏览器,[NetSurf](https://www.netsurf-browser.org/),但它正在努力赶上现代网络。你将不会像使用模拟器套件那样获得要播放的标题范围。RISC OS Open 是业余爱好者可以免费下载和使用的,而且很多源代码已经开放。但尽管有这个名字,它并不是 100% 的开源操作系统。 + +#### 它适用于谁? + +这一款专为追求新奇的人、绝对怀旧的人、想要探索80年代有趣的操作系统的人、那些对过去的Acorn机器怀旧的人,以及想要一个完全不同的怀旧游戏项目的人而设计。 + +### 命令行游戏 + +您是否真的需要安装模拟器或异国的操作系统才能重温辉煌的日子?为什么不从命令行安装一些原生 Linux 游戏? + +#### 它是什么? + +有一系列原生 Linux 游戏经过测试可以在 [树莓派](https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794) 上运行。 + +#### 它有什么好处 + +你可以使用命令行从程序包安装其中的大部分,然后开始玩。容易的。如果你已经启动并运行了 Raspbian,那么它可能是你运行游戏的最快途径。 + +#### 它有什么不太好的 + +严格来说,这并不是真正的复古游戏。Linux诞生于 1991 年,花了一段时间才能成为一个游戏平台。这不是经典的 8 位和 16 位时代的游戏;这些是后来构建的端口和受复古影响的游戏。 + +#### 它适用于谁? + +如果你只是想找点乐子,这没问题。但如果你想重温真实的时代,那就不完全是这样了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/9/retro-gaming-raspberry-pi + +作者:[James Mawson][a] +选题:[lujun9972](https://github.com/lujun9972) +译者:[canhetingsky](https://github.com/canhetingsky) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dxmjames +[1]: https://retropie.org.uk/ +[2]: https://www.raspbian.org/ +[3]: https://emulationstation.org/ +[4]: https://www.libretro.com/ +[5]: https://www.youtube.com/ +[6]: https://soundcloud.com/ +[7]: https://www.recalbox.com/ +[8]: http://www.mkw.me.uk/beebem/ +[9]: http://arcem.sourceforge.net/ +[10]: https://opensource.com/article/18/7/gentle-intro-risc-os +[11]: https://blog.dxmtechsupport.com.au/playing-badass-acorn-archimedes-games-on-a-raspberry-pi/ +[12]: https://kodi.tv/ +[13]: https://www.netsurf-browser.org/ +[14]: https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794 From edd1d6bd79251c29d0d4b257a3366c75144dc0b6 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Mon, 29 Jul 2019 22:19:05 +0800 Subject: [PATCH 180/951] Translating Continuous integration testing for the Linux kernel.md --- ...ontinuous integration testing for the Linux kernel.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md index 790d471150..7b7c5e33ea 100644 --- a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md @@ -32,14 +32,11 @@ Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14, #### CKI 团队如何运作? -The CKI team at Red Hat currently follows changes from several internal kernels, as well as upstream kernels such as the [stable kernel tree][3]. We watch for two critical events in each repository: - - 1. When maintainers merge pull requests or patches, and the resulting commits in the repository change. - - 2. When developers propose changes for merging via patchwork or the stable patch queue. - +Red Hat 的 CKI 团队当前正追踪来自数个内部内核分支和[稳定内核分支树][3]等上游内核分支的更改。我们关注每个代码库的两类关键事件: + 1. 当维护人员合并 PR 或者补丁时,代码库变化后的最终结果。 + 2. 当开发人员通过拼凑的或者稳定的补丁队列发起合并时。 As these events occur, automation springs into action and [GitLab CI pipelines][4] begin the testing process. Once the pipeline runs [linting][5] scripts, merges any patches, and compiles the kernel for multiple architectures, the real testing begins. We compile kernels in under six minutes for four architectures and submit feedback to the stable mailing list usually in two hours or less. Over 100,000 kernel tests run each month and over 11,000 GitLab pipelines have completed (since January 2019). From c20ece8f970a018c300a105aaff0ab02eebb93c6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Jul 2019 01:15:49 +0800 Subject: [PATCH 181/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190729=20Comman?= =?UTF-8?q?d=20line=20quick=20tips:=20More=20about=20permissions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190729 Command line quick tips- More about permissions.md --- ...line quick tips- More about permissions.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/tech/20190729 Command line quick tips- More about permissions.md diff --git a/sources/tech/20190729 Command line quick tips- More about permissions.md b/sources/tech/20190729 Command line quick tips- More about permissions.md new file mode 100644 index 0000000000..63674e71c4 --- /dev/null +++ b/sources/tech/20190729 Command line quick tips- More about permissions.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command line quick tips: More about permissions) +[#]: via: (https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/) +[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) + +Command line quick tips: More about permissions +====== + +![][1] + +A previous article [covered some basics about file permissions][2] on your Fedora system. This installment shows you additional ways to use permissions to manage file access and sharing. It also builds on the knowledge and examples in the previous article, so if you haven’t read that one, do [check it out][2]. + +### Symbolic and octal + +In the previous article you saw how there are three distinct permission sets for a file. The user that owns the file has a set, members of the group that owns the file has a set, and then a final set is for everyone else. These permissions are expressed on screen in a long listing (_ls -l_) using symbolic mode. + +Each set has **r, w,** and **x** entries for whether a particular user (owner, group member, or other) can read, write, or execute that file. But there’s another way to express these permissions: in **octal** mode. + +You’re used to the [decimal][3] numbering system, which has ten distinct values (0 through 9). The octal system, on the other hand, has eight distinct values (0 through 7). In the case of permissions, octal is used as a shorthand to show the value of the **r, w,** and **x** fields. Think of each field as having a value: + + * **r** = 4 + * **w** = 2 + * **x** = 1 + + + +Now you can express any combination with a single octal value. For instance, read and write permission, but no execute permission, would have a value of 6. Read and execute permission only would have a value of 5. A file’s **rwxr-xr-x** symbolic permission has an octal value of **755**. + +You can use octal values to set file permissions with the _chmod_ command similarly to symbolic values. The following two commands set the same permissions on a file: + +``` +chmod u=rw,g=r,o=r myfile1 +chmod 644 myfile1 +``` + +### Special permission bits + +There are several special permission bits also available on a file. These are called **setuid** (or **suid**), **setgid** (or **sgid**), and the **sticky bit** (or **delete inhibit**). Think of this as yet another set of octal values: + + * setuid = 4 + * setgid = 2 + * sticky = 1 + + + +The **setuid** bit is ignored _unless_ the file is executable. If that’s the case, the file (presumably an app or a script) runs as if it were launched by the user who owns the file. A good example of setuid is the _/bin/passwd_ utility, which allows a user to set or change passwords. This utility must be able to write to files no user should be allowed to change. Therefore it is carefully written, owned by the _root_ user, and has a setuid bit so it can alter the password related files. + +The **setgid** bit works similarly for executable files. The file will run with the permissions of the group that owns it. However, setgid also has an additional use for directories. If a file is created in a directory with setgid permission, the group owner for the file will be set to the group owner of the directory. + +Finally, the sticky bit, while ignored for files, is useful for directories. The sticky bit set on a directory will prevent a user from deleting files in that directory owned by other users. + +The way to set these bits with _chmod_ in octal mode is to add a value prefix, such as **4755** to add setuid to an executable file. In symbolic mode, the **u** and **g** can be used to set or remove setuid and setgid, such as **u+s,g+s**. The sticky bit is set using **o+t**. (Other combinations, like **o+s** or **u+t**, are meaningless and ignored.) + +### Sharing and special permissions + +Recall the example from the previous article concerning a finance team that needs to share files. As you can imagine, the special permission bits help to solve their problem even more effectively. The original solution simply made a directory the whole group could write to: + +``` +drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance +``` + +One problem with this directory is that users _dwayne_ and _jill_, who are both members of the _finance_ group, can delete each other’s files. That’s not optimal for a shared space. It might be useful in some situations, but probably not when dealing with financial records! + +Another problem is that files in this directory may not be truly shared, because they will be owned by the default groups of _dwayne_ and _jill_ — most likely the user private groups also named _dwayne_ and _jill_. + +A better way to solve this is to set both setgid and the sticky bit on the folder. This will do two things — cause files created in the folder to be owned by the _finance_ group automatically, and prevent _dwayne_ and _jill_ from deleting each other’s files. Either of these commands will work: + +``` +sudo chmod 3770 finance +sudo chmod u+rwx,g+rwxs,o+t finance +``` + +The long listing for the file now shows the new special permissions applied. The sticky bit appears as **T** and not **t** because the folder is not searchable for users outside the _finance_ group. + +``` +drwxrws--T. 2 root finance 4096 Jul 6 15:35 finance +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/ + +作者:[Paul W. Frields][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/pfrields/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg +[2]: https://fedoramagazine.org/command-line-quick-tips-permissions/ +[3]: https://en.wikipedia.org/wiki/Decimal From 1ac7869610c6cb6a500b9adcebfb0e56cb7b14b7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Jul 2019 01:16:37 +0800 Subject: [PATCH 182/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20Is=20T?= =?UTF-8?q?his=20the=20End=20of=20Floppy=20Disk=20in=20Linux=3F=20Linus=20?= =?UTF-8?q?Torvalds=20Marks=20Floppy=20Disks=20=E2=80=98Orphaned=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md --- ...s Torvalds Marks Floppy Disks ‘Orphaned.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/tech/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md diff --git a/sources/tech/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/sources/tech/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md new file mode 100644 index 0000000000..e8fc087743 --- /dev/null +++ b/sources/tech/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md @@ -0,0 +1,76 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks ‘Orphaned’) +[#]: via: (https://itsfoss.com/end-of-floppy-disk-in-linux/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks ‘Orphaned’ +====== + +_**In a recent commit to the Linux Kernel, Linus Torvalds marked the floppy disk drivers as orphaned. Could this be the beginning of the end of floppy disks in Linux?**_ + +Chances are that you haven’t seen a real floppy disk in years. And if you are looking for a computer with floppy drive, you may have to visit a museum. + +More than two decades ago, floppy disks were the popular medium for storing data and running operating systems on it. The [early Linux distributions][1] were ‘distributed’ using floppy disks. Floppy disks were also used extensively for saving and transferring data. + +Have you ever wondered why the save icons in many applications look like a floppy? Because it IS floppy disk. Floppy disks were popular for saving data and hence many applications used it as save icons and the tradition continues till date. + +![][2] + +Why am I talking about floppy disks today? Because Linus Torvalds has marked floppy drivers ‘orphaned’ in a commit to the Linux kernel code. + +### Floppy disk drivers marked ‘orphaned’ in Linux kernel + +As you can read in the [commit on the GitHub mirror][3], the developer Jiri doesn’t have a working computer with floppy drive anymore. Without the correct hardware, continuing the development won’t be possible for Jiri. And that’s why Torvalds marked it orphan + +> Actual working physical floppy hardware is getting hard to find, and while Willy was able to test this, I think the driver can be considered pretty much dead from an actual hardware standpoint. The hardware that is still sold seems to be mainly USB-based, which doesn’t use this legacy driver at all. + +![][4] + +### What does ‘orphan’ mean in Linux kernel? + +Orphan means that there are no developers able to or willing to support that part of code. + +An orphaned module will probably get deprecated and removed eventually if no one else comes forward to continue maintaining and developing it. + +[][5] + +Suggested read  Valve Annouces Linux Based Gaming Operating System: SteamOS + +### It’s not being removed immediately + +Torvalds notes that floppy drives are still used by various virtual environment emulators. So the floppy drivers won’t be discarded straightway. + +> The old floppy disk controller is still emulated in various VM environments, so the driver isn’t going away, but let’s see if anybody is interested to step up to maintain it. + +Why not just keep the floppy drive support in the kernel forever? It’s because this will pose a security threat. Even if there is no real computer using floppy drivers, the VMs still have it and this will leave the VMs vulnerable. + +### End of an era? + +Will this be the end of an era or will someone else come up and take the responsibility of keeping floppy support alive in Linux? Only time will tell. + +I don’t think there is any love lost here with floppy drives being orphaned in Linux kernel. + +I haven’t used a floppy disks in last fifteen years and I doubt many people either. What about you? Have you ever used a floppy disk? If yes, when was the last time you used it? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/end-of-floppy-disk-in-linux/ + +作者:[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/earliest-linux-distros/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/floppy-disk-icon-of-saving.png?resize=800%2C300&ssl=1 +[3]: https://github.com/torvalds/linux/commit/47d6a7607443ea43dbc4d0f371bf773540a8f8f4 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/End-of-Floppy-in-Linux.png?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/ From f1c8a6f6353e5fbd783b4117306795ff35a2dd30 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Jul 2019 01:17:14 +0800 Subject: [PATCH 183/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20OpenHM?= =?UTF-8?q?D:=20Open=20Source=20Project=20for=20VR=20Development?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md --- ... Open Source Project for VR Development.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md diff --git a/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md b/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md new file mode 100644 index 0000000000..99e83e3613 --- /dev/null +++ b/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (OpenHMD: Open Source Project for VR Development) +[#]: via: (https://itsfoss.com/openhmd/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +OpenHMD: Open Source Project for VR Development +====== + +In this day and age, there are open-source alternatives for all your computing needs. There is even an open-source platform for VR goggles and the like. Let’s have a quick look at the OpenHMD project. + +### What is OpenHMD? + +![][1] + +[OpenHMD][2] is a project that aims to create an open-source API and drivers for immersive technology. This category includes head-mounted displays with built-in head tracking. + +They currently support quite a few systems, including Android, FreeBSD, Linux, OpenBSD, mac OS, and Windows. The [devices][3] that they support include Oculus Rift, HTC Vive, DreamWorld DreamGlass, Playstation Move, and others. They also offer support for a wide range of languages, including Go, Java, .NET, Perl, Python, and Rust. + +The OpenHMD project is released under the [Boost License][4]. + +### More and Improved Features in the new Release + +![][5] + +Recently, the OpenHMD project [released version 0.3.0][6] codenamed Djungelvral. ([Djungelvral][7] is a salted licorice from Sweden.) This brought quite a few changes. + +The update added support for the following devices: + + * 3Glasses D3 + * Oculus Rift CV1 + * HTC Vive and HTC Vive Pro + * NOLO VR + * Windows Mixed Reality HMD support + * Deepoon E2 + * GearVR Gen1 + + + +A universal distortion shader was added to OpenHMD. This additions “makes it possible to simply set some variables in the drivers that gives information to the shader regarding lens size, chromatic aberration, position and quirks.” + +They also announced plans to change the build system. OpenHMD added support for Meson and will remove support for Autotools in the next (0.4) release. + +The team behind OpenHMD also had to remove some features because they want their system to work for everyone. Support for PlayStation VR has been disabled because of some issue with Windows and mac OS due to incomplete HID headers. NOLO has a bunch of firmware version, many will small changes. OpenHMD is unable to test all of the firmware versions, so some version might not work. They recommend upgrading to the latest firmware release. Finally, several devices only have limited support and therefore are not included in this release. + +[][8] + +Suggested read  To Do App Remember The Milk Is Now Available For Linux + +They accounted that they will be speeding up the OpenHMD release cycle to get newer features and support for more devices to users quicker. Their main priority will be to get “currently disabled devices in master ready for a patch release will be priority as well, among getting the elusive positional tracking functional for supported HMD’s.” + +### Final Thoughts + +I don’t have a VR device and have never used one. I do believe that they have great potential, even beyond gaming. I am thrill (but not surprised) that there is an open-source implementation that seeks to support many devices. I’m glad that they are focusing on a wide range of devices, instead of focussing on some off-brand VR effort. + +I wish the OpenHMD team well and hope they create a platform that will make them the goto VR project. + +Have you ever used or encountered OpenHMD? Have you ever used VR for gaming and other pursuits? If yes, have you encountered any open-source hardware or software? Please let us know in the comments below. + +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/openhmd/ + +作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/openhmd-logo.png?resize=300%2C195&ssl=1 +[2]: http://www.openhmd.net/ +[3]: http://www.openhmd.net/index.php/devices/ +[4]: https://github.com/OpenHMD/OpenHMD/blob/master/LICENSE +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/virtual-reality-development.jpg?ssl=1 +[6]: http://www.openhmd.net/index.php/2019/07/12/openhmd-0-3-0-djungelvral-released/ +[7]: https://www.youtube.com/watch?v=byP5i6LdDXs +[8]: https://itsfoss.com/remember-the-milk-linux/ +[9]: http://reddit.com/r/linuxusersgroup From b341db3e417cbc426ee670e70a0d001db9f0daf1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Jul 2019 01:17:58 +0800 Subject: [PATCH 184/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190729=20Top=20?= =?UTF-8?q?8=20Things=20to=20do=20after=20Installing=20Debian=2010=20(Bust?= =?UTF-8?q?er)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md --- ... do after Installing Debian 10 (Buster).md | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md diff --git a/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md b/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md new file mode 100644 index 0000000000..4246d5f7d9 --- /dev/null +++ b/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md @@ -0,0 +1,285 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Top 8 Things to do after Installing Debian 10 (Buster)) +[#]: via: (https://www.linuxtechi.com/things-to-do-after-installing-debian-10/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +Top 8 Things to do after Installing Debian 10 (Buster) +====== + +Debian 10 code name Buster is the latest LTS release from the house of Debian and the latest release comes packed with a lot of features. So if you have already installed the Debian 10 in your system and thinking what next, then please continue reading the article till the end as we provide you with the top 8 things to do after installing Debian 10. For those who haven’t installed Debian 10, please read this guide [**Debian 10 (Buster) Installation Steps with Screenshots**][1]. So lets continue with the article: + + + +### 1) Install and Configure sudo + +Once you complete setting up Debian 10 in your system, the first thing you need to do is install the sudo package as it enables you to get administrative privileges to install any package you need. In order to install and configure sudo, please use the following command: + +Become the root user and then install sudo package using the beneath command, + +``` +root@linuxtechi:~$ su - +Password: +root@linuxtechi:~# apt install sudo -y +``` + +Add your local user to sudo group using the following [usermod][2] command, + +``` +root@linuxtechi:~# usermod -aG sudo pkumar +root@linuxtechi:~# +``` + +Now verify whether local user got the sudo rights or not, + +``` +root@linuxtechi:~$ id +uid=1000(pkumar) gid=1000(pkumar) groups=1000(pkumar),27(sudo) +root@linuxtechi:~$ sudo vi /etc/hosts +[sudo] password for pkumar: +root@linuxtechi:~$ +``` + +### 2) Fix Date and time + +Once you’ve successfully configured the sudo package, next thing you need to  fix the date and time according to your location. In order to fix the date and time, + +Go to System **Settings** –> **Details** –> **Date and Time** and then change your time zone that suits to your location. + + + +Once the time zone is changed, you can see the time changed automatically in your clock + +### 3) Apply all updates + +After Debian 10 installation, it is recommended to install all updates which are available via Debian 10 package repositories, execute the beneath apt command, + +``` +root@linuxtechi:~$ sudo apt update +root@linuxtechi:~$ sudo apt upgrade -y +``` + +**Note:** If you are a big fan of vi editor then install vim using the following command apt command, + +``` +root@linuxtechi:~$ sudo apt install vim -y +``` + +### 4) Install Flash Player Plugin + +By default, the Debian 10 (Buster) repositories don’t come packed with the Flash plugin and hence users looking to install flash player in their system need to follow the steps outlined below: + +Configure Repository for flash player: + +``` +root@linuxtechi:~$ echo "deb http://ftp.de.debian.org/debian buster main contrib" | sudo tee -a /etc/apt/sources.list +deb http://ftp.de.debian.org/debian buster main contrib +root@linuxtechi:~ +``` + +Now update package index using following command, + +``` +root@linuxtechi:~$ sudo apt update +``` + +Install flash plugin using following apt command + +``` +root@linuxtechi:~$ sudo apt install pepperflashplugin-nonfree -y +``` + +Once package is installed successfully, then try to play videos in YouTube, + + + +### 5)  Install Software like VLC, SKYPE, FileZilla and Screenshot tool + +So now we’ve enabled flash player, it is time to install all other software like VLC, Skype, Filezilla and screenshot tool like flameshot in our Debian 10 system. + +**Install VLC Media Player** + +To install VLC player in your system using apt command, + +``` +root@linuxtechi:~$ sudo apt install vlc -y +``` + +After the successful installation of VLC player, try to play your favorite videos + + + +**Install Skype:** + +First download the latest Skype package as shown below: + +``` +root@linuxtechi:~$ wget https://go.skype.com/skypeforlinux-64.deb +``` + +Next install the package using the apt command as shown below: + +``` +root@linuxtechi:~$ sudo apt install ./skypeforlinux-64.deb +``` + +After successful installation of Skype, try to access it and enter your Credentials, + + + +**Install Filezilla** + +To install Filezilla in your system use the following apt command, + +``` +root@linuxtechi:~$ sudo apt install filezilla -y +``` + +Once FileZilla package is installed successfully, try to access it, + + + +**Install Screenshot tool (flameshot)** + +Use the following command to install screenshoot tool flameshot, + +``` +root@linuxtechi:~$ sudo apt install flameshot -y +``` + +**Note:** Shutter Tool in Debian 10 has been removed + + + +### 6) Enable and Start Firewall + +It is always recommended to start firewall to make your secure over the network. If you are looking to enable firewall in Debian 10, **UFW** (Uncomplicated Firewall) is the best tool handle firewall. Since UFW is available in the Debian repositories, it is quite easy to install as shown below: + +``` +root@linuxtechi:~$ sudo apt install ufw +``` + +Once you have installed UFW, the next step is to set up the firewall. So, to setup the firewall, disable all incoming traffic by denying the ports and allow only the required ports like ssh, http and https. + +``` +root@linuxtechi:~$ sudo ufw default deny incoming +Default incoming policy changed to 'deny' +(be sure to update your rules accordingly) +root@linuxtechi:~$ sudo ufw default allow outgoing +Default outgoing policy changed to 'allow' +(be sure to update your rules accordingly) +root@linuxtechi:~$ +``` + +Allow SSH port + +``` +root@linuxtechi:~$ sudo ufw allow ssh +Rules updated +Rules updated (v6) +root@linuxtechi:~$ +``` + +In case you have installed Web Server in your system then allow their ports too in the firewall using the following ufw command, + +``` +root@linuxtechi:~$ sudo ufw allow 80 +Rules updated +Rules updated (v6) +root@linuxtechi:~$ sudo ufw allow 443 +Rules updated +Rules updated (v6) +root@linuxtechi:~$ +``` + +Finally, you can enable UFW using the following command + +``` +root@linuxtechi:~$ sudo ufw enable +Command may disrupt existing ssh connections. Proceed with operation (y|n)? y +Firewall is active and enabled on system startup +root@linuxtechi:~$ +``` + +In case if you want to check the status of your firewall, you can check it using the following command + +``` +root@linuxtechi:~$ sudo ufw status +``` + +### 7) Install Virtualization Software (VirtualBox) + +First step in installing Virtualbox is by importing the public keys of the Oracle VirtualBox repository to your Debian 10 system + +``` +root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - +OK +root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - +OK +root@linuxtechi:~$ +``` + +If the import is successful, you will see a “OK” message displayed. + +Next you need to add the repository to the source list + +``` +root@linuxtechi:~$ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian buster contrib" +root@linuxtechi:~$ +``` + +Finally, it is time to install VirtualBox 6.0 in your system + +``` +root@linuxtechi:~$ sudo apt update +root@linuxtechi:~$ sudo apt install virtualbox-6.0 -y +``` + +Once VirtualBox packages are installed successfully, try access it and start creating virtual machines, + + + +### 8) Install latest AMD Drivers + +Finally, you can also install additional AMD drivers needed like the graphics card, ATI Proprietary and Nvidia Graphics drivers. To Install the latest AMD Drivers, first we must modify **/etc/apt/sources.list** file, add **non-free** word in lines which contains **main** and **contrib**, example is shown below + +``` +root@linuxtechi:~$ sudo vi /etc/apt/sources.list +………………… +deb http://deb.debian.org/debian/ buster main non-free contrib +deb-src http://deb.debian.org/debian/ buster main non-free contrib + +deb http://security.debian.org/debian-security buster/updates main contrib non-free +deb-src http://security.debian.org/debian-security buster/updates main contrib non-free + +deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free +…………………… +``` + +Now use the following apt commands to install latest AMD drivers in Debian 10 system + +``` +root@linuxtechi:~$ sudo apt update +root@linuxtechi:~$ sudo apt install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu -y +``` + +That’s all from this article, I hope you got an idea what one should after installing Debian 10. Please do share your feedback and comments in comments section below. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/things-to-do-after-installing-debian-10/ + +作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ +[2]: https://www.linuxtechi.com/linux-commands-to-manage-local-accounts/ From f90e42397a3a1687d2c4eb7570e7b4cee4234f07 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Jul 2019 01:18:53 +0800 Subject: [PATCH 185/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190729=203=20co?= =?UTF-8?q?mmands=20to=20reboot=20Linux=20(plus=204=20more=20ways=20to=20d?= =?UTF-8?q?o=20it=20safely)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190729 3 commands to reboot Linux (plus 4 more ways to do it safely).md --- ...inux (plus 4 more ways to do it safely).md | 262 ++++++++++++++++++ 1 file changed, 262 insertions(+) create mode 100644 sources/tech/20190729 3 commands to reboot Linux (plus 4 more ways to do it safely).md diff --git a/sources/tech/20190729 3 commands to reboot Linux (plus 4 more ways to do it safely).md b/sources/tech/20190729 3 commands to reboot Linux (plus 4 more ways to do it safely).md new file mode 100644 index 0000000000..4cc9cf417e --- /dev/null +++ b/sources/tech/20190729 3 commands to reboot Linux (plus 4 more ways to do it safely).md @@ -0,0 +1,262 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (3 commands to reboot Linux (plus 4 more ways to do it safely)) +[#]: via: (https://opensource.com/article/19/7/reboot-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/alanfdosshttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/greg-phttps://opensource.com/users/greg-phttps://opensource.com/users/sethhttps://opensource.com/users/cldxsolutions) + +3 commands to reboot Linux (plus 4 more ways to do it safely) +====== +Learn how to reboot Linux through many different methods, from the GUI +to deep within the command line. +![Tux with binary code background][1] + +Linux is fully capable of running not weeks, but years, without a reboot. In some industries, that’s exactly what Linux does, thanks to advances like **kpatch** and **kgraph**. + +For laptop and desktop users, though, that metric is a little extreme. While it may not be a day-to-day reality, it’s at least a weekly reality that sometimes you have a good reason to reboot your machine. And for a system that doesn’t need rebooting often, Linux offers plenty of choices for when it’s time to start over. + +### Understand your options + +Before continuing though, a note on rebooting. Rebooting is a unique process on each operating system. Even within [POSIX][2] systems, the commands to power down and reboot may behave differently due to different initialization systems or command designs. + +Despite this factor, two concepts are vital. First, rebooting is rarely requisite on a POSIX system. Your Linux machine can operate for weeks or months at a time without a reboot if that’s what you need. There’s no need to "freshen up" your computer with a reboot unless specifically advised to do so by a software installer or updater. Then again, it doesn’t hurt to reboot, either, so it’s up to you. + +Second, rebooting is meant to be a friendly process, allowing time for programs to exit, files to be saved, temporary files to be removed, filesystem journals updated, and so on. Whenever possible, reboot using the intended interfaces, whether in a GUI or a terminal. If you force your computer to shut down or reboot, you risk losing unsaved and even recently-saved data, and even corrupting important system information; you should only ever force your computer off when there’s no other option**.** + +### Click the button + +The first way to reboot or shut down Linux is the most common one, and the most intuitive for most desktop users regardless of their OS: It’s the power button in the GUI. Since powering down and rebooting are common tasks on a workstation, you can usually find the power button (typically with reboot and shut down options) in a few different places. On the GNOME desktop, it's in the system tray:  + +![The GNOME power button.][3] + +It’s also in the GNOME **Activities** menu: + +![The GNOME Activities menu power button.][4] + +On the KDE desktop, the power buttons can be found in the **Applications** menu: + +![The KDE power buttons via the Applications menu.][5] + +You can also access the KDE power controls by right-clicking on the desktop and selecting the **Leave** option, which opens the window you see here: + +![The KDE power buttons via the Leave option.][6] + +Other desktops provide variations on these themes, but the general idea is the same: use your mouse to locate the power button, and then click it. You may have to select between rebooting and powering down, but in the end, the result is nearly identical: Processes are stopped, nicely, so that data is saved and temporary files are removed, then data is synchronized to drives, and then the system is powered down. + +### Push the physical button + +Most computers have a physical power button. If you press that button, your Linux desktop may display a power menu with options to shut down or reboot. This feature is provided by the [Advanced Configuration and Power Interface (ACPI)][7] subsystem, which communicates with your motherboard’s firmware to control your computer’s state. + +ACPI is important but it’s limited in scope, so there’s not much to configure from the user’s perspective. Usually, ACPI options are generically called **Power** and are set to a sane default. If you want to change this setup, you can do so in your system settings. + +On GNOME, open the system tray menu and select **Activities**, and then **Settings.** Next, select the **Power** category in the left column, which opens the following menu: + +![GNOME’s power button settings.][8] + +In the **Suspend & Power Button** section, select what you want the physical power button to do. + +The process is similar across desktops. For instance, on KDE, the **Power Management** panel in **System Settings** contains an option for **Button Event Handling.** + +* * * + +* * * + +* * * + +**![KDE Power Management][9]** + +* * * + +* * * + +* * * + +**opensource.com** + +After you configure how the button event is handled, pressing your computer’s physical power button follows whatever option you chose. Depending on your computer vendor (or parts vendors, if you build your own), a button press might be a light tap, or it may require a slightly longer push, so you might have to do some tests before you get the hang of it. + +Beware of an over-long press, though, since it may shut your computer down without warning. + +### Run the systemctl command + +If you operate more in a terminal than in a GUI desktop, you might prefer to reboot with a command. Broadly speaking, rebooting and powering down are processes of the _init_ system—the sequence of programs that bring a computer up or down after a power signal (either on or off, respectively) is received. + +On most modern Linux distributions, **systemd** is the init system, so both rebooting and powering down can be performed through the **systemd** user interface, **systemctl**. The **systemctl** command accepts, among many other options, **halt** (halts disk activity but does not cut power) **reboot** (halts disk activity and sends a reset signal to the motherboard) and **poweroff** (halts disk acitivity, and then cut power). These commands are mostly equivalent to starting the target file of the same name. + +For instance, to trigger a reboot: + + +``` +`$ sudo systemctl start reboot.target` +``` + +### Run the shutdown command + +Traditional UNIX, before the days of **systemd** (and for some Linux distributions, like [Slackware][10], that’s _now_), there were commands specific to stopping a system. The **shutdown** command, for instance, can power down your machine, but it has several options to control exactly what that means. + +This command requires a time argument, in minutes, so that **shutdown** knows when to execute. To reboot immediately, append the **-r** flag: + + +``` +`$ sudo shutdown -r now` +``` + +To power down immediately: + + +``` +`$ sudo shutdown -P now` +``` + +Or you can use the **poweroff** command: + + +``` +`$ poweroff` +``` + +To reboot after 10 minutes: + + +``` +`$ sudo shutdown -r 10` +``` + +The **shutdown** command is a safe way to power off or reboot your computer, allowing disks to sync and processes to end. This command prevents new logins within the final 5 minutes of shutdown commencing, which is particularly useful on multi-user systems. + +On many systems today, the **shutdown** command is actually just a call to **systemctl** with the appropriate reboot or power off option. + +### Run the reboot command + +The **reboot** command, on its own, is basically a shortcut to **shutdown -r now**. From a terminal, this is the easiest and quickest reboot command: + + +``` +`$ sudo reboot` +``` + +If your system is being blocked from shutting down (perhaps due to a runaway process), you can use the **\--force** flag to make the system shut down anyway. However, this option skips the actual shutting down process, which can be abrupt for running processes, so it should only be used when the **shutdown** command is blocking you from powering down. + +On many systems, **reboot** is actually a call to **systemctl** with the appropriate reboot or power off option. + +### Init + +On Linux distributions without **systemd**, there are up to 7 runlevels your computer understands. Different distributions can assign each mode uniquely, but generally, 0 initiates a halt state, and 6 initiates a reboot (the numbers in between denote states such as single-user mode, multi-user mode, a GUI prompt, and a text prompt). + +These modes are defined in **/etc/inittab** on systems without **systemd**. On distributions using **systemd** as the init system, the **/etc/inittab** file is either missing, or it’s just a placeholder. + +The **telinit** command is the front-end to your init system. If you’re using **systemd**, then this command is a link to **systemctl** with the appropriate options. + +To power off your computer by sending it into runlevel 0: + + +``` +`$ sudo telinit 0` +``` + +To reboot using the same method: + + +``` +`$ sudo telinit 6` +``` + +How unsafe this command is for your data depends entirely on your init configuration. Most distributions try to protect you from pulling the plug (or the digital equivalent of that) by mapping runlevels to friendly commands. + +You can see for yourself what happens at each runlevel by reading the init scripts found in **/etc/rc.d** or **/etc/init.d**, or by reading the **systemd** targets in **/lib/systemd/system/**. + +### Apply brute force + +So far I’ve covered all the _right_ ways to reboot or shut down your Linux computer. To be thorough, I include here additional methods of bringing down a Linux computer, but by no means are these methods recommended. They aren’t designed as a daily reboot or shut down command (**reboot** and **shutdown** exist for that), but they’re valid means to accomplish the task. + +If you try these methods, try them in a virtual machine. Otherwise, use them only in emergencies. + +#### Proc + +A step lower than the init system is the **/proc** filesystem, which is a virtual representation of nearly everything happening on your computer. For instance, you can view your CPUs as though they were text files (with **cat /proc/cpuinfo**), view how much power is left in your laptop’s battery, or, after a fashion, reboot your system. + +There’s a provision in the Linux kernel for system requests (**Sysrq** on most keyboards). You can communicate directly with this subsystem using key combinations, ideally regardless of what state your computer is in; it gets complex on some keyboards because the **Sysrq** key can be a special function key that requires a different key to access (such as **Fn** on many laptops). + +An option less likely to fail is using **echo** to insert information into **/proc**, manually. First, make sure that the Sysrq system is enabled: + + +``` +`$ sudo echo 1 > /proc/sys/kernel/sysrq` +``` + +To reboot, you can use either **Alt**+**Sysrq**+**B** or type: + + +``` +`$ sudo echo b > /proc/sysrq-trigger` +``` + +This method is not a reasonable way to reboot your machine on a regular basis, but it gets the job done in a pinch. + +#### Sysctl + +Kernel parameters can be managed during runtime with **sysctl**. There are lots of kernel parameters, and you can see them all with **sysctl --all**. Most probably don’t mean much to you until you know what to look for, and in this case, you’re looking for **kernel.panic**. + +You can query kernel parameters using the **-–value** option: + + +``` +`$ sudo sysctl --value kernel.panic` +``` + +If you get a 0 back, then the kernel you’re running has no special setting, at least by default, to reboot upon a kernel panic. That situation is fairly typical since rebooting immediately on a catastrophic system crash makes it difficult to diagnose the cause of the crash. Then again, systems that need to stay on no matter what might benefit from an automatic restart after a kernel failure, so it’s an option that does get switched on in some cases. + +You can activate this feature as an experiment (if you’re following along, try this in a virtual machine rather than on your actual computer): + + +``` +`$ sudo sysctl kernel.reboot=1` +``` + +Now, should your computer experience a kernel panic, it is set to reboot instead of waiting patiently for you to diagnose the problem. You can test this by simulating a catastrophic crash with **sysrq**. First, make sure that Sysrq is enabled: + + +``` +`$ sudo echo 1 > /proc/sys/kernel/sysrq` +``` + +And then simulate a kernel panic: + + +``` +`$ sudo echo c > /proc/sysrq-trigger` +``` + +Your computer reboots immediately. + +### Reboot responsibly + +Knowing all of these options doesn't mean that you should use them all. Give careful thought to what you're trying to accomplish, and what the command you've selected will do. You don't want to damage your system by being reckless. That's what virtual machines are for. However, having so many options means that you're ready for most situations. + +Have I left out your favorite method of rebooting or powering down a system? List what I’ve missed in the comments! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/reboot-linux + +作者:[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/sethhttps://opensource.com/users/alanfdosshttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/greg-phttps://opensource.com/users/greg-phttps://opensource.com/users/sethhttps://opensource.com/users/cldxsolutions +[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]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/sites/default/files/uploads/gnome-menu-power.jpg (The GNOME power button.) +[4]: https://opensource.com/sites/default/files/uploads/gnome-screen-power.jpg (The GNOME Activities menu power button.) +[5]: https://opensource.com/sites/default/files/uploads/kde-menu-power.jpg (The KDE power buttons via the Applications menu.) +[6]: https://opensource.com/sites/default/files/uploads/kde-screen-power.jpg (The KDE power buttons via the Leave option.) +[7]: https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface +[8]: https://opensource.com/sites/default/files/uploads/gnome-settings-power.jpg (GNOME’s power button settings.) +[9]: https://opensource.com/sites/default/files/images/kde-power-management.jpg +[10]: http://slackware.com From cb022a628ba6d3b16ac190e631f571a6d82c3e96 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Jul 2019 01:19:29 +0800 Subject: [PATCH 186/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190729=20How=20?= =?UTF-8?q?to=20structure=20a=20multi-file=20C=20program:=20Part=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190729 How to structure a multi-file C program- Part 1.md --- ...tructure a multi-file C program- Part 1.md | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 sources/tech/20190729 How to structure a multi-file C program- Part 1.md diff --git a/sources/tech/20190729 How to structure a multi-file C program- Part 1.md b/sources/tech/20190729 How to structure a multi-file C program- Part 1.md new file mode 100644 index 0000000000..b4c9cd194d --- /dev/null +++ b/sources/tech/20190729 How to structure a multi-file C program- Part 1.md @@ -0,0 +1,197 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to structure a multi-file C program: Part 1) +[#]: via: (https://opensource.com/article/19/7/structure-multi-file-c-part-1) +[#]: author: (Erik O'Shaughnessy https://opensource.com/users/jnyjnyhttps://opensource.com/users/jnyjnyhttps://opensource.com/users/jim-salterhttps://opensource.com/users/cldxsolutions) + +How to structure a multi-file C program: Part 1 +====== +Grab your favorite beverage, editor, and compiler, crank up some tunes, +and start structuring a C program composed of multiple files. +![Programming keyboard.][1] + +It has often been said that the art of computer programming is part managing complexity and part naming things. I contend that this is largely true with the addition of "and sometimes it requires drawing boxes." + +In this article, I'll name some things and manage some complexity while writing a small C program that is loosely based on the program structure I discussed in "[How to write a good C main function][2]"—but different. This one will do something. Grab your favorite beverage, editor, and compiler, crank up some tunes, and let's write a mildly interesting C program together. + +### Philosophy of a good Unix program + +The first thing to know about this C program is that it's a [Unix][3] command-line tool. This means that it runs on (or can be ported to) operating systems that provide a Unix C runtime environment. When Unix was invented at Bell Labs, it was imbued from the beginning with a [design philosophy][4]. In my own words: _programs do one thing, do it well, and act on files_. While it makes sense to do one thing and do it well, the part about "acting on files" seems a little out of place. + +It turns out that the Unix abstraction of a "file" is very powerful. A Unix file is a stream of bytes that ends with an end-of-file (EOF) marker. That's it. Any other structure in a file is imposed by the application and not the operating system. The operating system provides system calls that allow a program to perform a set of standard operations on files: open, read, write, seek, and close (there are others, but those are the biggies). Standardizing access to files allows different programs to share a common abstraction and work together even when different people implement them in different programming languages. + +Having a shared file interface makes it possible to build programs that are _composable_. The output of one program can be the input of another program. The Unix family of operating systems provides three files by default whenever a program is executed: standard in (**stdin**), standard out (**stdout**), and standard error (**stderr**). Two of these files are opened in write-only mode: **stdout** and **stderr**, while **stdin** is opened read-only. We see this in action whenever we use file redirection in a command shell like Bash: + + +``` +`$ ls | grep foo | sed -e 's/bar/baz/g' > ack` +``` + +This construction can be described briefly as: the output of **ls** is written to stdout, which is redirected to the stdin of **grep**, whose stdout is redirected to **sed**, whose stdout is redirected to write to a file called **ack** in the current directory. + +We want our program to play well in this ecosystem of equally flexible and awesome programs, so let's write a program that reads and writes files. + +### MeowMeow: A stream encoder/decoder concept + +When I was a dewy-eyed kid studying computer science in the <mumbles>s, there were a plethora of encoding schemes. Some of them were for compressing files, some were for packaging files together, and others had no purpose but to be excruciatingly silly. An example of the last is the [MooMoo encoding scheme][5]. + +To give our program a purpose, I'll update this concept for the [2000s][6] and implement a concept called MeowMeow encoding (since the internet loves cats). The basic idea here is to take files and encode each nibble (half of a byte) with the text "meow." A lower-case letter indicates a zero, and an upper-case indicates a one. Yes, it will balloon the size of a file since we are trading 4 bits for 32 bits. Yes, it's pointless. But imagine the surprise on someone's face when this happens: + + +``` +$ cat /home/your_sibling/.super_secret_journal_of_my_innermost_thoughts +MeOWmeOWmeowMEoW... +``` + +This is going to be awesome. + +### Implementation, finally + +The full source for this can be found on [GitHub][7], but I'll talk through my thought process while writing it. The object is to illustrate how to structure a C program composed of multiple files. + +Having already established that I want to write a program that encodes and decodes files in MeowMeow format, I fired up a shell and issued the following commands: + + +``` +$ mkdir meowmeow +$ cd meowmeow +$ git init +$ touch Makefile     # recipes for compiling the program +$ touch main.c       # handles command-line options +$ touch main.h       # "global" constants and definitions +$ touch mmencode.c   # implements encoding a MeowMeow file +$ touch mmencode.h   # describes the encoding API +$ touch mmdecode.c   # implements decoding a MeowMeow file +$ touch mmdecode.h   # describes the decoding API +$ touch table.h      # defines encoding lookup table values +$ touch .gitignore   # names in this file are ignored by git +$ git add . +$ git commit -m "initial commit of empty files" +``` + +In short, I created a directory full of empty files and committed them to git. + +Even though the files are empty, you can infer the purpose of each from its name. Just in case you can't, I annotated each **touch** with a brief description. + +Usually, a program starts as a single, simple **main.c** file, with only two or three functions that solve the problem. And then the programmer rashly shows that program to a friend or her boss, and suddenly the number of functions in the file balloons to support all the new "features" and "requirements" that pop up. The first rule of "Program Club" is don't talk about "Program Club." The second rule is to minimize the number of functions in one file. + +To be honest, the C compiler does not care one little bit if every function in your program is in one file. But we don't write programs for computers or compilers; we write them for other people (who are sometimes us). I know that is probably a surprise, but it's true. A program embodies a set of algorithms that solve a problem with a computer, and it's important that people understand it when the parameters of the problem change in unanticipated ways. People will have to modify the program, and they will curse your name if you have all 2,049 functions in one file. + +So we good and true programmers break functions out, grouping similar functions into separate files. Here I've got files **main.c**, **mmencode.c**, and **mmdecode.c**. For small programs like this, it may seem like overkill. But small programs rarely stay small, so planning for expansion is a "Good Idea." + +But what about those **.h** files? I'll explain them in general terms later, but in brief, those are called _header_ files, and they can contain C language type definitions and C preprocessor directives. Header files should _not_ have any functions in them. You can think of headers as a definition of the application programming interface (API) offered by the **.c** flavored file that is used by other **.c** files. + +### But what the heck is a Makefile? + +I know all you cool kids are using the "Ultra CodeShredder 3000" integrated development environment to write the next blockbuster app, and building your project consists of mashing on Ctrl-Meta-Shift-Alt-Super-B. But back in my day (and also today), lots of useful work got done by C programs built with Makefiles. A Makefile is a text file that contains recipes for working with files, and programmers use it to automate building their program binaries from source (and other stuff too!). + +Take, for instance, this little gem: + + +``` +00 # Makefile +01 TARGET= my_sweet_program +02 $(TARGET): main.c +03    cc -o my_sweet_program main.c +``` + +Text after an octothorpe/pound/hash is a comment, like in line 00. + +Line 01 is a variable assignment where the variable **TARGET** takes on the string value **my_sweet_program**. By convention, OK, my preference, all Makefile variables are capitalized and use underscores to separate words. + +Line 02 consists of the name of the file that the recipe creates and the files it depends on. In this case, the target is **my_sweet_program**, ****and the dependency is **main.c**. + +The final line, 03, is indented with a tab and not four spaces. This is the command that will be executed to create the target. In this case, we call **cc** the C compiler frontend to compile and link **my_sweet_program**. + +Using a Makefile is simple: + + +``` +$ make +cc -o my_sweet_program main.c +$ ls +Makefile  main.c  my_sweet_program +``` + +The [Makefile][8] that will build our MeowMeow encoder/decoder is considerably more sophisticated than this example, but the basic structure is the same. I'll break it down Barney-style in another article. + +### Form follows function + +My idea here is to write a program that reads a file, transforms it, and writes the transformed data to another file. The following fabricated command-line interaction is how I imagine using the program: + + +``` +        $ meow < clear.txt > clear.meow +        $ unmeow < clear.meow > meow.tx +        $ diff clear.txt meow.tx +        $ +``` + +We need to write code to handle command-line parsing and managing the input and output streams. We need a function to encode a stream and write it to another stream. And finally, we need a function to decode a stream and write it to another stream. Wait a second, I've only been talking about writing one program, but in the example above, I invoke two commands: **meow** and **unmeow**? I know you are probably thinking that this is getting complex as heck. + +### Minor sidetrack: argv[0] and the ln command + +If you recall, the signature of a C main function is: + + +``` +`int main(int argc, char *argv[])` +``` + +where **argc** is the number of command-line arguments, and **argv** is a list of character pointers (strings). The value of **argv[0]** is the path of the file containing the program being executed. Many Unix utility programs with complementary functions (e.g., compress and uncompress) look like two programs, but in fact, they are one program with two names in the filesystem. The two-name trick is accomplished by creating a filesystem "link" using the **ln** command. + +An example from **/usr/bin** on my laptop is: + + +``` +   $ ls -li /usr/bin/git* +3376 -rwxr-xr-x. 113 root root     1.5M Aug 30  2018 /usr/bin/git +3376 -rwxr-xr-x. 113 root root     1.5M Aug 30  2018 /usr/bin/git-receive-pack +... +``` + +Here **git** and **git-receive-pack** are the same file with different names. We can tell it's the same file because they have the same inode number (the first column). An inode is a feature of the Unix filesystem and is super outside the scope of this article. + +Good and/or lazy programmers can use this feature of the Unix filesystem to write less code but double the number of programs they deliver. First, we write a program that changes its behavior based on the value of **argv[0]**, then we make sure to create links with the names that cause the behavior. + +In our Makefile, the **unmeow** link is created using this recipe: + + +``` + # Makefile + ... + $(DECODER): $(ENCODER) +         $(LN) -f $< $@ +        ... +``` + +I tend to parameterize everything in my Makefiles, rarely using a "bare" string. I group all the definitions at the top of the Makefile, which makes it easy to find and change them. This makes a big difference when you are trying to port software to a new platform and you need to change all your rules to use **xcc** instead of **cc**. + +The recipe should appear relatively straightforward except for the two built-in variables **$@** and **$<**. The first is a shortcut for the target of the recipe; in this case, **$(DECODER)**. (I remember this because the at-sign looks like a target to me.) The second, **$<** is the rule dependency; in this case, it resolves to **$(ENCODER)**. + +Things are getting complex for sure, but it's managed. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/structure-multi-file-c-part-1 + +作者:[Erik O'Shaughnessy][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/jnyjnyhttps://opensource.com/users/jnyjnyhttps://opensource.com/users/jim-salterhttps://opensource.com/users/cldxsolutions +[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://opensource.com/article/19/5/how-write-good-c-main-function +[3]: https://en.wikipedia.org/wiki/Unix +[4]: http://harmful.cat-v.org/cat-v/ +[5]: http://www.jabberwocky.com/software/moomooencode.html +[6]: https://giphy.com/gifs/nyan-cat-sIIhZliB2McAo +[7]: https://github.com/JnyJny/meowmeow +[8]: https://github.com/JnyJny/meowmeow/blob/master/Makefile From 6d050ab8cbe44213b8c471ce6fa109e93091e919 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 30 Jul 2019 01:20:03 +0800 Subject: [PATCH 187/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190729=20Do=20y?= =?UTF-8?q?ou=20prefer=20a=20live=20demo=20to=20be=20perfect=20or=20broken?= =?UTF-8?q?=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md --- ...fer a live demo to be perfect or broken.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md diff --git a/sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md b/sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md new file mode 100644 index 0000000000..b4b76aadd6 --- /dev/null +++ b/sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md @@ -0,0 +1,82 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Do you prefer a live demo to be perfect or broken?) +[#]: via: (https://opensource.com/article/19/7/live-demo-perfect-or-broken) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeohttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesf) + +Do you prefer a live demo to be perfect or broken? +====== +Do you learn more from flawless demos or ones the presenter de-bugs in +real-time? Let us know by answering our poll. +![video editing dashboard][1] + +At [DevFest DC][2] in June, [Sara Robinson][3], developer advocate at Google Cloud, gave the most seamless live demo I've ever witnessed. + +Sara live-coded a machine model from scratch using TensorFlow and Keras. Then she trained the model live, deployed it to Google's Cloud AI platform, and used the deployed model to make predictions. + +With the exception of perhaps one small hiccup, the whole thing went smoothly, and I learned a lot as an audience member. + +At that evening's reception, I congratulated Sara on the live demo's success and told her I've never seen a live demo go so well. It turns out that this subject was already on her mind; Sara asked this question on Twitter less than two hours before her live demo: + +> Do you prefer watching a live demo where everything works perfectly or one that breaks and the presenter has to de-bug? +> +> — Sara Robinson (@SRobTweets) [June 14, 2019][4] + +Contrary to my preference for flawless demos, two-thirds of Sara's followers prefer to watch de-bugging. The replies to her poll were equally enlightening: + +> I prefer ones that break once or twice, just so you know it's real. "Break" can be something small like a typo or skipping a step. +> +> — Seth Vargo (@sethvargo) [June 14, 2019][5] + +> Broken demos which are fixed in real time seem to get a better reaction from the audience. This was our experience with the All-Demo Super Session at NEXT SF. Audible gasps followed by applause from the audience when the broken demo was fixed in real-time 🤓 +> +> — Jamie Kinney (@jamiekinney) [June 14, 2019][6] + +This made me reconsider my preference for perfection. When I attend live demos at events, I'm looking for tools that I'm unfamiliar with. I want to learn the basics of those tools, then see real-world applications. I don't expect magic, but I do want to see how the tools intend to work so I can gain and retain some knowledge. + +I've gone to several live demos that break. In my experience, this has caught most presenters off-guard; they seemed unfamiliar with the bugs at hand and, in one case, the error derailed the rest of the presentation. In short, it was like this: + +> Hmm, at least when the live demo fails you know it's not a video 😁 +> But I don't like when the presenter start to struggle, when everything becomes silent, it becomes so awkward (especially when I'm the one presenting) +> +> — Sylvain Nouts Ⓥ (@SylvainNouts) [June 14, 2019][7] + +Reading the replies to Sara's thread made me wonder what I'm really after when attending live demos. Is "perfection" what I seek? Or is it presenters who are more skilled at de-bugging in real-time? Upon reflection, I suspect that it's the latter. + +After all, "perfect" code is a lofty (if impossible) concept. Mistakes will happen, and I don't expect them not to. But I _do_ expect conference presenters to know their tools well enough that when things go sideways during live demos, they won't get so flustered that they can't keep going. + +Overall, this reply to Sara resonates with me the most. I attend live demos as a new coder with the goal to learn, and those that veer too far off-course aren't as effective for me: + +> I don’t necessarily prefer a broken demo, but I do think they show a more realistic view. +> That said, when you are newer to coding if the error takes things too far off the rails it can make it challenging to understand the original concept. +> +> — April Bowler (@A_Bowler2) [June 14, 2019][8] + +I don't expect everyone to attend live demos with the same goals and perspective as me. That's why we want to learn what the open source community thinks. + +_Do you prefer for live demos to be perfect? Or do you gain more from watching presenters de-bug in real-time? Do you attend live demos primarily to learn or for other reasons? Let us know by taking our poll or leaving a comment below._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/live-demo-perfect-or-broken + +作者:[Lauren Maffeo][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/lmaffeohttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesf +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/video_editing_folder_music_wave_play.png?itok=-J9rs-My (video editing dashboard) +[2]: https://www.devfestdc.org/ +[3]: https://twitter.com/SRobTweets +[4]: https://twitter.com/SRobTweets/status/1139619990687162368?ref_src=twsrc%5Etfw +[5]: https://twitter.com/sethvargo/status/1139620990546145281?ref_src=twsrc%5Etfw +[6]: https://twitter.com/jamiekinney/status/1139636109585989632?ref_src=twsrc%5Etfw +[7]: https://twitter.com/SylvainNouts/status/1139637154731237376?ref_src=twsrc%5Etfw +[8]: https://twitter.com/A_Bowler2/status/1139648492953976832?ref_src=twsrc%5Etfw From 59583c878c23099d920fb1dbc27942d6d60cb0d0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 30 Jul 2019 09:01:24 +0800 Subject: [PATCH 188/951] translating --- ... a Free Alternative to Microsoft Office.md | 112 ------------------ ... a Free Alternative to Microsoft Office.md | 108 +++++++++++++++++ 2 files changed, 108 insertions(+), 112 deletions(-) delete mode 100644 sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md create mode 100644 translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md diff --git a/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md b/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md deleted file mode 100644 index d7ea912438..0000000000 --- a/sources/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (WPS Office on Linux is a Free Alternative to Microsoft Office) -[#]: via: (https://itsfoss.com/wps-office-linux/) -[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) - -WPS Office on Linux is a Free Alternative to Microsoft Office -====== - -_**If you are looking for a free alternative of Microsoft Office on Linux, WPS Office is one of the best choice. It’s free to use and offers compatibility with MS Office document formats.**_ - -[WPS Office][1] is a cross-platform office productivity suite. It is light and fully compatible with Microsoft Office, Google Docs/Sheets/Slide and Adobe PDF. - -For many users, WPS Office feels intuitive and capable enough to meet their needs. It has gained popularity because of its closeness to Microsoft Office, both in terms of looks and compatibility. - -![WPS Office 2019 All In One Mode][2] - -WPS office is created by Kingsoft Corporation based in China. For Windows users, WPS Office has both free and premium versions. For Linux users, WPS Office is available for free through its [community project][3]. - -Non-FOSS Alert! - -WPS Office is not an open source software. We have covered it here because it’s available for free for Linux users and at times, we cover software created for Linux even if they are not open source. - -### WPS Office on Linux - -![WPS Office in Linux | Image Credit: Ubuntu Handbook][4] - -WPS Office has four main components: - - * WPS Writer - * WPS Presentation - * WPS Spreadsheet - * WPS PDF - - - -WPS Office is fully compatible with MS Office and more, supporting .doc, .docx, .dotx, .ppt, .pptx, .xls, .xlsx, .docm, .dotm, .xml, .txt, .html, .rtf (and others), as well as its own format (.wps, .wpt). It also includes Microsoft fonts by default (to ensure compatibility), can export PDFs and provides spell checking capabilities in more than 10 languages. - -However, it didn’t do very well with ODT, ODP and other open document formats. - -All three main WPS Office applications feature a very similar interface to Microsoft Office, with the same Ribbon UI. Although there are minor differences, the usage remains relatively the same. You can easily clone any Microsoft Office/LibreOffice document using WPS Office. - -![WPS Office Writer][5] - -The only thing you might dislike are some of the default styling settings (some headers having a lot of space beneath them etc.), but these can be easily tweaked. - -[][6] - -Suggested read  WPS Office: Microsoft Office Clone For Ubuntu! - -By default, WPS saves files in .docx, .pptx and .xlsx file types. You can also save documents to the **[WPS Cloud][7]** and collaborate on them with others. Another nice addition is the possibility to download a great number of templates from [here][8]. - -### Install WPS Office on Linux - -WPS provides DEB and RPM installer files for Linux distributions. This makes installing WPS Office an easy process if you use Debian/Ubuntu or Fedora based distributions. - -You can download WPS for Linux from its download section: - -[Download WPS Office for Linux][9] - -Scroll down and you’ll find a link to the package for the latest version: - -![WPS Office Download][10] - -Download the appropriate file for your distribution. [Installing applications from DEB][11] or RPM file is as easy as double clicking on them. Doing so will open up a Software Center instance providing you the option to install the package: - -![WPS Office Install Package][12] - -After a few seconds, the application should successfully install on your system! - -You can now search for **WPS** in the Applications Menu and find all applications found in the WPS Office Suite: - -![WPS Applications Menu][13] - -**Do you use WPS Office or something else?** - -There are other [open source alternatives to Microsoft Office][14] but they have poor compatibility with the MS Office. - -Personally, I prefer LibreOffice but you have to work considerably with Microsoft Office, you may try WPS Office on Linux. It looks similar to MS Office and has good compatibility with MS document formats. It’s free on Linux so you don’t have to worry about Office 365 subscription as well. - -What office suite do you use on your system? Have you ever used WPS Office on Linux? How was/is your experience with it? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/wps-office-linux/ - -作者:[Sergiu][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/sergiu/ -[b]: https://github.com/lujun9972 -[1]: https://www.wps.com/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps2019-all-in-one-mode.png?resize=800%2C526&ssl=1 -[3]: http://wps-community.org/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-2019-Linux.jpg?resize=800%2C450&ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-office-writer.png?resize=800%2C454&ssl=1 -[6]: https://itsfoss.com/wps-office-microsoft-office-clone-for-ubuntu/ -[7]: https://account.wps.com/?cb=https%3A%2F%2Fdrive.wps.com%2F -[8]: https://template.wps.com/ -[9]: http://wps-community.org/downloads -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_download.jpg?fit=800%2C413&ssl=1 -[11]: https://itsfoss.com/install-deb-files-ubuntu/ -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_install_package.png?fit=800%2C719&ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_applications_menu.jpg?fit=800%2C355&ssl=1 -[14]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ diff --git a/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md b/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md new file mode 100644 index 0000000000..b1f15f0f94 --- /dev/null +++ b/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md @@ -0,0 +1,108 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (WPS Office on Linux is a Free Alternative to Microsoft Office) +[#]: via: (https://itsfoss.com/wps-office-linux/) +[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) + +Linux 上的 WPS Office 是 Microsoft Office 的免费替代品 +====== + +_ **如果你在寻找 Linux 上免费的 Microsoft Office 替代品,那么 WPS Office 是最佳选择之一。它可以免费使用,并兼容 MS Office 文档格式。** _ + +[WPS Office][1] 是一个跨平台的办公生产力套件。它轻巧,并且与 Microsoft Office、Google Docs/Sheets/Slide 和 Adobe PDF 完全兼容。 + +对于许多用户而言,WPS Office 具有足够直观,并且能够满足他们的需求。由于它在外观和兼容性方面与 Microsoft Office 非常相似,因此广受欢迎。 + +![WPS Office 2019 All In One Mode][2] + +WPS office 由中国的金山公司创建。对于 Windows 用户而言,WPS Office 有免费版和高级版。对于 Linux 用户,WPS Office 可通过其[社区项目][3]免费获得。 + +非 FOSS 警告! + +WPS Office 不是一个开源软件。因为它对于 Linux 用户免费使用,我们已经在这介绍过它,有时我们也会介绍即使不是开源的 Linux 软件。 + +### Linux 上的 WPS Office + +![WPS Office in Linux | Image Credit: Ubuntu Handbook][4] + +WPS Office 有四个主要组件: + + * WPS 文字 + * WPS 演示 + * WPS 表格 + * WPS PDF + + + +WPS Office 与 MS Office 完全兼容,支持.doc、.docx、.dotx、.ppt、.pptx、.xls、.xlsx、.docm、.dotm、.xml、.txt、.html、.rtf (等其他),以及它自己的格式(.wps、.wpt)。它还默认包含 Microsoft 字体(以确保兼容性),它可以导出 PDF 并提供超过 10 种语言的拼写检查功能。 + +但是,它在 ODT、ODP 和其他开放文档格式方面表现不佳。 + +三个主要的 WPS Office 应用都有与 Microsoft Office 非常相似的界面,都有相同的 Ribbon UI。尽管存在细微差别,但使用仍然相对一致。你可以使用 WPS Office 轻松克隆任何 Microsoft Office/LibreOffice 文档。 + + +![WPS Office Writer][5] + +你可能唯一不喜欢的是一些默认的样式设置(一些标题下面有很多空间等),但这些可以很容易地调整。 + +默认情况下,WPS 以 .docx、.pptx 和 .xlsx 文件类型保存文件。你还可以将文档保存到 **[WPS 云][7]**中并与他人协作。另一个不错的功能是能从[这里][8]下载大量模板。 + +### 在 Linux 上安装 WPS Office + +WPS 为 Linux 发行版提供 DEB 和 RPM 安装程序。如果你使用的是 Debian/Ubuntu 或基于 Fedora 的发行版,那么安装 WPS Office 就简单了。 + +你可以在下载标签那下载Linux 中的 WPS + +[Download WPS Office for Linux][9] + +向下滚动,你将看到最新版本包的链接: + +![WPS Office Download][10] + +下载适合你发行版的文件。 只需双击 DEB 或者 RPM 就能[安装它们][11]。这会打开软件中心,你将看到安装选项: + +![WPS Office Install Package][12] + +几秒钟后,应用应该成功安装到你的系统上了! + +你现在可以在“应用程序”菜单中搜索 **WPS**,查找 WPS Office 套件中所有的应用: + +![WPS Applications Menu][13] + +**你是否使用 WPS Office 或其他软件?** + +还有其他 [Microsoft Office 的开源替代方案][14]但它们与 MS Office 的兼容性很差。 + +就个人而言,我更喜欢 LibreOffice,但你必须要用到 Microsoft Office,你可以尝试在 Linux 上使用 WPS Office。它看起来和 MS Office 类似,并且与 MS 文档格式具有良好的兼容性。它在 Linux 上是免费的,因此你也不必担心 Office 365 订阅。 + +你在系统上使用什么办公套件?你曾经在 Linux 上使用过 WPS Office 吗?你的体验如何? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/wps-office-linux/ + +作者:[Sergiu][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/sergiu/ +[b]: https://github.com/lujun9972 +[1]: https://www.wps.com/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps2019-all-in-one-mode.png?resize=800%2C526&ssl=1 +[3]: http://wps-community.org/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-2019-Linux.jpg?resize=800%2C450&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-office-writer.png?resize=800%2C454&ssl=1 +[7]: https://account.wps.com/?cb=https%3A%2F%2Fdrive.wps.com%2F +[8]: https://template.wps.com/ +[9]: http://wps-community.org/downloads +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_download.jpg?fit=800%2C413&ssl=1 +[11]: https://itsfoss.com/install-deb-files-ubuntu/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_install_package.png?fit=800%2C719&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_applications_menu.jpg?fit=800%2C355&ssl=1 +[14]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ From 66ef899599bb94512afe0e45f806a1698ae670d7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 30 Jul 2019 09:08:02 +0800 Subject: [PATCH 189/951] translating --- ...0706 Install NetData Performance Monitoring Tool On Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md b/sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md index a0fa775728..cbd62e05a9 100644 --- a/sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md +++ b/sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 5c800845d5ac5e1e55f520d7a90b1aa17df05a2d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 30 Jul 2019 10:28:24 +0800 Subject: [PATCH 190/951] Rename sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md to sources/talk/20190729 Do you prefer a live demo to be perfect or broken.md --- .../20190729 Do you prefer a live demo to be perfect or broken.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190729 Do you prefer a live demo to be perfect or broken.md (100%) diff --git a/sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md b/sources/talk/20190729 Do you prefer a live demo to be perfect or broken.md similarity index 100% rename from sources/tech/20190729 Do you prefer a live demo to be perfect or broken.md rename to sources/talk/20190729 Do you prefer a live demo to be perfect or broken.md From abe4129c325e4c44416468a54290e1b60269158d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 30 Jul 2019 10:31:03 +0800 Subject: [PATCH 191/951] =?UTF-8?q?Rename=20sources/tech/20190730=20Is=20T?= =?UTF-8?q?his=20the=20End=20of=20Floppy=20Disk=20in=20Linux-=20Linus=20To?= =?UTF-8?q?rvalds=20Marks=20Floppy=20Disks=20=E2=80=98Orphaned.md=20to=20s?= =?UTF-8?q?ources/talk/20190730=20Is=20This=20the=20End=20of=20Floppy=20Di?= =?UTF-8?q?sk=20in=20Linux-=20Linus=20Torvalds=20Marks=20Floppy=20Disks=20?= =?UTF-8?q?=E2=80=98Orphaned.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md (100%) diff --git a/sources/tech/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md similarity index 100% rename from sources/tech/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md rename to sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md From db2a8467763a16fc125778b138d094b7ccc3a3c9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Jul 2019 10:58:45 +0800 Subject: [PATCH 192/951] PRF @geekpi --- ... enable DNS-over-HTTPS (DoH) in Firefox.md | 62 ++++++------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md b/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md index 9f4e00f905..f921204798 100644 --- a/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md +++ b/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to enable DNS-over-HTTPS (DoH) in Firefox) @@ -10,9 +10,7 @@ 如何在 Firefox 中启用 DNS-over-HTTPS(DoH) ====== -DNS-over-HTTPS(DoH)协议目前是谈论的焦点,Firefox 是唯一支持它的浏览器。 - -但是,Firefox 默认不启用此功能,用户必须经历许多步骤并修改多个设置才能启动并运行 DoH。 +DNS-over-HTTPS(DoH)协议目前是谈论的焦点,Firefox 是唯一支持它的浏览器。但是,Firefox 默认不启用此功能,用户必须经历许多步骤并修改多个设置才能启动并运行 DoH。 在开始如何在 Firefox 中启用 DoH 支持的分步教程之前,让我们先描述它的原理。 @@ -20,76 +18,56 @@ DNS-over-HTTPS(DoH)协议目前是谈论的焦点,Firefox 是唯一支持 DNS-over-HTTPS 协议通过获取用户在浏览器中输入的域名,并向 DNS 服务器发送查询,以了解托管该站点的 Web 服务器的 IP 地址。 -这也是正常 DNS 的工作原理。但是,DoH 通过 443 端口的加密 HTTPS 连接接受 DNS 查询将其发送到兼容 DoH 的 DNS 服务器(解析器),而不是在 53 端口上发送纯文本。 +这也是正常 DNS 的工作原理。但是,DoH 通过 443 端口的加密 HTTPS 连接接受 DNS 查询将其发送到兼容 DoH 的 DNS 服务器(解析器),而不是在 53 端口上发送纯文本。这样,DoH 就会在常规 HTTPS 流量中隐藏 DNS 查询,因此第三方监听者将无法嗅探流量,并了解用户的 DNS 查询,从而推断他们将要访问的网站。 -这样,DoH 就会在常规 HTTPS 流量中隐藏 DNS 查询,因此第三方监听者将无法嗅探流量,并了解用户的 DNS 查询,从而推断他们将要访问的网站。 +此外,DNS-over-HTTPS 的第二个特性是该协议工作在应用层。应用可以带上内部硬编码的 DoH 兼容的 DNS 解析器列表,从而向它们发送 DoH 查询。这种操作模式绕过了系统级别的默认 DNS 设置,在大多数情况下,这些设置是由本地 Internet 服务提供商(ISP)设置的。这也意味着支持 DoH 的应用可以有效地绕过本地 ISP 流量过滤器并访问可能被本地电信公司或当地政府阻止的内容 —— 这也是 DoH 目前被誉为用户隐私和安全的福音的原因。 -此外,DNS-over-HTTPS 的第二个特性是协议工作在应用层。应用可以带上内部硬编码的 DoH 兼容的 DNS 解析器列表,从而向它们发送 DoH 查询。 - -这种操作模式绕过了系统级别的默认 DNS 设置,在大多数情况下,这些设置是由本地 Internet 服务提供商(ISP)设置的。 - -这也意味着支持 DoH 的应用可以有效地绕过本地 ISP 流量过滤器并访问可能被本地电信公司或当地政府阻止的内容 - 这也是 DoH 目前被誉为用户隐私和安全的福音的原因。 - -这是 DoH 在推出后不到两年的时间里获得相当大的普及的原因之一,同时也是一群[英国 ISP 因为 Mozilla 计划支持 DoH 协议提名它获得 2019 年的“互联网小人” (Internet Villian)][1]的,ISP 认为 DoH 协议会阻碍他们过滤不良流量的努力。 +这是 DoH 在推出后不到两年的时间里获得相当大的普及的原因之一,同时也是一群[英国 ISP 因为 Mozilla 计划支持 DoH 协议而提名它为 2019 年的“互联网恶棍” (Internet Villian)][1]的原因,ISP 认为 DoH 协议会阻碍他们过滤不良流量的努力。(LCTT 译注:后来这一奖项的提名被取消。) 作为回应,并且由于英国政府阻止访问侵犯版权内容的复杂情况,以及 ISP 自愿阻止访问虐待儿童网站的情况,[Mozilla 已决定不为英国用户默认启用此功能][2]。 -下面的分步指南将向英国和世界各地的 Firefox 用户展示如何立即启用该功能,而不用等到 Mozilla 将来启用它,如果它会这么做的话。在 Firefox 中有两种启用 DoH 支持的方法。 +下面的分步指南将向英国和世界各地的 Firefox 用户展示如何立即启用该功能,而不用等到 Mozilla 将来启用它 —— 如果它会这么做的话。在 Firefox 中有两种启用 DoH 支持的方法。 ### 方法 1:通过 Firefox 设置 -**步骤 1:**进入 Firefox 菜单,选择**工具**,然后选择**首选项**。 可选在 URL 栏中输入 **about:preferences**,然后按下回车。这将打开 Firefox 首选项部分。 +**步骤 1:**进入 Firefox 菜单,选择**工具**,然后选择**首选项**。 可选在 URL 栏中输入 `about:preferences`,然后按下回车。这将打开 Firefox 的首选项。 **步骤 2:**在**常规**中,向下滚动到**网络设置**,然后按**设置**按钮。 ![DoH section in Firefox settings][3] -图片:ZDNet - -**步骤3:**在弹出窗口中,向下滚动并选择“ **Enable DNS over HTTPS**”,然后配置你需要的 DoH 解析器。你可以使用内置的 Cloudflare 解析器(该公司与 Mozilla [达成协议][4],记录更少的 Firefox 用户数据),或者你可以在[这个列表][4]中选择一个。 +**步骤3:**在弹出窗口中,向下滚动并选择“**Enable DNS over HTTPS**”,然后配置你需要的 DoH 解析器。你可以使用内置的 Cloudflare 解析器(该公司与 Mozilla [达成协议][4],记录更少的 Firefox 用户数据),或者你可以在[这个列表][4]中选择一个。 ![DoH section in Firefox settings][6] -图片:ZDNet - ### 方法 2:通过 about:config -**步骤 1:**在 URL 栏中输入 **about:config**,然后按回车访问 Firefox 的隐藏配置面板。在这里,用户需要启用和修改三个设置。 - -**步骤 2:**第一个设置是 **network.trr.mode**。这打开了 DoH 支持。此设置支持四个值: - - * 0 - 标准 Firefox 安装中的默认值(当前为 5,表示禁用 DoH) -  * 1 - 启用 DoH,但 Firefox 依据哪个请求更快返回选择使用 DoH 或者常规 DNS -  * 2 - 启用 DoH,常规 DNS 作为备用 -  * 3 - 启用 DoH,并禁用常规 DNS -  * 5 - 禁用 DoH +**步骤 1:**在 URL 栏中输入 `about:config`,然后按回车访问 Firefox 的隐藏配置面板。在这里,用户需要启用和修改三个设置。 +**步骤 2:**第一个设置是 `network.trr.mode`。这打开了 DoH 支持。此设置支持四个值: +* `0` - 标准 Firefox 安装中的默认值(当前为 5,表示禁用 DoH) +* `1` - 启用 DoH,但 Firefox 依据哪个请求更快返回选择使用 DoH 或者常规 DNS +* `2` - 启用 DoH,常规 DNS 作为备用 +* `3` - 启用 DoH,并禁用常规 DNS +* `5` - 禁用 DoH 值为 2 工作得最好 ![DoH in Firefox][7] -图片:ZDNet - -**步骤3:**需要修改的第二个设置是 **network.trr.uri**。这是与 DoH 兼容的 DNS 服务器的 URL,Firefox 将向它发送 DoH DNS 查询。默认情况下,Firefox 使用 Cloudflare 的 DoH服务,地址是:。但是,用户可以使用自己的 DoH 服务器 URL。他们可以从[这个列表][8]中选择其中一个可用的。Mozilla 在 Firefox 中使用 Cloudflare 的原因是因为与这家公司[达成了协议][4],之后 Cloudflare 将收集来自 Firefox 用户的 DoH 查询的非常少的数据。 +**步骤3:**需要修改的第二个设置是 `network.trr.uri`。这是与 DoH 兼容的 DNS 服务器的 URL,Firefox 将向它发送 DoH DNS 查询。默认情况下,Firefox 使用 Cloudflare 的 DoH服务,地址是:。但是,用户可以使用自己的 DoH 服务器 URL。他们可以从[这个列表][8]中选择其中一个可用的。Mozilla 在 Firefox 中使用 Cloudflare 的原因是因为与这家公司[达成了协议][4],之后 Cloudflare 将收集来自 Firefox 用户的 DoH 查询的非常少的数据。 [DoH in Firefox][9] -图片:ZDNet - -**步骤4:**第三个设置是可选的,你可以跳过此设置。 但是如果设置不起作用,你可以使用此作为步骤 3 的备用。该选项名为 **network.trr.bootstrapAddress**,它是一个输入字段,用户可以输入步骤 3 中兼容 DoH 的 DNS 解析器的 IP 地址。对于 Cloudflare,它是 1.1.1.1。 对于 Google 服务,它是 8.8.8.8。 如果你使用了另一个 DoH 解析器的 URL,如果有必要的话,你需要追踪那台服务器的 IP 地址并输入。 +**步骤4:**第三个设置是可选的,你可以跳过此设置。 但是如果设置不起作用,你可以使用此作为步骤 3 的备用。该选项名为 `network.trr.bootstrapAddress`,它是一个输入字段,用户可以输入步骤 3 中兼容 DoH 的 DNS 解析器的 IP 地址。对于 Cloudflare,它是 1.1.1.1。 对于 Google 服务,它是 8.8.8.8。 如果你使用了另一个 DoH 解析器的 URL,如果有必要的话,你需要追踪那台服务器的 IP 地址并输入。 ![DoH in Firefox][10] -图片:ZDNet - 通常,在步骤 3 中输入的 URL 应该足够了。 - -Settings should apply right away, but in case they don't work, give Firefox a restart. 设置应该立即生效,但如果它们不起作用,请重新启动 Firefox。 -文章来源:[Mozilla Wiki][11] +文章信息来源:[Mozilla Wiki][11] -------------------------------------------------------------------------------- @@ -99,13 +77,13 @@ via: https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-firefox/ 作者:[Catalin Cimpanu][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://www.zdnet.com/meet-the-team/us/catalin.cimpanu/ [b]: https://github.com/lujun9972 -[1]: https://www.zdnet.com/article/uk-isp-group-names-mozilla-internet-villain-for-supporting-dns-over-https/ +[1]: https://linux.cn/article-11068-1.html [2]: https://www.zdnet.com/article/mozilla-no-plans-to-enable-dns-over-https-by-default-in-the-uk/ [3]: https://zdnet1.cbsistatic.com/hub/i/2019/07/07/df30c7b0-3a20-4de7-8640-3dea6d249a49/121bd379b6232e1e2a97c35ea8c7764e/doh-settings-1.png [4]: https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/privacy-policy/firefox/ From bc12bd98c20eeb456c733fb6778c0d24ad23bd1b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Jul 2019 10:59:20 +0800 Subject: [PATCH 193/951] PUB @geekpi https://linux.cn/article-11163-1.html --- .../20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md (98%) diff --git a/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md b/published/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md similarity index 98% rename from translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md rename to published/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md index f921204798..7a4e915b9e 100644 --- a/translated/tech/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md +++ b/published/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11163-1.html) [#]: subject: (How to enable DNS-over-HTTPS (DoH) in Firefox) [#]: via: (https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-firefox/) [#]: author: (Catalin Cimpanu https://www.zdnet.com/meet-the-team/us/catalin.cimpanu/) From f471fa0a35ff55eb3f31f8a670c40ef1c4662cfe Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Jul 2019 15:41:54 +0800 Subject: [PATCH 194/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @canhetingsky 恭喜你完成了第一篇翻译。但是在使用翻译工具辅助的时候,还需要自己审阅几遍译文,重新润色和理解。 --- ...play old-school games on a Raspberry Pi.md | 114 +++++++++--------- 1 file changed, 59 insertions(+), 55 deletions(-) diff --git a/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md b/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md index 1c861f67d3..f9a55eda13 100644 --- a/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md +++ b/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md @@ -1,145 +1,149 @@ -在树莓派上玩老式游戏的 5 种方法 +在树莓派上玩怀旧游戏的 5 种方法 ====== -使用这些用于树莓派的开源平台来重温游戏的黄金时代。 +> 使用这些用于树莓派的开源平台来重温游戏的黄金时代。 -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/arcade_game_gaming.jpg?itok=84Rjk_32) +![](https://d3avoj45mekucs.cloudfront.net/rojakdaily/media/jessica-chua/lifestyle/retro%20gaming%20comeback/retro-video-game-event.jpg) -他们不像过去那样制造他们,是吗?我指的是电子游戏。 +他们使它们不像过去那样子了,对吧?我是说,电子游戏。 -当然,现在的设备有点普通。赛达尔公主在过去每个方向有 16 个像素,现在她头上的每根头发都有足够的图像处理能力。今天的处理器可以在一场不费吹灰之力的战斗中打败 1988 年的处理器。 +当然,现在的设备更强大了。赛达尔公主Princess Zelda在过去每个边只有 16 个像素,而现在的图像处理能力足够处理她头上的每根头发。今天的处理器打败 1988 年的处理器简直不费吹灰之力。 但是你知道缺少什么吗?乐趣。 -你已经有了一个标准和一个按钮来学习只是为了完成教程任务。可能也有故事情节。你不应该需要一个故事情节来杀死坏人。你需要的只是跳跃和射击。因此,毫不奇怪,树莓派最持久的流行用途之一是重新体验 80 年代和 90 年代早期 8 位和 16 位游戏的黄金时代。但从哪里开始呢? +你有数之不尽的游戏,按下一个按钮就可以完成教程任务。可能有故事情节,当然杀死坏蛋也可以不需要故事情节,你需要的只是跳跃和射击。因此,毫不奇怪,树莓派最持久的流行用途之一就是重温上世纪八九十年代的 8 位和 16 位游戏的黄金时代。但从哪里开始呢? -在树莓派上有几种方法可以玩老式游戏。每一种都有自己的优点和缺点,我将在这里讨论。 +在树莓派上有几种方法可以玩怀旧游戏。每一种都有自己的优点和缺点,我将在这里讨论这些。 -### Retropie +### RetroPie -[Retropie][1] 可能是树莓派上最受欢迎的复古游戏平台。它是一个可靠的万能选手,是模拟经典桌面和控制台游戏系统的绝佳选择。 +[RetroPie][1] 可能是树莓派上最受欢迎的复古游戏平台。它是一个可靠的万能选手,是模拟经典桌面和控制台游戏系统的绝佳选择。 -#### 它是什么? +![](https://retropie.org.uk/wp-content/uploads/2016/04/Amiga_Gameplay_2.png) -Retropie 可以在 [Raspbian][2] 上运行。如果你愿意,它也可以安装在现有的 Raspbian 映像上。它使用 [EmulationStation][3] 作为开源仿真器库(包括 [Libretro][4] 仿真器)的图形前端。 +#### 介绍 -不过,玩游戏并不需要理解上面任何一个词。 +RetroPie 构建在 [Raspbian][2] 上运行。如果你愿意,它也可以安装在现有的 Raspbian 镜像上。它使用 [EmulationStation][3] 作为开源仿真器库(包括 [Libretro][4] 仿真器)的图形前端。 + +不过,你要玩游戏其实并不需要理解上面的任何一个词。 #### 它有什么好处 -入门很容易。你需要做的就是将映像刻录到 SD 卡,配置你的控制器,复制游戏,然后开始杀死坏人。 +入门很容易。你需要做的就是将镜像刻录到 SD 卡,配置你的控制器、复制游戏,然后开始杀死坏蛋。 -庞大的用户群意味着那里有大量的支持和信息,以及活跃的在线社区可以求助问题。 +它的庞大用户群意味着有大量的支持和信息,活跃的在线社区也可以求助问题。 -除了随 Retropie 映像一起安装的仿真器之外,还有一个可以从包管理器安装的庞大的仿真器库,并且它一直在增长。Retropie 还提供用户友好的菜单系统来管理,节省您的时间。 +除了随 RetroPie 镜像一起安装的仿真器之外,还有一个可以从包管理器安装的庞大的仿真器库,并且它一直在增长。RetroPie 还提供了用户友好的菜单系统来管理这些,可以节省你的时间。 -从 Retropie 菜单中,可以轻松添加 Kodi 和 Raspbian 桌面,它随 Chromium 网络浏览器一起提供。这意味着您的复古游戏装备也适用于家庭影院,[YouTube](https://www.youtube.com/),[SoundCloud](https://soundcloud.com/) 以及所有其它“休息室电脑”的产品。 +从 RetroPie 菜单中可以轻松添加 Kodi 和配备了 Chromium 浏览器的 Raspbian 桌面。这意味着你的这套复古游戏装备也适于作为家庭影院、[YouTube][5]、[SoundCloud][6] 以及所有其它“休息室电脑”产品。 -Retropie 还有许多其它自定义选项:你可以更改菜单中的图形,为不同的模拟器设置不同的控制板配置,使你的树莓派文件系统的所有内容对你的本地 Windows 网络可见。 +RetroPie 还有许多其它自定义选项:你可以更改菜单中的图形,为不同的模拟器设置不同的控制手柄配置,使你的树莓派文件系统的所有内容对你的本地 Windows 网络可见等等。 -Retropie 建立在 Raspbian 上,这意味着你可以使用树莓派最受欢迎的操作系统进行探索。你所发现的大多数树莓派项目和教程都是为 Raspbian 编写的,因此可以轻松地自定义和安装新内容。我已经使用我的 Retropie 装备作为无线桥接器,在上面安装了 MIDI 合成器,自学了一些 Python,更重要的是 ,所有这些都没有影响它作为游戏机的用途。 +RetroPie 建立在 Raspbian 上,这意味着你可以探索这个树莓派最受欢迎的操作系统。你所发现的大多数树莓派项目和教程都是为 Raspbian 编写的,因此可以轻松地自定义和安装新内容。我已经使用我的 RetroPie 装备作为无线桥接器,在上面安装了 MIDI 合成器,自学了一些 Python,更重要的是,所有这些都没有影响它作为游戏机的用途。 #### 它有什么不太好的 -Retropie 的简单安装和易用性在某种程度上是一把双刃剑。你可以玩 Retropie 很长时间,甚至不需要学习像`sudo apt-get` 这样简单的东西,但这意味着你正在错过了很多树莓派的体验。 +RetroPie 的安装简单和易用性在某种程度上是一把双刃剑。你可以在 RetroPie 上玩了很长时间,而甚至没有学习过哪怕像 `sudo apt-get` 这样简单的东西,但这也意味着你错过了很多树莓派的体验。 -它不一定是这样的; 当你需要它时,命令行仍然存在于打字机的罩子下,但是也许用户与 Bash shell 有点隔离,而 Bash shell 最终并没有看上去那么可怕。Retropie 的主菜单只能通过控制键盘操作,当你没有插入一个键盘时,这可能很烦人,因为你一直在使用系统进行游戏以外的事情。 +但不一定必须如此;当你需要时,命令行仍然存在于底层,但是也许用户与 Bash shell 有点隔离,而使它最终并没有看上去那么可怕、另外,RetroPie 的主菜单只能通过控制手柄操作,当你没有接入手柄时,这可能很烦人,因为你一直将该系统用于游戏之外的事情。 #### 它适用于谁? -任何想直接进入游戏领域的人,任何想拥有最大最好的模拟器库的人,以及任何想在不玩游戏的时候开始探索 Linux 的人。 +任何想直接玩一些游戏的人,任何想拥有最大、最好的模拟器库的人,以及任何想在不玩游戏的时候开始探索 Linux 的人。 ### Recalbox -[Recalbox][7] 是树莓派的一个较新的开源模拟器套件。它还支持其它基于 ARM 的小型计算机。 +[Recalbox][7] 是一个较新的树莓派开源模拟器套件。它还支持其它基于 ARM 的小型计算机。 -#### 它是什么? +![](https://www.recalbox.com/images/features/4playermodo_hu5438825b9b6d1014226d20d231e650c2_230970_500x0_resize_q75_box.jpeg) -与 Retropie 一样, Recalbox 基于 EmulationStation 和 Libretro 。它的不同之处在于它不是基于Raspbian 构建的,而是基于它自己的 Linux:RecalboxOS。 +#### 介绍 + +与 Retropie 一样, Recalbox 基于 EmulationStation 和 Libretro。它的不同之处在于它不是基于 Raspbian 构建的,而是基于它自己的 Linux 发行版:RecalboxOS。 #### 它有什么好处 -Recalbox 的设置比 Retropie 更容易。你甚至不需要对 SD 卡进行映像处理; 只需复制一些文件即可。它还为一些游戏控制器提供开箱即用的支持,让你更快地达到1级。Kodi 是预装了。这是一个现成的游戏和媒体平台。 +Recalbox 的设置比 RetroPie 更容易。你甚至不需要做 SD 卡镜像;只需复制一些文件即可。它还为一些游戏控制器提供开箱即用的支持,可以让你更快地开始游戏。它预装了 Kodi。这是一个现成的游戏和媒体平台。 #### 它有什么不太好的 -Recalbox 比 Retropie 拥有更少的仿真器,更少的自定义选项和更小的用户社区。 +Recalbox 比 RetroPie 拥有更少的仿真器、更少的自定义选项和更小的用户社区。 -你的 Recalbox 装备可能总是用于模拟器和 Kodi,与安装时相同。如果你想深入了解 Linux,你可能需要为 Raspbian 提供一个新的SD卡。 +你的 Recalbox 装备可能一直用于模拟器和 Kodi,安装成什么样就是什么样。如果你想深入了解 Linux,你可能需要为 Raspbian 提供一个新的 SD 卡。 #### 它适用于谁? -如果你想要绝对最简单的复古游戏体验,并且可以在没有一些更加模糊的游戏平台的情况下愉快地使用,或者如果你因为做一些技术性的想法而感到害怕(并且没有兴趣从中发展出来),那么 Recalbox 非常棒 。 +如果你想要绝对简单的复古游戏体验,并且不想玩一些比较少见的游戏平台模拟器,或者你害怕一些技术性工作(也没有兴趣去做),那么 Recalbox 非常适合你。 -对于大多数 opensource.com 读者来说,Recalbox 可能最方便推荐给你那些不太技术的朋友或亲戚。它超级简单的设置和整体缺乏选项甚至可以帮助你避免不得不帮助他们。 +对于大多数读者来说,Recalbox 可能最适合推荐给你那些不太懂技术的朋友或亲戚。它超级简单的设置和几乎没什么选项甚至可以让你免去帮助他们解决问题。 -### 制作你自己的 +### 做个你自己的 -好的,如你一直在关注的话,你可能已经注意到 Retropie 和 Recalbox 都是由许多相同的开源组件构建的。那么是什么阻止你自己把它们放在一起呢? +好,你可能已经注意到 Retropie 和 Recalbox 都是由许多相同的开源组件构建的。那么为什么不自己把它们组合在一起呢? -#### 它是什么? +#### 介绍 -无论你想要什么,宝贝。开源软件的本质意味着你可以使用现有的模拟器套件作为起点,或者随意使用它们。 +无论你想要的是什么,开源软件的本质意味着你可以使用现有的模拟器套件作为起点,或者随意使用它们。 #### 它有什么好处 -如果你有自己的自定义界面,我想除了卷起袖子去做,别无事可做。这也是安装仿真器的一种方法,仿真器还没有完全进入到 Retropie 中,例如 [BeebEm](http://www.mkw.me.uk/beebem/) 或 [ArcEm](http://arcem.sourceforge.net/)。 +如果你想有自己的自定义界面,我想除了亲自动手别无它法。这也是安装在 RetroPie 中没有的仿真器的方法,例如 [BeebEm][8]) 或 [ArcEm][9]。 #### 它有什么不太好的 -嗯,工作量有点大,不是吗? +嗯,工作量有点大。 #### 它适用于谁? -黑客,修改者,开发者,经验丰富的业余爱好者等。 +喜欢鼓捣的人,有动手能力的人,开发者,经验丰富的业余爱好者等。 -## 本机 RISC 操所系统 游戏 +### 原生 RISC OS 游戏体验 -现在有一匹黑马:[RISC 操作系统](https://opensource.com/article/18/7/gentle-intro-risc-os),ARM设备的原始操作系统。 +现在有一匹黑马:[RISC OS][10],它是 ARM 设备的原始操作系统。 -#### 它是什么? +#### 介绍 -在ARM成为世界上最受欢迎的 CPU 架构之前,它最初是作为 Acorn Archimedes 的核心而构建的。现在这是一种被遗忘的野兽,但几年来它作为世界上最强大的台式计算机已经领先了很多年,并且吸引了大量的游戏开发。 +在 ARM 成为世界上最受欢迎的 CPU 架构之前,它最初是作为 Acorn Archimedes 的处理器而开发的。现在看起来这像是一种被遗忘的野兽,但是那几年,它作为世界上最强大的台式计算机独领风骚了好几年,并且吸引了大量的游戏开发项目。 -因为树莓派中的 ARM 处理器是Archimedes 的曾孙,我们仍然可以在其上安装 RISC OS,只要做一点工作,就可以让这些游戏运行起来。这与我们到目前为止所涵盖的仿真器选项不同,因为我们在操作系统和 CPU 架构上玩我们的游戏。 +树莓派中的 ARM 处理器是 Archimedes 的曾孙辈的 CPU,所以我们仍然可以在其上安装 RISC OS,只要做一点工作,就可以让这些游戏运行起来。这与我们到上面所介绍的仿真器方式不同,我们是在玩为该操作系统和 CPU 架构开发的游戏。 #### 它有什么好处 -这是 RISC 操作系统的完美介绍。这绝对是操作系统的瑰宝,非常值得一试。 +这是 RISC OS 的完美展现,这绝对是操作系统的瑰宝,非常值得一试。 -事实上,你使用的操作系统和以前的几乎相同,以加载和玩你的游戏,这使得你的复古游戏装备成为一个时间机器。这无疑为项目增添了一些魅力和复古价值。 +事实上,你使用的是和以前几乎相同的操作系统来加载和玩你的游戏,这使得你的复古游戏装备像是一个时间机器一样,这无疑为该项目增添了一些魅力和复古价值。 -有一些精彩的游戏只在 Archimedes 上发布。Archimedes 的巨大硬件优势也意味着它通常拥有许多多平台游戏的最佳图形和最流畅的游戏体验。许多游戏的版权持有者非常慷慨,可以合法地免费下载。 +有一些精彩的游戏只在 Archimedes 上发布过。Archimedes 的巨大硬件优势也意味着它通常拥有许多多平台游戏大作的最佳图形和最流畅的游戏体验。这类游戏的版权持有者非常慷慨,可以合法地免费下载它们。 #### 它有什么不太好的 -一旦你安装了 RISC 操作系统,它仍然需要一些努力才能让游戏运行起来。这是 [入门指南](https://blog.dxmtechsupport.com.au/playing-badass-acorn-archimedes-games-on-a-raspberry-pi/)。 +安装了 RISC OS 之后,它仍然需要一些努力才能让游戏运行起来。这是 [入门指南][11]。 -对于休息室来说,这绝对不是一个很好的全方位服务。没有什么比 [Kodi](https://kodi.tv/) 更好的了。有一个网络浏览器,[NetSurf](https://www.netsurf-browser.org/),但它正在努力赶上现代网络。你将不会像使用模拟器套件那样获得要播放的标题范围。RISC OS Open 是业余爱好者可以免费下载和使用的,而且很多源代码已经开放。但尽管有这个名字,它并不是 100% 的开源操作系统。 +对于休息室来说,这绝对不是一个很好的全能选手。没有什么比 [Kodi][12] 更好的了。它有一个网络浏览器 [NetSurf][13],但它在支持现代 Web 方面还需要一些努力。你不会像使用模拟器套件那样得到大量可以玩的游戏。RISC OS Open 对于爱好者来说可以免费下载和使用,而且很多源代码已经开源,尽管由于这个名字,它不是一个 100% 的开源操作系统。 #### 它适用于谁? -这一款专为追求新奇的人、绝对怀旧的人、想要探索80年代有趣的操作系统的人、那些对过去的Acorn机器怀旧的人,以及想要一个完全不同的怀旧游戏项目的人而设计。 +这是专为追求新奇的人,绝对怀旧的人,想要探索一个来自上世纪 80 年代的有趣的操作系统的人,怀旧过去的 Acorn 机器的人,以及想要一个完全不同的怀旧游戏项目的人而设计的。 -### 命令行游戏 +### 终端游戏 -您是否真的需要安装模拟器或异国的操作系统才能重温辉煌的日子?为什么不从命令行安装一些原生 Linux 游戏? +你是否真的需要安装模拟器或者一个异域风情的操作系统才能重温辉煌的日子?为什么不从命令行安装一些原生 Linux 游戏呢? -#### 它是什么? +#### 介绍 -有一系列原生 Linux 游戏经过测试可以在 [树莓派](https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794) 上运行。 +有一系列原生的 Linux 游戏经过测试可以在 [树莓派][14] 上运行。 #### 它有什么好处 -你可以使用命令行从程序包安装其中的大部分,然后开始玩。容易的。如果你已经启动并运行了 Raspbian,那么它可能是你运行游戏的最快途径。 +你可以使用命令行从程序包安装其中的大部分,然后开始玩。很容易。如果你已经有了一个跑起来的 Raspbian,那么它可能是你运行游戏的最快途径。 #### 它有什么不太好的 -严格来说,这并不是真正的复古游戏。Linux诞生于 1991 年,花了一段时间才能成为一个游戏平台。这不是经典的 8 位和 16 位时代的游戏;这些是后来构建的端口和受复古影响的游戏。 +严格来说,这并不是真正的复古游戏。Linux 诞生于 1991 年,过了一段时间才成为了一个游戏平台。这些不是经典的 8 位和 16 位时代的游戏体验;后来有一些移植的游戏或受复古影响的游戏。 #### 它适用于谁? -如果你只是想找点乐子,这没问题。但如果你想重温真实的时代,那就不完全是这样了。 +如果你只是想找点乐子,这没问题。但如果你想重温过去,那就不完全是这样了。 -------------------------------------------------------------------------------- @@ -148,7 +152,7 @@ via: https://opensource.com/article/18/9/retro-gaming-raspberry-pi 作者:[James Mawson][a] 选题:[lujun9972](https://github.com/lujun9972) 译者:[canhetingsky](https://github.com/canhetingsky) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 559b3064794284d5a26bb200886d5a93b55b4488 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Jul 2019 15:43:12 +0800 Subject: [PATCH 195/951] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @canhetingsky 本文首发地址:https://linux.cn/article-11165-1.html 您的 LCTT 专页地址: https://linux.cn/lctt/canhetingsky 请注册领取 LCCN: https://lctt.linux.cn/ --- .../20180924 5 ways to play old-school games on a Raspberry Pi.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180924 5 ways to play old-school games on a Raspberry Pi.md (100%) diff --git a/translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md b/published/20180924 5 ways to play old-school games on a Raspberry Pi.md similarity index 100% rename from translated/tech/20180924 5 ways to play old-school games on a Raspberry Pi.md rename to published/20180924 5 ways to play old-school games on a Raspberry Pi.md From d9dd579b1440ae5f7910aa378c4cbc9004fb1aac Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Tue, 30 Jul 2019 21:45:00 +0800 Subject: [PATCH 196/951] Translating Continuous integration testing for the Linux kernel.md --- ...ntegration testing for the Linux kernel.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md index 7b7c5e33ea..5180a84cf5 100644 --- a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md @@ -28,37 +28,37 @@ Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14, 许多现代软件代码库都采用某种自动化 CI 测试,能够在提交进入代码存储库之前对其进行测试。这种自动化测试运行维护人员通过查看 CI 测试报告来发现软件质量问题已经大多数错误。一些更方便的项目,比如某个 python 库,附带的大量工具使得整个检查过程更简单。 -在任何测试之前都需要配置和编译 Linux。而这么做将耗费大量的时间和计算资源。此外,Linux 内核必需在虚拟机或者裸机上启动才能进行测试。访问某些体系结构需要额外的开销或者非常慢的仿真。因此,必需有人确定一组能够触发错误或者验证修复的测试组。 +在任何测试之前都需要配置和编译 Linux。而这么做将耗费大量的时间和计算资源。此外,Linux 内核必需在虚拟机或者裸机上启动才能进行测试。访问某些硬件架构需要额外的开销或者非常慢的仿真。因此,必需有人确定一组能够触发错误或者验证修复的测试组。 #### CKI 团队如何运作? -Red Hat 的 CKI 团队当前正追踪来自数个内部内核分支和[稳定内核分支树][3]等上游内核分支的更改。我们关注每个代码库的两类关键事件: +Red Hat 公司的 CKI 团队当前正追踪来自数个内部内核分支和[稳定内核分支树][3]等上游内核分支的更改。我们关注每个代码库的两类关键事件: 1. 当维护人员合并 PR 或者补丁时,代码库变化后的最终结果。 2. 当开发人员通过拼凑的或者稳定的补丁队列发起合并时。 -As these events occur, automation springs into action and [GitLab CI pipelines][4] begin the testing process. Once the pipeline runs [linting][5] scripts, merges any patches, and compiles the kernel for multiple architectures, the real testing begins. We compile kernels in under six minutes for four architectures and submit feedback to the stable mailing list usually in two hours or less. Over 100,000 kernel tests run each month and over 11,000 GitLab pipelines have completed (since January 2019). +当这些事件发生时,自动化工具开始执行,[GitLab CI 管道][4]开始进行测试。一旦管道开始执行 [linting][5] 脚本,合并每一个补丁,并为多种硬件架构编译内核,真正的测试便开始了。我们会在六分钟内完成四种硬件架构的内核编译工作,并且通常会在两个小时或更短的时间内将反馈提交到稳定邮件列表中。(自 2019 年 1 月起)每月执行超过 100,000 次内核测试,并有超过 11,000 个 GitLab 管道已经完成。 -Each kernel is booted on its native architecture, which includes: +每个内核都会在本地硬件架构上启动,其中包含: -● [aarch64][6]: 64-bit [ARM][7], such as the [Cavium (now Marvell) ThunderX][8]. +* [aarch64][6]:64-bit [ARM][7], 例如 [Cavium(当前是 Marvell)ThunderX][8]。 -● [ppc64/ppc64le][9]: Big and little endian [IBM POWER][10] systems. +* [ppc64/ppc64le][9]:大端和小端的 [IBM POWER][10] 系统。 -● [s390x][11]: [IBM Zseries][12] mainframes. +* [s390x][11]:[IBM Zseries][12] 大型机 -● [x86_64][13]: [Intel][14] and [AMD][15] workstations, laptops, and servers. +* [x86_64][13]:[Intel][14] 和 [AMD][15] 工作站,笔记本和服务器。 -Multiple tests run on these kernels, including the [Linux Test Project (LTP)][16], which contains a myriad of tests using a common test harness. My CKI team open-sourced over 44 tests with more on the way. +这些内核上运行了包括 [Linux 测试项目(LTP)][16]在内的多个测试,其中包括使用常用测试工具的大量测试。我们 CKI 团队开源了超过 44 个测试并将继续开源更多测试。 ### 参与其中 -The upstream kernel testing effort grows day-by-day. Many companies provide test output for various kernels, including [Google][17], Intel, [Linaro][18], and [Sony][19]. Each effort is focused on bringing value to the upstream kernel as well as each company’s customer base. +上游的内核测试工作日渐增多。包括[Google][17]、Intel、[Linaro][18] 和 [Sony][19] 在内的许多公司为各种内核提供测试输出。每一项工作都专注于为上游内核以及每个公司的客户群带来价值。 -If you or your company want to join the effort, please come to the [Linux Plumbers Conference 2019][20] in Lisbon, Portugal. Join us at the Kernel CI hackfest during the two days after the conference, and drive the future of rapid kernel testing. +如果你或者你的公司想要参与这一工作,请参加在葡萄牙里斯本举办的 [Linux Plumbers Conference 2019][20]。在会议结束后的两天加入我们的 Kernel CI hackfest 活动,并推动快速内核测试的发展。 -For more details, [review the slides][21] from my Texas Linux Fest 2019 talk. +更多详细信息,[参见][21]我在 Texas Linux Fest 2019 上的演讲。 -------------------------------------------------------------------------------- From 9442011a736a6dae0a128b6ffa0b1a6bc1105124 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Jul 2019 22:46:16 +0800 Subject: [PATCH 197/951] =?UTF-8?q?APL:20190730=20Is=20This=20the=20End=20?= =?UTF-8?q?of=20Floppy=20Disk=20in=20Linux-=20Linus=20Torvalds=20Marks=20F?= =?UTF-8?q?loppy=20Disks=20=E2=80=98Orphaned?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...isk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md index e8fc087743..1f2cc5e5bf 100644 --- a/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md +++ b/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 95b16c5ed34c3a50e2765c4050c2aca3701ef207 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Jul 2019 23:10:07 +0800 Subject: [PATCH 198/951] =?UTF-8?q?TSL&PRF:20190730=20Is=20This=20the=20En?= =?UTF-8?q?d=20of=20Floppy=20Disk=20in=20Linux-=20Linus=20Torvalds=20Marks?= =?UTF-8?q?=20Floppy=20Disks=20=E2=80=98Orphaned.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wxy --- ...s Torvalds Marks Floppy Disks ‘Orphaned.md | 76 ------------------- ...s Torvalds Marks Floppy Disks ‘Orphaned.md | 72 ++++++++++++++++++ 2 files changed, 72 insertions(+), 76 deletions(-) delete mode 100644 sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md create mode 100644 translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md diff --git a/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md deleted file mode 100644 index 1f2cc5e5bf..0000000000 --- a/sources/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks ‘Orphaned’) -[#]: via: (https://itsfoss.com/end-of-floppy-disk-in-linux/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks ‘Orphaned’ -====== - -_**In a recent commit to the Linux Kernel, Linus Torvalds marked the floppy disk drivers as orphaned. Could this be the beginning of the end of floppy disks in Linux?**_ - -Chances are that you haven’t seen a real floppy disk in years. And if you are looking for a computer with floppy drive, you may have to visit a museum. - -More than two decades ago, floppy disks were the popular medium for storing data and running operating systems on it. The [early Linux distributions][1] were ‘distributed’ using floppy disks. Floppy disks were also used extensively for saving and transferring data. - -Have you ever wondered why the save icons in many applications look like a floppy? Because it IS floppy disk. Floppy disks were popular for saving data and hence many applications used it as save icons and the tradition continues till date. - -![][2] - -Why am I talking about floppy disks today? Because Linus Torvalds has marked floppy drivers ‘orphaned’ in a commit to the Linux kernel code. - -### Floppy disk drivers marked ‘orphaned’ in Linux kernel - -As you can read in the [commit on the GitHub mirror][3], the developer Jiri doesn’t have a working computer with floppy drive anymore. Without the correct hardware, continuing the development won’t be possible for Jiri. And that’s why Torvalds marked it orphan - -> Actual working physical floppy hardware is getting hard to find, and while Willy was able to test this, I think the driver can be considered pretty much dead from an actual hardware standpoint. The hardware that is still sold seems to be mainly USB-based, which doesn’t use this legacy driver at all. - -![][4] - -### What does ‘orphan’ mean in Linux kernel? - -Orphan means that there are no developers able to or willing to support that part of code. - -An orphaned module will probably get deprecated and removed eventually if no one else comes forward to continue maintaining and developing it. - -[][5] - -Suggested read  Valve Annouces Linux Based Gaming Operating System: SteamOS - -### It’s not being removed immediately - -Torvalds notes that floppy drives are still used by various virtual environment emulators. So the floppy drivers won’t be discarded straightway. - -> The old floppy disk controller is still emulated in various VM environments, so the driver isn’t going away, but let’s see if anybody is interested to step up to maintain it. - -Why not just keep the floppy drive support in the kernel forever? It’s because this will pose a security threat. Even if there is no real computer using floppy drivers, the VMs still have it and this will leave the VMs vulnerable. - -### End of an era? - -Will this be the end of an era or will someone else come up and take the responsibility of keeping floppy support alive in Linux? Only time will tell. - -I don’t think there is any love lost here with floppy drives being orphaned in Linux kernel. - -I haven’t used a floppy disks in last fifteen years and I doubt many people either. What about you? Have you ever used a floppy disk? If yes, when was the last time you used it? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/end-of-floppy-disk-in-linux/ - -作者:[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/earliest-linux-distros/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/floppy-disk-icon-of-saving.png?resize=800%2C300&ssl=1 -[3]: https://github.com/torvalds/linux/commit/47d6a7607443ea43dbc4d0f371bf773540a8f8f4 -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/End-of-Floppy-in-Linux.png?resize=800%2C450&ssl=1 -[5]: https://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/ diff --git a/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md new file mode 100644 index 0000000000..a0344edbd8 --- /dev/null +++ b/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md @@ -0,0 +1,72 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks ‘Orphaned’) +[#]: via: (https://itsfoss.com/end-of-floppy-disk-in-linux/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Linux 中的软盘走向终结了吗?Torvalds 将软盘的驱动标记为“孤儿” +====== + +> 在 Linux 内核最近的提交当中,Linus Torvalds 将软盘的驱动程序标记为孤儿。这标志着软盘在 Linux 中步入结束了吗? + +有可能你很多年没见过真正的软盘了。如果你正在寻找带软盘驱动器的计算机,可能需要去博物馆里看看。 + +在二十多年前,软盘是用于存储数据和运行操作系统的流行介质。[早期的 Linux 发行版][1]使用软盘进行“分发”。软盘也广泛用于保存和传输数据。 + +你有没有想过为什么许多应用程序中的保存图标看起来像软盘?因为它就是软盘啊!软盘常用于保存数据,因此许多应用程序将其用作保存图标,并且这个传统一直延续至今。 + +![][2] + +今天我为什么要说起软盘?因为 Linus Torvalds 在一个 Linux 内核代码的提交里标记软盘的驱动程序为“孤儿”。 + +### 在 Linux 内核中被标记为“孤儿”的软盘驱动程序 + +正如你可以在 [GitHub 镜像上的提交][3]中看到的那样,开发人员 Jiri 不再使用带有软驱的工作计算机了。而如果没有正确的硬件,Jiri 将无法继续开发。这就是 Torvalds 将其标记为孤儿的原因。 + +> 越来越难以找到可以实际工作的软盘的物理硬件,虽然 Willy 能够对此进行测试,但我认为从实际的硬件角度来看,这个驱动程序几乎已经死了。目前仍然销售的硬件似乎主要是基于 USB 的,根本不使用这种传统的驱动器。 + +![][4] + +### “孤儿”在 Linux 内核中意味着什么? + +“孤儿”意味着没有开发人员能够或愿意支持这部分代码。如果没有其他人出现继续维护和开发它,孤儿模块可能会被弃用并最终删除。 + +[][5] + +### 它没有被立即删除 + +Torvalds 指出,各种虚拟环境模拟器仍在使用软盘驱动器。所以软盘的驱动程序不会被立即丢弃。 + +> 各种 VM 环境中仍然在仿真旧的软盘控制器,因此该驱动程序不会消失,但让我们看看是否有人有兴趣进一步维护它。 + +为什么不永远保持内核中的软盘驱动器支持呢?因为这将构成安全威胁。即使没有真正的计算机使用软盘驱动程序,虚拟机仍然拥有它,这将使虚拟机容易受到攻击。 + +### 一个时代的终结? + +这将是一个时代的结束还是会有其他人出现并承担起在 Linux 中继续维护软盘驱动程序的责任?只有时间会给出答案。 + +在 Linux 内核中,软盘驱动器成为孤儿我不觉得有什么可惜的。 + +在过去的十五年里我没有使用过软盘,我怀疑很多人也是如此。那么你呢?你有没有用过软盘?如果是的话,你最后一次使用它的时间是什么时候? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/end-of-floppy-disk-in-linux/ + +作者:[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://itsfoss.com/earliest-linux-distros/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/floppy-disk-icon-of-saving.png?resize=800%2C300&ssl=1 +[3]: https://github.com/torvalds/linux/commit/47d6a7607443ea43dbc4d0f371bf773540a8f8f4 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/End-of-Floppy-in-Linux.png?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/ From 6204a6ce6d9bf6cdde32fbba761978ab17368630 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Jul 2019 23:13:20 +0800 Subject: [PATCH 199/951] PUB @wxy https://linux.cn/article-11167-1.html --- ... Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md index a0344edbd8..7a4e3e0404 100644 --- a/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md +++ b/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11167-1.html) [#]: subject: (Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks ‘Orphaned’) [#]: via: (https://itsfoss.com/end-of-floppy-disk-in-linux/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) @@ -34,8 +34,6 @@ Linux 中的软盘走向终结了吗?Torvalds 将软盘的驱动标记为“ “孤儿”意味着没有开发人员能够或愿意支持这部分代码。如果没有其他人出现继续维护和开发它,孤儿模块可能会被弃用并最终删除。 -[][5] - ### 它没有被立即删除 Torvalds 指出,各种虚拟环境模拟器仍在使用软盘驱动器。所以软盘的驱动程序不会被立即丢弃。 From 1cd68606fd2ecfff06d8e6f2af857fd3b8b7bdc3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Jul 2019 00:11:31 +0800 Subject: [PATCH 200/951] PUB @wxy https://linux.cn/article-11167-1.html --- ... Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md (100%) diff --git a/translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/published/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md similarity index 100% rename from translated/talk/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md rename to published/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md From 7e6e8ac2e163e4752f8ee030fcb582dfb960e40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Wed, 31 Jul 2019 07:20:22 +0800 Subject: [PATCH 201/951] Translated --- ... to Debian 10 (Buster) via Command Line.md | 165 ------------------ ... to Debian 10 (Buster) via Command Line.md | 165 ++++++++++++++++++ 2 files changed, 165 insertions(+), 165 deletions(-) delete mode 100644 sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md create mode 100644 translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md diff --git a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md deleted file mode 100644 index 6c28cfb644..0000000000 --- a/sources/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md +++ /dev/null @@ -1,165 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line) -[#]: via: (https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/) -[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) - -How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line -====== - -Hello All!!!, Good to See you! So we saw how to install [Debian 10(Buster)][1] in the previous article. Today, we are going to learn how to upgrade from Debian 9 to Debian 10. Since we have already seen about Debian 10 and its features, let’s not go deep into it. But readers who didn’t have the chance to read that article, let’s give a quick update about Debian 10 and its new features. - - - -After almost two years of development, the team at Debian has finally released a stable version of Buster, code name for Debian 10. Buster is a LTS (Long Term Support) version and hence will be supported for the next 5 years by Debian. - -### Debian 10 (Buster) – New Features - -Debian 10 (Buster) comes packed with a lot of new features which could be rewarding to most of the Debian fans out there. Some of the features include: - - * GNOME Desktop 3.30 - * AppArmor enabled by default - * Supports Linux Kernel 4.19.0-4 - * Supports OpenJDk 11.0 - * Moved from Nodejs 4-8 to Nodejs 10.15.2 - * Iptables replaced by NFTables - - - -and a lot more. - -### Step by Step Guide to Upgrade from Debian 9 to Debian 10 - -Before we start upgrading to Debian 10, let’s look at the prerequisites needed for the upgrade: - -### Step 1) Debian upgrade prerequisites - - * A good internet connection - * Root user permission - * Data backup - - - -It is extremely important to backup all your application code bases, data files, user account details, configuration files, so that you can always revert to the previous version if anything goes wrong during the upgrade. - -### Step 2) Upgrade Debian 9 Existing Packages - -Next step is to upgrade all your existing packages as any packages that are tagged as held back cannot be upgraded and there is a possibility the upgrade from Debian 9 to Debian 10 may fail or cause some issues. So, let’s not take any chances and better upgrade the packages. Use the following code to upgrade the packages: - -``` -root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y -``` - -### Step 3) Modify Package Repository file (/etc/sources.list) - -Next step is to modify package repository file “/etc/sources.list” where you need to replace the text “Stretch” with the text “Buster”. - -But before you change anything, make sure to create a backup of the sources.list file as shown below: - -``` -root@linuxtechi:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak -``` - -Now use below sed commands to replace the text ‘**stretch**‘ with ‘**buster**‘ in package repository file, example is shown below, - -``` -root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list -root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*.list -``` - -Once the text is updated, you need to update the package index like shown below: - -``` -root@linuxtechi:~$ sudo apt update -``` - -Before start upgrading  your existing Debian OS , let’s verify the current version using the following command, - -``` -root@linuxtechi:~$ cat /etc/*-release -PRETTY_NAME="Debian GNU/Linux 9 (stretch)" -NAME="Debian GNU/Linux" -VERSION_ID="9" -VERSION="9 (stretch)" -ID=debian -HOME_URL="https://www.debian.org/" -SUPPORT_URL="https://www.debian.org/support" -BUG_REPORT_URL="https://bugs.debian.org/" -root@linuxtechi:~$ -``` - -### Step 4) Upgrade from Debian 9 to Debian 10 - -Once you made all the changes, it is time to upgrade from Debian 9 – Debian 10. But before that, make sure to update your packages again as shown below: - -``` -root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y -``` - -During packages upgrade you will be prompted to start the services, so choose your preferred option - -Once all the packages are updated in your system, it is time to upgrade your distribution package. Use the following code to upgrade the distribution: - -``` -root@linuxtechi:~$ sudo apt dist-upgrade -y -``` - -The upgrade process may take a few minutes depending upon your internet connection. Remember during the upgrade process, you’ll also be asked a few questions whether you need to restart the services during the packages are upgraded and whether you need to keep the existing configurations files. If you don’t want to make any custom changes, simply type “Y” and let the upgrade process continue. - -### Step 5) Verify Upgrade - -Once the upgrade process is completed, reboot your machine and check the version using the following command: - -``` -root@linuxtechi:~$ lsb_release -a -``` - -If you get the output as shown below: - -``` -Distributor ID: Debian -Description: Debian GNU/Linux 10 (buster) -Release: 10 -Codename: buster -root@linuxtechi:~$ -``` - -Yes, you have successfully upgraded from Debian 9 to Debian 10. - -Alternate way to verify upgrade - -``` -root@linuxtechi:~$ cat /etc/*-release -PRETTY_NAME="Debian GNU/Linux 10 (buster)" -NAME="Debian GNU/Linux" -VERSION_ID="10" -VERSION="10 (buster)" -VERSION_CODENAME=buster -ID=debian -HOME_URL="https://www.debian.org/" -SUPPORT_URL="https://www.debian.org/support" -BUG_REPORT_URL="https://bugs.debian.org/" -root@linuxtechi:~$ -``` - -### Conclusion - -Hope the above step by step guide provided you with all the information needed to upgrade from Debian 9(Stretch) to Debian 10 (Buster) easily. Please give us your feedback, suggestions and your experiences with the all new Debian 10 in the comments section. For more such Linux tutorials and articles, keep visiting LinuxTechi.com every now and then. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/ - -作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ diff --git a/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md new file mode 100644 index 0000000000..f89e1205ee --- /dev/null +++ b/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md @@ -0,0 +1,165 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line) +[#]: via: (https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +如何通过命令行升级 Debian 9 (Stretch) 为 Debian 10 (Buster) +====== + +大家好!!!,很高兴见到你!我们已经在先前的文章中看到如何安装 [Debian 10(Buster)][1]。今天,我们将学习如何从 Debian 9 升级为 Debian 10,虽然我们已将看到 Debian 10 和它的特色a,让我们不要深入它。但是读者没有机会来读那篇文章,让我们给予一个快速更新 Debian 10 和它的新功能。 + + + +在差不多两年的开发后,Debian 小组最终发布一个稳定版本, Debian 10 的代码名称是Buster。Buster 是一个 LTS (长期支持支持)版本,因此未来将由 Debian 支持5年。 + +### Debian 10 (Buster) – 新的特色 + +Debian 10 (Buster) 带来大量打包好的新的特色,对大多数的 Debian 粉丝是有益的。一些特色包括: + + * GNOME 桌面 3.30 + * AppArmor 默认启用 + * 支持 Linux 内核 4.19.0-4 + * 支持 OpenJDk 11.0 + * Moved from.15.2 + * Iptables 替换为 NFTables + + + +还有很多。 + +### 从 Debian 9 到 Debian 10 的逐步升级指南 + +在我们开始升级 Debian 10前,让我们看看升级需要的必备条件: + +### 步骤 1) Debian 升级必备条件 + + * 一个良好的网络连接 + * Root 用户权限 + * 数据备份 + + + +备份你所有的应用程序代码库,数据文件,用户账号详细信息,配置文件是极其重要的,以便在升级期间出错时,你可以总是可以还原到先前的版本。 + +### 步骤 2) 升级 Debian 9 现有的软件包 + +接下来的步骤是升级你所有现有的软件包,因为一些软件包被标志为保留不能升级,从 Debian 9 升级为 Debian 10 有失败或引发一些问题的可能性。所以,我们不冒任何风险,更好地升级软件包。使用下面的代码来升级软件包: + +``` +root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y +``` + +### 步骤 3) 修改软件包存储库文件 (/etc/sources.list) + +接下来的步骤是修改软件包存储库文件 “/etc/sources.list” ,你需要用文本 “Buster” 替换 “Stretch” + +但是,在你更改任何东西前,确保如下创建一个 sources.list 文件的备份: + +``` +root@linuxtechi:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak +``` + +现在使用下面的 sed 命令来在软件包存储库文件中使用 ‘**buster**‘ 替换 ‘**stretch**‘ ,示例如下显示, + +``` +root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list +root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*.list +``` + +一旦文本更新,你需要如下更新软件包存储库索引: + +``` +root@linuxtechi:~$ sudo apt update +``` + +在开始升级你现有的 Debian 操作系统前,让我们使用下面的命令验证当前版本, + +``` +root@linuxtechi:~$ cat /etc/*-release +PRETTY_NAME="Debian GNU/Linux 9 (stretch)" +NAME="Debian GNU/Linux" +VERSION_ID="9" +VERSION="9 (stretch)" +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" +root@linuxtechi:~$ +``` + +### 步骤 4) 从 Debian 9 升级到 Debian 10 + +一旦你做完所有的更改,是时候从 Debian 9 升级到 Debian 10 。但是在这之前,再次如下确保更新你的软件包: + +``` +root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y +``` + +在软件包升级期间,你将被提示启动服务,所以选择你较喜欢的选项 + +一旦你系统的所有软件包升级完成,是时候升级你的发行版的软件包。使用下面的代码来升级发行版: + +``` +root@linuxtechi:~$ sudo apt dist-upgrade -y +``` + +升级过程可能花费一些时间,取决于你的网络速度。记住在升级过程中,你将被问道一些问题,在软件包升级后是否需要重启服务,你是否需要保留现存的配置文件。如果你不想进行一些自定义更改,简单地键入 “Y” ,来让升级过程继续。 + +### 步骤 5) 验证升级 + +一旦升级过程完成,重启你的机器,并使用下面的方法检测版本: + +``` +root@linuxtechi:~$ lsb_release -a +``` + +如果你获得如下输出: + +``` +Distributor ID: Debian +Description: Debian GNU/Linux 10 (buster) +Release: 10 +Codename: buster +root@linuxtechi:~$ +``` + +是的,你已经成功地从 Debian 9 升级到 Debian 10。 + +验证升级的备用方法 + +``` +root@linuxtechi:~$ cat /etc/*-release +PRETTY_NAME="Debian GNU/Linux 10 (buster)" +NAME="Debian GNU/Linux" +VERSION_ID="10" +VERSION="10 (buster)" +VERSION_CODENAME=buster +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" +root@linuxtechi:~$ +``` + +### 结束 + +希望上面的逐步指南为你提供从 Debian 9(Stretch) 简单地升级为 Debian 10 (Buster) 的所有信息。在评论部分,请给予你使用 Debian 10 的反馈,建议,体验,更多 Linux 教程和文章,保持时时访问 LinuxTechi.com 。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/ + +作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ From e8d867d1e752dd17838a0fc8393246eb7d595425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Wed, 31 Jul 2019 08:34:37 +0800 Subject: [PATCH 202/951] Translating --- ...29 Top 8 Things to do after Installing Debian 10 (Buster).md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md b/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md index 4246d5f7d9..ea470a2418 100644 --- a/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md +++ b/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f57fccf0441a4786997b56520b8ca06922892e4e Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 31 Jul 2019 08:54:32 +0800 Subject: [PATCH 203/951] translated --- ...190304 How to Install MongoDB on Ubuntu.md | 238 ----------------- ...190304 How to Install MongoDB on Ubuntu.md | 239 ++++++++++++++++++ 2 files changed, 239 insertions(+), 238 deletions(-) delete mode 100644 sources/tech/20190304 How to Install MongoDB on Ubuntu.md create mode 100644 translated/tech/20190304 How to Install MongoDB on Ubuntu.md diff --git a/sources/tech/20190304 How to Install MongoDB on Ubuntu.md b/sources/tech/20190304 How to Install MongoDB on Ubuntu.md deleted file mode 100644 index 8f7e3676e0..0000000000 --- a/sources/tech/20190304 How to Install MongoDB on Ubuntu.md +++ /dev/null @@ -1,238 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Install MongoDB on Ubuntu) -[#]: via: (https://itsfoss.com/install-mongodb-ubuntu) -[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) - -How to Install MongoDB on Ubuntu -====== - -**This tutorial presents two ways to install MongoDB on Ubuntu and Ubuntu-based Linux distributions.** - -[MongoDB][1] is an increasingly popular free and open-source NoSQL database that stores data in collections of JSON-like, flexible documents, in contrast to the usual table approach you’ll find in SQL databases. - -You are most likely to find MongoDB used in modern web applications. Its document model makes it very intuitive to access and handle with various programming languages. - -![mongodb Ubuntu][2] - -In this article, I’ll cover two ways you can install MongoDB on your Ubuntu system. - -### Installing MongoDB on Ubuntu based Distributions - - 1. Install MongoDB using Ubuntu’s repository. Easy but not the latest version of MongoDB - 2. Install MongoDB using its official repository. Slightly complicated but you get the latest version of MongoDB. - - - -The first installation method is easier, but I recommend the second method if you plan on using the latest release with official support. - -Some people might prefer using snap packages. There are snaps available in the Ubuntu Software Center, but I wouldn’t recommend using them; they’re outdated at the moment and I won’t be covering that. - -#### Method 1. Install MongoDB from Ubuntu Repository - -This is the easy way to install MongoDB on your system, you only need to type in a simple command. - -##### Installing MongoDB - -First, make sure your packages are up-to-date. Open up a terminal and type: - -``` -sudo apt update && sudo apt upgrade -y -``` - -Go ahead and install MongoDB with: - -``` -sudo apt install mongodb -``` - -That’s it! MongoDB is now installed on your machine. - -The MongoDB service should automatically be started on install, but to check the status type - -``` -sudo systemctl status mongodb -``` - -![Check if the MongoDB service is running.][3] - -You can see that the service is **active**. - -##### Running MongoDB - -MongoDB is currently a systemd service, so we’ll use **systemctl** to check and modify it’s state, using the following commands: - -``` -sudo systemctl status mongodb -sudo systemctl stop mongodb -sudo systemctl start mongodb -sudo systemctl restart mongodb -``` - -You can also change if MongoDB automatically starts when the system starts up ( **default** : enabled): - -``` -sudo systemctl disable mongodb -sudo systemctl enable mongodb -``` - -To start working with (creating and editing) databases, type: - -``` -mongo -``` - -This will start up the **mongo shell**. Please check out the [manual][4] for detailed information on the available queries and options. - -**Note:** Depending on how you plan to use MongoDB, you might need to adjust your Firewall. That’s unfortunately more involved than what I can cover here and depends on your configuration. - -##### Uninstall MongoDB - -If you installed MongoDB from the Ubuntu Repository and want to uninstall it (maybe to install using the officially supported way), type: - -``` -sudo systemctl stop mongodb -sudo apt purge mongodb -sudo apt autoremove -``` - -This should completely get rid of your MongoDB install. Make sure to **backup** any collections or documents you might want to keep since they will be wiped out! - -#### Method 2. Install MongoDB Community Edition on Ubuntu - -This is the way the recommended way to install MongoDB, using the package manager. You’ll have to type a few more commands and it might be intimidating if you are newer to the Linux world. - -But there’s nothing to be afraid of! We’ll go through the installation process step by step. - -##### Installing MongoDB - -The package maintained by MongoDB Inc. is called **mongodb-org** , not **mongodb** (this is the name of the package in the Ubuntu Repository). Make sure **mongodb** is not installed on your system before applying this steps. The packages will conflict. Let’s get to it! - -First, we’ll have to import the public key: - -``` -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 -``` - -Now, you need to add a new repository in your sources list so that you can install MongoDB Community Edition and also get automatic updates: - -``` -echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list -``` - -To be able to install **mongodb-org** , we’ll have to update our package database so that your system is aware of the new packages available: - -``` -sudo apt update -``` - -Now you can ether install the **latest stable version** of MongoDB: - -``` -sudo apt install -y mongodb-org -``` - -or a **specific version** (change the version number after **equal** sign) - -``` -sudo apt install -y mongodb-org=4.0.6 mongodb-org-server=4.0.6 mongodb-org-shell=4.0.6 mongodb-org-mongos=4.0.6 mongodb-org-tools=4.0.6 -``` - -If you choose to install a specific version, make sure you change the version number everywhere. If you only change it in the **mongodb-org=4.0.6** part, the latest version will be installed. - -By default, when updating using the package manager ( **apt-get** ), MongoDB will be updated to the newest updated version. To stop that from happening (and freezing to the installed version), use: - -``` -echo "mongodb-org hold" | sudo dpkg --set-selections -echo "mongodb-org-server hold" | sudo dpkg --set-selections -echo "mongodb-org-shell hold" | sudo dpkg --set-selections -echo "mongodb-org-mongos hold" | sudo dpkg --set-selections -echo "mongodb-org-tools hold" | sudo dpkg --set-selections -``` - -You have now successfully installed MongoDB! - -##### Configuring MongoDB - -By default, the package manager will create **/var/lib/mongodb** and **/var/log/mongodb** and MongoDB will run using the **mongodb** user account. - -I won’t go into changing these default settings since that is beyond the scope of this guide. You can check out the [manual][5] for detailed information. - -The settings in **/etc/mongod.conf** are applied when starting/restarting the **mongodb** service instance. - -##### Running MongoDB - -To start the mongodb daemon **mongod** , type: - -``` -sudo service mongod start -``` - -Now you should verify that the **mongod** process started successfully. This information is stored (by default) at **/var/log/mongodb/mongod.log**. Let’s check the contents of that file: - -``` -sudo cat /var/log/mongodb/mongod.log -``` - -![Check MongoDB logs to see if the process is running properly.][6] - -As long as you get this: **[initandlisten] waiting for connections on port 27017** somewhere in there, the process is running properly. - -**Note: 27017** is the default port of **mongod.** - -To stop/restart **mongod** enter: - -``` -sudo service mongod stop -sudo service mongod restart -``` - -Now, you can use MongoDB by opening the **mongo shell** : - -``` -mongo -``` - -##### Uninstall MongoDB - -Run the following commands - -``` -sudo service mongod stop -sudo apt purge mongodb-org* -``` - -To remove the **databases** and **log files** (make sure to **backup** what you want to keep!): - -``` -sudo rm -r /var/log/mongodb -sudo rm -r /var/lib/mongodb -``` - -**Wrapping Up** - -MongoDB is a great NoSQL database, easy to integrate into modern projects. I hope this tutorial helped you to set it up on your Ubuntu machine! Let us know how you plan on using MongoDB in the comments below. - - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-mongodb-ubuntu - -作者:[Sergiu][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/sergiu/ -[b]: https://github.com/lujun9972 -[1]: https://www.mongodb.com/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/mongodb-ubuntu.jpeg?resize=800%2C450&ssl=1 -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/mongodb_check_status.jpg?fit=800%2C574&ssl=1 -[4]: https://docs.mongodb.com/manual/tutorial/getting-started/ -[5]: https://docs.mongodb.com/manual/ -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/mongodb_org_check_logs.jpg?fit=800%2C467&ssl=1 diff --git a/translated/tech/20190304 How to Install MongoDB on Ubuntu.md b/translated/tech/20190304 How to Install MongoDB on Ubuntu.md new file mode 100644 index 0000000000..205215f4a4 --- /dev/null +++ b/translated/tech/20190304 How to Install MongoDB on Ubuntu.md @@ -0,0 +1,239 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Install MongoDB on Ubuntu) +[#]: via: (https://itsfoss.com/install-mongodb-ubuntu) +[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) + +如何在 Ubuntu 上安装 MongoDB +====== + +**本教程介绍了在 Ubuntu 和基于 Ubuntu 的 Linux 发行版上安装 MongoDB 的两种方法。** + +[MongoDB][1]是一个越来越流行的免费和开源的 NoSQL 数据库,它将数据存储在类似 JSON 的灵活文档集中,这与 SQL 数据库中常见的表格形式形成对比。 + +你很可能发现在现代 Web 应用中使用 MongoDB。它的文档模型使得使用各种编程语言能非常直观地访问和处理它。 + +![mongodb Ubuntu][2] + +在本文中,我将介绍两种在 Ubuntu 上安装 MongoDB 的方法。 + +### 在基于 Ubuntu 的发行版上安装 MongoDB + + 1. 使用 Ubuntu 仓库安装 MongoDB。简单但不是最新版本的 MongoDB +  2. 使用其官方仓库安装 MongoDB。稍微复杂,但你能得到最新版本的 MongoDB。 + + + +第一种安装方法更容易,但如果你计划使用官方支持的最新版本,那么我建议使用第二种方法。 + +S有些人可能更喜欢使用 snap 包。Ubuntu 软件中心提供了 snap,但我不建议使用它们,因为现在已经过时了,因此我这里不会提到。 + +#### 方法 1:从 Ubuntu 仓库安装 MongoDB + +这是在系统中安装 MongoDB 的简便方法,你只需输入一个命令即可。 + +##### 安装 MongoDB + +首先,确保你的包是最新的。打开终端并输入: + +``` +sudo apt update && sudo apt upgrade -y +``` + +继续安装 MongoDB: + +``` +sudo apt install mongodb +``` + +这就完成了!MongoDB 现在安装到你的计算机上了。 + +MongoDB 服务应该在安装时自动启动,但要检查服务状态: + +``` +sudo systemctl status mongodb +``` + +![Check if the MongoDB service is running.][3] + +你可以看到该服务是**活动**的。 + +##### 运行 MongoDB + +MongoDB 目前是一个 systemd 服务,因此我们使用 **systemctl** 来检查和修改它的状态,使用以下命令: + +``` +sudo systemctl status mongodb +sudo systemctl stop mongodb +sudo systemctl start mongodb +sudo systemctl restart mongodb +``` + +你也可以修改 MongoDB 是否自动随系统启动(**默认**:启用): + +``` +sudo systemctl disable mongodb +sudo systemctl enable mongodb +``` + +要开始使用(创建和编辑)数据库,请输入: + +``` +mongo +``` + +这将启动 **mongo shell**。有关查询和选项的详细信息,请查看[手册][4]。 + +**注意:**根据你计划使用 MongoDB 的方式,你可能需要调整防火墙。不幸的是,这超出了本篇的内容,并且取决于你的配置。 + +##### 卸载 MongoDB + +如果你从 Ubuntu 仓库安装 MongoDB 并想要卸载它(可能要使用官方支持的方式安装),请输入: + +``` +sudo systemctl stop mongodb +sudo apt purge mongodb +sudo apt autoremove +``` + +这应该会完全卸载 MongoDB。确保**备份**你可能想要保留的任何集合或文档,因为它们将被删除! + +#### 方法 2:在 Ubuntu 上安装 MongoDB 社区版 + +这是推荐的安装 MongoDB 的方法,它使用包管理器。你需要多打几条命令,对于 Linux 新手而言,这可能会感到害怕。 + +但没有什么可怕的!我们将一步步说明安装过程。 + +##### 安装 MongoDB + +由 MongoDB Inc. 维护的包称为 **mongodb-org** ,而不是 **mongodb**(这是 Ubuntu 仓库中包的名称)。在开始之前,请确保系统上未安装 **mongodb**。因为包之间会发生冲突。让我们开始吧! + +首先,我们必须导入公钥: + +``` +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 +``` + +现在,你需要在源列表中添加一个新的仓库,以便你可以安装 MongoDB 社区版并获得自动更新: + +``` +echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list +``` + +为了安装 **mongodb-org**,我们需要我们的包数据库,以便系统知道可用的新包: + +``` +sudo apt update +``` + +现在你可以安装**最新稳定版**的 MongoDB: + +``` +sudo apt install -y mongodb-org +``` + +或者某个**特定版本**(在**等号**后面修改版本号) + +``` +sudo apt install -y mongodb-org=4.0.6 mongodb-org-server=4.0.6 mongodb-org-shell=4.0.6 mongodb-org-mongos=4.0.6 mongodb-org-tools=4.0.6 +``` + +如果你选择安装特定版本,请确保在所有位置都修改了版本号。如果你修改了 **mongodb-org=4.0.6**,你将安装最新版本。 + + +默认情况下,使用包管理器(**apt-get**)更新时,MongoDB 将更新为最新的版本。要阻止这种情况发生(并冻结为已安装的版本),请使用: + +``` +echo "mongodb-org hold" | sudo dpkg --set-selections +echo "mongodb-org-server hold" | sudo dpkg --set-selections +echo "mongodb-org-shell hold" | sudo dpkg --set-selections +echo "mongodb-org-mongos hold" | sudo dpkg --set-selections +echo "mongodb-org-tools hold" | sudo dpkg --set-selections +``` + +你现在已经成功安装了 MongoDB! + +##### 配置 MongoDB + +默认情况下,包管理器将创建 **/var/lib/mongodb** 和 **/var/log/mongodb**,MongoDB 将使用 **mongodb** 用户帐户运行。 + +我不会去更改这些默认设置,因为这超出了本指南的范围。有关详细信息,请查看[手册][5]。 + +**/etc/mongod.conf** 中的设置在启动/重新启动 **mongodb** 服务实例时生效。 + + +##### 运行 MongoDB + +要启动 mongodb 的守护进程 **mongod**,请输入: + +``` +sudo service mongod start +``` + +现在你应该验证 **mongod** 进程是否已成功启动。此信息(默认情况下)保存在 **/var/log/mongodb/mongod.log** 中。我们来看看文件的内容: + +``` +sudo cat /var/log/mongodb/mongod.log +``` + +![Check MongoDB logs to see if the process is running properly.][6] + +只要你在某处看到:**[initandlisten] waiting for connections on port 27017**,就说明进程正常运行。 + +**注意:27017** 是 **mongod** 的默认端口。 + +要停止/重启 **mongod**,请输入: + +``` +sudo service mongod stop +sudo service mongod restart +``` + +现在,你可以通过打开 **mongo shell** 来使用 MongoDB: + +``` +mongo +``` + +##### 卸载 MongoDB + +运行以下命令 + +``` +sudo service mongod stop +sudo apt purge mongodb-org* +``` + +要删除**数据库**和**日志文件**(确保**备份**你要保留的内容!): + +``` +sudo rm -r /var/log/mongodb +sudo rm -r /var/lib/mongodb +``` + +**总结** + +MongoDB 是一个很棒的 NoSQL 数据库,它易于集成到现代项目中。我希望本教程能帮助你在 Ubuntu 上安装它!在下面的评论中告诉我们你计划如何使用 MongoDB。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-mongodb-ubuntu + +作者:[Sergiu][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/sergiu/ +[b]: https://github.com/lujun9972 +[1]: https://www.mongodb.com/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/mongodb-ubuntu.jpeg?resize=800%2C450&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/mongodb_check_status.jpg?fit=800%2C574&ssl=1 +[4]: https://docs.mongodb.com/manual/tutorial/getting-started/ +[5]: https://docs.mongodb.com/manual/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/mongodb_org_check_logs.jpg?fit=800%2C467&ssl=1 From f01ccce2630c04d8a491dabb4f690739d5d83412 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 31 Jul 2019 08:59:33 +0800 Subject: [PATCH 204/951] translating --- .../20190726 Manage your passwords with Bitwarden and Podman.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md b/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md index 1218867160..4d52087778 100644 --- a/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md +++ b/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7d586b8a3ee5f86cda03ebfa80f62eeac76a9428 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Jul 2019 09:52:00 +0800 Subject: [PATCH 205/951] PRF @geekpi --- ... a Free Alternative to Microsoft Office.md | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md b/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md index b1f15f0f94..d26dff5b1d 100644 --- a/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md +++ b/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md @@ -1,28 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (WPS Office on Linux is a Free Alternative to Microsoft Office) [#]: via: (https://itsfoss.com/wps-office-linux/) [#]: author: (Sergiu https://itsfoss.com/author/sergiu/) -Linux 上的 WPS Office 是 Microsoft Office 的免费替代品 +WPS Office:Linux 上的 Microsoft Office 的免费替代品 ====== -_ **如果你在寻找 Linux 上免费的 Microsoft Office 替代品,那么 WPS Office 是最佳选择之一。它可以免费使用,并兼容 MS Office 文档格式。** _ +> 如果你在寻找 Linux 上 Microsoft Office 免费替代品,那么 WPS Office 是最佳选择之一。它可以免费使用,并兼容 MS Office 文档格式。 [WPS Office][1] 是一个跨平台的办公生产力套件。它轻巧,并且与 Microsoft Office、Google Docs/Sheets/Slide 和 Adobe PDF 完全兼容。 -对于许多用户而言,WPS Office 具有足够直观,并且能够满足他们的需求。由于它在外观和兼容性方面与 Microsoft Office 非常相似,因此广受欢迎。 +对于许多用户而言,WPS Office 足够直观,并且能够满足他们的需求。由于它在外观和兼容性方面与 Microsoft Office 非常相似,因此广受欢迎。 ![WPS Office 2019 All In One Mode][2] WPS office 由中国的金山公司创建。对于 Windows 用户而言,WPS Office 有免费版和高级版。对于 Linux 用户,WPS Office 可通过其[社区项目][3]免费获得。 -非 FOSS 警告! +> **非 FOSS 警告!** -WPS Office 不是一个开源软件。因为它对于 Linux 用户免费使用,我们已经在这介绍过它,有时我们也会介绍即使不是开源的 Linux 软件。 +> WPS Office 不是一个开源软件。因为它对于 Linux 用户免费使用,我们已经在这介绍过它,有时我们也会介绍即使不是开源的 Linux 软件。 ### Linux 上的 WPS Office @@ -35,14 +35,11 @@ WPS Office 有四个主要组件: * WPS 表格 * WPS PDF - - -WPS Office 与 MS Office 完全兼容,支持.doc、.docx、.dotx、.ppt、.pptx、.xls、.xlsx、.docm、.dotm、.xml、.txt、.html、.rtf (等其他),以及它自己的格式(.wps、.wpt)。它还默认包含 Microsoft 字体(以确保兼容性),它可以导出 PDF 并提供超过 10 种语言的拼写检查功能。 +WPS Office 与 MS Office 完全兼容,支持 .doc、.docx、.dotx、.ppt、.pptx、.xls、.xlsx、.docm、.dotm、.xml、.txt、.html、.rtf (等其他),以及它自己的格式(.wps、.wpt)。它还默认包含 Microsoft 字体(以确保兼容性),它可以导出 PDF 并提供超过 10 种语言的拼写检查功能。 但是,它在 ODT、ODP 和其他开放文档格式方面表现不佳。 -三个主要的 WPS Office 应用都有与 Microsoft Office 非常相似的界面,都有相同的 Ribbon UI。尽管存在细微差别,但使用仍然相对一致。你可以使用 WPS Office 轻松克隆任何 Microsoft Office/LibreOffice 文档。 - +三个主要的 WPS Office 应用都有与 Microsoft Office 非常相似的界面,都有相同的 Ribbon UI。尽管存在细微差别,但使用习惯仍然相对一致。你可以使用 WPS Office 轻松克隆任何 Microsoft Office/LibreOffice 文档。 ![WPS Office Writer][5] @@ -54,15 +51,15 @@ WPS Office 与 MS Office 完全兼容,支持.doc、.docx、.dotx、.ppt、.ppt WPS 为 Linux 发行版提供 DEB 和 RPM 安装程序。如果你使用的是 Debian/Ubuntu 或基于 Fedora 的发行版,那么安装 WPS Office 就简单了。 -你可以在下载标签那下载Linux 中的 WPS +你可以在下载区那下载 Linux 中的 WPS: -[Download WPS Office for Linux][9] +- [下载 WPS Office for Linux][9] 向下滚动,你将看到最新版本包的链接: ![WPS Office Download][10] -下载适合你发行版的文件。 只需双击 DEB 或者 RPM 就能[安装它们][11]。这会打开软件中心,你将看到安装选项: +下载适合你发行版的文件。只需双击 DEB 或者 RPM 就能[安装它们][11]。这会打开软件中心,你将看到安装选项: ![WPS Office Install Package][12] @@ -72,22 +69,22 @@ WPS 为 Linux 发行版提供 DEB 和 RPM 安装程序。如果你使用的是 D ![WPS Applications Menu][13] -**你是否使用 WPS Office 或其他软件?** +### 你是否使用 WPS Office 或其他软件? -还有其他 [Microsoft Office 的开源替代方案][14]但它们与 MS Office 的兼容性很差。 +还有其他 [Microsoft Office 的开源替代方案][14],但它们与 MS Office 的兼容性很差。 -就个人而言,我更喜欢 LibreOffice,但你必须要用到 Microsoft Office,你可以尝试在 Linux 上使用 WPS Office。它看起来和 MS Office 类似,并且与 MS 文档格式具有良好的兼容性。它在 Linux 上是免费的,因此你也不必担心 Office 365 订阅。 +就个人而言,我更喜欢 LibreOffice,但如果你必须要用到 Microsoft Office,你可以尝试在 Linux 上使用 WPS Office。它看起来和 MS Office 类似,并且与 MS 文档格式具有良好的兼容性。它在 Linux 上是免费的,因此你也不必担心 Office 365 订阅。 你在系统上使用什么办公套件?你曾经在 Linux 上使用过 WPS Office 吗?你的体验如何? --------------------------------------------------------------------------------- +---------------------------------------------------------------------------- via: https://itsfoss.com/wps-office-linux/ 作者:[Sergiu][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 c3b8bd0fa73810eb18c7b97fa74cddad29f59f7a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Jul 2019 09:52:39 +0800 Subject: [PATCH 206/951] PUB @geekpi https://linux.cn/article-11170-1.html --- ...fice on Linux is a Free Alternative to Microsoft Office.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md (98%) diff --git a/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md b/published/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md similarity index 98% rename from translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md rename to published/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md index d26dff5b1d..1b74136442 100644 --- a/translated/tech/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md +++ b/published/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11170-1.html) [#]: subject: (WPS Office on Linux is a Free Alternative to Microsoft Office) [#]: via: (https://itsfoss.com/wps-office-linux/) [#]: author: (Sergiu https://itsfoss.com/author/sergiu/) From d74e63f5077d154c984ad3ef3efe7b5ea7043a86 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Jul 2019 20:29:14 +0800 Subject: [PATCH 207/951] APL:20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux --- ...nitor Messages Log (Warning, Error and Critical) on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md b/sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md index d7799311d6..7384fbe102 100644 --- a/sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md +++ b/sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3056ac5374a521855e0914e63fac730e959c6ef8 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Wed, 31 Jul 2019 20:54:00 +0800 Subject: [PATCH 208/951] Check translation of Continuous integration testing for the Linux kernel.md --- ...ntegration testing for the Linux kernel.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md index 5180a84cf5..4b07612098 100644 --- a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md @@ -10,29 +10,29 @@ Linux 内核的持续集成测试 ====== -> 团队如何防止 bug 被合并到 Linux 内核中。 +> 这个团队是如何防止 bug 被合并到 Linux 内核中。 ![Linux kernel source code \(C\) in Visual Studio Code][1] -Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14,000 个更改,很显然,这使得 Linux 内核快速迭代的同时也产生了大量复杂性问题。内核上 Bug 有小麻烦也有大问题,例如系统奔溃和数据丢失。 +Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14,000 个更改,很显然,这使得 Linux 内核快速迭代的同时也产生了巨大的复杂性问题。内核上 Bug 有小麻烦也有大问题,例如系统奔溃和数据丢失。 -随着越来越多的项目对于持续集成(CI)的呼声,[内核持续集成(CKI)][2]小组保持着一个任务目标:防止 Bug 被合并到内核当中。 +随着越来越多的项目对于持续集成(CI)的呼声,[内核持续集成(CKI)][2]小组秉承着一个任务目标:防止 Bug 被合并到内核当中。 ### Linux 测试问题 -许多 Linux 发行版只在需要的时候测试 Linux 内核。而这个测试往往只在版本发布时或者用户发现错误时进行。 +许多 Linux 发行版只在需要的时候对 Linux 内核进行测试。而这种测试往往只在版本发布时或者用户发现错误时进行。 -有时会出现不相关的问题,维护人员会在包含了数万个补丁的变更中匆忙地寻找哪个补丁导致这个不相关的新 Bug。诊断 Bug 需要专业的硬件设备、一系列的触发器以及内核相关的专业知识。 +有时候,出现玄学问题时,维护人员需要在包含了数万个补丁的变更中匆忙地寻找哪个补丁导致这个新的玄学 Bug。诊断 Bug 需要专业的硬件设备、一系列的触发器以及内核相关的专业知识。 #### CI 和 Linux -许多现代软件代码库都采用某种自动化 CI 测试,能够在提交进入代码存储库之前对其进行测试。这种自动化测试运行维护人员通过查看 CI 测试报告来发现软件质量问题已经大多数错误。一些更方便的项目,比如某个 python 库,附带的大量工具使得整个检查过程更简单。 +许多现代软件代码库都采用某种自动化 CI 测试机制,能够在提交进入代码存储库之前对其进行测试。这种自动化测试使得维护人员可以通过查看 CI 测试报告来发现软件质量问题以及大多数的错误。一些更方便的项目,比如某个 python 库,附带的大量工具使得整个检查过程更简单。 -在任何测试之前都需要配置和编译 Linux。而这么做将耗费大量的时间和计算资源。此外,Linux 内核必需在虚拟机或者裸机上启动才能进行测试。访问某些硬件架构需要额外的开销或者非常慢的仿真。因此,必需有人确定一组能够触发错误或者验证修复的测试组。 +在任何测试之前都需要配置和编译 Linux。而这么做将耗费大量的时间和计算资源。此外,Linux 内核必需在虚拟机或者裸机上启动才能进行测试。而访问某些硬件架构需要额外的开销或者非常慢的仿真。因此,必需有人确定一组能够触发错误或者验证修复的测试集。 #### CKI 团队如何运作? -Red Hat 公司的 CKI 团队当前正追踪来自数个内部内核分支和[稳定内核分支树][3]等上游内核分支的更改。我们关注每个代码库的两类关键事件: +Red Hat 公司的 CKI 团队当前正追踪来自数个内部内核分支和上游的[稳定内核分支树][3]等内核分支的更改。我们关注每个代码库的两类关键事件: 1. 当维护人员合并 PR 或者补丁时,代码库变化后的最终结果。 @@ -58,7 +58,7 @@ Red Hat 公司的 CKI 团队当前正追踪来自数个内部内核分支和[稳 如果你或者你的公司想要参与这一工作,请参加在葡萄牙里斯本举办的 [Linux Plumbers Conference 2019][20]。在会议结束后的两天加入我们的 Kernel CI hackfest 活动,并推动快速内核测试的发展。 -更多详细信息,[参见][21]我在 Texas Linux Fest 2019 上的演讲。 +更多详细信息,[请见][21]我在 Texas Linux Fest 2019 上的演讲。 -------------------------------------------------------------------------------- @@ -73,7 +73,7 @@ via: https://opensource.com/article/19/6/continuous-kernel-integration-linux [a]: https://opensource.com/users/mhayden [b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_kernel_clang_vscode.jpg?itok=fozZ4zrr (Linux kernel source code (C) in Visual Studio Code) +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_kernel_clang_vscode.jpg?itok=fozZ4zrr "Linux kernel source code (C) in Visual Studio Code" [2]: https://cki-project.org/ [3]: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html [4]: https://docs.gitlab.com/ee/ci/pipelines.html From 88c7078d2b28672cf991a383b8116b6819f5f25f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Jul 2019 21:02:34 +0800 Subject: [PATCH 209/951] TSL&PRF @wxy --- ... (Warning, Error and Critical) on Linux.md | 127 ------------------ ... (Warning, Error and Critical) on Linux.md | 108 +++++++++++++++ 2 files changed, 108 insertions(+), 127 deletions(-) delete mode 100644 sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md create mode 100644 translated/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md diff --git a/sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md b/sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md deleted file mode 100644 index 7384fbe102..0000000000 --- a/sources/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux) -[#]: via: (https://www.2daygeek.com/linux-bash-script-to-monitor-messages-log-warning-error-critical-send-email/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux -====== - -There are many open source monitoring tools are currently available in market to monitor Linux systems performance. - -It will send an email alert when the system reaches the specified threshold limit. - -It monitors everything such as CPU utilization, Memory utilization, swap utilization, disk space utilization and much more. - -If you only have few systems and want to monitor them then writing a small shell script can make your task very easy. - -In this tutorial we have added a shell script to monitor Messages Log on Linux system. - -We had added many useful shell scripts in the past. If you want to check those, navigate to the below link. - - * **[How to automate day to day activities using shell scripts?][1]** - - - -This script will check **“warning, error and critical”** in the `/var/log/messages` file and trigger a mail to given email id, if it’s found anything related it. - -We can’t run this script frequently that may fill up your inbox if the server has many matching strings, instead we can run once in a day. - -To overcome this issue, i made the script to trigger an email in a different manner. - -If any given strings are found in the **“/var/log/messages”** file for yesterday’s date then the script will send an email alert to given email id. - -**Note:** You need to change the email id instead of ours. Also, you can change the Memory utilization threshold value as per your requirement. - -``` -# vi /opt/scripts/os-log-alert.sh - -#!/bin/bash - -#Set the variable which equal to zero - -prev_count=0 - -count=$(grep -i "`date --date='yesterday' '+%b %e'`" /var/log/messages | egrep -wi 'warning|error|critical' | wc -l) - -if [ "$prev_count" -lt "$count" ] ; then - -# Send a mail to given email id when errors found in log - -SUBJECT="WARNING: Errors found in log on "`date --date='yesterday' '+%b %e'`"" - -# This is a temp file, which is created to store the email message. - -MESSAGE="/tmp/logs.txt" - -TO="[email protected]" - -echo "ATTENTION: Errors are found in /var/log/messages. Please Check with Linux admin." >> $MESSAGE - -echo "Hostname: `hostname`" >> $MESSAGE - -echo -e "\n" >> $MESSAGE - -echo "+------------------------------------------------------------------------------------+" >> $MESSAGE - -echo "Error messages in the log file as below" >> $MESSAGE - -echo "+------------------------------------------------------------------------------------+" >> $MESSAGE - -grep -i "`date --date='yesterday' '+%b %e'`" /var/log/messages | awk '{ $3=""; print}' | egrep -wi 'warning|error|critical' >> $MESSAGE - -mail -s "$SUBJECT" "$TO" < $MESSAGE - -#rm $MESSAGE - -fi -``` - -Set an executable permission to `os-log-alert.sh` file. - -``` -$ chmod +x /opt/scripts/os-log-alert.sh -``` - -Finally add a cronjob to automate this. It will run everyday at 7'o clock. - -``` -# crontab -e -0 7 * * * /bin/bash /opt/scripts/os-log-alert.sh -``` - -**Note:** You will be getting an email alert everyday at 7 o'clock, which is for yesterday's log. - -**Output:** You will be getting an email alert similar to below. - -``` -ATTENTION: Errors are found in /var/log/messages. Please Check with Linux admin. - -+-----------------------------------------------------+ -Error messages in the log file as below -+-----------------------------------------------------+ -Jul 3 02:40:11 ns1 kernel: php-fpm[3175]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000] -Jul 3 02:50:14 ns1 kernel: lmtp[8249]: segfault at 20 ip 00007f9cc05295e4 sp 00007ffc57bca1a0 error 4 in libdovecot-storage.so.0.0.0[7f9cc04df000+148000] -Jul 3 15:36:09 ns1 kernel: php-fpm[17846]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000] -Jul 3 15:45:54 ns1 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [daygeek] -Jul 3 16:25:36 ns1 pure-ftpd: ([email protected]) [WARNING] Sorry, cleartext sessions and weak ciphers are not accepted on this server.#012Please reconnect using TLS security mechanisms. -Jul 3 16:44:20 ns1 kernel: php-fpm[8979]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000] -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/linux-bash-script-to-monitor-messages-log-warning-error-critical-send-email/ - -作者:[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/shell-script/ diff --git a/translated/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md b/translated/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md new file mode 100644 index 0000000000..02c5378bb6 --- /dev/null +++ b/translated/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md @@ -0,0 +1,108 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux) +[#]: via: (https://www.2daygeek.com/linux-bash-script-to-monitor-messages-log-warning-error-critical-send-email/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +在 Linux 上用 Bash 脚本监控 messages 日志 +====== + +目前市场上有许多开源监控工具可用于监控 Linux 系统的性能。当系统达到指定的阈值限制时,它将发送电子邮件警报。它可以监视 CPU 利用率、内存利用率、交换利用率、磁盘空间利用率等所有内容。 + +如果你只有很少的系统并且想要监视它们,那么编写一个小的 shell 脚本可以使你的任务变得非常简单。 + +在本教程中,我们添加了一个 shell 脚本来监视 Linux 系统上的 messages 日志。 + +我们过去添加了许多有用的 shell 脚本。如果要查看这些内容,请导航至以下链接。 + +- [如何使用 shell 脚本监控系统的日常活动?][1] + +此脚本将检查 `/var/log/messages` 文件中的 “warning“、“error” 和 “critical”,如果发现任何有关的东西,就给指定电子邮件地址发邮件。 + +如果服务器有许多匹配的字符串,我们就不能经常运行这个可能填满收件箱的脚本,我们可以在一天内运行一次。 + +为了解决这个问题,我让脚本以不同的方式触发电子邮件。 + +如果 `/var/log/messages` 文件中昨天的日志中找到任何给定字符串,则脚本将向给定的电子邮件地址发送电子邮件警报。 + +**注意:**你需要更改电子邮件地址,而不是我们的电子邮件地址。 + +``` +# vi /opt/scripts/os-log-alert.sh +``` + +``` +#!/bin/bash +#Set the variable which equal to zero +prev_count=0 + +count=$(grep -i "`date --date='yesterday' '+%b %e'`" /var/log/messages | egrep -wi 'warning|error|critical' | wc -l) + +if [ "$prev_count" -lt "$count" ] ; then + # Send a mail to given email id when errors found in log + SUBJECT="WARNING: Errors found in log on "`date --date='yesterday' '+%b %e'`"" + # This is a temp file, which is created to store the email message. + MESSAGE="/tmp/logs.txt" + TO="2daygeek@gmail.com" + echo "ATTENTION: Errors are found in /var/log/messages. Please Check with Linux admin." >> $MESSAGE + echo "Hostname: `hostname`" >> $MESSAGE + echo -e "\n" >> $MESSAGE + echo "+------------------------------------------------------------------------------------+" >> $MESSAGE + echo "Error messages in the log file as below" >> $MESSAGE + echo "+------------------------------------------------------------------------------------+" >> $MESSAGE + grep -i "`date --date='yesterday' '+%b %e'`" /var/log/messages | awk '{ $3=""; print}' | egrep -wi 'warning|error|critical' >> $MESSAGE + mail -s "$SUBJECT" "$TO" < $MESSAGE + #rm $MESSAGE +fi +``` + +为 `os-log-alert.sh` 文件设置可执行权限。 + +``` +$ chmod +x /opt/scripts/os-log-alert.sh +``` + +最后添加一个 cron 任务来自动执行此操作。它将每天 7 点钟运行。 + +``` +# crontab -e +``` + +``` +0 7 * * * /bin/bash /opt/scripts/os-log-alert.sh +``` + +**注意:**你将在每天 7 点收到昨天日志的电子邮件提醒。 + +**输出:**你将收到类似下面的电子邮件提醒。 + +``` +ATTENTION: Errors are found in /var/log/messages. Please Check with Linux admin. + ++-----------------------------------------------------+ +Error messages in the log file as below ++-----------------------------------------------------+ +Jul 3 02:40:11 ns1 kernel: php-fpm[3175]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000] +Jul 3 02:50:14 ns1 kernel: lmtp[8249]: segfault at 20 ip 00007f9cc05295e4 sp 00007ffc57bca1a0 error 4 in libdovecot-storage.so.0.0.0[7f9cc04df000+148000] +Jul 3 15:36:09 ns1 kernel: php-fpm[17846]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000] +Jul 3 15:45:54 ns1 pure-ftpd: (?@5.188.62.5) [WARNING] Authentication failed for user [daygeek] +Jul 3 16:25:36 ns1 pure-ftpd: (?@104.140.148.58) [WARNING] Sorry, cleartext sessions and weak ciphers are not accepted on this server.#012Please reconnect using TLS security mechanisms. +Jul 3 16:44:20 ns1 kernel: php-fpm[8979]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000]``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-bash-script-to-monitor-messages-log-warning-error-critical-send-email/ + +作者:[Magesh Maruthamuthu][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://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/category/shell-script/ From e4344e29905c0917a34932176f225981a3f4997a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Jul 2019 21:13:35 +0800 Subject: [PATCH 210/951] PUB @wxy https://linux.cn/article-11171-1.html --- ... Messages Log (Warning, Error and Critical) on Linux.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md (98%) diff --git a/translated/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md b/published/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md similarity index 98% rename from translated/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md rename to published/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md index 02c5378bb6..8f06f3a6a9 100644 --- a/translated/tech/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md +++ b/published/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11171-1.html) [#]: subject: (Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux) [#]: via: (https://www.2daygeek.com/linux-bash-script-to-monitor-messages-log-warning-error-critical-send-email/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) @@ -90,7 +90,8 @@ Jul 3 02:50:14 ns1 kernel: lmtp[8249]: segfault at 20 ip 00007f9cc05295e4 sp 00 Jul 3 15:36:09 ns1 kernel: php-fpm[17846]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000] Jul 3 15:45:54 ns1 pure-ftpd: (?@5.188.62.5) [WARNING] Authentication failed for user [daygeek] Jul 3 16:25:36 ns1 pure-ftpd: (?@104.140.148.58) [WARNING] Sorry, cleartext sessions and weak ciphers are not accepted on this server.#012Please reconnect using TLS security mechanisms. -Jul 3 16:44:20 ns1 kernel: php-fpm[8979]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000]``` +Jul 3 16:44:20 ns1 kernel: php-fpm[8979]: segfault at 299 ip 000055dfe7cc7e25 sp 00007ffd799d7d38 error 4 in php-fpm[55dfe7a89000+3a7000] +``` -------------------------------------------------------------------------------- From 38d314f7ef84bbc8098ede5bb29ccc1d23ce2e7e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 00:52:18 +0800 Subject: [PATCH 211/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=20Bash?= =?UTF-8?q?=20Script=20to=20Send=20a=20Mail=20When=20a=20New=20User=20Acco?= =?UTF-8?q?unt=20is=20Created=20in=20System?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md --- ...a New User Account is Created in System.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md diff --git a/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md b/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md new file mode 100644 index 0000000000..769acc1b27 --- /dev/null +++ b/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md @@ -0,0 +1,123 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bash Script to Send a Mail When a New User Account is Created in System) +[#]: via: (https://www.2daygeek.com/linux-bash-script-to-monitor-user-creation-send-email/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Bash Script to Send a Mail When a New User Account is Created in System +====== + +There are many open source monitoring tools are currently available in market to monitor Linux systems performance. + +It will send an email alert when the system reaches the specified threshold limit. + +It monitors everything such as CPU utilization, Memory utilization, swap utilization, disk space utilization and much more. + +But i don’t think they have an option to monitor a new user creation activity and alert when it’s happening. + +If not, it doesn’t really matter as we can write our own bash script to achieve this. + +We had added many useful shell scripts in the past. If you want to check those, navigate to the below link. + + * **[How to automate day to day activities using shell scripts?][1]** + + + +What the script does? It monitors **`/var/log/secure`**` ` file and alert admin when a new account is created in system. + +We can’t run this script frequently since user creation is not happening very often. However, I’m planning to run this script once in a day. + +So, that we can get a consolidated report about the user creation. + +If useradd string was found in “/var/log/secure” file for yesterday’s date, then the script will send an email alert to given email id with new users details. + +**Note:** You need to change the email id instead of ours. + +``` +# vi /opt/scripts/new-user.sh + +#!/bin/bash + +#Set the variable which equal to zero +prev_count=0 + +count=$(grep -i "`date --date='yesterday' '+%b %e'`" /var/log/secure | egrep -wi 'useradd' | wc -l) + +if [ "$prev_count" -lt "$count" ] ; then + +# Send a mail to given email id when errors found in log + +SUBJECT="ATTENTION: New User Account is created on server : `date --date='yesterday' '+%b %e'`" + +# This is a temp file, which is created to store the email message. + +MESSAGE="/tmp/new-user-logs.txt" + +TO="[email protected]" + +echo "Hostname: `hostname`" >> $MESSAGE + +echo -e "\n" >> $MESSAGE + +echo "The New User Details are below." >> $MESSAGE + +echo "+------------------------------+" >> $MESSAGE + +grep -i "`date --date='yesterday' '+%b %e'`" /var/log/secure | egrep -wi 'useradd' | grep -v 'failed adding'| awk '{print $4,$8}' | uniq | sed 's/,/ /' >> $MESSAGE + +echo "+------------------------------+" >> $MESSAGE + +mail -s "$SUBJECT" "$TO" < $MESSAGE + +rm $MESSAGE + +fi +``` + +Set an executable permission to **`new-user.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/new-user.sh +``` + +Finally add a cronjob to automate this. It will run everyday at 7'o clock. + +``` +# crontab -e + +0 7 * * * /bin/bash /opt/scripts/new-user.sh +``` + +Note: You will be getting an email alert everyday at 7 o'clock, which is for yesterday's log. + +**`Output:`**` ` You will be getting an email alert similar to below. + +``` +# cat /tmp/logs.txt + +Hostname: 2g.server10.com + +The New User Details are below. ++------------------------------+ +2g.server10.com name=magesh +2g.server10.com name=daygeek ++------------------------------+ +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-bash-script-to-monitor-user-creation-send-email/ + +作者:[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/shell-script/ From 72bb0d8cdb8ba417ed340a924e802d44a3746e42 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 00:53:43 +0800 Subject: [PATCH 212/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=205=20Fr?= =?UTF-8?q?ee=20Partition=20Managers=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190801 5 Free Partition Managers for Linux.md --- ...801 5 Free Partition Managers for Linux.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20190801 5 Free Partition Managers for Linux.md diff --git a/sources/tech/20190801 5 Free Partition Managers for Linux.md b/sources/tech/20190801 5 Free Partition Managers for Linux.md new file mode 100644 index 0000000000..294d484145 --- /dev/null +++ b/sources/tech/20190801 5 Free Partition Managers for Linux.md @@ -0,0 +1,133 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 Free Partition Managers for Linux) +[#]: via: (https://itsfoss.com/partition-managers-linux/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +5 Free Partition Managers for Linux +====== + +_**Here’s our recommended list of partitioning tools for Linux distributions. These tools let you delete, add, tweak or resize the disk partitioning on your Linux system.**_ + +Usually, you decide the disk partitions while installing the OS. But, what if you need to modify the partitions sometime after the installation. You just can’t go back to the setup screen in any way. So, that is where partition managers (or accurately disk partition managers) come in handy. + +In most of the cases, you do not need to separately install the partition manager because it comes pre-installed. Also, it is worth noting that you can either opt for a command-line based partition manager or something with a GUI. + +Attention! + +Playing with disk partitioning is a risky task. Don’t do it unless it’s absolutely necessary. +If you are using a command line based partitioning tool, you need to learn the commands to get the job done. Or else, you might just end up wiping the entire disk. + +### 5 Tools To Manage Disk Partitions in Linux + +![][1] + +The list below is in no particular order of ranking. Most of these partitioning tools should be available in your Linux distribution’s repository. + +#### GParted + +![GParted][2] + +This could perhaps be the most popular GUI-based partition manager available for Linux distributions. You might have it pre-installed in some distributions. If you don’t, simply search for it in the software center to get it installed. + +It directly prompts you to authenticate as the root user when you launch it. So, you don’t have to utilize the terminal here – at all. After authentication, it analyzes the devices and then lets you tweak the disk partitions. You will also find an option to “Attempt Data Rescue” in case of data loss or accidental deletion of files. + +[GParted][3] + +#### GNOME Disks + +![Gnome Disks][4] + +A GUI-based partition manager that comes baked in with Ubuntu or any Ubuntu-based distros like Zorin OS. + +[][5] + +Suggested read  7 Best Linux Tools For Digital Artists + +It lets you delete, add, resize and tweak the partition. It even helps you in [formatting the USB in Ubuntu][6] if there is any problem. + +You can even attempt to repair a partition with the help of this tool. The options also include editing filesystem, creating a partition image, restoring the image, and benchmarking the partition. + +[GNOME Disks][7] + +#### KDE Partition Manager + +![Kde Partition Manager][8] + +KDE Partition Manager should probably come pre-installed on KDE-based Linux distros. But, if it isn’t there – you can search for it on the software center to easily get it installed. + +If you didn’t have it pre-installed, you might get the notice that you do not have administrative privileges when you try launching it. Without admin privileges, you cannot do anything. So, in that case, type in the following command to get started: + +``` +sudo partitionmanager +``` + +It will scan your devices and then you will be able to create, move, copy, delete, and resize partitions. You can also import/export partition tables along with a lot of other options available to tweak. + +[KDE Partition Manager][9] + +#### Fdisk [Command Line] + +![Fdisk][10] + +[Fdisk][11] is a command line utility that comes baked in with every unix-like OS. Fret not, even though it requires you to launch a terminal and enter commands – it isn’t very difficult. However, if you are too confused while using a text-based utility, you should stick to the GUI applications mentioned above. They all do the same thing. + +To launch fdisk, you will have to be the root user and specify the device to manage partitions. Here’s an example for the command to start with: + +``` +sudo fdisk /dev/sdc +``` + +You can refer to [The Linux Documentation Project’s wiki page][12] for the list of commands and more details on how it works. + +#### GNU Parted [Command Line] + +![Gnu Parted][13] + +Yet another command-line utility that you can find pre-installed on your Linux distro. You just need to enter the following command to get started: + +``` +sudo parted +``` + +**Wrapping Up** + +[][14] + +Suggested read  Best Games On Steam You Can Play On Linux and Windows + +I wouldn’t forget to mention [QtParted][15] as one of the alternatives to the list of partition managers. However, it has not been maintained for years now – so I do not recommend using it. + +What do you think about the partition managers mentioned here? Did I miss any of your favorites? Let me know and I’ll update this list of partition manager for Linux with your suggestion. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/partition-managers-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://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/disk-partitioning-tools-linux.jpg?resize=800%2C450&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/g-parted.png?ssl=1 +[3]: https://gparted.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnome-disks.png?ssl=1 +[5]: https://itsfoss.com/best-linux-graphic-design-software/ +[6]: https://itsfoss.com/format-usb-drive-sd-card-ubuntu/ +[7]: https://wiki.gnome.org/Apps/Disks +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/kde-partition-manager.jpg?resize=800%2C404&ssl=1 +[9]: https://kde.org/applications/system/org.kde.partitionmanager +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/fdisk.jpg?fit=800%2C496&ssl=1 +[11]: https://en.wikipedia.org/wiki/Fdisk +[12]: https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnu-parted.png?fit=800%2C559&ssl=1 +[14]: https://itsfoss.com/best-linux-games-steam/ +[15]: http://qtparted.sourceforge.net/ From 98dfeb25a7660c48dd56f31fa1d9153b24f75002 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 00:55:07 +0800 Subject: [PATCH 213/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190731=20Bash?= =?UTF-8?q?=20aliases=20you=20can=E2=80=99t=20live=20without?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190731 Bash aliases you can-t live without.md --- ...731 Bash aliases you can-t live without.md | 449 ++++++++++++++++++ 1 file changed, 449 insertions(+) create mode 100644 sources/tech/20190731 Bash aliases you can-t live without.md diff --git a/sources/tech/20190731 Bash aliases you can-t live without.md b/sources/tech/20190731 Bash aliases you can-t live without.md new file mode 100644 index 0000000000..7d93633b6d --- /dev/null +++ b/sources/tech/20190731 Bash aliases you can-t live without.md @@ -0,0 +1,449 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bash aliases you can’t live without) +[#]: via: (https://opensource.com/article/19/7/bash-aliases) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/samwebstudiohttps://opensource.com/users/greg-phttps://opensource.com/users/greg-p) + +Bash aliases you can’t live without +====== +Tired of typing the same long commands over and over? Do you feel +inefficient working on the command line? Bash aliases can make a world +of difference. +![bash logo on green background][1] + +A Bash alias is a method of supplementing or overriding Bash commands with new ones. Bash aliases make it easy for users to customize their experience in a [POSIX][2] terminal. They are often defined in **$HOME/.bashrc** or **$HOME/bash_aliases** (which must be loaded by **$HOME/.bashrc**). + +Most distributions add at least some popular aliases in the default **.bashrc** file of any new user account. These are simple ones to demonstrate the syntax of a Bash alias: + + +``` +alias ls='ls -F' +alias ll='ls -lh' +``` + +Not all distributions ship with pre-populated aliases, though. If you add aliases manually, then you must load them into your current Bash session: + + +``` +$ source ~/.bashrc +``` + +Otherwise, you can close your terminal and re-open it so that it reloads its configuration file. + +With those aliases defined in your Bash initialization script, you can then type **ll** and get the results of **ls -l**, and when you type **ls** you get, instead of the output of plain old ****[ls][3]. + +Those aliases are great to have, but they just scratch the surface of what’s possible. Here are the top 10 Bash aliases that, once you try them, you won’t be able to live without. + +### Set up first + +Before beginning, create a file called **~/.bash_aliases**: + + +``` +$ touch ~/.bash_aliases +``` + +Then, make sure that this code appears in your **~/.bashrc** file: + + +``` +if [ -e $HOME/.bash_aliases ]; then +    source $HOME/.bash_aliases +fi +``` + +If you want to try any of the aliases in this article for yourself, enter them into your **.bash_aliases** file, and then load them into your Bash session with the **source ~/.bashrc** command. + +### Sort by file size + +If you started your computing life with GUI file managers like Nautilus in GNOME, the Finder in MacOS, or Explorer in Windows, then you’re probably used to sorting a list of files by their size. You can do that in a terminal as well, but it’s not exactly succinct. + +Add this alias to your configuration on a GNU system: + + +``` +alias lt='ls --human-readable --size -1 -S --classify' +``` + +This alias replaces **lt** with an **ls** command that displays the size of each item, and then sorts it by size, in a single column, with a notation to indicate the kind of file. Load your new alias, and then try it out: + + +``` +$ source ~/.bashrc +$ lt +total 344K +140K configure* + 44K aclocal.m4 + 36K LICENSE + 32K config.status* + 24K Makefile + 24K Makefile.in + 12K config.log +8.0K README.md +4.0K info.slackermedia.Git-portal.json +4.0K git-portal.spec +4.0K flatpak.path.patch +4.0K Makefile.am* +4.0K dot-gitlab.ci.yml +4.0K configure.ac* +   0 autom4te.cache/ +   0 share/ +   0 bin/ +   0 install-sh@ +   0 compile@ +   0 missing@ +   0 COPYING@ +``` + +On MacOS or BSD, the **ls** command doesn’t have the same options, so this alias works instead: + + +``` +alias lt='du -sh * | sort -h' +``` + +The results of this version are a little different: + + +``` +$ du -sh * | sort -h +0       compile +0       COPYING +0       install-sh +0       missing +4.0K    configure.ac +4.0K    dot-gitlab.ci.yml +4.0K    flatpak.path.patch +4.0K    git-portal.spec +4.0K    info.slackermedia.Git-portal.json +4.0K    Makefile.am +8.0K    README.md +12K     config.log +16K     bin +24K     Makefile +24K     Makefile.in +32K     config.status +36K     LICENSE +44K     aclocal.m4 +60K     share +140K    configure +476K    autom4te.cache +``` + +In fact, even on Linux, that command is useful, because ****using **ls** lists directories and symlinks as being 0 in size, which may not be the information you actually want. It’s your choice. + +_Thanks to Brad Alexander for this alias idea._ + +### View only mounted drives + +The **mount** command used to be so simple. With just one command, you could get a list of all the mounted filesystems on your computer, and it was frequently used for an overview of what drives were attached to a workstation. It used to be impressive to see more than three or four entries because most computers don’t have many more USB ports than that, so the results were manageable. + +Computers are a little more complicated now, and between LVM, physical drives, network storage, and virtual filesystems, the results of **mount** can be difficult to parse: + + +``` +sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel) +proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) +devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=8131024k,nr_inodes=2032756,mode=755) +securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) +[...] +/dev/nvme0n1p2 on /boot type ext4 (rw,relatime,seclabel) +/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro) +[...] +gvfsd-fuse on /run/user/100977/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=100977,group_id=100977) +/dev/sda1 on /run/media/seth/pocket type ext4 (rw,nosuid,nodev,relatime,seclabel,uhelper=udisks2) +/dev/sdc1 on /run/media/seth/trip type ext4 (rw,nosuid,nodev,relatime,seclabel,uhelper=udisks2) +binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) +``` + +To solve that problem, try an alias like this: + + +``` +alias mnt='mount | awk -F' ' '{ printf "%s\t%s\n",$1,$3; }' | column -t | egrep ^/dev/ | sort' +``` + +This alias uses **awk** to parse the output of **mount** by column, reducing the output to what you probably looking for (what hard drives, and not file systems, are mounted): + + +``` +$ mnt +/dev/mapper/fedora-root  / +/dev/nvme0n1p1           /boot/efi +/dev/nvme0n1p2           /boot +/dev/sda1                /run/media/seth/pocket +/dev/sdc1                /run/media/seth/trip +``` + +On MacOS, the **mount** command doesn’t provide terribly verbose output, so an alias may be overkill. However, if you prefer a succinct report, try this: + + +``` +alias mnt='mount | grep -E ^/dev | column -t' +``` + +The results: + + +``` +$ mnt +/dev/disk1s1  on  /                (apfs,  local,  journaled) +/dev/disk1s4  on  /private/var/vm  (apfs,  local,  noexec,     journaled,  noatime,  nobrowse) +``` + +### Find a command in your grep history + +Sometimes you figure out how to do something in the terminal, and promise yourself that you’ll never forget what you’ve just learned. Then an hour goes by, and you’ve completely forgotten what you did. + +Searching through your Bash history is something everyone has to do from time to time. If you know exactly what you’re searching for, you can use **Ctrl+R** to do a reverse search through your history, but sometimes you can’t remember the exact command you want to find. + +Here’s an alias to make that task a little easier: + + +``` +alias gh='history|grep' +``` + +Here’s an example of how to use it: + + +``` +$ gh bash +482 cat ~/.bashrc | grep _alias +498 emacs ~/.bashrc +530 emacs ~/.bash_aliases +531 source ~/.bashrc +``` + +### Sort by modification time + +It happens every Monday: You get to work, you sit down at your computer, you open a terminal, and you find you’ve forgotten what you were doing last Friday. What you need is an alias to list the most recently modified files. + +You can use the **ls** command to create an alias to help you find where you left off: + + +``` +alias left='ls -t -1' +``` + +The output is simple, although you can extend it with the --**long** option if you prefer. The alias, as listed, displays this: + + +``` +$ left +demo.jpeg +demo.xcf +design-proposal.md +rejects.txt +brainstorm.txt +query-letter.xml +``` + +### Count files + +If you need to know how many files you have in a directory, the solution is one of the most classic examples of UNIX command construction: You list files with the **ls** command, control its output to be only one column with the **-1** option, and then pipe that output to the **wc** (word count) command to count how many lines of single files there are. + +It’s a brilliant demonstration of how the UNIX philosophy allows users to build their own solutions using small system components. This command combination is also a lot to type if you happen to do it several times a day, and it doesn’t exactly work for a directory of directories without using the **-R** option, which introduces new lines to the output and renders the exercise useless. + +Instead, this alias makes the process easy: + + +``` +alias count='find . -type f | wc -l' +``` + +This one counts files, ignoring directories, but _not_ the contents of directories. If you have a project folder containing two directories, each of which contains two files, the alias returns four, because there are four files in the entire project. + + +``` +$ ls +foo   bar +$ count +4 +``` + +### Create a Python virtual environment + +Do you code in Python? + +Do you code in Python a lot? + +If you do, then you know that creating a Python virtual environment requires, at the very least, 53 keystrokes. +That’s 49 too many, but that’s easily circumvented with two new aliases called **ve** and **va**: + + +``` +alias ve='python3 -m venv ./venv' +alias va='source ./venv/bin/activate' +``` + +Running **ve** creates a new directory, called **venv**, containing the usual virtual environment filesystem for Python3. The **va** alias activates the environment in your current shell: + + +``` +$ cd my-project +$ ve +$ va +(venv) $ +``` + +### Add a copy progress bar + +Everybody pokes fun at progress bars because they’re infamously inaccurate. And yet, deep down, we all seem to want them. The UNIX **cp** command has no progress bar, but it does have a **-v** option for verbosity, meaning that it echoes the name of each file being copied to your terminal. That’s a pretty good hack, but it doesn’t work so well when you’re copying one big file and want some indication of how much of the file has yet to be transferred. + +The **pv** command provides a progress bar during copy, but it’s not common as a default application. On the other hand, the **rsync** command is included in the default installation of nearly every POSIX system available, and it’s widely recognized as one of the smartest ways to copy files both remotely and locally. + +Better yet, it has a built-in progress bar. + + +``` +alias cpv='rsync -ah --info=progress2' +``` + +Using this alias is the same as using the **cp** command: + + +``` +$ cpv bigfile.flac /run/media/seth/audio/ +          3.83M 6%  213.15MB/s    0:00:00 (xfr#4, to-chk=0/4) +``` + +An interesting side effect of using this command is that **rsync** copies both files and directories without the **-r** flag that **cp** would otherwise require. + +### Protect yourself from file removal accidents + +You shouldn’t use the **rm** command. The **rm** manual even says so: + +> _Warning_: If you use ‘rm’ to remove a file, it is usually possible to recover the contents of that file. If you want more assurance that the contents are truly unrecoverable, consider using ‘shred’. + +If you want to remove a file, you should move the file to your Trash, just as you do when using a desktop. + +POSIX makes this easy, because the Trash is an accessible, actual location in your filesystem. That location may change, depending on your platform: On a [FreeDesktop][4], the Trash is located at **~/.local/share/Trash**, while on MacOS it’s **~/.Trash**, but either way, it’s just a directory into which you place files that you want out of sight until you’re ready to erase them forever. + +This simple alias provides a way to toss files into the Trash bin from your terminal: + + +``` +alias tcn='mv --force -t ~/.local/share/Trash ' +``` + +This alias uses a little-known **mv** flag that enables you to provide the file you want to move as the final argument, ignoring the usual requirement for that file to be listed first. Now you can use your new command to move files and folders to your system Trash: + + +``` +$ ls +foo  bar +$ tcn foo +$ ls +bar +``` + +Now the file is "gone," but only until you realize in a cold sweat that you still need it. At that point, you can rescue the file from your system Trash; be sure to tip the Bash and **mv** developers on the way out. + +**Note:** If you need a more robust **Trash** command with better FreeDesktop compliance, see [Trashy][5]. + +### Simplify your Git workflow + +Everyone has a unique workflow, but there are usually repetitive tasks no matter what. If you work with Git on a regular basis, then there’s probably some sequence you find yourself repeating pretty frequently. Maybe you find yourself going back to the master branch and pulling the latest changes over and over again during the day, or maybe you find yourself creating tags and then pushing them to the remote, or maybe it’s something else entirely. + +No matter what Git incantation you’ve grown tired of typing, you may be able to alleviate some pain with a Bash alias. Largely thanks to its ability to pass arguments to hooks, Git has a rich set of introspective commands that save you from having to perform uncanny feats in Bash. + +For instance, while you might struggle to locate, in Bash, a project’s top-level directory (which, as far as Bash is concerned, is an entirely arbitrary designation, since the absolute top level to a computer is the root directory), Git knows its top level with a simple query. If you study up on Git hooks, you’ll find yourself able to find out all kinds of information that Bash knows nothing about, but you can leverage that information with a Bash alias. + +Here’s an alias to find the top level of a Git project, no matter where in that project you are currently working, and then to change directory to it, change to the master branch, and perform a Git pull: + + +``` +alias startgit='cd `git rev-parse --show-toplevel` && git checkout master && git pull' +``` + +This kind of alias is by no means a universally useful alias, but it demonstrates how a relatively simple alias can eliminate a lot of laborious navigation, commands, and waiting for prompts. + +A simpler, and probably more universal, alias returns you to the Git project’s top level. This alias is useful because when you’re working on a project, that project more or less becomes your "temporary home" directory. It should be as simple to go "home" as it is to go to your actual home, and here’s an alias to do it: + + +``` +alias cg='cd `git rev-parse --show-toplevel`' +``` + +Now the command **cg** takes you to the top of your Git project, no matter how deep into its directory structure you have descended. + +### Change directories and view the contents at the same time + +It was once (allegedly) proposed by a leading scientist that we could solve many of the planet’s energy problems by harnessing the energy expended by geeks typing **cd** followed by **ls**. +It’s a common pattern, because generally when you change directories, you have the impulse or the need to see what’s around. + +But "walking" your computer’s directory tree doesn’t have to be a start-and-stop process. + +This one’s cheating, because it’s not an alias at all, but it’s a great excuse to explore Bash functions. While aliases are great for quick substitutions, Bash allows you to add local functions in your **.bashrc** file (or a separate functions file that you load into **.bashrc**, just as you do your aliases file). + +To keep things modular, create a new file called **~/.bash_functions** and then have your **.bashrc** load it: + + +``` +if [ -e $HOME/.bash_functions ]; then +    source $HOME/.bash_functions +fi +``` + +In the functions file, add this code: + + +``` +function cl() { +    DIR="$*"; +        # if no DIR given, go home +        if [ $# -lt 1 ]; then +                DIR=$HOME; +    fi; +    builtin cd "${DIR}" && \ +    # use your preferred ls command +        ls -F --color=auto +} +``` + +Load the function into your Bash session and then try it out: + + +``` +$ source ~/.bash_functions +$ cl Documents +foo bar baz +$ pwd +/home/seth/Documents +$ cl .. +Desktop  Documents  Downloads +[...] +$ pwd +/home/seth +``` + +Functions are much more flexible than aliases, but with that flexibility comes the responsibility for you to ensure that your code makes sense and does what you expect. Aliases are meant to be simple, so keep them easy, but useful. For serious modifications to how Bash behaves, use functions or custom shell scripts saved to a location in your **PATH**. + +For the record, there _are_ some clever hacks to implement the **cd** and **ls** sequence as an alias, so if you’re patient enough, then the sky is the limit even using humble aliases. + +### Start aliasing and functioning + +Customizing your environment is what makes Linux fun, and increasing your efficiency is what makes Linux life-changing. Get started with simple aliases, graduate to functions, and post your must-have aliases in the comments! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/bash-aliases + +作者:[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/sethhttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/samwebstudiohttps://opensource.com/users/greg-phttps://opensource.com/users/greg-p +[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/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/article/19/7/master-ls-command +[4]: https://www.freedesktop.org/wiki/ +[5]: https://gitlab.com/trashy/trashy From 8be7a603a619f334fb4b75fd14a116ad71bd1407 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 00:55:55 +0800 Subject: [PATCH 214/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190731=20How=20?= =?UTF-8?q?to=20structure=20a=20multi-file=20C=20program:=20Part=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190731 How to structure a multi-file C program- Part 2.md --- ...tructure a multi-file C program- Part 2.md | 229 ++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 sources/tech/20190731 How to structure a multi-file C program- Part 2.md diff --git a/sources/tech/20190731 How to structure a multi-file C program- Part 2.md b/sources/tech/20190731 How to structure a multi-file C program- Part 2.md new file mode 100644 index 0000000000..0570214eba --- /dev/null +++ b/sources/tech/20190731 How to structure a multi-file C program- Part 2.md @@ -0,0 +1,229 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to structure a multi-file C program: Part 2) +[#]: via: (https://opensource.com/article/19/7/structure-multi-file-c-part-2) +[#]: author: (Erik O'Shaughnessy https://opensource.com/users/jnyjny) + +How to structure a multi-file C program: Part 2 +====== +Dive deeper into the structure of a C program composed of multiple files +in the second part of this article. +![4 manilla folders, yellow, green, purple, blue][1] + +In [Part 1][2], I laid out the structure for a multi-file C program called [MeowMeow][3] that implements a toy [codec][4]. I also talked about the Unix philosophy of program design, laying out a number of empty files to start with a good structure from the very beginning. Lastly, I touched on what a Makefile is and what it can do for you. This article picks up where the other one left off and now I'll get to the actual implementation of our silly (but instructional) MeowMeow codec. + +The structure of the **main.c** file for **meow**/**unmeow** should be familiar to anyone who's read my article "[How to write a good C main function][5]." It has the following general outline: + + +``` +/* main.c - MeowMeow, a stream encoder/decoder */ + +/* 00 system includes */ +/* 01 project includes */ +/* 02 externs */ +/* 03 defines */ +/* 04 typedefs */ +/* 05 globals (but don't)*/ +/* 06 ancillary function prototypes if any */ +    +int main(int argc, char *argv[]) +{ +  /* 07 variable declarations */ +  /* 08 check argv[0] to see how the program was invoked */ +  /* 09 process the command line options from the user */ +  /* 10 do the needful */ +} +    +/* 11 ancillary functions if any */ +``` + +### Including project header files + +The second section, **/* 01 project includes /***, reads like this from the source: + + +``` +/* main.c - MeowMeow, a stream encoder/decoder */ +... +/* 01 project includes */ +#include "main.h" +#include "mmecode.h" +#include "mmdecode.h" +``` + +The **#include** directive is a C preprocessor command that causes the contents of the named file to be "included" at this point in the file. If the programmer uses double-quotes around the name of the header file, the compiler will look for that file in the current directory. If the file is enclosed in <>, it will look for the file in a set of predefined directories. + +The file [**main.h**][6] contains the definitions and typedefs used in [**main.c**][7]. I like to collect these things here in case I want to use those definitions elsewhere in my program. + +The files [**mmencode.h**][8] and [**mmdecode.h**][9] are nearly identical, so I'll break down **mmencode.h**. + + +``` + /* mmencode.h - MeowMeow, a stream encoder/decoder */ +    + #ifndef _MMENCODE_H + #define _MMENCODE_H +    + #include <stdio.h> +    + int mm_encode(FILE *src, FILE *dst); +    + #endif /* _MMENCODE_H */ +``` + +The **#ifdef, #define, #endif** construction is collectively known as a "guard." This keeps the C compiler from including this file more than once per file. The compiler will complain if it finds multiple definitions/prototypes/declarations, so the guard is a _must-have_ for header files. + +Inside the guard, there are only two things: an **#include** directive and a function prototype declaration. I include **stdio.h** here to bring in the definition of **FILE** that is used in the function prototype. The function prototype can be included by other C files to establish that function in the file's namespace. You can think of each file as a separate _namespace_, which means variables and functions in one file are not usable by functions or variables in another file. + +Writing header files is complex, and it is tough to manage in larger projects. Use guards. + +### MeowMeow encoding, finally + +The meat and potatoes of this program—encoding and decoding bytes into/out of **MeowMeow** strings—is actually the easy part of this project. All of our activities until now have been putting the scaffolding in place to support calling this function: parsing the command line, determining which operation to use, and opening the files that we'll operate on. Here is the encoding loop: + + +``` + /* mmencode.c - MeowMeow, a stream encoder/decoder */ + ... +     while (![feof][10](src)) { +    +       if (![fgets][11](buf, sizeof(buf), src)) +         break; +              +       for(i=0; i<[strlen][12](buf); i++) { +         lo = (buf[i] & 0x000f); +         hi = (buf[i] & 0x00f0) >> 4; +         [fputs][13](tbl[hi], dst); +         [fputs][13](tbl[lo], dst); +       } +            } +``` + +In plain English, this loop reads in a chunk of the file while there are chunks left to read (**feof(3)** and **fgets(3)**). Then it splits each byte in the chunk into **hi** and **lo** nibbles. Remember, a nibble is half of a byte, or 4 bits. The real magic here is realizing that 4 bits can encode 16 values. I use **hi** and **lo** as indices into a 16-string lookup table, **tbl**, that contains the **MeowMeow** strings that encode each nibble. Those strings are written to the destination **FILE** stream using **fputs(3)**, then we move on to the next byte in the buffer. + +The table is initialized with a macro defined in [**table.h**][14] for no particular reason except to demonstrate including another project local header file, and I like initialization macros. We will go further into why a future article. + +### MeowMeow decoding + +Alright, I'll admit it took me a couple of runs at this before I got it working. The decode loop is similar: read a buffer full of **MeowMeow** strings and reverse the encoding from strings to bytes. + + +``` + /* mmdecode.c - MeowMeow, a stream decoder/decoder */ + ... + int mm_decode(FILE *src, FILE *dst) + { +   if (!src || !dst) { +     errno = EINVAL; +     return -1; +   } +   return stupid_decode(src, dst); + } +``` + +Not what you were expecting? + +Here, I'm exposing the function **stupid_decode()** via the externally visible **mm_decode()** function. When I say "externally," I mean outside this file. Since **stupid_decode()** isn't in the header file, it isn't available to be called in other files. + +Sometimes we do this when we want to publish a solid public interface, but we aren't quite done noodling around with functions to solve a problem. In my case, I've written an I/O-intensive function that reads 8 bytes at a time from the source stream to decode 1 byte to write to the destination stream. A better implementation would work on a buffer bigger than 8 bytes at a time. A _much_ better implementation would also buffer the output bytes to reduce the number of single-byte writes to the destination stream. + + +``` + /* mmdecode.c - MeowMeow, a stream decoder/decoder */ + ... + int stupid_decode(FILE *src, FILE *dst) + { +   char           buf[9]; +   decoded_byte_t byte; +   int            i; +      +   while (![feof][10](src)) { +     if (![fgets][11](buf, sizeof(buf), src)) +       break; +     byte.field.f0 = [isupper][15](buf[0]); +     byte.field.f1 = [isupper][15](buf[1]); +     byte.field.f2 = [isupper][15](buf[2]); +     byte.field.f3 = [isupper][15](buf[3]); +     byte.field.f4 = [isupper][15](buf[4]); +     byte.field.f5 = [isupper][15](buf[5]); +     byte.field.f6 = [isupper][15](buf[6]); +     byte.field.f7 = [isupper][15](buf[7]); +        +     [fputc][16](byte.value, dst); +   } +   return 0; + } +``` + +Instead of using the bit-shifting technique I used in the encoder, I elected to create a custom data structure called **decoded_byte_t**. + + +``` + /* mmdecode.c - MeowMeow, a stream decoder/decoder */ + ... + + typedef struct { +   unsigned char f7:1; +   unsigned char f6:1; +   unsigned char f5:1; +   unsigned char f4:1; +   unsigned char f3:1; +   unsigned char f2:1; +   unsigned char f1:1; +   unsigned char f0:1; + } fields_t; +    + typedef union { +   fields_t      field; +   unsigned char value; + } decoded_byte_t; +``` + +It's a little complex when viewed all at once, but hang tight. The **decoded_byte_t** is defined as a **union** of a **fields_t** and an **unsigned char**. The named members of a union can be thought of as aliases for the same region of memory. In this case, **value** and **field** refer to the same 8-bit region of memory. Setting **field.f0** to 1 would also set the least significant bit in **value**. + +While **unsigned char** shouldn't be a mystery, the **typedef** for **fields_t** might look a little unfamiliar. Modern C compilers allow programmers to specify "bit fields" in a **struct**. The field type needs to be an unsigned integral type, and the member identifier is followed by a colon and an integer that specifies the length of the bit field. + +This data structure makes it simple to access each bit in the byte by field name and then access the assembled value via the **value** field of the union. We depend on the compiler to generate the correct bit-shifting instructions to access the fields, which can save you a lot of heartburn when you are debugging. + +Lastly, **stupid_decode()** is _stupid_ because it only reads 8 bytes at a time from the source **FILE** stream. Usually, we try to minimize the number of reads and writes to improve performance and reduce our cost of system calls. Remember that reading or writing a bigger chunk less often is much better than reading/writing a lot of smaller chunks more frequently. + +### The wrap-up + +Writing a multi-file program in C requires a little more planning on behalf of the programmer than just a single **main.c**. But just a little effort up front can save a lot of time and headache when you refactor as you add functionality. + +To recap, I like to have a lot of files with a few short functions in them. I like to expose a small subset of the functions in those files via header files. I like to keep my constants in header files, both numeric and string constants. I _love_ Makefiles and use them instead of Bash scripts to automate all sorts of things. I like my **main()** function to handle command-line argument parsing and act as a scaffold for the primary functionality of the program. + +I know I've only touched the surface of what's going on in this simple program, and I'm excited to learn what things were helpful to you and which topics need better explanations. Share your thoughts in the comments to let me know. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/structure-multi-file-c-part-2 + +作者:[Erik O'Shaughnessy][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/jnyjny +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/file_system.jpg?itok=pzCrX1Kc (4 manilla folders, yellow, green, purple, blue) +[2]: https://opensource.com/article/19/7/how-structure-multi-file-c-program-part-1 +[3]: https://github.com/jnyjny/MeowMeow.git +[4]: https://en.wikipedia.org/wiki/Codec +[5]: https://opensource.com/article/19/5/how-write-good-c-main-function +[6]: https://github.com/JnyJny/meowmeow/blob/master/main.h +[7]: https://github.com/JnyJny/meowmeow/blob/master/main.c +[8]: https://github.com/JnyJny/meowmeow/blob/master/mmencode.h +[9]: https://github.com/JnyJny/meowmeow/blob/master/mmdecode.h +[10]: http://www.opengroup.org/onlinepubs/009695399/functions/feof.html +[11]: http://www.opengroup.org/onlinepubs/009695399/functions/fgets.html +[12]: http://www.opengroup.org/onlinepubs/009695399/functions/strlen.html +[13]: http://www.opengroup.org/onlinepubs/009695399/functions/fputs.html +[14]: https://github.com/JnyJny/meowmeow/blob/master/table.h +[15]: http://www.opengroup.org/onlinepubs/009695399/functions/isupper.html +[16]: http://www.opengroup.org/onlinepubs/009695399/functions/fputc.html From d251822e5d4ce9442dc6ea31d981f006d3c98dec Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 00:57:39 +0800 Subject: [PATCH 215/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20From?= =?UTF-8?q?=20e-learning=20to=20m-learning:=20Open=20education's=20next=20?= =?UTF-8?q?move?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md --- ... m-learning- Open education-s next move.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md diff --git a/sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md b/sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md new file mode 100644 index 0000000000..cb5bd4baae --- /dev/null +++ b/sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md @@ -0,0 +1,87 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (From e-learning to m-learning: Open education's next move) +[#]: via: (https://opensource.com/open-organization/19/7/m-learning-open-education) +[#]: author: (Jim Hall https://opensource.com/users/jim-hallhttps://opensource.com/users/mysentimentshttps://opensource.com/users/petercheerhttps://opensource.com/users/jenkelchnerhttps://opensource.com/users/gkftii) + +From e-learning to m-learning: Open education's next move +====== +"Open education" means more than teaching with open source software. It +means being open to meeting students wherever they are. +![A person looking at a phone][1] + +> "Access to computers and the Internet has become a basic need for education in our society."‒U.S. Senator Kent Conrad, 2004 + +I spent seventeen years working in higher education, both as a campus technology leader and as an adjunct professor. Today, I continue as an adjunct professor. I know firsthand that educational technology is invaluable to the teaching and learning mission of universities—and that it changes at a rapid pace. + +Higher education is often an entrepreneurial space, seizing on new opportunities to deliver the best value. Too often, however, institutions spend a year or more to designing, bidding on, selecting, purchasing, building, or implementing new education technologies in the service of the teaching and learning mission. But in that yearlong interim, the technology landscape may change so much that the solution delivered no longer addresses the needs of the education community. + +What's more, technological solutions often re-entrench traditional educational models that aren't as effective today as they once were. The "closed" classroom featuring the model of teacher as a "sage on a stage" can no longer be the norm. + +Education needs to evolve and embrace new technologies and new modes of learning if we are to meet our students' needs. + +### Shifts in teaching and learning + +The next fundamental technological shift at universities will impact how students interface with teaching and learning. To understand the new learning landscape, let me first provide the context of previous methods. + +Learning has always been about students sitting in a classroom, pen and paper in hand, taking notes during a professor's lecture. We've experienced variations on this mode over time (such as small group breakout discussions and inverted classrooms) but most classes involve some version of this teaching model. + +In the 1980s, IBM introduced the IBM-PC, which put individual computing power into the hands of everyone, including students. Overnight, institutions needed to integrate the new technology into their pedagogies. + +The PC changed the teaching and learning landscape. Certainly students needed to learn the new software. Students previously wrote papers by hand—a methodology that directly mirrored work in the professional world. But with the introduction of the PC, modern students now needed to learn new skills. + +For example, writing-intensive courses could no longer expect students to use a standard typewriter to write papers. That would be like expecting handwritten papers in the era of the typewriter. "Keyboarding" became a new skill, replacing "typing" classes in most institutions. Rather than simply learning to type on a typewriter, students needed to learn the new "word processing" software available on the new PC. + +The thought process behind writing remains the same, only the tools change. In this case, the PC introduced an additional component to teaching and learning: Students learned the same writing _process_, but now learned new skills in the _mechanics_ of writing via word processing software. + +### M-learning means mobile learning + +Technology is changing, and will continue to evolve. How will students access information next year? Five years from now? Ten years from now? We cannot expect to rely on old models. And campuses need to look toward the technology horizon and consider how to prepare for that new landscape in the face of new technologies. + +Universities cannot rest on the accomplishments of e-learning. How students interface with e-learning continues to evolve, and is already changing. + +In response to today's ubiquitous computing trends across higher education, many institutions have already adopted electronic learning system, or "e-learning." If you have stepped into a college campus in the last few years, you'll already be familiar with central systems that provide a single place for students to turn in homework, respond to quizzes, interact with other students, ask questions of the instructor, receive grades, and track other progress in their courses. Universities that adopt e-learning are evolving to the classroom of the future. + +But these universities cannot rest on the accomplishments of e-learning. How students interface with e-learning continues to evolve, and is already changing. + +By my count, only two years ago students preferred laptops for their personal computing devices. Since then, smaller mobile devices have overtaken the classroom. Students still use laptops for _creating_ content, such as writing papers, but they increasingly use mobile devices such as phones to _consume_ content. This trend is increasing. According to research by Nielsen conducted a few years ago, [98% of surveyed Millennials aged 18 to 24 said they owned a smartphone][2]. + +In a listening session with my campus, I heard one major concern from our students: How could they could access e-learning systems from their phones? With loud voices, students asked for e-learning interfaces that supported their smartphones. Electronic learning had shifted from "e-learning" to mobile learning, or "m-learning." + +In turn, this meant we needed better mobile carrier reception across campus. The focus changes again—this time, from providing high-quality, high-speed WiFi networks to every corner of campus to ensuring the mobile carriers could provide their own coverage across campus. With smartphones, and with m-learning, students now expect to "bring their network with them." + +### Finding the future landscape + +This radically changes the model of e-learning and how students access e-learning systems. M-learning is about responding to _the mobility of the student_, and recognizing that _students can continue to learn wherever they are_. Students don't want to be anchored to the four walls of a classroom. + +Our responsibility as stewards of education is to discover the next educational computing methods in partnership with the students we serve. + +How will the future unfold? The future is always changing, so I cannot give a complete picture of the future of learning. But I can describe the trends that we will see. + +Mobile computing and m-learning will only expand. In the next five years, campuses that have dedicated computer labs will be in the minority. Instead of dedicated spaces, students will need to access software and programs from these "labs" through a "virtual lab." If this sounds similar to today's model of a laptop connected to a virtual lab, that's to be expected. The model isn't likely to change much; education will be via m-learning and mobile devices for the foreseeable future. + +Even after education fully adopts m-learning, change will continue. Students won't stop discovering new ways of learning, and they'll demand those new methods from their institutions. We will move beyond m-learning to new modes we have yet to uncover. That's the reality of educational technology. + +Our responsibility as stewards of education is to discover the next educational computing methods _in partnership_ with the students we serve. To meet the challenges this future technology landscape presents us, we cannot expect an ivory tower to dictate how students will adopt technology. That era is long past. Instead, institutions need to work together with students—and examine how to adapt technology to serve students. + +_(This article is part of the_ [Open Organization Guide for Educators][3] _project.)_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/19/7/m-learning-open-education + +作者:[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-hallhttps://opensource.com/users/mysentimentshttps://opensource.com/users/petercheerhttps://opensource.com/users/jenkelchnerhttps://opensource.com/users/gkftii +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_mobile_phone.png?itok=RqVtvxkd (A person looking at a phone) +[2]: https://www.nielsen.com/us/en/insights/article/2016/millennials-are-top-smartphone-users/ +[3]: https://github.com/open-organization-ambassadors/open-org-educators-guide From 24fac4371123f5da079c4c142cfff6c06f4f0b7d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 00:58:27 +0800 Subject: [PATCH 216/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20How=20?= =?UTF-8?q?to=20create=20a=20pull=20request=20in=20GitHub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190730 How to create a pull request in GitHub.md --- ... How to create a pull request in GitHub.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20190730 How to create a pull request in GitHub.md diff --git a/sources/tech/20190730 How to create a pull request in GitHub.md b/sources/tech/20190730 How to create a pull request in GitHub.md new file mode 100644 index 0000000000..41d49bbea5 --- /dev/null +++ b/sources/tech/20190730 How to create a pull request in GitHub.md @@ -0,0 +1,144 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to create a pull request in GitHub) +[#]: via: (https://opensource.com/article/19/7/create-pull-request-github) +[#]: author: (Kedar Vijay Kulkarni https://opensource.com/users/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p) + +How to create a pull request in GitHub +====== +Learn how to fork a repo, make changes, and ask the maintainers to +review and merge it. +![a checklist for a team][1] + +So, you know how to use git. You have a [GitHub][2] repo and can push to it. All is well. But how the heck do you contribute to other people's GitHub projects? That is what I wanted to know after I learned git and GitHub. In this article, I will explain how to fork a git repo, make changes, and submit a pull request. + +When you want to work on a GitHub project, the first step is to fork a repo. + +![Forking a GitHub repo][3] + +Use [my demo repo][4] to try it out. + +Once there, click on the **Fork** button in the top-right corner. This creates a new copy of my demo repo under your GitHub user account with a URL like: + + +``` +`https://github.com//demo` +``` + +The copy includes all the code, branches, and commits from the original repo. + +Next, clone the repo by opening the terminal on your computer and running the command: + + +``` +`git clone https://github.com//demo` +``` + +Once the repo is cloned, you need to do two things: + + 1. Create a new branch by issuing the command: + + +``` +`git checkout -b new_branch` +``` + + 2. Create a new remote for the upstream repo with the command: + + +``` +`git remote add upstream https://github.com/kedark3/demo` +``` + + + + +In this case, "upstream repo" refers to the original repo you created your fork from. + +Now you can make changes to the code. The following code creates a new branch, makes an arbitrary change, and pushes it to **new_branch**: + + +``` +$ git checkout -b new_branch +Switched to a new branch ‘new_branch’ +$ echo “some test file” > test +$ cat test +Some test file +$ git status +On branch new_branch +No commits yet +Untracked files: +  (use "git add <file>..." to include in what will be committed) +    test +nothing added to commit but untracked files present (use "git add" to track) +$ git add test +$ git commit -S -m "Adding a test file to new_branch" +[new_branch (root-commit) 4265ec8] Adding a test file to new_branch + 1 file changed, 1 insertion(+) + create mode 100644 test +$ git push -u origin new_branch +Enumerating objects: 3, done. +Counting objects: 100% (3/3), done. +Writing objects: 100% (3/3), 918 bytes | 918.00 KiB/s, done. +Total 3 (delta 0), reused 0 (delta 0) +Remote: Create a pull request for ‘new_branch’ on GitHub by visiting: +Remote:   +Remote: + * [new branch]         new_branch -> new_branch +``` + +Once you push the changes to your repo, the **Compare & pull request** button will appear in GitHub. + +![GitHub's Compare & Pull Request button][5] + +Click it and you'll be taken to this screen: + +![GitHub's Open pull request button][6] + +Open a pull request by clicking the **Create pull request** button. This allows the repo's maintainers to review your contribution. From here, they can merge it if it is good, or they may ask you to make some changes. + +### TLDR + +In summary, if you want to contribute to a project, the simplest way is to: + + 1. Find a project you want to contribute to + 2. Fork it + 3. Clone it to your local system + 4. Make a new branch + 5. Make your changes + 6. Push it back to your repo + 7. Click the **Compare & pull request** button + 8. Click **Create pull request** to open a new pull request + + + +If the reviewers ask for changes, repeat steps 5 and 6 to add more commits to your pull request. + +Happy coding! + +In a previous article , I discussed the complaints that have been leveled against GitHub during the... + +Arfon Smith works at GitHub and is involved in a number of activities at the intersection of open... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/create-pull-request-github + +作者:[Kedar Vijay Kulkarni][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/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) +[2]: https://github.com/ +[3]: https://opensource.com/sites/default/files/uploads/forkrepo.png (Forking a GitHub repo) +[4]: https://github.com/kedark3/demo +[5]: https://opensource.com/sites/default/files/uploads/compare-and-pull-request-button.png (GitHub's Compare & Pull Request button) +[6]: https://opensource.com/sites/default/files/uploads/open-a-pull-request_crop.png (GitHub's Open pull request button) From 31113daede5d0f86d9f47abdb9577bcca76d774c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 00:59:03 +0800 Subject: [PATCH 217/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20Using?= =?UTF-8?q?=20Python=20to=20explore=20Google's=20Natural=20Language=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190730 Using Python to explore Google-s Natural Language API.md --- ...o explore Google-s Natural Language API.md | 304 ++++++++++++++++++ 1 file changed, 304 insertions(+) create mode 100644 sources/tech/20190730 Using Python to explore Google-s Natural Language API.md diff --git a/sources/tech/20190730 Using Python to explore Google-s Natural Language API.md b/sources/tech/20190730 Using Python to explore Google-s Natural Language API.md new file mode 100644 index 0000000000..b5f8611a1c --- /dev/null +++ b/sources/tech/20190730 Using Python to explore Google-s Natural Language API.md @@ -0,0 +1,304 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using Python to explore Google's Natural Language API) +[#]: via: (https://opensource.com/article/19/7/python-google-natural-language-api) +[#]: author: (JR Oakes https://opensource.com/users/jroakes) + +Using Python to explore Google's Natural Language API +====== +Google's API can surface clues to how Google is classifying your site +and ways to tweak your content to improve search results. +![magnifying glass on computer screen][1] + +As a technical search engine optimizer, I am always looking for ways to use data in novel ways to better understand how Google ranks websites. I recently investigated whether Google's [Natural Language API][2] could better inform how Google may be classifying a site's content. + +Although there are [open source NLP tools][3], I wanted to explore Google's tools under the assumption it might use the same tech in other products, like Search. This article introduces Google's Natural Language API and explores common natural language processing (NLP) tasks and how they might be used to inform website content creation. + +### Understanding the data types + +To begin, it is important to understand the types of data that Google's Natural Language API returns. + +#### Entities + +Entities are text phrases that can be tied back to something in the physical world. Named entity recognition (NER) is a difficult part of NLP because tools often need to look at the full context around words to understand their usage. For example, homographs are spelled the same but have multiple meanings. Does "lead" in a sentence refer to a metal (a noun), causing someone to move (a verb), or the main character in a play (also a noun)? Google has 12 distinct types of entities, as well as a 13th catch-all category called "UNKNOWN." Some of the entities tie back to Wikipedia articles, suggesting [Knowledge Graph][4] influence on the data. Each entity returns a salience score, which is its overall relevance to the supplied text. + +![Entities][5] + +#### Sentiment + +Sentiment, a view of or attitude towards something, is measured at the document and sentence level and for individual entities discovered in the document. The score of the sentiment ranges from -1.0 (negative) to 1.0 (positive). The magnitude represents the non-normalized strength of emotion; it ranges between 0.0 and infinity. + +![Sentiment][6] + +#### Syntax + +Syntax parsing contains most of the common NLP activities found in better libraries, like [lemmatization][7], [part-of-speech tagging][8], and [dependency-tree parsing][9]. NLP mainly deals with helping machines understand text and the relationship between words. Syntax parsing is a foundational part of most language-processing or understanding tasks. + +![Syntax][10] + +#### Categories + +Categories assign the entire given content to a specific industry or topical category with a confidence score from 0.0 to 1.0. The categories appear to be the same audience and website categories used by other Google tools, like AdWords. + +![Categories][11] + +### Pulling some data + +Now I'll pull some sample data to play around with. I gathered some search queries and their corresponding URLs using Google's [Search Console API][12]. Google Search Console is a tool that reports the terms people use to find a website's pages with Google Search. This [open source Jupyter notebook][13] allows you to pull similar data about your website. For this example, I pulled Google Search Console data on a website (which I won't name) generated between January 1 and June 1, 2019, and restricted it to queries that received at least one click (as opposed to just impressions). + +This dataset contains information on 2,969 pages and 7,144 queries that displayed the website's pages in Google Search results. The table below shows that the vast majority of pages received very few clicks, as this site focuses on what is called long-tail (more specific and usually longer) as opposed to short-tail (very general, higher search volume) search queries. + +![Histogram of clicks for all pages][14] + +To reduce the dataset size and get only top-performing pages, I limited the dataset to pages that received at least 20 impressions over the period. This is the histogram of clicks by page for this refined dataset, which includes 723 pages: + +![Histogram of clicks for subset of pages][15] + +### Using Google's Natural Language API library in Python + +To test out the API, create a small script that leverages the **[google-cloud-language][16]** library in Python. The following code is Python 3.5+. + +First, activate a new virtual environment and install the libraries. Replace **<your-env>** with a unique name for the environment. + + +``` +virtualenv <your-env> +source <your-env>/bin/activate +pip install --upgrade google-cloud-language +pip install --upgrade requests +``` + +This script extracts HTML from a URL and feeds the HTML to the Natural Language API. It returns a dictionary of **sentiment**, **entities**, and **categories**, where the values for these keys are all lists. I used a Jupyter notebook to run this code because it makes it easier to annotate and retry code using the same kernel. + + +``` +# Import needed libraries +import requests +import json + +from google.cloud import language +from google.oauth2 import service_account +from google.cloud.language import enums +from google.cloud.language import types + +# Build language API client (requires service account key) +client = language.LanguageServiceClient.from_service_account_json('services.json') + +# Define functions +def pull_googlenlp(client, url, invalid_types = ['OTHER'], **data): +    +        html = load_text_from_url(url, **data) +    +        if not html: +        return None +    +        document = types.Document( +        content=html, +        type=language.enums.Document.Type.HTML ) + +        features = {'extract_syntax': True, +                'extract_entities': True, +                'extract_document_sentiment': True, +                'extract_entity_sentiment': True, +                'classify_text': False +                } +    +        response = client.annotate_text(document=document, features=features) +        sentiment = response.document_sentiment +        entities = response.entities +    +        response = client.classify_text(document) +        categories = response.categories +          +        def get_type(type): +        return client.enums.Entity.Type(entity.type).name +    +        result = {} +    +        result['sentiment'] = []     +        result['entities'] = [] +        result['categories'] = [] + +        if sentiment: +        result['sentiment'] = [{ 'magnitude': sentiment.magnitude, 'score':sentiment.score }] +          +        for entity in entities: +        if get_type(entity.type) not in invalid_types: +                result['entities'].append({'name': entity.name, 'type': get_type(entity.type), 'salience': entity.salience, 'wikipedia_url': entity.metadata.get('wikipedia_url', '-')  }) +          +        for category in categories: +        result['categories'].append({'name':category.name, 'confidence': category.confidence}) +          +          +        return result + +def load_text_from_url(url, **data): + +        timeout = data.get('timeout', 20) +    +        results = [] +    +        try: +          +        print("Extracting text from: {}".format(url)) +        response = requests.get(url, timeout=timeout) + +        text = response.text +        status = response.status_code + +        if status == 200 and len(text) > 0: +                return text +          +        return None +          + +        except Exception as e: +        print('Problem with url: {0}.'.format(url)) +        return None +``` + +To access the API, follow Google's [quickstart instructions][17] to create a project in Google Cloud Console, enable the API, and download a service account key. Afterward, you should have a JSON file that looks similar to this: + +![services.json file][18] + +Upload it to your project folder with the name **services.json**. + +Then you can pull the API data for any URL (such as Opensource.com) by running the following: + + +``` +url = "" +pull_googlenlp(client,url) +``` + +If it's set up correctly, you should see this output: + +![Output from pulling API data][19] + +To make it easier to get started, I created a [Jupyter Notebook][20] that you can download and use to test extracting web pages' entities, categories, and sentiment. I prefer using [JupyterLab][21], which is an extension of Jupyter Notebooks that includes a file viewer and other enhanced user experience features. If you're new to these tools, I think [Anaconda][22] is the easiest way to get started using Python and Jupyter. It makes installing and setting up Python, as well as common libraries, very easy, especially on Windows. + +### Playing with the data + +With these functions that scrape the HTML of the given page and pass it to the Natural Language API, I can run some analysis across the 723 URLs. First, I'll look at the categories relevant to the site by looking at the count of returned top categories across all pages. + +#### Categories + +![Categories data from example site][23] + +This seems to be a fairly accurate representation of the key themes of this particular site. Looking at a single query that one of the top-performing pages ranks for, I can compare the other ranking pages in Google's results for that same query. + + * _URL 1 | Top Category: /Law & Government/Legal (0.5099999904632568) of 1 total categories._ + * _No categories returned._ + * _URL 3 | Top Category: /Internet & Telecom/Mobile & Wireless (0.6100000143051147) of 1 total categories._ + * _URL 4 | Top Category: /Computers & Electronics/Software (0.5799999833106995) of 2 total categories._ + * _URL 5 | Top Category: /Internet & Telecom/Mobile & Wireless/Mobile Apps & Add-Ons (0.75) of 1 total categories._ + * _No categories returned._ + * _URL 7 | Top Category: /Computers & Electronics/Software/Business & Productivity Software (0.7099999785423279) of 2 total categories._ + * _URL 8 | Top Category: /Law & Government/Legal (0.8999999761581421) of 3 total categories._ + * _URL 9 | Top Category: /Reference/General Reference/Forms Guides & Templates (0.6399999856948853) of 1 total categories._ + * _No categories returned._ + + + +The numbers in parentheses above represent Google's confidence that the content of the page is relevant for that category. The eighth result has much higher confidence than the first result for the same category, so this doesn't seem to be a magic bullet for defining relevance for ranking. Also, the categories are much too broad to make sense for a specific search topic. + +Looking at average confidence by ranking position, there doesn't seem to be a correlation between these two metrics, at least for this dataset: + +![Plot of average confidence by ranking position ][24] + +Both of these approaches make sense to review for a website at scale to ensure the content categories seem appropriate, and boilerplate or sales content isn't moving your pages out of relevance for your main expertise area. Think if you sell industrial supplies, but your pages return _Marketing_ as the main category. There doesn't seem to be a strong suggestion that category relevancy has anything to do with how well you rank, at least at a page level. + +#### Sentiment + +I won't spend much time on sentiment. Across all the pages that returned a sentiment from the API, they fell into two bins: 0.1 and 0.2, which is almost neutral sentiment. Based on the histogram, it is easy to tell that sentiment doesn't provide much value. It would be a much more interesting metric to run for a news or opinion site to measure the correlation of sentiment to median rank for particular pages. + +![Histogram of sentiment for unique pages][25] + +#### Entities + +Entities were the most interesting part of the API, in my opinion. This is a selection of the top entities, across all pages, by salience (or relevancy to the page). Notice that Google is inferring different types for the same terms (Bill of Sale), perhaps incorrectly. This is caused by the terms appearing in different contexts in the content. + +![Top entities for example site][26] + +Then I looked at each entity type individually and all together to see if there was any correlation between the salience of the entity and the best-ranking position of the page. For each type, I matched the salience (overall relevance to the page) of the top entity matching that type ordered by salience (descending). + +Some of the entity types returned zero salience across all examples, so I omitted those results from the charts below. + +![Correlation between salience and best ranking position][27] + +The **Consumer Good** entity type had the highest positive correlation, with a Pearson correlation of 0.15854, although since lower-numbered rankings are better, the **Person** entity had the best result with a -0.15483 correlation. This is an extremely small sample set, especially for individual entity types, so I can't make too much of the data. I didn't find any value with a strong correlation, but the **Person** entity makes the most sense. Sites usually have pages about their chief executive and other key employees, and these pages are very likely to do well in search results for those queries. + +Moving on, while looking at the site holistically, the following themes emerge based on **entity** **name** and **entity type**. + +![Themes based on entity name and entity type][28] + +I blurred a few results that seem too specific to mask the site's identity. Thematically, the name information is a good way to look topically at your (or a competitor's) site to see its core themes. This was done based only on the example site's ranking URLs and not all the site's possible URLs (Since Search Console data only reports on pages that received impressions in Google), but the results would be interesting, especially if you were to pull a site's main ranking URLs from a tool like [Ahrefs][29], which tracks many, many queries and the Google results for those queries. + +The other interesting piece in the entity data is that entities marked **CONSUMER_GOOD** tended to "look" like results I have seen in Knowledge Results, i.e., the Google Search results on the right-hand side of the page. + +![Google search results][30] + +Of the **Consumer Good** entity names from our data set that had three or more words, 5.8% had the same Knowledge Results as Google's results for the entity name. This means, if you searched for the term or phrase in Google, the block on the right (eg. the Knowledge Results showing Linux above), would display in the search result page. Since Google "picks" an exemplar webpage to represent the entity, it is a good opportunity to identify opportunities to be singularly featured in search results. Also of interest, of the 5.8% names that displayed these Knowledge Results in Google, none of the entities had Wikipedia URLs returned from the Natural Language API. This is interesting enough to warrant additional analysis. It would be very useful, especially for more esoteric topics that traditional global rank-tracking tools, like Ahrefs, don't have in their databases. + +As mentioned, the Knowledge Results can be important to site owners who want to have their content featured in Google, as they are strongly highlighted on desktop search. They are also more than likely, hypothetically, to line up with knowledge-base topics from Google [Discover][31], an offering for Android and iOS that attempts to surface content for users based on topics they are interested in but haven't searched explicitly for. + +### Wrapping up + +This article went over Google's Natural Language API, shared some code, and investigated ways this API may be useful for site owners. The key takeaways are: + + * Learning to use Python and Jupyter Notebooks opens your data-gathering tasks to a world of incredible APIs and open source projects (like Pandas and NumPy) built by incredibly smart and talented people. + * Python allows me to quickly pull and test my hypothesis about the value of an API for a particular purpose. + * Passing a website's pages through Google's categorization API may be a good check to ensure its content falls into the correct thematic categories. Doing this for competitors' sites may also offer guidance on where to tune-up or create content. + * Google's sentiment score didn't seem to be an interesting metric for the example site, but it may be for news or opinion-based sites. + * Google's found entities gave a much more granular topic-level view of the website holistically and, like categorization, would be very interesting to use in competitive content analysis. + * Entities may help define opportunities where your content can line up with Google Knowledge blocks in search results or Google Discover results. With 5.8% of our results set for longer (word count) **Consumer Goods** entities, displaying these results, there may be opportunities, for some sites, to better optimize their page's salience score for these entities to stand a better chance of capturing this featured placement in Google search results or Google Discovers suggestions. + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/python-google-natural-language-api + +作者:[JR Oakes][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/jroakes +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) +[2]: https://cloud.google.com/natural-language/#natural-language-api-demo +[3]: https://opensource.com/article/19/3/natural-language-processing-tools +[4]: https://en.wikipedia.org/wiki/Knowledge_Graph +[5]: https://opensource.com/sites/default/files/uploads/entities.png (Entities) +[6]: https://opensource.com/sites/default/files/uploads/sentiment.png (Sentiment) +[7]: https://en.wikipedia.org/wiki/Lemmatisation +[8]: https://en.wikipedia.org/wiki/Part-of-speech_tagging +[9]: https://en.wikipedia.org/wiki/Parse_tree#Dependency-based_parse_trees +[10]: https://opensource.com/sites/default/files/uploads/syntax.png (Syntax) +[11]: https://opensource.com/sites/default/files/uploads/categories.png (Categories) +[12]: https://developers.google.com/webmaster-tools/ +[13]: https://github.com/MLTSEO/MLTS/blob/master/Demos.ipynb +[14]: https://opensource.com/sites/default/files/uploads/histogram_1.png (Histogram of clicks for all pages) +[15]: https://opensource.com/sites/default/files/uploads/histogram_2.png (Histogram of clicks for subset of pages) +[16]: https://pypi.org/project/google-cloud-language/ +[17]: https://cloud.google.com/natural-language/docs/quickstart +[18]: https://opensource.com/sites/default/files/uploads/json_file.png (services.json file) +[19]: https://opensource.com/sites/default/files/uploads/output.png (Output from pulling API data) +[20]: https://github.com/MLTSEO/MLTS/blob/master/Tutorials/Google_Language_API_Intro.ipynb +[21]: https://github.com/jupyterlab/jupyterlab +[22]: https://www.anaconda.com/distribution/ +[23]: https://opensource.com/sites/default/files/uploads/categories_2.png (Categories data from example site) +[24]: https://opensource.com/sites/default/files/uploads/plot.png (Plot of average confidence by ranking position ) +[25]: https://opensource.com/sites/default/files/uploads/histogram_3.png (Histogram of sentiment for unique pages) +[26]: https://opensource.com/sites/default/files/uploads/entities_2.png (Top entities for example site) +[27]: https://opensource.com/sites/default/files/uploads/salience_plots.png (Correlation between salience and best ranking position) +[28]: https://opensource.com/sites/default/files/uploads/themes.png (Themes based on entity name and entity type) +[29]: https://ahrefs.com/ +[30]: https://opensource.com/sites/default/files/uploads/googleresults.png (Google search results) +[31]: https://www.blog.google/products/search/introducing-google-discover/ From 5ce84594a8125f09d8abfb12599edd0832a114a4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 01:00:00 +0800 Subject: [PATCH 218/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190731=20Remote?= =?UTF-8?q?=20code=20execution=20is=20possible=20by=20exploiting=20flaws?= =?UTF-8?q?=20in=20Vxworks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190731 Remote code execution is possible by exploiting flaws in Vxworks.md --- ...possible by exploiting flaws in Vxworks.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/talk/20190731 Remote code execution is possible by exploiting flaws in Vxworks.md diff --git a/sources/talk/20190731 Remote code execution is possible by exploiting flaws in Vxworks.md b/sources/talk/20190731 Remote code execution is possible by exploiting flaws in Vxworks.md new file mode 100644 index 0000000000..7fa6eaa226 --- /dev/null +++ b/sources/talk/20190731 Remote code execution is possible by exploiting flaws in Vxworks.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Remote code execution is possible by exploiting flaws in Vxworks) +[#]: via: (https://www.networkworld.com/article/3428996/remote-code-execution-is-possible-by-exploiting-flaws-in-vxworks.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +Remote code execution is possible by exploiting flaws in Vxworks +====== + +![Thinkstock][1] + +Eleven zero-day vulnerabilities in WindRiver’s VxWorks, a real-time operating system in use across an advertised 2 billion connected devices have been discovered by network security vendor Armis. + +Six of the vulnerabilities could enable remote attackers to access unpatched systems without any user interaction, even through a firewall according to Armis. + +**About IoT:** + + * [What is the IoT? How the internet of things works][2] + * [What is edge computing and how it’s changing the network][3] + * [Most powerful Internet of Things companies][4] + * [10 Hot IoT startups to watch][5] + * [The 6 ways to make money in IoT][6] + * [What is digital twin technology? [and why it matters]][7] + * [Blockchain, service-centric networking key to IoT success][8] + * [Getting grounded in IoT networking and security][9] + * [Building IoT-ready networks must become a priority][10] + * [What is the Industrial IoT? [And why the stakes are so high]][11] + + + +The vulnerabilities affect all devices running VxWorks version 6.5 and later with the exception of VxWorks 7, issued July 19, which patches the flaws. That means the attack windows may have been open for more than 13 years. + +Armis Labs said that affected devices included SCADA controllers, patient monitors, MRI machines, VOIP phones and even network firewalls, specifying that users in the medical and industrial fields should be particularly quick about patching the software. + +Thanks to remote-code-execution vulnerabilities, unpatched devices can be compromised by a maliciously crafted IP packet that doesn’t need device-specific tailoring, and every vulnerable device on a given network can be targeted more or less simultaneously. + +The Armis researchers said that, because the most severe of the issues targets “esoteric parts of the TCP/IP stack that are almost never used by legitimate applications,” specific rules for the open source Snort security framework can be imposed to detect exploits. + +VxWorks, which has been in use since the 1980s, is a popular real-time OS, used in industrial, medical and many other applications that require extremely low latency and response time. While highly reliable, the inability to install a security agent alongside the operating system makes it vulnerable, said Armis, and the proprietary source code makes it more difficult to detect problems. + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][12] ]** + +Armis argued that more attention has to be paid by security researchers to real-time operating systems, particularly given the explosive growth in IoT usage – for one thing, the researchers said, any software that doesn’t get thoroughly researched runs a higher risk of having serious vulnerabilities go unaddressed. For another, the critical nature of many IoT use cases means that the consequences of a compromised device are potentially very serious. + +“It is inconvenient to have your phone put out of use, but it’s an entirely different story to have your manufacturing plant shut down,” the Armis team wrote. “A compromised industrial controller could shut down a factory, and a pwned patient monitor could have a life-threatening effect.” + +In addition to the six headlining vulnerabilities, five somewhat less serious security holes were found. These could lead to consequences ranging from denial of service and leaked information to logic flaws and memory issues. + +More technical details and a fuller overview of the problem can be found at the Armis Labs blog post here, and there are partial lists available of companies and devices that run VxWorks available [on Wikipedia][13] and at [Wind River’s customer page][14]. Wind River itself issued a security advisory [here][15], which contains some potential mitigation techniques. + +Join the Network World communities on [Facebook][16] and [LinkedIn][17] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3428996/remote-code-execution-is-possible-by-exploiting-flaws-in-vxworks.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://images.idgesg.net/images/article/2017/09/iot-security11-100735405-large.jpg +[2]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html +[3]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html +[4]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html +[5]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html +[6]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html +[7]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html +[8]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html +[9]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html +[10]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html +[11]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[12]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[13]: https://en.wikipedia.org/wiki/VxWorks#Notable_uses +[14]: https://www.windriver.com/customers/ +[15]: https://www.windriver.com/security/announcements/tcp-ip-network-stack-ipnet-urgent11/security-advisory-ipnet/ +[16]: https://www.facebook.com/NetworkWorld/ +[17]: https://www.linkedin.com/company/network-world From 8fcb8e78ef4047bb5876dc7fb1054ae46ff6ba43 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 01:00:55 +0800 Subject: [PATCH 219/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20IoT=20?= =?UTF-8?q?roundup:=20Connected=20cows,=20food=20safety=20sensors=20and=20?= =?UTF-8?q?tracking=20rent-a-bikes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190730 IoT roundup- Connected cows, food safety sensors and tracking rent-a-bikes.md --- ...afety sensors and tracking rent-a-bikes.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/talk/20190730 IoT roundup- Connected cows, food safety sensors and tracking rent-a-bikes.md diff --git a/sources/talk/20190730 IoT roundup- Connected cows, food safety sensors and tracking rent-a-bikes.md b/sources/talk/20190730 IoT roundup- Connected cows, food safety sensors and tracking rent-a-bikes.md new file mode 100644 index 0000000000..e751d31d66 --- /dev/null +++ b/sources/talk/20190730 IoT roundup- Connected cows, food safety sensors and tracking rent-a-bikes.md @@ -0,0 +1,72 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (IoT roundup: Connected cows, food safety sensors and tracking rent-a-bikes) +[#]: via: (https://www.networkworld.com/article/3412141/iot-roundup-connected-cows-food-safety-sensors-and-tracking-rent-a-bikes.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +IoT roundup: Connected cows, food safety sensors and tracking rent-a-bikes +====== +Farmers use LoRaWAN wireless with internet of things devices that monitor the health and location of beef cattle; restaurant chains use it to network IoT sensors that signal temperature shifts in commercial refrigerators. +![Getty Images][1] + +While the public image of agriculture remains a bit antiquated, the industry is actually an increasingly sophisticated one, and farmers have been particularly enthusiastic in their embrace of the internet of things ([IoT][2]). Everything from GPS-guided precision for planting, watering and harvesting to remote soil monitoring and in-depth yield analysis is available to the modern farmer. + +What’s more, the technology used in agriculture continues to evolve at speed; witness the recent partnership between Quantified Ag, a University of Nebraska-backed program that, among other things, can track livestock health via a system of IoT ear tags, and Cradlepoint, a vendor that makes the NetCloud Manager product. + +**[ Now see: [How edge networking and IoT will reshape data centers][3] | Get regularly scheduled insights: [Sign up for Network World newsletters][4] ]** + +Quantified Ag’s tags use [LoRaWAN][5] tech to transmit behavioral and biometric data to custom gateways installed at a farm, where the data is aggregated. Yet those gateways sometimes suffered from problems, particularly where unreliable wired connectivity and the complexities of working with an array of different rural ISPs were concerned. Enter Cradlepoint, which partnered up with an unnamed national cellular data provider to dramatically simplify the synchronization of data across a given implementation, as well as make it easier to deploy and provision new nodes. + +Simplicity is always a desirable quality in an IoT deployment, and single-pane-of-glass systems, provisioned by a single network, are a strong play for numerous IoT use cases. + +### LoRaWAN keeping food safe + +Even after the livestock is no longer, well, alive, IoT technology plays a role. Restaurants such as Five Guys and Shake Shack are integrating low-power WAN technology to connect temperature sensors into a network. Sort of an Internet of Burgers, if you will. + +According to an announcement earlier this month from Semtech, who makes the LoRaWAN devices in question, the restaurant chains join up-and-comers like Hattie B’s among those using IoT tech to improve food safety. The latter restaurant – a Nashville-based small chain noted for its spicy fried chicken – recently realized the benefits of such a system after a power outage. Instant notification that the refrigeration had died enabled the management to rescue tens of thousands of dollars’ worth of food inventory. + +Frankly, anything that saves fried chicken and burgers from wastage – and potentially, keeps their prices fractionally lower – is a good thing in our book, and Semtech argues (as it might be expected to) that the lower-frequency LoRa-based technology is a better choice for this application, given its ability to pass through obstacles like refrigerator and freezer doors with less attenuation than, for example, Bluetooth. + +### IoT tracking rental bikes** + +** + +Readers who live in urban areas will probably have noticed the rent-a-bike phenomenon spreading quickly of late. IoT connectivity provider Sigfox has, also, getting in on the action via a partnership with France-based INDIGO weel, a self-service bicycle fleet that was announced earlier this month. + +In this application, Sigfox’s proprietary wide area network technology is used to precisely track INDIGO’s bikes, deterring theft and damage. Sigfox also claims that the integration of its technology into the bike fleet will reduce costs, since reusable sensors can be easily transferred from one bike to another, and help users find the vehicle they need more quickly. + +Sigfox likes to talk about itself as an “IoT service provider,” and its large coverage footprint – the company claims to be operating in 60 countries – is a good fit for the kind of application that covers a lot of ground and might not require a great deal of bandwidth. + +### Vulnerability warning for IoT medical devices + +Per usual, several minor but alarming revelations about insecure, exploitable IoT devices have come to light this month. One advisory, [revealed by healthcare cybersecurity firm CyberMDX][6], said attackers could compromise GE Aestiva and Aespire anesthesia and respiration devices – changing the mix of gases that the patient breathes, altering the date and time on the machine or silencing alarms. (GE responded by pointing out that the compromise requires access to both the hospital’s network and an insufficiently secure terminal server, and urged users not to use such servers. Obviously, if devices don’t need to be on the network in the first place, that’s an even better solution.) + +Elsewhere, [an anonymous researcher at VPN Mentor][7] posted early this month that China-based smart home product maker Orvibo had (presumably by accident) opened up an enormous database to public view. The database contained 2 billion log entries, which covered email addresses, usernames, passwords and even geographic locations, based on its footprint of smart home devices installed in residences and hotels. The company has since cut off access to the database, but, still – not a great look for them. + +Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3412141/iot-roundup-connected-cows-food-safety-sensors-and-tracking-rent-a-bikes.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://images.idgesg.net/images/article/2018/08/nw_iot-news_internet-of-things_smart-city_smart-home7-100768495-large.jpg +[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html +[3]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html +[4]: https://www.networkworld.com/newsletters/signup.html +[5]: https://www.networkworld.com/article/3211390/lorawan-key-to-building-full-stack-production-iot-networks.html +[6]: https://www.cybermdx.com/news/vulnerability-discovered-ge-anesthesia-respiratory-devices +[7]: https://www.vpnmentor.com/blog/report-orvibo-leak/ +[8]: https://www.facebook.com/NetworkWorld/ +[9]: https://www.linkedin.com/company/network-world From 9344ce557d9e51d6b6eff395b166c9ec00b68570 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 01:01:33 +0800 Subject: [PATCH 220/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20Google?= =?UTF-8?q?=20Cloud=20to=20offer=20VMware=20data-center=20tools=20natively?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190730 Google Cloud to offer VMware data-center tools natively.md --- ...offer VMware data-center tools natively.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/talk/20190730 Google Cloud to offer VMware data-center tools natively.md diff --git a/sources/talk/20190730 Google Cloud to offer VMware data-center tools natively.md b/sources/talk/20190730 Google Cloud to offer VMware data-center tools natively.md new file mode 100644 index 0000000000..e882248bf8 --- /dev/null +++ b/sources/talk/20190730 Google Cloud to offer VMware data-center tools natively.md @@ -0,0 +1,69 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Google Cloud to offer VMware data-center tools natively) +[#]: via: (https://www.networkworld.com/article/3428497/google-cloud-to-offer-vmware-data-center-tools-natively.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Google Cloud to offer VMware data-center tools natively +====== +Google is enlisting VMware and CloudSimple to serve up vSphere, NSX and vSAN software on Google Cloud to make ease the transition of enterprise workloads to the cloud. +![Thinkstock / Google][1] + +Google this week said it would for the first time natively support VMware workloads in its Cloud service, giving customers more options for deploying enterprise applications. + +The hybrid cloud service called Google Cloud VMware Solution by CloudSimple will use VMware software-defined data center (SDCC) technologies including VMware vSphere, NSX and vSAN software deployed on a platform administered by CloudSimple for GCP. + +[RELATED: How to make hybrid cloud work][2] + +“Users will have full, native access to the full VMware stack including vCenter, vSAN and NSX-T. Google Cloud will provide the first line of support, working closely with CloudSimple to help ensure customers receive a streamlined product support experience and that their business-critical applications are supported with the SLAs that enterprise customers need,”  Thomas Kurian, CEO of Google Cloud [wrote in a blog outlining the deal][3].  + +“With VMware on Google Cloud Platform, customers will be able to leverage all of the familiarity of VMware tools and training, and protect their investments, as they execute on their cloud strategies and rapidly bring new services to market and operate them seamlessly and more securely across a hybrid cloud environment,” said Sanjay Poonen, chief operating officer, customer operations at VMware [in a statement][4]. + +The move further integrates Google and VMware software as both have teamed up multiple times in the past including: + + * Google Cloud integration for VMware NSX Service Mesh and SD-WAN by VeloCloud that lets customers deploy and gain visibility into their hybrid workloads—wherever they’re running. + * Google Cloud’s Anthos on VMware vSphere, including validations for vSAN, as the preferred hyperconverged infrastructure, to provide customers a multi-cloud offering and providing Kubernetes users the ability to create and manage persistent storage volumes for stateful workloads on-premises. + * A Google Cloud plug-in for VMware vRealize Automation providing customers with a seamless way to deploy, orchestrate and manage Google Cloud resources from within their vRealize Automation environment. + + + +Google is just one key cloud relationship VMware relies on.  It has a deep integration with Amazon Web Services that began in 2017.  With that flagship agreement, VMware customers can run workloads in the AWS cloud.  And more recently, VMware cloud offerings can be bought directly through the AWS service.  + +VMware also has a hybrid cloud partnership with [Microsoft’s Azure cloud service][5].  That package, called Azure VMware Solutions is built on VMware Cloud Foundation, which  is a packaging of the company’s traditional compute virtualization software vSphere with its NSX network virtualization product and its VSAN software-defined storage area network product. + +More recently VMware bulked up its cloud offerings by [buying Avi Networks][6]' load balancing, analytics and application-delivery technology for an undisclosed amount. + +Founded in 2012 by a group of Cisco engineers and executives, Avi offers a variety of software-defined products and services including a software-based application delivery controller (ADC) and intelligent web-application firewall.  The software already integrates with VMware vCenter and NSX, OpenStack, third party [SDN][7] controllers, as well as Amazon AWS and Google Cloud Platform, Red Hat OpenShift and container orchestration platforms such as Kubernetes and Docker. + +According to the company,  the VMware and Avi Networks teams will work together to advance VMware’s Virtual Cloud Network plan, build out full stack Layer 2-7 services, and deliver the public-cloud experience for on-prem environments and data centers, said Tom Gillis, VMware's senior vice president and general manager of its networking and security business unit. + +Combining Avi Networks with [VMware NSX][8] will further enable organizations to respond to new opportunities and threats, create new business models and deliver services to all applications and data, wherever they are located, VMware stated. + +Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3428497/google-cloud-to-offer-vmware-data-center-tools-natively.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://images.idgesg.net/images/article/2018/07/google-cloud-services-100765812-large.jpg +[2]: https://www.networkworld.com/article/3119362/hybrid-cloud/how-to-make-hybrid-cloud-work.html#tk.nww-fsb +[3]: https://cloud.google.com/blog/topics/partners/vmware-cloud-foundation-comes-to-google-cloud +[4]: https://www.vmware.com/company/news/releases/vmw-newsfeed.Google-Cloud-and-VMware-Extend-Strategic-Partnership.1893625.html +[5]: https://www.networkworld.com/article/3113394/vmware-cloud-foundation-integrates-virtual-compute-network-and-storage-systems.html +[6]: https://www.networkworld.com/article/3402981/vmware-eyes-avi-networks-for-data-center-software.html +[7]: https://www.networkworld.com/article/3209131/what-sdn-is-and-where-its-going.html +[8]: https://www.networkworld.com/article/3346017/vmware-preps-milestone-nsx-release-for-enterprise-cloud-push.html +[9]: https://www.facebook.com/NetworkWorld/ +[10]: https://www.linkedin.com/company/network-world From e62ce5ddd0780ef0356795e7d87bb329244e70e9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 01:02:53 +0800 Subject: [PATCH 221/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190730=20How=20?= =?UTF-8?q?to=20manage=20logs=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190730 How to manage logs in Linux.md --- .../20190730 How to manage logs in Linux.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/tech/20190730 How to manage logs in Linux.md diff --git a/sources/tech/20190730 How to manage logs in Linux.md b/sources/tech/20190730 How to manage logs in Linux.md new file mode 100644 index 0000000000..cebfbc5f99 --- /dev/null +++ b/sources/tech/20190730 How to manage logs in Linux.md @@ -0,0 +1,110 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to manage logs in Linux) +[#]: via: (https://www.networkworld.com/article/3428361/how-to-manage-logs-in-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +How to manage logs in Linux +====== +Log files on Linux systems contain a LOT of information — more than you'll ever have time to view. Here are some tips on how you can make use of it without ... drowning in it. +![Greg Lobinski \(CC BY 2.0\)][1] + +Managing log files on Linux systems can be incredibly easy or painful. It all depends on what you mean by log management. + +If all you mean is how you can go about ensuring that your log files don’t eat up all the disk space on your Linux server, the issue is generally quite straightforward. Log files on Linux systems will automatically roll over, and the system will only maintain a fixed number of the rolled-over logs. Even so, glancing over what can easily be a group of 100 files can be overwhelming. In this post, we'll take a look at how the log rotation works and some of the most relevant log files. + +**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** + +### Automatic log rotation + +Log files rotate frequently. What is the current log acquires a slightly different file name and a new log file is established. Take the syslog file as an example. This file is something of a catch-all for a lot of normal system messages. If you **cd** over to **/var/log** and take a look, you’ll probably see a series of syslog files like this: + +``` +$ ls -l syslog* +-rw-r----- 1 syslog adm 28996 Jul 30 07:40 syslog +-rw-r----- 1 syslog adm 71212 Jul 30 00:00 syslog.1 +-rw-r----- 1 syslog adm 5449 Jul 29 00:00 syslog.2.gz +-rw-r----- 1 syslog adm 6152 Jul 28 00:00 syslog.3.gz +-rw-r----- 1 syslog adm 7031 Jul 27 00:00 syslog.4.gz +-rw-r----- 1 syslog adm 5602 Jul 26 00:00 syslog.5.gz +-rw-r----- 1 syslog adm 5995 Jul 25 00:00 syslog.6.gz +-rw-r----- 1 syslog adm 32924 Jul 24 00:00 syslog.7.gz +``` + +Rolled over at midnight each night, the older syslog files are kept for a week and then the oldest is deleted. The syslog.7.gz file will be tossed off the system and syslog.6.gz will be renamed syslog.7.gz. The remainder of the log files will follow suit until syslog becomes syslog.1 and a new syslog file is created. Some syslog files will be larger than others, but in general, none will likely ever get very large and you’ll never see more than eight of them. This gives you just over a week to review any data they collect. + +The number of files maintained for any particular log file depends on the log file itself. For some, you may have as many as 13. Notice how the older files – both for syslog and dpkg – are gzipped to save space. The thinking here is likely that you’ll be most interested in the recent logs. Older logs can be unzipped with **gunzip** as needed. + +``` +# ls -t dpkg* +dpkg.log dpkg.log.3.gz dpkg.log.6.gz dpkg.log.9.gz dpkg.log.12.gz +dpkg.log.1 dpkg.log.4.gz dpkg.log.7.gz dpkg.log.10.gz +dpkg.log.2.gz dpkg.log.5.gz dpkg.log.8.gz dpkg.log.11.gz +``` + +Log files can be rotated based on age, as well as by size. Keep this in mind as you examine your log files. + +Log file rotation can be configured differently if you are so inclined, though the defaults work for most Linux sysadmins. Take a look at files like **/etc/rsyslog.conf** and **/etc/logrotate.conf** for some of the details. + +### Making use of your log files + +Managing log files should also include using them from time to time. The first step in making use of log files should probably include getting used to what each log file can tell you about how your system is working and what problems it might have run into. Reading log files from top to bottom is almost never a good option, but knowing how to pull information from them can be of great benefit when you want to get a sense of how well your system is working or need to track down a problem. This also suggests that you have a general idea what kind of information is stored in each file. For example: + +``` +$ who wtmp | tail -10 show the most recent logins +$ who wtmp | grep shark show recent logins for a particular user +$ grep "sudo:" auth.log see who is using sudo +$ tail dmesg look at kernel messages +$ tail dpkg.log see recently installed and updated packages +$ more ufw.log see firewall activity (i.e., if you are using ufw) +``` + +Some commands that you run will also extract information from your log files. If you want to see, for example, a list of system reboots, you can use a command like this: + +``` +$ last reboot +reboot system boot 5.0.0-20-generic Tue Jul 16 13:19 still running +reboot system boot 5.0.0-15-generic Sat May 18 17:26 - 15:19 (21+21:52) +reboot system boot 5.0.0-13-generic Mon Apr 29 10:55 - 15:34 (18+04:39) +``` + +### Using more advanced log managers + +While you can write scripts to make it easier to find interesting information in your log files, you should also be aware that there are some very sophisticated tools available for log file analysis. Some correlate information from multiple sources to get a fuller picture of what’s happening on your network. They may provide real-time monitoring, as well. Tools such as [Solarwinds Log & Event Manager][3] and [PRTG Network Monitor][4] (which includes log monitoring) come to mind. + +There are also some free tools that can help with analyzing log files. These include: + + * **Logwatch** — program to scan system logs for interesting lines + * **Logcheck** — system log analyzer and reporter + + + +I'll provide some insights and help on these tools in upcoming posts. + +**[ Also see: [Invaluable tips and tricks for troubleshooting Linux][5] ]** + +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/3428361/how-to-manage-logs-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://images.idgesg.net/images/article/2019/07/logs-100806633-large.jpg +[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua +[3]: https://www.esecurityplanet.com/products/solarwinds-log-event-manager-siem.html +[4]: https://www.paessler.com/prtg +[5]: https://www.networkworld.com/article/3242170/linux/invaluable-tips-and-tricks-for-troubleshooting-linux.html +[6]: https://www.facebook.com/NetworkWorld/ +[7]: https://www.linkedin.com/company/network-world From aeb4c5b5c287e8225f22436c2191c431f644515e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Aug 2019 01:03:25 +0800 Subject: [PATCH 222/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190729=20Intent?= =?UTF-8?q?-Based=20Networking=20(IBN):=20Bridging=20the=20gap=20on=20netw?= =?UTF-8?q?ork=20complexity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190729 Intent-Based Networking (IBN)- Bridging the gap on network complexity.md --- ... Bridging the gap on network complexity.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/talk/20190729 Intent-Based Networking (IBN)- Bridging the gap on network complexity.md diff --git a/sources/talk/20190729 Intent-Based Networking (IBN)- Bridging the gap on network complexity.md b/sources/talk/20190729 Intent-Based Networking (IBN)- Bridging the gap on network complexity.md new file mode 100644 index 0000000000..86a3ea2b86 --- /dev/null +++ b/sources/talk/20190729 Intent-Based Networking (IBN)- Bridging the gap on network complexity.md @@ -0,0 +1,107 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Intent-Based Networking (IBN): Bridging the gap on network complexity) +[#]: via: (https://www.networkworld.com/article/3428356/intent-based-networking-ibn-bridging-the-gap-on-network-complexity.html) +[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) + +Intent-Based Networking (IBN): Bridging the gap on network complexity +====== +Intent-Based Networking was a result of the need for greater network automation. +![IDG / Thinkstock][1] + +Networking has gone through various transformations over the last decade. In essence, the network has become complex and hard to manage using traditional mechanisms. Now there is a significant need to design and integrate devices from multiple vendors and employ new technologies, such as virtualization and cloud services. + +Therefore, every network is a unique snowflake. You will never come across two identical networks. The products offered by the vendors act as the building blocks for engineers to design solutions that work for them. If we all had a simple and predictable network, this would not be a problem. But there are no global references to follow and designs vary from organization to organization. These lead to network variation even while offering similar services. + +It is estimated that over 60% of users consider their I.T environment to be more complex than it was 2 years ago. We can only assume that network complexity is going to increase in the future. + +**[ Learn more about SDN: Find out [where SDN is going][2] and learn the [difference between SDN and NFV][3]. | Get regularly scheduled insights by [signing up for Network World newsletters][4]. ]** + +Large enterprises and service providers need to manage this complexity to ensure that all their traffic flows, policies and configurations are in line with requirements and objectives. You cannot manage a complex network in a manual way. Human error will always get you, eventually slowing down the network prohibiting agility. + +As I wrote about on Network Insight _[Disclaimer: the author is employed by Network Insight]_, the fact that the network is complex and error-prone is an [encouragement to automate][5]. How this actually happens, depends on the level of automation. Hence, a higher-level of orchestration is needed. + +### The need to modernize + +This complexity is compounded by the fact that the organizations are now looking to modernize their business processes and networks. The traditional vertically integrated monolithic networking solutions prohibit network modernization. This consequently creates a gap between the architect’s original intent and the actual runtime-behavior. + +If you examine, you will find that the contents of a design document are loosely coupled to the network execution. Primarily, there is no structured process as to how the design documents get translated and implemented to the actual devices. How it gets implemented is wide-open to individual interpretation. + +These networks were built for a different era. Therefore, we must now shift the focus from the traditional network prescriptive to Intent-Based Networking (IBN). IBN is a technology that has the capability to modernize the network and process in-line with the overall business objectives. This gives you the tight coupling of your design rules with your network. + +### The need for new tools + +Undoubtedly, we need new tools, not just from the physical device’s perspective, but also from the traffic’s perspective. Verifying the manual way will not work anymore. We have 100s of bits in the packet, meaning the traffic could be performing numerous talks at one time. Hence, tracking the end-to-end flow is impossible using the human approach. + +When it comes to provisioning, CLI is the most common method used to make configuration changes. But it has many drawbacks. Firstly, it offers the wrong level of abstraction. It targets the human operator and there is no validation whether the engineers will follow the correct procedures. + +Also, the CLI languages are not standardized across multi-vendors. The industry reacted and introduced NETCONF. However, NETCONF has many inconsistencies across the vendor operating systems. Many use their own proprietary format, making it hard to write NETCONF applications across multiple vendor networks. + +NETCONF was basically meant to make the automation easy but in reality, the irregularities it presented actually made the automation even more difficult. Also, the old troubleshooting tools that we use such as ping, traceroute does not provide a holistic assessment of how the network is behaving. Traceroute has problems with IP unnumbered links which is useful in the case of fully automated network environments. On the other hand, ping tells you nothing about how the network is performing. These tools were originally built for simpler times. + +We need to progress to a vendor-agnostic solution that can verify the intent against the configured policies. This should be regardless of the number of devices, the installed operating system, traffic rules and any other type of configured policy. We need networks to be automated and predictable. And the existing tools that are commonly used add no value. + +In a nutshell, we need a new model that can figure out all the device and traffic interactions, not just at the device level but the network-wide level. + +### IBN and SDN + +Software-Defined Networking (SDN) was a success in terms of interest, on the other hand, its adoption rate largely comprised of only the big players. These were the users who had the resources to build their own hardware and software, such as Google and Facebook. + +For example, Google’s B4 project to build an efficient Wide Area Network (WAN) in a dynamic fashion with flow-based optimization. However, this would be impossible to implement in case of a traditional WAN architecture on the production network. + +IBN is a natural successor to SDN as it borrows the same principles and architectures; a divide between the application and the network infrastructure. Similar to SDN, IBN is making software that controls the network as a whole, instead of device-to-device. + +Now the question that surfaces is can SDN, as a concept, automate as much as you want it to? Virtually, SDN uses software to configure the network, thereby driving a software-based network. But IBN is the next step where you have more of an explicit emphasis. Intent-Based systems work higher in the application level to offer true automation. + +### What is IBN? + +IBN was a result of the need for greater network automation. IBN is a technology that provides enhanced automation and network insights. It represents a paradigm shift that focuses on “what” the network is supposed to do versus “how” the network components are configured. It monitors if the network design is doing what it should be doing. + +IBN does this by generating the configuration for the design and device implementation. In addition, it continuously verifies and validates in real-time whether the original intent is being met. For example, if the desired intent is not being met, the system can take corrective action, such as modifying a QoS policy, VLAN or ACL. This makes the network more in-line with both; business objectives and compliance requirements. + +It uses declarative statements i.e. what the network should do as opposed to imperative statements that describe how it should be done. IBN has the capability to understand a large collection of heterogeneous networks which consist of a range of diverse devices that do not have one API. This substantially allows you to focus on the business needs rather than the constraints of traditional networking. + +### The IBN journey + +The first step on the road to IBN is to translate all of this into explicit logical rules which are essentially a piece of IBN software. You also need to understand the traffic to see if the reality is matching the intent. For this, the system would build a model of the network and then verify that model; this is known as formal verification in computer science. This is a method where we mathematically analyze the network to see if it's matching its intent. This involves certain calculations to encompass the logic. + +### Network verification + +Network verification is a key part of any IBN system. It requires an underlying mathematical model of the network behavior in order to analyze and reason out the targeted network design and policies. The systems need to verify all the conceivable packets flows and traffic patterns. + +Although there are no clear architectural guidelines for IBN a mathematical model can be used to treat every network device. This can be treated as a set of algebraic and logical operations on all the packet types and traffic flows at a per-device level. This allows the IBM system to evaluate and verify all the possible scenarios. + +When a device receives a packet, it can perform a number of actions. It can forward the packet to a particular port, drop the packet, or modify the packet header and then forward to a port. It’s up to the mathematical model to understand how each device responds to every possible type of packet and to evaluate the behavior at a network-wide level, not just at a device-level. + +Principally, the verification process must be end-to-end. It must collect the configuration files and state information from every device on the network. It then mathematically analyzes the behavior of all the possible traffic flows on a hop-by-hop basis. The IBM system builds a software model of the network infrastructure. This model first reads the Layer 2 to Layer 4 configuration details and then collects the state from each device (IP routing tables). + +With IBN we will see the shift from a reactive to a proactive approach. It will have a profound effect on the future of networking as we switch to a model that primarily focuses on the business needs and makes things easier. We are not as far down the road as one might think, but if you want to you can start your IBN journey today. So, the technology is there, and a phased deployment model is recommended. If you look at the deployment of IDS/IPS, you will find that most are still altering. + +**This article is published as part of the IDG Contributor Network. [Want to Join?][6]** + +Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3428356/intent-based-networking-ibn-bridging-the-gap-on-network-complexity.html + +作者:[Matt Conran][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/Matt-Conran/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2018/01/nw_2018_intent-based_networking_cover_art-100747914-large.jpg +[2]: https://www.networkworld.com/article/3209131/lan-wan/what-sdn-is-and-where-its-going.html +[3]: https://www.networkworld.com/article/3206709/lan-wan/what-s-the-difference-between-sdn-and-nfv.html +[4]: https://www.networkworld.com/newsletters/signup.html +[5]: https://network-insight.net/2019/07/introducing-intent-based-networking-its-not-hype/ +[6]: https://www.networkworld.com/contributor-network/signup.html +[7]: https://www.facebook.com/NetworkWorld/ +[8]: https://www.linkedin.com/company/network-world From a0d770ee0f14e51aa43a99abe539a9feb03a4bc5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Aug 2019 08:53:11 +0800 Subject: [PATCH 223/951] PRF @robsean --- ... to Debian 10 (Buster) via Command Line.md | 64 +++++++++---------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md index f89e1205ee..547e23abe3 100644 --- a/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md +++ b/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md @@ -1,51 +1,47 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line) [#]: via: (https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) -如何通过命令行升级 Debian 9 (Stretch) 为 Debian 10 (Buster) +如何通过命令行升级 Debian 9 为 Debian 10 ====== -大家好!!!,很高兴见到你!我们已经在先前的文章中看到如何安装 [Debian 10(Buster)][1]。今天,我们将学习如何从 Debian 9 升级为 Debian 10,虽然我们已将看到 Debian 10 和它的特色a,让我们不要深入它。但是读者没有机会来读那篇文章,让我们给予一个快速更新 Debian 10 和它的新功能。 +我们已经在先前的文章中看到如何安装 [Debian 10(Buster)][1]。今天,我们将学习如何从 Debian 9 升级为 Debian 10,虽然我们已将看到 Debian 10 和它的特色,所以这里我们不会深入介绍。但是可能读者没有机会读到那篇文章,让我们快速了解一下 Debian 10 和它的新功能。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/Upgrade-Debian-9-to-Debian-10.jpg) -在差不多两年的开发后,Debian 小组最终发布一个稳定版本, Debian 10 的代码名称是Buster。Buster 是一个 LTS (长期支持支持)版本,因此未来将由 Debian 支持5年。 +在差不多两年的开发后,Debian 团队最终发布一个稳定版本,Debian 10 的代码名称是 Buster。Buster 是一个 LTS (长期支持支持)版本,因此未来将由 Debian 支持 5 年。 -### Debian 10 (Buster) – 新的特色 +### Debian 10(Buster)新的特色 -Debian 10 (Buster) 带来大量打包好的新的特色,对大多数的 Debian 粉丝是有益的。一些特色包括: +Debian 10(Buster)回报给大多数 Debian 爱好者大量的新特色。一些特色包括: * GNOME 桌面 3.30 - * AppArmor 默认启用 + * 默认启用 AppArmor * 支持 Linux 内核 4.19.0-4 * 支持 OpenJDk 11.0 - * Moved from.15.2 + * 从 Nodejs 4 ~ 8 升级到 Nodejs 10.15.2 * Iptables 替换为 NFTables - - -还有很多。 +等等。 ### 从 Debian 9 到 Debian 10 的逐步升级指南 -在我们开始升级 Debian 10前,让我们看看升级需要的必备条件: +在我们开始升级 Debian 10 前,让我们看看升级需要的必备条件: -### 步骤 1) Debian 升级必备条件 +#### 步骤 1) Debian 升级必备条件 * 一个良好的网络连接 - * Root 用户权限 + * root 用户权限 * 数据备份 +备份你所有的应用程序代码库、数据文件、用户账号详细信息、配置文件是极其重要的,以便在升级出错时,你可以总是可以还原到先前的版本。 - -备份你所有的应用程序代码库,数据文件,用户账号详细信息,配置文件是极其重要的,以便在升级期间出错时,你可以总是可以还原到先前的版本。 - -### 步骤 2) 升级 Debian 9 现有的软件包 +#### 步骤 2) 升级 Debian 9 现有的软件包 接下来的步骤是升级你所有现有的软件包,因为一些软件包被标志为保留不能升级,从 Debian 9 升级为 Debian 10 有失败或引发一些问题的可能性。所以,我们不冒任何风险,更好地升级软件包。使用下面的代码来升级软件包: @@ -53,24 +49,24 @@ Debian 10 (Buster) 带来大量打包好的新的特色,对大多数的 Debian root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y ``` -### 步骤 3) 修改软件包存储库文件 (/etc/sources.list) +#### 步骤 3) 修改软件包存储库文件 /etc/sources.list -接下来的步骤是修改软件包存储库文件 “/etc/sources.list” ,你需要用文本 “Buster” 替换 “Stretch” +接下来的步骤是修改软件包存储库文件 `/etc/sources.list`,你需要用文本 `Buster` 替换 `Stretch`。 -但是,在你更改任何东西前,确保如下创建一个 sources.list 文件的备份: +但是,在你更改任何东西前,确保如下创建一个 `sources.list` 文件的备份: ``` root@linuxtechi:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak ``` -现在使用下面的 sed 命令来在软件包存储库文件中使用 ‘**buster**‘ 替换 ‘**stretch**‘ ,示例如下显示, +现在使用下面的 `sed` 命令来在软件包存储库文件中使用 `buster` 替换 `stretch`,示例如下显示: ``` root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list root@linuxtechi:~$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*.list ``` -一旦文本更新,你需要如下更新软件包存储库索引: +更新后,你需要如下更新软件包存储库索引: ``` root@linuxtechi:~$ sudo apt update @@ -91,25 +87,25 @@ BUG_REPORT_URL="https://bugs.debian.org/" root@linuxtechi:~$ ``` -### 步骤 4) 从 Debian 9 升级到 Debian 10 +#### 步骤 4) 从 Debian 9 升级到 Debian 10 -一旦你做完所有的更改,是时候从 Debian 9 升级到 Debian 10 。但是在这之前,再次如下确保更新你的软件包: +你做完所有的更改后,是时候从 Debian 9 升级到 Debian 10 了。但是在这之前,再次如下确保更新你的软件包: ``` root@linuxtechi:~$ sudo apt update && sudo apt upgrade -y ``` -在软件包升级期间,你将被提示启动服务,所以选择你较喜欢的选项 +在软件包升级期间,你将被提示启动服务,所以选择你较喜欢的选项。 -一旦你系统的所有软件包升级完成,是时候升级你的发行版的软件包。使用下面的代码来升级发行版: +一旦你系统的所有软件包升级完成,就升级你的发行版的软件包。使用下面的代码来升级发行版: ``` root@linuxtechi:~$ sudo apt dist-upgrade -y ``` -升级过程可能花费一些时间,取决于你的网络速度。记住在升级过程中,你将被问道一些问题,在软件包升级后是否需要重启服务,你是否需要保留现存的配置文件。如果你不想进行一些自定义更改,简单地键入 “Y” ,来让升级过程继续。 +升级过程可能花费一些时间,取决于你的网络速度。记住在升级过程中,你将被询问一些问题,在软件包升级后是否需要重启服务、你是否需要保留现存的配置文件等。如果你不想进行一些自定义更改,简单地键入 “Y” ,来让升级过程继续。 -### 步骤 5) 验证升级 +#### 步骤 5) 验证升级 一旦升级过程完成,重启你的机器,并使用下面的方法检测版本: @@ -129,7 +125,7 @@ root@linuxtechi:~$ 是的,你已经成功地从 Debian 9 升级到 Debian 10。 -验证升级的备用方法 +验证升级的备用方法: ``` root@linuxtechi:~$ cat /etc/*-release @@ -147,7 +143,7 @@ root@linuxtechi:~$ ### 结束 -希望上面的逐步指南为你提供从 Debian 9(Stretch) 简单地升级为 Debian 10 (Buster) 的所有信息。在评论部分,请给予你使用 Debian 10 的反馈,建议,体验,更多 Linux 教程和文章,保持时时访问 LinuxTechi.com 。 +希望上面的逐步指南为你提供了从 Debian 9(Stretch)简单地升级为 Debian 10(Buster)的所有信息。在评论部分,请给予你使用 Debian 10 的反馈、建议、体验。 -------------------------------------------------------------------------------- @@ -156,10 +152,10 @@ via: https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/ 作者:[Pradeep Kumar][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/) 荣誉推出 [a]: https://www.linuxtechi.com/author/pradeep/ [b]: https://github.com/lujun9972 -[1]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ +[1]: https://linux.cn/article-11083-1.html From 24b4ba33caafedfcaf5d4f0d364c3c1ec78301b3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Aug 2019 08:53:46 +0800 Subject: [PATCH 224/951] PUB @robsean https://linux.cn/article-11172-1.html --- ...bian 9 (Stretch) to Debian 10 (Buster) via Command Line.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md (98%) diff --git a/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md b/published/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md similarity index 98% rename from translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md rename to published/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md index 547e23abe3..14e36860b6 100644 --- a/translated/tech/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md +++ b/published/20190720 How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11172-1.html) [#]: subject: (How to Upgrade Debian 9 (Stretch) to Debian 10 (Buster) via Command Line) [#]: via: (https://www.linuxtechi.com/upgrade-debian-9-to-debian-10-command-line/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) From 83b3634d47851f71c39d3c122ef35fc4288a9fe8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 1 Aug 2019 08:54:00 +0800 Subject: [PATCH 225/951] translating --- ...ta Performance Monitoring Tool On Linux.md | 312 ----------------- ...ta Performance Monitoring Tool On Linux.md | 313 ++++++++++++++++++ 2 files changed, 313 insertions(+), 312 deletions(-) delete mode 100644 sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md create mode 100644 translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md diff --git a/sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md b/sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md deleted file mode 100644 index cbd62e05a9..0000000000 --- a/sources/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md +++ /dev/null @@ -1,312 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Install NetData Performance Monitoring Tool On Linux) -[#]: via: (https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -Install NetData Performance Monitoring Tool On Linux -====== - -![][1] - -**NetData** is a distributed, real-time, performance and health monitoring tool for systems and applications. It provides unparalleled insights of everything happening on a system in real-time. You can view the results in a highly interactive web-dashboard. Using Netdata, you can get a clear idea of what is happening now, and what happened before in your systems and applications. You don’t need to be an expert to deploy this tool in your Linux systems. NetData just works fine out of the box with zero configuration, and zero dependencies. Just install this utility and sit back, NetData will take care of the rest. - -It has its own built-in webserver to display the result in graphical format. NetData is quite fast and efficient, and it will immediately start to analyze the performance of your system in no time after installing it. It is written using **C** programming language, so it is extremely light weight. It consumes less than 3% of a single core CPU usage and a 10-15MB of RAM. We can easily embed the charts on any existing web pages, and also it has a plugin API, so that you can monitor any application. - -Here is the list of things that will be monitored by NetData utility in your Linux system. - - * CPU usage, - * RAM Usage, - * Swap memory usage, - * Kernel memory usage, - * Hard disks and its usage, - * Network interfaces, - * IPtables, - * Netfilter, - * DDoS protection, - * Processes, - * Applications, - * NFS server, - * Web server (Apache & Nginx), - * Database servers (MySQL), - * DHCP server, - * DNS server, - * Email serve,r - * Proxy server, - * Tomcat, - * PHP, - * SNP devices, - * And many more. - - - -NetData is free, open source tool and it supports Linux, FreeBSD and Mac OS. - -### Install NetData On Linux - -Netdata can be installed on any Linux distributions that have **Bash** installed. - -The easiest way to install Netdata is to run the following one-liner command from the Terminal: - -``` -$ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) -``` - -This will download and install everything needed to up and run Netdata. - -Some users may not want to inject something directly into Bash without investigating it. If you don’t like this method, you can follow the steps below to install it on your system. - -**On Arch Linux:** - -The latest version is available in the Arch Linux default repositories. So, we can install it with [**pacman**][2] using command: - -``` -$ sudo pacman -S netdata -``` - -**On DEB and RPM-based systems** - -NetData is not available in the default repositories of DEB based (Ubuntu / Debian) or RPM based (RHEL / CentOS / Fedora) systems. We need to install NetData manually from its Git repository. - -First install the required dependencies: - -``` -# Debian / Ubuntu -$ sudo apt-get install zlib1g-dev uuid-dev libuv1-dev liblz4-dev libjudy-dev libssl-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl - -# Fedora -$ sudo dnf install zlib-devel libuuid-devel libuv-devel lz4-devel Judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils - -# CentOS / Red Hat Enterprise Linux -$ sudo yum install epel-release -$ sudo yum install autoconf automake curl gcc git libmnl-devel libuuid-devel openssl-devel libuv-devel lz4-devel Judy-devel lm_sensors make MySQL-python nc pkgconfig python python-psycopg2 PyYAML zlib-devel - -# openSUSE -$ sudo zypper install zlib-devel libuuid-devel libuv-devel liblz4-devel judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils -``` - -After installing the required dependencies, install NetData on DEB or RPM based systems as shown below. - -Git clone the NetData repository: - -``` -$ git clone https://github.com/netdata/netdata.git --depth=100 -``` - -The above command will create a directory called **‘netdata’** in the current working directory. - -Change to the ‘netdata’ directory: - -``` -$ cd netdata/ -``` - -Finally, install and start NetData using command: - -``` -$ sudo ./netdata-installer.sh -``` - -**Sample output:** - -``` -Welcome to netdata! -Nice to see you are giving it a try! - -You are about to build and install netdata to your system. - -It will be installed at these locations: - -- the daemon at /usr/sbin/netdata - - config files at /etc/netdata - - web files at /usr/share/netdata - - plugins at /usr/libexec/netdata - - cache files at /var/cache/netdata - - db files at /var/lib/netdata - - log files at /var/log/netdata - - pid file at /var/run - -This installer allows you to change the installation path. -Press Control-C and run the same command with --help for help. - -Press ENTER to build and install netdata to your system > ## Press ENTER key -``` - -After installing NetData, you will see the following output at the end: - -``` -------------------------------------------------------------------------------- - -OK. NetData is installed and it is running (listening to *:19999). - -------------------------------------------------------------------------------- - -INFO: Command line options changed. -pidfile, -nd and -ch are deprecated. -If you use custom startup scripts, please run netdata -h to see the -corresponding options and update your scripts. - -Hit http://localhost:19999/ from your browser. - -To stop netdata, just kill it, with: - -killall netdata - -To start it, just run it: - -/usr/sbin/netdata - - -Enjoy! - -Uninstall script generated: ./netdata-uninstaller.sh -``` - -![][3] - -Install NetData - -NetData has been installed and started. - -To install Netdata on other Linux distributions, refer the [**official installation instructions page**][4]. - -##### Allow NetData default port via Firewall or Router - -If your system stays behind any firewall or router, you must allow the default port **19999** to access the NetData web interface from any remote systems on the network,. - -**On Ubuntu / Debian:** - -``` -$ sudo ufw allow 19999 -``` - -**On CentOS / RHEL / Fedora:** - -``` -$ sudo firewall-cmd --permanent --add-port=19999/tcp - -$ sudo firewall-cmd --reload -``` - -### Starting / Stopping NetData - -To enable and start Netdata service on systems that use **Systemd** , run: - -``` -$ sudo systemctl enable netdata - -$ sudo systemctl start netdata -``` - -To stop: - -``` -$ sudo systemctl stop netdata -``` - -To enable and start Netdata service on systems that use **Init** , run: - -``` -$ sudo service netdata start - -$ sudo chkconfig netdata on -``` - -To stop it: - -``` -$ sudo service netdata stop -``` - -### Access NetData via Web browser - -Open your web browser, and navigate to **** or **** or ****. You should see a screen something like below. - -![][5] - -Netdata dashboard - -From the dashboard, you will find the complete statistics of your Linux system. Scroll down to view each section. - -You can download and/or view NetData default configuration file at any time by simply navigating to ****. - -![][6] - -Netdata configuration file - -### Updating NetData - -In Arch Linux, just run the following command to update NetData. If the updated version is available in the repository, it will be automatically installed. - -``` -$ sudo pacman -Syyu -``` - -In DEB or RPM based systems, just go to the directory where you have cloned it (In our case it’s netdata). - -``` -$ cd netdata -``` - -Pull the latest update: - -``` -$ git pull -``` - -Then, rebuild and update it using command: - -``` -$ sudo ./netdata-installer.sh -``` - -### Uninstalling NetData - -Go to the location where you have cloned NetData. - -``` -$ cd netdata -``` - -Then, uninstall it using command: - -``` -$ sudo ./netdata-uninstaller.sh --force -``` - -In Arch Linux, the following command will uninstall it. - -``` -$ sudo pacman -Rns netdata -``` - -**Resources:** - - * [**NetData website**][7] - * [**NetData GitHub page**][8] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2016/06/Install-netdata-720x340.png -[2]: https://www.ostechnix.com/getting-started-pacman/ -[3]: https://www.ostechnix.com/wp-content/uploads/2016/06/Deepin-Terminal_002-6.png -[4]: https://docs.netdata.cloud/packaging/installer/ -[5]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-dashboard.png -[6]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-config-file.png -[7]: http://netdata.firehol.org/ -[8]: https://github.com/firehol/netdata diff --git a/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md b/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md new file mode 100644 index 0000000000..7719bd7a5a --- /dev/null +++ b/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md @@ -0,0 +1,313 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Install NetData Performance Monitoring Tool On Linux) +[#]: via: (https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +在 Linux 上安装 NetData 性能监控工具 +====== + +![][1] + +**NetData** 是一个用于系统和应用的分布式实时性能和健康监控工具。它提供了对系统中实时发生的所有事情的全面检测。你可以在高度互动的 Web 仪表板中查看结果。使用 Netdata,你可以清楚地了解现在发生的事情,以及之前系统和应用中发生的事情。你无需成为专家即可在 Linux 系统中部署此工具。NetData 开箱即用,零配置和零依赖。只需安装它然后休息,之后 NetData 将负责其余部分。 + + +它有自己的内置 Web 服务器,以图形形式显示结果。NetData 非常快速高效,安装后可立即开始分析系统性能。它是用 **C** 编程语言编写的,所以它非常轻量。它占用的单核 CPU 使用率不到 3%,内存占用 10-15MB。我们可以轻松地在任何现有网页上嵌入图表,并且它还有一个插件 API,以便你可以监控任何应用。 + +以下是 Linux 系统中 NetData 的监控列表。 + + * CPU 使用率 +  * RAM 使用率 +  * swap 内存使用率 +  * 内核内存使用率 +  * 硬盘及其使用率 +  * 网络接口 +  * IPtables +  * Netfilter +  * DDoS 保护 +  * 进程 +  * 应用 +  * NFS 服务器 +  * Web 服务器 (Apache 和 Nginx) +  * 数据库服务器 (MySQL), +  * DHCP 服务器 +  * DNS 服务器 +  * 电子邮件服务 +  * 代理服务器 +  * Tomcat +  * PHP +  * SNP 设备 +  * 等等 + + + +NetData 是免费的开源工具,它支持 Linux、FreeBSD 和 Mac OS。 + +### 在 Linux 上安装 NetData + +Netdata 可以安装在任何安装了**Bash** 的 Linux 发行版上。 + +最简单的安装 Netdata 的方法是从终端运行以下命令: + +``` +$ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) +``` + +这将下载并安装启动和运行 Netdata 所需的一切。 + +有些用户可能不想在没有研究的情况下将某些东西直接注入 Bash。如果你不喜欢此方法,可以按照以下步骤在系统上安装它。 + +**在 Arch Linux 上:** + +Arch Linux 默认仓库中提供了最新版本。所以,我们可以使用以下 [**pacman**][2] 命令安装它: + +``` +$ sudo pacman -S netdata +``` + +**在基于 DEB 和基于 RPM 的系统上** + +在基于 DEB (Ubuntu / Debian) 或基于RPM (RHEL / CentOS / Fedora) 系统的默认仓库没有 NetData。我们需要从它的 Git 仓库手动安装 NetData。 + +首先安装所需的依赖项: + +``` +# Debian / Ubuntu +$ sudo apt-get install zlib1g-dev uuid-dev libuv1-dev liblz4-dev libjudy-dev libssl-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl + +# Fedora +$ sudo dnf install zlib-devel libuuid-devel libuv-devel lz4-devel Judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils + +# CentOS / Red Hat Enterprise Linux +$ sudo yum install epel-release +$ sudo yum install autoconf automake curl gcc git libmnl-devel libuuid-devel openssl-devel libuv-devel lz4-devel Judy-devel lm_sensors make MySQL-python nc pkgconfig python python-psycopg2 PyYAML zlib-devel + +# openSUSE +$ sudo zypper install zlib-devel libuuid-devel libuv-devel liblz4-devel judy-devel openssl-devel libmnl-devel gcc make git autoconf autoconf-archive autogen automake pkgconfig curl findutils +``` + +安装依赖项后,在基于 DEB 或基于 RPM 的系统上安装 NetData,如下所示。 + +Git 克隆 NetData 仓库: + +``` +$ git clone https://github.com/netdata/netdata.git --depth=100 +``` + +上面的命令将在当前工作目录中创建一个名为 **“netdata”** 的目录。 + +切换到 “netdata” 目录: + +``` +$ cd netdata/ +``` + +最后,使用命令安装并启动 NetData: + +``` +$ sudo ./netdata-installer.sh +``` + +**示例输出:** + +``` +Welcome to netdata! +Nice to see you are giving it a try! + +You are about to build and install netdata to your system. + +It will be installed at these locations: + +- the daemon at /usr/sbin/netdata + - config files at /etc/netdata + - web files at /usr/share/netdata + - plugins at /usr/libexec/netdata + - cache files at /var/cache/netdata + - db files at /var/lib/netdata + - log files at /var/log/netdata + - pid file at /var/run + +This installer allows you to change the installation path. +Press Control-C and run the same command with --help for help. + +Press ENTER to build and install netdata to your system > ## Press ENTER key +``` + +安装完成后,你将在最后看到以下输出: + +``` +------------------------------------------------------------------------------- + +OK. NetData is installed and it is running (listening to *:19999). + +------------------------------------------------------------------------------- + +INFO: Command line options changed. -pidfile, -nd and -ch are deprecated. +If you use custom startup scripts, please run netdata -h to see the +corresponding options and update your scripts. + +Hit http://localhost:19999/ from your browser. + +To stop netdata, just kill it, with: + +killall netdata + +To start it, just run it: + +/usr/sbin/netdata + + +Enjoy! + +Uninstall script generated: ./netdata-uninstaller.sh +``` + +![][3] + +安装 NetData + +NetData 已安装并启动。 + +要在其他 Linux 发行版上安装 Netdata,请参阅[**官方安装说明页面**][4]。 + +##### 在防火墙或者路由器上允许 NetData 的默认端口 + +如果你的系统在防火墙或者路由器后面,那么必须允许默认端口 **19999** 以便从任何远程系统访问 NetData 的 web 界面。 + +**在 Ubuntu/Debian 中:** + +``` +$ sudo ufw allow 19999 +``` + +**在 CentOS/RHEL/Fedora 中:** + +``` +$ sudo firewall-cmd --permanent --add-port=19999/tcp + +$ sudo firewall-cmd --reload +``` + +### 启动/停止 NetData + +要在使用 **Systemd** 的系统上启用和启动 Netdata 服务,请运行: + +``` +$ sudo systemctl enable netdata + +$ sudo systemctl start netdata +``` + +要停止: + +``` +$ sudo systemctl stop netdata +``` + +要在使用 **Init** 的系统上启用和启动 Netdata 服务,请运行: + +``` +$ sudo service netdata start + +$ sudo chkconfig netdata on +``` + +要停止: + +``` +$ sudo service netdata stop +``` + +### 通过 Web 浏览器访问 NetData + +打开 Web 浏览器,然后打开 **** 或者 **** 或者 ****。你应该看到如下页面。 + +![][5] + +Netdata 仪表板 + +在仪表板中,你可以找到 Linux 系统的完整统计信息。向下滚动以查看每个部分。 + +你可以随时打开 **** 来下载和/或查看 NetData 默认配置文件。 + +![][6] + +Netdata 配置文件 + +### 更新 NetData + +在 Arch Linux 中,只需运行以下命令即可更新 NetData。如果仓库中提供了更新版本,那么就会自动安装该版本。 + +``` +$ sudo pacman -Syyu +``` + +在基于 DEB 或 RPM 的系统中,只需进入已克隆它的目录(此例中是 netdata)。 + +``` +$ cd netdata +``` + +拉取最新更新: + +``` +$ git pull +``` + +然后,使用命令重新构建并更新它: + +``` +$ sudo ./netdata-installer.sh +``` + +### 卸载 NetData + +进入克隆 NetData 的文件夹。 + +``` +$ cd netdata +``` + +然后,使用命令卸载它: + +``` +$ sudo ./netdata-uninstaller.sh --force +``` + +在 Arch Linux 中,使用以下命令卸载它。 + +``` +$ sudo pacman -Rns netdata +``` + +**资源:** + + * [**NetData 网站**][7] + * [**NetData 的 GitHub 页面**][8] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2016/06/Install-netdata-720x340.png +[2]: https://www.ostechnix.com/getting-started-pacman/ +[3]: https://www.ostechnix.com/wp-content/uploads/2016/06/Deepin-Terminal_002-6.png +[4]: https://docs.netdata.cloud/packaging/installer/ +[5]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-dashboard.png +[6]: https://www.ostechnix.com/wp-content/uploads/2016/06/Netdata-config-file.png +[7]: http://netdata.firehol.org/ +[8]: https://github.com/firehol/netdata From 3f832fec84858a0393e59e5108845cbd4b8b85ab Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Aug 2019 08:56:19 +0800 Subject: [PATCH 226/951] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201907?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20171226 Top 10 Microsoft Visio Alternatives for Linux.md | 0 ...0180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md | 0 ...e your workstation with Ansible- Configure desktop settings.md | 0 .../20180620 How To Find The Port Number Of A Service In Linux.md | 0 published/{ => 201907}/20180629 100 Best Ubuntu Apps.md | 0 published/{ => 201907}/20180902 Learning BASIC Like It-s 1983.md | 0 .../20180924 5 ways to play old-school games on a Raspberry Pi.md | 0 ...0211 Introducing kids to computational thinking with Python.md | 0 .../{ => 201907}/20190301 Emacs for (even more of) the win.md | 0 ...eate a Custom System Tray Indicator For Your Tasks on Linux.md | 0 ...- A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md | 0 published/{ => 201907}/20190320 4 cool terminal multiplexers.md | 0 published/{ => 201907}/20190416 Can schools be agile.md | 0 published/{ => 201907}/20190501 Looking into Linux modules.md | 0 ...chain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md | 0 .../20190513 When to be concerned about memory levels on Linux.md | 0 .../20190518 Best Linux Distributions for Beginners.md | 0 ... Convert Markdown files to word processor docs using pandoc.md | 0 .../20190531 Use Firefox Send with ffsend in Fedora.md | 0 ...0603 How to set up virtual environments for Python on MacOS.md | 0 .../20190604 5G will augment Wi-Fi, not replace it.md | 0 ...06 Zorin OS Becomes Even More Awesome With Zorin 15 Release.md | 0 .../{ => 201907}/20190607 4 tools to help you drive Kubernetes.md | 0 ...e and Open Source Trello Alternative OpenProject 9 Released.md | 0 ...w to set ulimit and file descriptors limit on Linux Servers.md | 0 ... To Free Up Space (Remove Unwanted or Junk Files) on Ubuntu.md | 0 ...12 BitTorrent Client Deluge 2.0 Released- Here-s What-s New.md | 0 ... still the heart of Jupyter Notebooks for Python developers.md | 0 ...17 Use ImageGlass to quickly view JPG images as a slideshow.md | 0 .../20190618 A beginner-s guide to Linux permissions.md | 0 .../{ => 201907}/20190619 Leading in the Python community.md | 0 ...0190621 Three Ways to Lock and Unlock User Account in Linux.md | 0 ...Upgraded Specs, Raspberry Pi 4 Takes Aim at Desktop Segment.md | 0 .../20190625 5 tiny Linux distros to try before you die.md | 0 published/{ => 201907}/20190625 The innovation delusion.md | 0 .../20190626 Tracking down library injections on Linux.md | 0 .../{ => 201907}/20190627 How to use Tig to browse Git logs.md | 0 ...0190628 Undo releases Live Recorder 5.0 for Linux debugging.md | 0 ...0190630 Donald Trump Now Wants to Ban End-to-End Encryption.md | 0 ...20190701 Ubuntu or Fedora- Which One Should You Use and Why.md | 0 .../{ => 201907}/20190702 Jupyter and data science in Fedora.md | 0 .../{ => 201907}/20190702 Make Linux stronger with firewalls.md | 0 ...3 How to Manually Install Security Updates on Debian-Ubuntu.md | 0 published/{ => 201907}/20190703 Parse arguments with Python.md | 0 ...Monitor Messages Log (Warning, Error and Critical) on Linux.md | 0 ...0190705 Copy and paste at the Linux command line with xclip.md | 0 published/{ => 201907}/20190705 Manage your shell environment.md | 0 .../20190706 How To Delete A Repository And GPG Key In Ubuntu.md | 0 .../20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md | 0 ...s Been Nominated for the -Internet Villain- Award in the UK.md | 0 .../{ => 201907}/20190708 10 ways to get started with Linux.md | 0 .../{ => 201907}/20190708 Command line quick tips- Permissions.md | 0 ...0708 Debian 10 (Buster) Installation Steps with Screenshots.md | 0 ...rformance Boost for AMD GPUs Thanks to Valve-s New Compiler.md | 0 ...ons from first programming languages on Command Line Heroes.md | 0 ...nstall And Run Python Applications In Isolated Environments.md | 0 .../20190709 Sysadmin vs SRE- What-s the difference.md | 0 .../20190710 32-bit life support- Cross-compiling with GCC.md | 0 ...10 How To Find Virtualbox Version From Commandline In Linux.md | 0 ... Test 200- Linux And Unix Operating Systems Online For Free.md | 0 .../20190711 How to install Elasticsearch on MacOS.md | 0 ... Linux Commands In Capital Letters To Run Them As Sudo User.md | 0 published/{ => 201907}/20190712 MTTR is dead, long live CIRT.md | 0 .../20190712 Make an RGB cube with Python and Scribus.md | 0 ...ElectronMail - a Desktop Client for ProtonMail and Tutanota.md | 0 ...Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md | 0 .../20190716 Become a lifelong learner and succeed at work.md | 0 .../{ => 201907}/20190716 Save and load Python data with JSON.md | 0 ...90717 Bond WiFi and Ethernet for easier networking mobility.md | 0 published/{ => 201907}/20190717 How to install Kibana on MacOS.md | 0 published/{ => 201907}/20190717 Mastering user groups on Linux.md | 0 ...c Games Backs Blender Foundation with -1.2m Epic MegaGrants.md | 0 .../20190722 How to run virtual machines with virt-manager.md | 0 .../20190723 Getting help for Linux shell built-ins.md | 0 ...w to Create a User Account Without useradd Command in Linux.md | 0 published/{ => 201907}/20190724 Master the Linux -ls- command.md | 0 ...S Office on Linux is a Free Alternative to Microsoft Office.md | 0 ...ble Canonical Kernel Livepatch Service on Ubuntu LTS System.md | 0 ... Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md | 0 published/{ => 201907}/20191110 What is DevSecOps.md | 0 80 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201907}/20171226 Top 10 Microsoft Visio Alternatives for Linux.md (100%) rename published/{ => 201907}/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md (100%) rename published/{ => 201907}/20180529 Manage your workstation with Ansible- Configure desktop settings.md (100%) rename published/{ => 201907}/20180620 How To Find The Port Number Of A Service In Linux.md (100%) rename published/{ => 201907}/20180629 100 Best Ubuntu Apps.md (100%) rename published/{ => 201907}/20180902 Learning BASIC Like It-s 1983.md (100%) rename published/{ => 201907}/20180924 5 ways to play old-school games on a Raspberry Pi.md (100%) rename published/{ => 201907}/20190211 Introducing kids to computational thinking with Python.md (100%) rename published/{ => 201907}/20190301 Emacs for (even more of) the win.md (100%) rename published/{ => 201907}/20190302 Create a Custom System Tray Indicator For Your Tasks on Linux.md (100%) rename published/{ => 201907}/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md (100%) rename published/{ => 201907}/20190320 4 cool terminal multiplexers.md (100%) rename published/{ => 201907}/20190416 Can schools be agile.md (100%) rename published/{ => 201907}/20190501 Looking into Linux modules.md (100%) rename published/{ => 201907}/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md (100%) rename published/{ => 201907}/20190513 When to be concerned about memory levels on Linux.md (100%) rename published/{ => 201907}/20190518 Best Linux Distributions for Beginners.md (100%) rename published/{ => 201907}/20190522 Convert Markdown files to word processor docs using pandoc.md (100%) rename published/{ => 201907}/20190531 Use Firefox Send with ffsend in Fedora.md (100%) rename published/{ => 201907}/20190603 How to set up virtual environments for Python on MacOS.md (100%) rename published/{ => 201907}/20190604 5G will augment Wi-Fi, not replace it.md (100%) rename published/{ => 201907}/20190606 Zorin OS Becomes Even More Awesome With Zorin 15 Release.md (100%) rename published/{ => 201907}/20190607 4 tools to help you drive Kubernetes.md (100%) rename published/{ => 201907}/20190607 Free and Open Source Trello Alternative OpenProject 9 Released.md (100%) rename published/{ => 201907}/20190609 How to set ulimit and file descriptors limit on Linux Servers.md (100%) rename published/{ => 201907}/20190610 5 Easy Ways To Free Up Space (Remove Unwanted or Junk Files) on Ubuntu.md (100%) rename published/{ => 201907}/20190612 BitTorrent Client Deluge 2.0 Released- Here-s What-s New.md (100%) rename published/{ => 201907}/20190613 IPython is still the heart of Jupyter Notebooks for Python developers.md (100%) rename published/{ => 201907}/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md (100%) rename published/{ => 201907}/20190618 A beginner-s guide to Linux permissions.md (100%) rename published/{ => 201907}/20190619 Leading in the Python community.md (100%) rename published/{ => 201907}/20190621 Three Ways to Lock and Unlock User Account in Linux.md (100%) rename published/{ => 201907}/20190624 With Upgraded Specs, Raspberry Pi 4 Takes Aim at Desktop Segment.md (100%) rename published/{ => 201907}/20190625 5 tiny Linux distros to try before you die.md (100%) rename published/{ => 201907}/20190625 The innovation delusion.md (100%) rename published/{ => 201907}/20190626 Tracking down library injections on Linux.md (100%) rename published/{ => 201907}/20190627 How to use Tig to browse Git logs.md (100%) rename published/{ => 201907}/20190628 Undo releases Live Recorder 5.0 for Linux debugging.md (100%) rename published/{ => 201907}/20190630 Donald Trump Now Wants to Ban End-to-End Encryption.md (100%) rename published/{ => 201907}/20190701 Ubuntu or Fedora- Which One Should You Use and Why.md (100%) rename published/{ => 201907}/20190702 Jupyter and data science in Fedora.md (100%) rename published/{ => 201907}/20190702 Make Linux stronger with firewalls.md (100%) rename published/{ => 201907}/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md (100%) rename published/{ => 201907}/20190703 Parse arguments with Python.md (100%) rename published/{ => 201907}/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md (100%) rename published/{ => 201907}/20190705 Copy and paste at the Linux command line with xclip.md (100%) rename published/{ => 201907}/20190705 Manage your shell environment.md (100%) rename published/{ => 201907}/20190706 How To Delete A Repository And GPG Key In Ubuntu.md (100%) rename published/{ => 201907}/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md (100%) rename published/{ => 201907}/20190706 Say WHAAAT- Mozilla has Been Nominated for the -Internet Villain- Award in the UK.md (100%) rename published/{ => 201907}/20190708 10 ways to get started with Linux.md (100%) rename published/{ => 201907}/20190708 Command line quick tips- Permissions.md (100%) rename published/{ => 201907}/20190708 Debian 10 (Buster) Installation Steps with Screenshots.md (100%) rename published/{ => 201907}/20190708 Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve-s New Compiler.md (100%) rename published/{ => 201907}/20190709 From BASIC to Ruby- Life lessons from first programming languages on Command Line Heroes.md (100%) rename published/{ => 201907}/20190709 Pipx - Install And Run Python Applications In Isolated Environments.md (100%) rename published/{ => 201907}/20190709 Sysadmin vs SRE- What-s the difference.md (100%) rename published/{ => 201907}/20190710 32-bit life support- Cross-compiling with GCC.md (100%) rename published/{ => 201907}/20190710 How To Find Virtualbox Version From Commandline In Linux.md (100%) rename published/{ => 201907}/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md (100%) rename published/{ => 201907}/20190711 How to install Elasticsearch on MacOS.md (100%) rename published/{ => 201907}/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md (100%) rename published/{ => 201907}/20190712 MTTR is dead, long live CIRT.md (100%) rename published/{ => 201907}/20190712 Make an RGB cube with Python and Scribus.md (100%) rename published/{ => 201907}/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md (100%) rename published/{ => 201907}/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md (100%) rename published/{ => 201907}/20190716 Become a lifelong learner and succeed at work.md (100%) rename published/{ => 201907}/20190716 Save and load Python data with JSON.md (100%) rename published/{ => 201907}/20190717 Bond WiFi and Ethernet for easier networking mobility.md (100%) rename published/{ => 201907}/20190717 How to install Kibana on MacOS.md (100%) rename published/{ => 201907}/20190717 Mastering user groups on Linux.md (100%) rename published/{ => 201907}/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md (100%) rename published/{ => 201907}/20190722 How to run virtual machines with virt-manager.md (100%) rename published/{ => 201907}/20190723 Getting help for Linux shell built-ins.md (100%) rename published/{ => 201907}/20190723 How to Create a User Account Without useradd Command in Linux.md (100%) rename published/{ => 201907}/20190724 Master the Linux -ls- command.md (100%) rename published/{ => 201907}/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md (100%) rename published/{ => 201907}/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md (100%) rename published/{ => 201907}/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md (100%) rename published/{ => 201907}/20191110 What is DevSecOps.md (100%) diff --git a/published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md b/published/201907/20171226 Top 10 Microsoft Visio Alternatives for Linux.md similarity index 100% rename from published/20171226 Top 10 Microsoft Visio Alternatives for Linux.md rename to published/201907/20171226 Top 10 Microsoft Visio Alternatives for Linux.md diff --git a/published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md b/published/201907/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md similarity index 100% rename from published/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md rename to published/201907/20180406 MX Linux- A Mid-Weight Distro Focused on Simplicity.md diff --git a/published/20180529 Manage your workstation with Ansible- Configure desktop settings.md b/published/201907/20180529 Manage your workstation with Ansible- Configure desktop settings.md similarity index 100% rename from published/20180529 Manage your workstation with Ansible- Configure desktop settings.md rename to published/201907/20180529 Manage your workstation with Ansible- Configure desktop settings.md diff --git a/published/20180620 How To Find The Port Number Of A Service In Linux.md b/published/201907/20180620 How To Find The Port Number Of A Service In Linux.md similarity index 100% rename from published/20180620 How To Find The Port Number Of A Service In Linux.md rename to published/201907/20180620 How To Find The Port Number Of A Service In Linux.md diff --git a/published/20180629 100 Best Ubuntu Apps.md b/published/201907/20180629 100 Best Ubuntu Apps.md similarity index 100% rename from published/20180629 100 Best Ubuntu Apps.md rename to published/201907/20180629 100 Best Ubuntu Apps.md diff --git a/published/20180902 Learning BASIC Like It-s 1983.md b/published/201907/20180902 Learning BASIC Like It-s 1983.md similarity index 100% rename from published/20180902 Learning BASIC Like It-s 1983.md rename to published/201907/20180902 Learning BASIC Like It-s 1983.md diff --git a/published/20180924 5 ways to play old-school games on a Raspberry Pi.md b/published/201907/20180924 5 ways to play old-school games on a Raspberry Pi.md similarity index 100% rename from published/20180924 5 ways to play old-school games on a Raspberry Pi.md rename to published/201907/20180924 5 ways to play old-school games on a Raspberry Pi.md diff --git a/published/20190211 Introducing kids to computational thinking with Python.md b/published/201907/20190211 Introducing kids to computational thinking with Python.md similarity index 100% rename from published/20190211 Introducing kids to computational thinking with Python.md rename to published/201907/20190211 Introducing kids to computational thinking with Python.md diff --git a/published/20190301 Emacs for (even more of) the win.md b/published/201907/20190301 Emacs for (even more of) the win.md similarity index 100% rename from published/20190301 Emacs for (even more of) the win.md rename to published/201907/20190301 Emacs for (even more of) the win.md diff --git a/published/20190302 Create a Custom System Tray Indicator For Your Tasks on Linux.md b/published/201907/20190302 Create a Custom System Tray Indicator For Your Tasks on Linux.md similarity index 100% rename from published/20190302 Create a Custom System Tray Indicator For Your Tasks on Linux.md rename to published/201907/20190302 Create a Custom System Tray Indicator For Your Tasks on Linux.md diff --git a/published/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md b/published/201907/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md similarity index 100% rename from published/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md rename to published/201907/20190306 ClusterShell - A Nifty Tool To Run Commands On Cluster Nodes In Parallel.md diff --git a/published/20190320 4 cool terminal multiplexers.md b/published/201907/20190320 4 cool terminal multiplexers.md similarity index 100% rename from published/20190320 4 cool terminal multiplexers.md rename to published/201907/20190320 4 cool terminal multiplexers.md diff --git a/published/20190416 Can schools be agile.md b/published/201907/20190416 Can schools be agile.md similarity index 100% rename from published/20190416 Can schools be agile.md rename to published/201907/20190416 Can schools be agile.md diff --git a/published/20190501 Looking into Linux modules.md b/published/201907/20190501 Looking into Linux modules.md similarity index 100% rename from published/20190501 Looking into Linux modules.md rename to published/201907/20190501 Looking into Linux modules.md diff --git a/published/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md b/published/201907/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md similarity index 100% rename from published/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md rename to published/201907/20190505 Blockchain 2.0 - Public Vs Private Blockchain Comparison -Part 7.md diff --git a/published/20190513 When to be concerned about memory levels on Linux.md b/published/201907/20190513 When to be concerned about memory levels on Linux.md similarity index 100% rename from published/20190513 When to be concerned about memory levels on Linux.md rename to published/201907/20190513 When to be concerned about memory levels on Linux.md diff --git a/published/20190518 Best Linux Distributions for Beginners.md b/published/201907/20190518 Best Linux Distributions for Beginners.md similarity index 100% rename from published/20190518 Best Linux Distributions for Beginners.md rename to published/201907/20190518 Best Linux Distributions for Beginners.md diff --git a/published/20190522 Convert Markdown files to word processor docs using pandoc.md b/published/201907/20190522 Convert Markdown files to word processor docs using pandoc.md similarity index 100% rename from published/20190522 Convert Markdown files to word processor docs using pandoc.md rename to published/201907/20190522 Convert Markdown files to word processor docs using pandoc.md diff --git a/published/20190531 Use Firefox Send with ffsend in Fedora.md b/published/201907/20190531 Use Firefox Send with ffsend in Fedora.md similarity index 100% rename from published/20190531 Use Firefox Send with ffsend in Fedora.md rename to published/201907/20190531 Use Firefox Send with ffsend in Fedora.md diff --git a/published/20190603 How to set up virtual environments for Python on MacOS.md b/published/201907/20190603 How to set up virtual environments for Python on MacOS.md similarity index 100% rename from published/20190603 How to set up virtual environments for Python on MacOS.md rename to published/201907/20190603 How to set up virtual environments for Python on MacOS.md diff --git a/published/20190604 5G will augment Wi-Fi, not replace it.md b/published/201907/20190604 5G will augment Wi-Fi, not replace it.md similarity index 100% rename from published/20190604 5G will augment Wi-Fi, not replace it.md rename to published/201907/20190604 5G will augment Wi-Fi, not replace it.md diff --git a/published/20190606 Zorin OS Becomes Even More Awesome With Zorin 15 Release.md b/published/201907/20190606 Zorin OS Becomes Even More Awesome With Zorin 15 Release.md similarity index 100% rename from published/20190606 Zorin OS Becomes Even More Awesome With Zorin 15 Release.md rename to published/201907/20190606 Zorin OS Becomes Even More Awesome With Zorin 15 Release.md diff --git a/published/20190607 4 tools to help you drive Kubernetes.md b/published/201907/20190607 4 tools to help you drive Kubernetes.md similarity index 100% rename from published/20190607 4 tools to help you drive Kubernetes.md rename to published/201907/20190607 4 tools to help you drive Kubernetes.md diff --git a/published/20190607 Free and Open Source Trello Alternative OpenProject 9 Released.md b/published/201907/20190607 Free and Open Source Trello Alternative OpenProject 9 Released.md similarity index 100% rename from published/20190607 Free and Open Source Trello Alternative OpenProject 9 Released.md rename to published/201907/20190607 Free and Open Source Trello Alternative OpenProject 9 Released.md diff --git a/published/20190609 How to set ulimit and file descriptors limit on Linux Servers.md b/published/201907/20190609 How to set ulimit and file descriptors limit on Linux Servers.md similarity index 100% rename from published/20190609 How to set ulimit and file descriptors limit on Linux Servers.md rename to published/201907/20190609 How to set ulimit and file descriptors limit on Linux Servers.md diff --git a/published/20190610 5 Easy Ways To Free Up Space (Remove Unwanted or Junk Files) on Ubuntu.md b/published/201907/20190610 5 Easy Ways To Free Up Space (Remove Unwanted or Junk Files) on Ubuntu.md similarity index 100% rename from published/20190610 5 Easy Ways To Free Up Space (Remove Unwanted or Junk Files) on Ubuntu.md rename to published/201907/20190610 5 Easy Ways To Free Up Space (Remove Unwanted or Junk Files) on Ubuntu.md diff --git a/published/20190612 BitTorrent Client Deluge 2.0 Released- Here-s What-s New.md b/published/201907/20190612 BitTorrent Client Deluge 2.0 Released- Here-s What-s New.md similarity index 100% rename from published/20190612 BitTorrent Client Deluge 2.0 Released- Here-s What-s New.md rename to published/201907/20190612 BitTorrent Client Deluge 2.0 Released- Here-s What-s New.md diff --git a/published/20190613 IPython is still the heart of Jupyter Notebooks for Python developers.md b/published/201907/20190613 IPython is still the heart of Jupyter Notebooks for Python developers.md similarity index 100% rename from published/20190613 IPython is still the heart of Jupyter Notebooks for Python developers.md rename to published/201907/20190613 IPython is still the heart of Jupyter Notebooks for Python developers.md diff --git a/published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md b/published/201907/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md similarity index 100% rename from published/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md rename to published/201907/20190617 Use ImageGlass to quickly view JPG images as a slideshow.md diff --git a/published/20190618 A beginner-s guide to Linux permissions.md b/published/201907/20190618 A beginner-s guide to Linux permissions.md similarity index 100% rename from published/20190618 A beginner-s guide to Linux permissions.md rename to published/201907/20190618 A beginner-s guide to Linux permissions.md diff --git a/published/20190619 Leading in the Python community.md b/published/201907/20190619 Leading in the Python community.md similarity index 100% rename from published/20190619 Leading in the Python community.md rename to published/201907/20190619 Leading in the Python community.md diff --git a/published/20190621 Three Ways to Lock and Unlock User Account in Linux.md b/published/201907/20190621 Three Ways to Lock and Unlock User Account in Linux.md similarity index 100% rename from published/20190621 Three Ways to Lock and Unlock User Account in Linux.md rename to published/201907/20190621 Three Ways to Lock and Unlock User Account in Linux.md diff --git a/published/20190624 With Upgraded Specs, Raspberry Pi 4 Takes Aim at Desktop Segment.md b/published/201907/20190624 With Upgraded Specs, Raspberry Pi 4 Takes Aim at Desktop Segment.md similarity index 100% rename from published/20190624 With Upgraded Specs, Raspberry Pi 4 Takes Aim at Desktop Segment.md rename to published/201907/20190624 With Upgraded Specs, Raspberry Pi 4 Takes Aim at Desktop Segment.md diff --git a/published/20190625 5 tiny Linux distros to try before you die.md b/published/201907/20190625 5 tiny Linux distros to try before you die.md similarity index 100% rename from published/20190625 5 tiny Linux distros to try before you die.md rename to published/201907/20190625 5 tiny Linux distros to try before you die.md diff --git a/published/20190625 The innovation delusion.md b/published/201907/20190625 The innovation delusion.md similarity index 100% rename from published/20190625 The innovation delusion.md rename to published/201907/20190625 The innovation delusion.md diff --git a/published/20190626 Tracking down library injections on Linux.md b/published/201907/20190626 Tracking down library injections on Linux.md similarity index 100% rename from published/20190626 Tracking down library injections on Linux.md rename to published/201907/20190626 Tracking down library injections on Linux.md diff --git a/published/20190627 How to use Tig to browse Git logs.md b/published/201907/20190627 How to use Tig to browse Git logs.md similarity index 100% rename from published/20190627 How to use Tig to browse Git logs.md rename to published/201907/20190627 How to use Tig to browse Git logs.md diff --git a/published/20190628 Undo releases Live Recorder 5.0 for Linux debugging.md b/published/201907/20190628 Undo releases Live Recorder 5.0 for Linux debugging.md similarity index 100% rename from published/20190628 Undo releases Live Recorder 5.0 for Linux debugging.md rename to published/201907/20190628 Undo releases Live Recorder 5.0 for Linux debugging.md diff --git a/published/20190630 Donald Trump Now Wants to Ban End-to-End Encryption.md b/published/201907/20190630 Donald Trump Now Wants to Ban End-to-End Encryption.md similarity index 100% rename from published/20190630 Donald Trump Now Wants to Ban End-to-End Encryption.md rename to published/201907/20190630 Donald Trump Now Wants to Ban End-to-End Encryption.md diff --git a/published/20190701 Ubuntu or Fedora- Which One Should You Use and Why.md b/published/201907/20190701 Ubuntu or Fedora- Which One Should You Use and Why.md similarity index 100% rename from published/20190701 Ubuntu or Fedora- Which One Should You Use and Why.md rename to published/201907/20190701 Ubuntu or Fedora- Which One Should You Use and Why.md diff --git a/published/20190702 Jupyter and data science in Fedora.md b/published/201907/20190702 Jupyter and data science in Fedora.md similarity index 100% rename from published/20190702 Jupyter and data science in Fedora.md rename to published/201907/20190702 Jupyter and data science in Fedora.md diff --git a/published/20190702 Make Linux stronger with firewalls.md b/published/201907/20190702 Make Linux stronger with firewalls.md similarity index 100% rename from published/20190702 Make Linux stronger with firewalls.md rename to published/201907/20190702 Make Linux stronger with firewalls.md diff --git a/published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md b/published/201907/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md similarity index 100% rename from published/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md rename to published/201907/20190703 How to Manually Install Security Updates on Debian-Ubuntu.md diff --git a/published/20190703 Parse arguments with Python.md b/published/201907/20190703 Parse arguments with Python.md similarity index 100% rename from published/20190703 Parse arguments with Python.md rename to published/201907/20190703 Parse arguments with Python.md diff --git a/published/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md b/published/201907/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md similarity index 100% rename from published/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md rename to published/201907/20190705 Bash Script to Monitor Messages Log (Warning, Error and Critical) on Linux.md diff --git a/published/20190705 Copy and paste at the Linux command line with xclip.md b/published/201907/20190705 Copy and paste at the Linux command line with xclip.md similarity index 100% rename from published/20190705 Copy and paste at the Linux command line with xclip.md rename to published/201907/20190705 Copy and paste at the Linux command line with xclip.md diff --git a/published/20190705 Manage your shell environment.md b/published/201907/20190705 Manage your shell environment.md similarity index 100% rename from published/20190705 Manage your shell environment.md rename to published/201907/20190705 Manage your shell environment.md diff --git a/published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md b/published/201907/20190706 How To Delete A Repository And GPG Key In Ubuntu.md similarity index 100% rename from published/20190706 How To Delete A Repository And GPG Key In Ubuntu.md rename to published/201907/20190706 How To Delete A Repository And GPG Key In Ubuntu.md diff --git a/published/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md b/published/201907/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md similarity index 100% rename from published/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md rename to published/201907/20190706 How to enable DNS-over-HTTPS (DoH) in Firefox.md diff --git a/published/20190706 Say WHAAAT- Mozilla has Been Nominated for the -Internet Villain- Award in the UK.md b/published/201907/20190706 Say WHAAAT- Mozilla has Been Nominated for the -Internet Villain- Award in the UK.md similarity index 100% rename from published/20190706 Say WHAAAT- Mozilla has Been Nominated for the -Internet Villain- Award in the UK.md rename to published/201907/20190706 Say WHAAAT- Mozilla has Been Nominated for the -Internet Villain- Award in the UK.md diff --git a/published/20190708 10 ways to get started with Linux.md b/published/201907/20190708 10 ways to get started with Linux.md similarity index 100% rename from published/20190708 10 ways to get started with Linux.md rename to published/201907/20190708 10 ways to get started with Linux.md diff --git a/published/20190708 Command line quick tips- Permissions.md b/published/201907/20190708 Command line quick tips- Permissions.md similarity index 100% rename from published/20190708 Command line quick tips- Permissions.md rename to published/201907/20190708 Command line quick tips- Permissions.md diff --git a/published/20190708 Debian 10 (Buster) Installation Steps with Screenshots.md b/published/201907/20190708 Debian 10 (Buster) Installation Steps with Screenshots.md similarity index 100% rename from published/20190708 Debian 10 (Buster) Installation Steps with Screenshots.md rename to published/201907/20190708 Debian 10 (Buster) Installation Steps with Screenshots.md diff --git a/published/20190708 Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve-s New Compiler.md b/published/201907/20190708 Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve-s New Compiler.md similarity index 100% rename from published/20190708 Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve-s New Compiler.md rename to published/201907/20190708 Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve-s New Compiler.md diff --git a/published/20190709 From BASIC to Ruby- Life lessons from first programming languages on Command Line Heroes.md b/published/201907/20190709 From BASIC to Ruby- Life lessons from first programming languages on Command Line Heroes.md similarity index 100% rename from published/20190709 From BASIC to Ruby- Life lessons from first programming languages on Command Line Heroes.md rename to published/201907/20190709 From BASIC to Ruby- Life lessons from first programming languages on Command Line Heroes.md diff --git a/published/20190709 Pipx - Install And Run Python Applications In Isolated Environments.md b/published/201907/20190709 Pipx - Install And Run Python Applications In Isolated Environments.md similarity index 100% rename from published/20190709 Pipx - Install And Run Python Applications In Isolated Environments.md rename to published/201907/20190709 Pipx - Install And Run Python Applications In Isolated Environments.md diff --git a/published/20190709 Sysadmin vs SRE- What-s the difference.md b/published/201907/20190709 Sysadmin vs SRE- What-s the difference.md similarity index 100% rename from published/20190709 Sysadmin vs SRE- What-s the difference.md rename to published/201907/20190709 Sysadmin vs SRE- What-s the difference.md diff --git a/published/20190710 32-bit life support- Cross-compiling with GCC.md b/published/201907/20190710 32-bit life support- Cross-compiling with GCC.md similarity index 100% rename from published/20190710 32-bit life support- Cross-compiling with GCC.md rename to published/201907/20190710 32-bit life support- Cross-compiling with GCC.md diff --git a/published/20190710 How To Find Virtualbox Version From Commandline In Linux.md b/published/201907/20190710 How To Find Virtualbox Version From Commandline In Linux.md similarity index 100% rename from published/20190710 How To Find Virtualbox Version From Commandline In Linux.md rename to published/201907/20190710 How To Find Virtualbox Version From Commandline In Linux.md diff --git a/published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md b/published/201907/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md similarity index 100% rename from published/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md rename to published/201907/20190710 Test 200- Linux And Unix Operating Systems Online For Free.md diff --git a/published/20190711 How to install Elasticsearch on MacOS.md b/published/201907/20190711 How to install Elasticsearch on MacOS.md similarity index 100% rename from published/20190711 How to install Elasticsearch on MacOS.md rename to published/201907/20190711 How to install Elasticsearch on MacOS.md diff --git a/published/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md b/published/201907/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md similarity index 100% rename from published/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md rename to published/201907/20190711 Type Linux Commands In Capital Letters To Run Them As Sudo User.md diff --git a/published/20190712 MTTR is dead, long live CIRT.md b/published/201907/20190712 MTTR is dead, long live CIRT.md similarity index 100% rename from published/20190712 MTTR is dead, long live CIRT.md rename to published/201907/20190712 MTTR is dead, long live CIRT.md diff --git a/published/20190712 Make an RGB cube with Python and Scribus.md b/published/201907/20190712 Make an RGB cube with Python and Scribus.md similarity index 100% rename from published/20190712 Make an RGB cube with Python and Scribus.md rename to published/201907/20190712 Make an RGB cube with Python and Scribus.md diff --git a/published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md b/published/201907/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md similarity index 100% rename from published/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md rename to published/201907/20190713 ElectronMail - a Desktop Client for ProtonMail and Tutanota.md diff --git a/published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md b/published/201907/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md similarity index 100% rename from published/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md rename to published/201907/20190714 Excellent- Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates -No PPA Needed Anymore.md diff --git a/published/20190716 Become a lifelong learner and succeed at work.md b/published/201907/20190716 Become a lifelong learner and succeed at work.md similarity index 100% rename from published/20190716 Become a lifelong learner and succeed at work.md rename to published/201907/20190716 Become a lifelong learner and succeed at work.md diff --git a/published/20190716 Save and load Python data with JSON.md b/published/201907/20190716 Save and load Python data with JSON.md similarity index 100% rename from published/20190716 Save and load Python data with JSON.md rename to published/201907/20190716 Save and load Python data with JSON.md diff --git a/published/20190717 Bond WiFi and Ethernet for easier networking mobility.md b/published/201907/20190717 Bond WiFi and Ethernet for easier networking mobility.md similarity index 100% rename from published/20190717 Bond WiFi and Ethernet for easier networking mobility.md rename to published/201907/20190717 Bond WiFi and Ethernet for easier networking mobility.md diff --git a/published/20190717 How to install Kibana on MacOS.md b/published/201907/20190717 How to install Kibana on MacOS.md similarity index 100% rename from published/20190717 How to install Kibana on MacOS.md rename to published/201907/20190717 How to install Kibana on MacOS.md diff --git a/published/20190717 Mastering user groups on Linux.md b/published/201907/20190717 Mastering user groups on Linux.md similarity index 100% rename from published/20190717 Mastering user groups on Linux.md rename to published/201907/20190717 Mastering user groups on Linux.md diff --git a/published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md b/published/201907/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md similarity index 100% rename from published/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md rename to published/201907/20190718 Epic Games Backs Blender Foundation with -1.2m Epic MegaGrants.md diff --git a/published/20190722 How to run virtual machines with virt-manager.md b/published/201907/20190722 How to run virtual machines with virt-manager.md similarity index 100% rename from published/20190722 How to run virtual machines with virt-manager.md rename to published/201907/20190722 How to run virtual machines with virt-manager.md diff --git a/published/20190723 Getting help for Linux shell built-ins.md b/published/201907/20190723 Getting help for Linux shell built-ins.md similarity index 100% rename from published/20190723 Getting help for Linux shell built-ins.md rename to published/201907/20190723 Getting help for Linux shell built-ins.md diff --git a/published/20190723 How to Create a User Account Without useradd Command in Linux.md b/published/201907/20190723 How to Create a User Account Without useradd Command in Linux.md similarity index 100% rename from published/20190723 How to Create a User Account Without useradd Command in Linux.md rename to published/201907/20190723 How to Create a User Account Without useradd Command in Linux.md diff --git a/published/20190724 Master the Linux -ls- command.md b/published/201907/20190724 Master the Linux -ls- command.md similarity index 100% rename from published/20190724 Master the Linux -ls- command.md rename to published/201907/20190724 Master the Linux -ls- command.md diff --git a/published/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md b/published/201907/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md similarity index 100% rename from published/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md rename to published/201907/20190724 WPS Office on Linux is a Free Alternative to Microsoft Office.md diff --git a/published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md b/published/201907/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md similarity index 100% rename from published/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md rename to published/201907/20190725 How to Enable Canonical Kernel Livepatch Service on Ubuntu LTS System.md diff --git a/published/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md b/published/201907/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md similarity index 100% rename from published/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md rename to published/201907/20190730 Is This the End of Floppy Disk in Linux- Linus Torvalds Marks Floppy Disks ‘Orphaned.md diff --git a/published/20191110 What is DevSecOps.md b/published/201907/20191110 What is DevSecOps.md similarity index 100% rename from published/20191110 What is DevSecOps.md rename to published/201907/20191110 What is DevSecOps.md From 2b8a5c45cb916e83db80613216f61a0e945bc97c Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 1 Aug 2019 08:59:27 +0800 Subject: [PATCH 227/951] translating --- .../20190730 OpenHMD- Open Source Project for VR Development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md b/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md index 99e83e3613..cea8ca3a0e 100644 --- a/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md +++ b/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4387df9ab231248587cb5b94caa5d8fd7756d247 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Aug 2019 09:07:47 +0800 Subject: [PATCH 228/951] PRF @geekpi --- ...ta Performance Monitoring Tool On Linux.md | 109 ++++++++---------- 1 file changed, 51 insertions(+), 58 deletions(-) diff --git a/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md b/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md index 7719bd7a5a..e9a56c00a9 100644 --- a/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md +++ b/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Install NetData Performance Monitoring Tool On Linux) @@ -12,43 +12,40 @@ ![][1] -**NetData** 是一个用于系统和应用的分布式实时性能和健康监控工具。它提供了对系统中实时发生的所有事情的全面检测。你可以在高度互动的 Web 仪表板中查看结果。使用 Netdata,你可以清楚地了解现在发生的事情,以及之前系统和应用中发生的事情。你无需成为专家即可在 Linux 系统中部署此工具。NetData 开箱即用,零配置和零依赖。只需安装它然后休息,之后 NetData 将负责其余部分。 +**NetData** 是一个用于系统和应用的分布式实时性能和健康监控工具。它提供了对系统中实时发生的所有事情的全面检测。你可以在高度互动的 Web 仪表板中查看结果。使用 Netdata,你可以清楚地了解现在发生的事情,以及之前系统和应用中发生的事情。你无需成为专家即可在 Linux 系统中部署此工具。NetData 开箱即用,零配置、零依赖。只需安装它然后坐等,之后 NetData 将负责其余部分。 - -它有自己的内置 Web 服务器,以图形形式显示结果。NetData 非常快速高效,安装后可立即开始分析系统性能。它是用 **C** 编程语言编写的,所以它非常轻量。它占用的单核 CPU 使用率不到 3%,内存占用 10-15MB。我们可以轻松地在任何现有网页上嵌入图表,并且它还有一个插件 API,以便你可以监控任何应用。 +它有自己的内置 Web 服务器,以图形形式显示结果。NetData 非常快速高效,安装后可立即开始分析系统性能。它是用 C 编程语言编写的,所以它非常轻量。它占用的单核 CPU 使用率不到 3%,内存占用 10-15MB。我们可以轻松地在任何现有网页上嵌入图表,并且它还有一个插件 API,以便你可以监控任何应用。 以下是 Linux 系统中 NetData 的监控列表。 - * CPU 使用率 -  * RAM 使用率 -  * swap 内存使用率 -  * 内核内存使用率 -  * 硬盘及其使用率 -  * 网络接口 -  * IPtables -  * Netfilter -  * DDoS 保护 -  * 进程 -  * 应用 -  * NFS 服务器 -  * Web 服务器 (Apache 和 Nginx) -  * 数据库服务器 (MySQL), -  * DHCP 服务器 -  * DNS 服务器 -  * 电子邮件服务 -  * 代理服务器 -  * Tomcat -  * PHP -  * SNP 设备 -  * 等等 +* CPU 使用率 +* RAM 使用率 +* 交换内存使用率 +* 内核内存使用率 +* 硬盘及其使用率 +* 网络接口 +* IPtables +* Netfilter +* DDoS 保护 +* 进程 +* 应用 +* NFS 服务器 +* Web 服务器 (Apache 和 Nginx) +* 数据库服务器 (MySQL), +* DHCP 服务器 +* DNS 服务器 +* 电子邮件服务 +* 代理服务器 +* Tomcat +* PHP +* SNP 设备 +* 等等 - - -NetData 是免费的开源工具,它支持 Linux、FreeBSD 和 Mac OS。 +NetData 是自由开源工具,它支持 Linux、FreeBSD 和 Mac OS。 ### 在 Linux 上安装 NetData -Netdata 可以安装在任何安装了**Bash** 的 Linux 发行版上。 +Netdata 可以安装在任何安装了 Bash 的 Linux 发行版上。 最简单的安装 Netdata 的方法是从终端运行以下命令: @@ -58,19 +55,19 @@ $ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) 这将下载并安装启动和运行 Netdata 所需的一切。 -有些用户可能不想在没有研究的情况下将某些东西直接注入 Bash。如果你不喜欢此方法,可以按照以下步骤在系统上安装它。 +有些用户可能不想在没有研究的情况下将某些东西直接注入到 Bash。如果你不喜欢此方法,可以按照以下步骤在系统上安装它。 -**在 Arch Linux 上:** +#### 在 Arch Linux 上 -Arch Linux 默认仓库中提供了最新版本。所以,我们可以使用以下 [**pacman**][2] 命令安装它: +Arch Linux 默认仓库中提供了最新版本。所以,我们可以使用以下 [pacman][2] 命令安装它: ``` $ sudo pacman -S netdata ``` -**在基于 DEB 和基于 RPM 的系统上** +#### 在基于 DEB 和基于 RPM 的系统上 -在基于 DEB (Ubuntu / Debian) 或基于RPM (RHEL / CentOS / Fedora) 系统的默认仓库没有 NetData。我们需要从它的 Git 仓库手动安装 NetData。 +在基于 DEB (Ubuntu / Debian)或基于 RPM(RHEL / CentOS / Fedora) 系统的默认仓库没有 NetData。我们需要从它的 Git 仓库手动安装 NetData。 首先安装所需的依赖项: @@ -97,9 +94,9 @@ Git 克隆 NetData 仓库: $ git clone https://github.com/netdata/netdata.git --depth=100 ``` -上面的命令将在当前工作目录中创建一个名为 **“netdata”** 的目录。 +上面的命令将在当前工作目录中创建一个名为 `netdata` 的目录。 -切换到 “netdata” 目录: +切换到 `netdata` 目录: ``` $ cd netdata/ @@ -167,23 +164,23 @@ Uninstall script generated: ./netdata-uninstaller.sh ![][3] -安装 NetData +*安装 NetData* NetData 已安装并启动。 -要在其他 Linux 发行版上安装 Netdata,请参阅[**官方安装说明页面**][4]。 +要在其他 Linux 发行版上安装 Netdata,请参阅[官方安装说明页面][4]。 -##### 在防火墙或者路由器上允许 NetData 的默认端口 +### 在防火墙或者路由器上允许 NetData 的默认端口 -如果你的系统在防火墙或者路由器后面,那么必须允许默认端口 **19999** 以便从任何远程系统访问 NetData 的 web 界面。 +如果你的系统在防火墙或者路由器后面,那么必须允许默认端口 `19999` 以便从任何远程系统访问 NetData 的 web 界面。 -**在 Ubuntu/Debian 中:** +#### 在 Ubuntu/Debian 中 ``` $ sudo ufw allow 19999 ``` -**在 CentOS/RHEL/Fedora 中:** +#### 在 CentOS/RHEL/Fedora 中 ``` $ sudo firewall-cmd --permanent --add-port=19999/tcp @@ -193,11 +190,10 @@ $ sudo firewall-cmd --reload ### 启动/停止 NetData -要在使用 **Systemd** 的系统上启用和启动 Netdata 服务,请运行: +要在使用 Systemd 的系统上启用和启动 Netdata 服务,请运行: ``` $ sudo systemctl enable netdata - $ sudo systemctl start netdata ``` @@ -207,11 +203,10 @@ $ sudo systemctl start netdata $ sudo systemctl stop netdata ``` -要在使用 **Init** 的系统上启用和启动 Netdata 服务,请运行: +要在使用 Init 的系统上启用和启动 Netdata 服务,请运行: ``` $ sudo service netdata start - $ sudo chkconfig netdata on ``` @@ -223,19 +218,19 @@ $ sudo service netdata stop ### 通过 Web 浏览器访问 NetData -打开 Web 浏览器,然后打开 **** 或者 **** 或者 ****。你应该看到如下页面。 +打开 Web 浏览器,然后打开 `http://127.0.0.1:19999` 或者 `http://localhost:19999/` 或者 `http://ip-address:19999`。你应该看到如下页面。 ![][5] -Netdata 仪表板 +*Netdata 仪表板* 在仪表板中,你可以找到 Linux 系统的完整统计信息。向下滚动以查看每个部分。 -你可以随时打开 **** 来下载和/或查看 NetData 默认配置文件。 +你可以随时打开 `http://localhost:19999/netdata.conf` 来下载和/或查看 NetData 默认配置文件。 ![][6] -Netdata 配置文件 +*Netdata 配置文件* ### 更新 NetData @@ -245,7 +240,7 @@ Netdata 配置文件 $ sudo pacman -Syyu ``` -在基于 DEB 或 RPM 的系统中,只需进入已克隆它的目录(此例中是 netdata)。 +在基于 DEB 或 RPM 的系统中,只需进入已克隆它的目录(此例中是 `netdata`)。 ``` $ cd netdata @@ -283,12 +278,10 @@ $ sudo ./netdata-uninstaller.sh --force $ sudo pacman -Rns netdata ``` -**资源:** - - * [**NetData 网站**][7] - * [**NetData 的 GitHub 页面**][8] - +### 资源 +* [NetData 网站][7] +* [NetData 的 GitHub 页面][8] -------------------------------------------------------------------------------- @@ -297,7 +290,7 @@ via: https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-lin 作者:[sk][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 fbc4e94d8327ba774b2c1d07a97656ffb34e7b10 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Aug 2019 09:08:46 +0800 Subject: [PATCH 229/951] PUB @geekpi https://linux.cn/article-11173-1.html --- ...06 Install NetData Performance Monitoring Tool On Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190706 Install NetData Performance Monitoring Tool On Linux.md (99%) diff --git a/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md b/published/20190706 Install NetData Performance Monitoring Tool On Linux.md similarity index 99% rename from translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md rename to published/20190706 Install NetData Performance Monitoring Tool On Linux.md index e9a56c00a9..5a5dc8d958 100644 --- a/translated/tech/20190706 Install NetData Performance Monitoring Tool On Linux.md +++ b/published/20190706 Install NetData Performance Monitoring Tool On Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11173-1.html) [#]: subject: (Install NetData Performance Monitoring Tool On Linux) [#]: via: (https://www.ostechnix.com/netdata-real-time-performance-monitoring-tool-linux/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From cc0a6c269712b9359170f72035277eb042a9295c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 1 Aug 2019 21:10:22 +0800 Subject: [PATCH 230/951] Rename sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md to sources/talk/20190730 From e-learning to m-learning- Open education-s next move.md --- ...0 From e-learning to m-learning- Open education-s next move.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190730 From e-learning to m-learning- Open education-s next move.md (100%) diff --git a/sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md b/sources/talk/20190730 From e-learning to m-learning- Open education-s next move.md similarity index 100% rename from sources/tech/20190730 From e-learning to m-learning- Open education-s next move.md rename to sources/talk/20190730 From e-learning to m-learning- Open education-s next move.md From 296cc79064bb7a0710819b8129fa0657b5259950 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Aug 2019 00:52:29 +0800 Subject: [PATCH 231/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190802=20Linux?= =?UTF-8?q?=20Smartphone=20Librem=205=20is=20Available=20for=20Preorder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md --- ...hone Librem 5 is Available for Preorder.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md diff --git a/sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md b/sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md new file mode 100644 index 0000000000..de4e87cf2f --- /dev/null +++ b/sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md @@ -0,0 +1,91 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Smartphone Librem 5 is Available for Preorder) +[#]: via: (https://itsfoss.com/librem-5-available/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Linux Smartphone Librem 5 is Available for Preorder +====== + +Purism recently [announced][1] the final specs for its [Librem 5 smartphone][2]. This is not based on Android or iOS – but built on [PureOS][3], which is an [open-source alternative to Android][4]. + +Along with the announcement, the Librem 5 is also available for [pre-orders for $649][5] (as an early bird offer till 31st July) and it will go up by $50 following the date. It will start shipping from Q3 of 2019. + +![][6] + +Here’s what Purism mentioned about Librem 5 in its blog post: + +_**We believe phones should not track you nor exploit your digital life.**_ + +_The Librem 5 represents the opportunity for you to take back control and protect your private information, your digital life through free and open source software, open governance, and transparency. The Librem 5 is_ **_a phone built on_ [_PureOS_][3]**_, a fully free, ethical and open-source operating system that is_ _**not based on Android or iOS**_ _(learn more about [why this is important][7])._ + +_We have successfully crossed our crowdfunding goals and will be delivering on our promise. The Librem 5’s hardware and software development is advancing [at a steady pace][8], and is scheduled for an initial release in Q3 2019. You can preorder the phone at $649 until shipping begins and regular pricing comes into effect. Kits with an external monitor, keyboard and mouse, are also available for preorder._ + +### Librem 5 Specifications + +From what it looks like, Librem 5 definitely aims to provide better privacy and security. In addition to this, it tries to avoid using anything from Google or Apple. + +While the idea is good enough – how does it hold up as a commercial smartphone under $700? + +![Librem 5 Smartphone][9] + +Let us take a look at the tech specs: + +![Librem 5][10] + +On paper the tech specs seems to be good enough. Not too great – not too bad. But, what about the performance? The user experience? + +Well, we can’t be too sure about it – unless we use it. So, if you are pre-ordering it – take that into consideration. + +[][11] + +Suggested read  Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve's New Compiler + +### Lifetime software updates for Librem 5 + +Of course, the specs aren’t very pretty when compared to the smartphones available at this price range. + +However, with the promise of lifetime software updates – it does look like a decent offering for open source enthusiasts. + +### Other Key Features + +Purism also highlights the fact that Librem 5 will be the first-ever [Matrix][12]-powered smartphone. This means that it will support end-to-end decentralized encrypted communications for messaging and calling. + +In addition to all these, the presence of headphone jack and a user-replaceable battery makes it a pretty solid deal. + +### Wrapping Up + +Even though it is tough to compete with the likes of Android/iOS smartphones, having an alternative is always good. Librem 5 may not prove to be an ideal smartphone for every user – but if you are an open-source enthusiast and looking for a simple smartphone that respects privacy and security without utilizing Google/Apple services, this is for you. + +Also the fact that it will receive lifetime software updates – makes it an interesting smartphone. + +What do you think about Librem 5? Are you thinking to pre-order it? Let us know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/librem-5-available/ + +作者:[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://puri.sm/posts/librem-5-smartphone-final-specs-announced/ +[2]: https://itsfoss.com/librem-linux-phone/ +[3]: https://pureos.net/ +[4]: https://itsfoss.com/open-source-alternatives-android/ +[5]: https://shop.puri.sm/shop/librem-5/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/librem-5-linux-smartphone.jpg?resize=800%2C450&ssl=1 +[7]: https://puri.sm/products/librem-5/pureos-mobile/ +[8]: https://puri.sm/posts/tag/phones +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/librem-5-smartphone.jpg?ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/librem-5-specs.png?ssl=1 +[11]: https://itsfoss.com/linux-games-performance-boost-amd-gpu/ +[12]: http://matrix.org From 2dcb3198ba2a4fd762e3df88a8a8db47608f58af Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Aug 2019 00:55:48 +0800 Subject: [PATCH 232/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=20Linux?= =?UTF-8?q?=20permissions=20101?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190801 Linux permissions 101.md --- .../tech/20190801 Linux permissions 101.md | 346 ++++++++++++++++++ 1 file changed, 346 insertions(+) create mode 100644 sources/tech/20190801 Linux permissions 101.md diff --git a/sources/tech/20190801 Linux permissions 101.md b/sources/tech/20190801 Linux permissions 101.md new file mode 100644 index 0000000000..cfbc3d0a29 --- /dev/null +++ b/sources/tech/20190801 Linux permissions 101.md @@ -0,0 +1,346 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux permissions 101) +[#]: via: (https://opensource.com/article/19/8/linux-permissions-101) +[#]: author: (Alex Juarez https://opensource.com/users/mralexjuarezhttps://opensource.com/users/marcobravohttps://opensource.com/users/greg-p) + +Linux permissions 101 +====== +Knowing how to control users' access to files is a fundamental system +administration skill. +![Penguins][1] + +Understanding Linux permissions and how to control which users have access to files is a fundamental skill for systems administration. + +This article will cover standard Linux file systems permissions, dig further into special permissions, and wrap up with an explanation of default permissions using **umask**. + +### Understanding the ls command output + +Before we can talk about how to modify permissions, we need to know how to view them. The **ls** command with the long listing argument (**-l**) gives us a lot of information about a file. + + +``` +$ ls -lAh +total 20K +-rwxr-xr--+ 1 root root    0 Mar  4 19:39 file1 +-rw-rw-rw-. 1 root root    0 Mar  4 19:39 file10 +-rwxrwxr--+ 1 root root    0 Mar  4 19:39 file2 +-rw-rw-rw-. 1 root root    0 Mar  4 19:39 file8 +-rw-rw-rw-. 1 root root    0 Mar  4 19:39 file9 +drwxrwxrwx. 2 root root 4.0K Mar  4 20:04 testdir +``` + +To understand what this means, let's break down the output regarding the permissions into individual sections. It will be easier to reference each section individually. + +Take a look at each component of the final line in the output above: + + +``` +`drwxrwxrwx. 2 root root 4.0K Mar  4 20:04 testdir` +``` + +Section 1 | Section 2 | Section 3 | Section 4 | Section 5 | Section 6 | Section 7 +---|---|---|---|---|---|--- +d | rwx | rwx | rwx | . | root | root + +Section 1 (on the left) reveals what type of file it is. + +d | Directory +---|--- +- | Regular file +l | A soft link + +The [info page][2] for **ls** has a full listing of the different file types. + +Each file has three modes of access: + + * the owner + * the group + * all others + + + +Sections 2, 3, and 4 refer to the user, group, and "other users" permissions. And each section can include a combination of **r** (read), **w** (write), and **x** (executable) permissions. + +Each of the permissions is also assigned a numerical value, which is important when talking about the octal representation of permissions. + +Permission | Octal Value +---|--- +Read | 4 +Write | 2 +Execute | 1 + +Section 5 details any alternative access methods, such as SELinux or File Access Control List (FACL). + +Method | Character +---|--- +No other method | - +SELinux | . +FACLs | + +Any combination of methods | + + +Sections 6 and 7 are the names of the owner and the group, respectively. + +### Using chown and chmod + +#### The chown command + +The **chown** (change ownership) command is used to change a file's user and group ownership. + +To change both the user and group ownership of the file **foo** to **root**, we can use these commands: + + +``` +$ chown root:root foo +$ chown root: foo +``` + +Running the command with the user followed by a colon (**:**) sets both the user and group ownership. + +To set only the user ownership of the file **foo** to the **root** user, enter: + + +``` +`$ chown root foo` +``` + +To change only the group ownership of the file **foo**, precede the group with a colon: + + +``` +`$ chown :root foo` +``` + +#### The chmod command + +The **chmod** (change mode) command controls file permissions for the owner, group, and all other users who are neither the owner nor part of the group associated with the file. + +The **chmod** command can set permissions in both octal (e.g., 755, 644, etc.) and symbolic (e.g., u+rwx, g-rwx, o=rw) formatting. + +Octal notation assigns 4 "points" to **read**, 2 to **write**, and 1 to **execute**. If we want to assign the user **read** permissions, we assign 4 to the first slot, but if we want to add **write** permissions, we must add 2. If we want to add **execute**, then we add 1. We do this for each permission type: owner, group, and others. + +For example, if we want to assign **read**, **write**, and **execute** to the owner of the file, but only **read** and **execute** to group members and all other users, we would use 755 in octal formatting. That's all permission bits for the owner (4+2+1), but only a 4 and 1 for the group and others (4+1). + +> The breakdown for that is: 4+2+1=7; 4+1=5; and 4+1=5. + +If we wanted to assign **read** and **write** to the owner of the file but only **read** to members of the group and all other users, we could use **chmod** as follows: + + +``` +`$ chmod 644 foo_file` +``` + +In the examples below, we use symbolic notation in different groupings. Note the letters **u**, **g**, and **o** represent **user**, **group**, and **other**. We use **u**, **g**, and **o** in conjunction with **+**, **-**, or **=** to add, remove, or set permission bits. + +To add the **execute** bit to the ownership permission set: + + +``` +`$ chmod u+x foo_file` +``` + +To remove **read**, **write**, and **execute** from members of the group: + + +``` +`$ chmod g-rwx foo_file` +``` + +To set the ownership for all other users to **read** and **write**: + + +``` +`$ chmod o=rw` +``` + +### The special bits: Set UID, set GID, and sticky bits + +In addition to the standard permissions, there are a few special permission bits that have some useful benefits. + +#### Set user ID (suid) + +When **suid** is set on a file, an operation executes as the owner of the file, not the user running the file. A [good example][3] of this is the **passwd** command. It needs the **suid** bit to be set so that changing a password runs with root permissions. + + +``` +$ ls -l /bin/passwd +-rwsr-xr-x. 1 root root 27832 Jun 10  2014 /bin/passwd +``` + +An example of setting the **suid** bit would be: + + +``` +`$ chmod u+s /bin/foo_file_name` +``` + +#### Set group ID (sgid) + +The **sgid** bit is similar to the **suid** bit in the sense that the operations are done under the group ownership of the directory instead of the user running the command. + +An example of using **sgid** would be if multiple users are working out of the same directory, and every file created in the directory needs to have the same group permissions. The example below creates a directory called **collab_dir**, sets the **sgid** bit, and changes the group ownership to **webdev**. + + +``` +$ mkdir collab_dir +$ chmod g+s collab_dir +$ chown :webdev collab_dir +``` + +Now any file created in the directory will have the group ownership of **webdev** instead of the user who created the file. + + +``` +$ cd collab_dir +$ touch file-sgid +$ ls -lah file-sgid +-rw-r--r--. 1 root webdev 0 Jun 12 06:04 file-sgid +``` + +#### The "sticky" bit + +The sticky bit denotes that only the owner of a file can delete the file, even if group permissions would otherwise allow it. This setting usually makes the most sense on a common or collaborative directory such as **/tmp**. In the example below, the **t** in the **execute** column of the **all others** permission set indicates that the sticky bit has been applied. + + +``` +$ ls -ld /tmp +drwxrwxrwt. 8 root root 4096 Jun 12 06:07 /tmp/ +``` + +Keep in mind this does not prevent somebody from editing the file; it just keeps them from deleting the contents of a directory. + +We set the sticky bit with: + + +``` +`$ chmod o+t foo_dir` +``` + +On your own, try setting the sticky bit on a directory and give it full group permissions so that multiple users can read, write and execute on the directory because they are in the same group. + +From there, create files as each user and then try to delete them as the other. + +If everything is configured correctly, one user should not be able to delete users from the other user. + +Note that each of these bits can also be set in octal format with SUID=4, SGID=2, and Sticky=1. + + +``` +$ chmod 4744 +$ chmod 2644 +$ chmod 1755 +``` + +#### Uppercase or lowercase? + +If you are setting the special bits and see an uppercase **S** or **T** instead of lowercase (as we've seen until this point), it is because the underlying execute bit is not present. To demonstrate, the following example creates a file with the sticky bit set. We can then add/remove the execute bit to demonstrate the case change. + + +``` +$ touch file cap-ST-demo +$ chmod 1755 cap-ST-demo +$ ls -l cap-ST-demo +-rwxr-xr-t. 1 root root 0 Jun 12 06:16 cap-ST-demo + +$ chmod o-x cap-X-demo +$ ls -l cap-X-demo +-rwxr-xr-T. 1 root root 0 Jun 12 06:16 cap-ST-demo +``` + +#### Setting the execute bit conditionally + +To this point, we've set the **execute** bit using a lowercase **x**, which sets it without asking any questions. We have another option: using an uppercase **X** instead of lowercase will set the **execute** bit only if it is already present somewhere in the permission group. This can be a difficult concept to explain, but the demo below will help illustrate it. Notice here that after trying to add the **execute** bit to the group privileges, it is not applied. + + +``` +$ touch cap-X-file +$ ls -l cap-X-file +-rw-r--r--. 1 root root 0 Jun 12 06:31 cap-X-file +$ chmod g+X cap-X-file +$ ls -l cap-X-file +-rw-r--r--. 1 root root 0 Jun 12 06:31 cap-X-file +``` + +In this similar example, we add the execute bit first to the group permissions using the lowercase **x** and then use the uppercase **X** to add permissions for all other users. This time, the uppercase **X** sets the permissions. + + +``` +$ touch cap-X-file +$ ls -l cap-X-file +-rw-r--r--. 1 root root 0 Jun 12 06:31 cap-X-file +$ chmod g+x cap-X-file +$ ls -l cap-X-file +-rw-r-xr--. 1 root root 0 Jun 12 06:31 cap-X-file +$ chmod g+x cap-X-file +$ chmod o+X cap-X-file +ls -l cap-X-file +-rw-r-xr-x. 1 root root 0 Jun 12 06:31 cap-X-file +``` + +### Understanding umask + +The **umask** masks (or "blocks off") bits from the default permission set in order to define permissions for a file or directory. For example, a 2 in the **umask** output indicates it is blocking the **write** bit from a file, at least by default. + +Using the **umask** command without any arguments allows us to see the current **umask** setting. There are four columns: the first is reserved for the special suid, sgid, or sticky bit, and the remaining three represent the owner, group, and other permissions. + + +``` +$ umask +0022 +``` + +To understand what this means, we can execute **umask** with a **-S** (as shown below) to get the result of masking the bits. For instance, because of the **2** value in the third column, the **write** bit is masked off from the group and other sections; only **read** and **execute** can be assigned for those. + + +``` +$ umask -S +u=rwx,g=rx,o=rx +``` + +To see what the default permission set is for files and directories, let's set our **umask** to all zeros. This means that we are not masking off any bits when we create a file. + + +``` +$ umask 000 +$ umask -S +u=rwx,g=rwx,o=rwx + +$ touch file-umask-000 +$ ls -l file-umask-000 +-rw-rw-rw-. 1 root root 0 Jul 17 22:03 file-umask-000 +``` + +Now when we create a file, we see the default permissions are **read** (4) and **write** (2) for all sections, which would equate to 666 in octal representation. + +We can do the same for a directory and see its default permissions are 777. We need the **execute** bit on directories so we can traverse through them. + + +``` +$ mkdir dir-umask-000 +$ ls -ld dir-umask-000 +drwxrwxrwx. 2 root root 4096 Jul 17 22:03 dir-umask-000/ +``` + +### Conclusion + +There are many other ways an administrator can control access to files on a system. These permissions are basic to Linux, and we can build upon these fundamental aspects. If your work takes you into FACLs or SELinux, you will see that they also build upon these first rules of file access. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/linux-permissions-101 + +作者:[Alex Juarez][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/mralexjuarezhttps://opensource.com/users/marcobravohttps://opensource.com/users/greg-p +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux-penguins.png?itok=yKOpaJM_ (Penguins) +[2]: https://www.gnu.org/software/texinfo/manual/info-stnd/info-stnd.html +[3]: https://www.theurbanpenguin.com/using-a-simple-c-program-to-explain-the-suid-permission/ From 85ed4ce0b378aa1552128b457a0344287db9f411 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Aug 2019 00:58:28 +0800 Subject: [PATCH 233/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=20GitHub?= =?UTF-8?q?=20Pages=20is=20a=20CI/CD=20pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190801 GitHub Pages is a CI-CD pipeline.md --- ...190801 GitHub Pages is a CI-CD pipeline.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/tech/20190801 GitHub Pages is a CI-CD pipeline.md diff --git a/sources/tech/20190801 GitHub Pages is a CI-CD pipeline.md b/sources/tech/20190801 GitHub Pages is a CI-CD pipeline.md new file mode 100644 index 0000000000..cad16c5512 --- /dev/null +++ b/sources/tech/20190801 GitHub Pages is a CI-CD pipeline.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GitHub Pages is a CI/CD pipeline) +[#]: via: (https://opensource.com/article/19/8/github-pages-cicd-pipeline) +[#]: author: (Katie McLaughlin https://opensource.com/users/glasnt) + +GitHub Pages is a CI/CD pipeline +====== +Integrating just a little bit of automation into your workflow can +greatly improve your productivity and development velocity. +![An intersection of pipes.][1] + +One of GitHub's superpowers is the ability to _magically_ turn your documentation into a website. If you configure a [GitHub Page][2] for your **docs/** folder on your AwesomeProject website, you'll end up with **yourname.github.io/awesomeproject**, showing your documentation, all for free. + +But it's not actually magic. Sadly, even though we have taught glass to think, we can still only thank the advanced application of technology for anything that appears to be magical. + +GitHub Pages is just an integrated pathway within GitHub to help you set up a Jekyll project. [Jekyll][3] is a static site generator, written in Ruby. Out of the box you can quickly generate websites using markdown files that are then merged into pre-formatted HTML templated themes. There are many [default themes][4] available for GitHub Pages, or you can use one of the many [free templates][5] out there. + +![Jekyll Themes screenshot][6] + +There are many open source licensed templates available for use. + +When you first set up GitHub Pages, you declare which branch you want to build from and the domain you want to use. When you merge into that branch, GitHub goes and takes your Jekyll site, renders it, and hosts it for you on that domain. You don't have to do anything else. No FTP transfers onto a server. No server costs. [No GitHub costs][7]. This is all the power of automation. + +### Turning it up to 11 with Netlify PR previews + +One of the limitations of this system is when you're working with pull requests (PRs). If you want to test your code, you have to run Jekyll locally. This isn't [terribly difficult][8], but when you're reviewing someone else's PR, say when it's related to the documentation on a project's homepage, you want to be able to see what the new website will look like if you merge the PR. Especially if there could be issues with the changes that are proposed (particularly large changes, changes to the theme/layout, etc) + +Normally, you'd have to go to the PR, clone the fork of the repo and check out the branch that was used for the PR, merge that code into your local master, build _that_ version of the code in Jekyll, and open the local server to look at the changes. + +But the great thing is, you can automate this. + +One such service is [Netlify][9]. You can use Netlify to host your projects, but you can also use its [Deploy Previews][10] feature to generate Jekyll sites for any PR on your project automatically. + +Its [continuous deployment][11] docs show how to set up Netlify to automatically build your site any time a PR is opened or updated. The results of that build are available as a temporary website that is linked in the "Checks" section at the bottom of the PR, uniquely named for the PR and project. You can have multiple active PRs and Netlify will update the previews independently! + +This has greatly improved the website development process for [PyCon AU][12], which is using GitHub Pages to host the [2019 event website][13]. We heavily borrowed this idea and the Netlify setup from [DjangoCon US][14], which has every [DjangoCon website][15] on GitHub. Well, [most of them][16], as there is an ongoing project to ensure that every DjangoCon conference website is archived for prosperity. + +### Machines do the work, so people have time to code + +CI and CD have many benefits, but integrating just a little bit of automation into your workflow can greatly improve your productivity and development velocity. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/github-pages-cicd-pipeline + +作者:[Katie McLaughlin][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/glasnt +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe (An intersection of pipes.) +[2]: https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages +[3]: https://jekyllrb.com/ +[4]: https://pages.github.com/themes/ +[5]: http://jekyllthemes.org/ +[6]: https://opensource.com/sites/default/files/uploads/jekyll-themes.png (Jekyll Themes screenshot) +[7]: https://github.com/pricing +[8]: https://jekyllrb.com/docs/ +[9]: https://www.netlify.com/ +[10]: https://www.netlify.com/blog/2017/10/31/introducing-public-deploy-logs-for-open-source-sites/ +[11]: https://www.netlify.com/docs/continuous-deployment/ +[12]: http://2019.pycon-au.org +[13]: https://github.com/pyconau/2019.pycon-au.org +[14]: https://2019.djangocon.us/ +[15]: https://github.com/djangocon +[16]: https://github.com/djangocon/djangocon-archive-project From dab0d526e0d320bc74a69d9223c18924298a63b5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Aug 2019 00:59:33 +0800 Subject: [PATCH 234/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=20Failur?= =?UTF-8?q?e=20is=20a=20feature=20in=20blameless=20DevOps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190801 Failure is a feature in blameless DevOps.md --- ...ailure is a feature in blameless DevOps.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20190801 Failure is a feature in blameless DevOps.md diff --git a/sources/tech/20190801 Failure is a feature in blameless DevOps.md b/sources/tech/20190801 Failure is a feature in blameless DevOps.md new file mode 100644 index 0000000000..d4a13a4e68 --- /dev/null +++ b/sources/tech/20190801 Failure is a feature in blameless DevOps.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Failure is a feature in blameless DevOps) +[#]: via: (https://opensource.com/article/19/8/failure-feature-blameless-devops) +[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) + +Failure is a feature in blameless DevOps +====== +In blameless DevOps culture, failure is more than an option; it's our +friend. +![failure sign at a party, celebrating failure][1] + +DevOps is just another term for _value stream development_. What does _value stream_ mean? + +Value is what arises during our interactions with customers and stakeholders. Once we get into value stream development, we quickly realize that value is not an entity. Value constantly changes. Value is a process. Value is a flow. + +Hence the term _stream_. Value is only value if it's a stream. And this streaming of value is what we call continuous integration (CI). + +### How do we generate value? + +No matter how carefully we specify value, its expectations tend to change. Therefore, the only realistic way to define and generate value is to solicit feedback. + +But it's obvious that no one is volunteering feedback. People are busy. We need to solicit feedback from our customers and stakeholders, but somehow, they always have something more pressing to do. Even if we throw a tantrum and insist that they stop what they're doing and give us much-needed feedback, at best we'd get a few lukewarm comments. Very little to go by. People are busy. + +We slowly learn that the most efficient and effective way to solicit feedback is to fail. Failure is a sure-fire way to make our customers and stakeholders drop everything, sit up, and pay attention. If we refuse to fail, we continue marching down the development path confidently, only to discover later that we're in the wrong. + +Agile DevOps culture is about dropping this arrogant stance and adopting the attitude of humility. We admit that we don't know it all, and we commit to a more humble approach to working on the value stream. + +It is of paramount importance to fail as soon as possible. That way, failure is not critical; it is innocuous, easy to overcome, easy to fix. But we need feedback to know how to fix it. The best feedback is reaction to failure. + +Let's illustrate this dynamic visually: + +![Value generation via feedback loop][2] + +Value generation via a feedback loop from continuous solicitation + +This figure illustrates the dynamics of producing value by soliciting feedback in a continuous, never-ending fashion. + +### Where does failure fit? + +Where in the above process do we see failure? Time for another diagram: + +![Failure is central to feedback loop][3] + +Failure is the central driving force enabling the delivery of value stream. + +_Failure is center stage_. Without failure, nothing useful ever gets done. From this, we conclude that failure is our friend. + +### How do we know we failed? + +In the ~~good~~ bad old days of waterfall methodology, the prime directive was "Failure is not an option." We worked under the pressure that every step must be a fully qualified success. We were going out of our way to avoid getting any feedback. Feedback was reserved for the momentous Big Bang event; the point when we all got an earful on how much the system we built missed the mark. + +That was, in a nutshell, the traditional way of learning that we failed. With the advent of agile and DevOps, we underwent cultural transformation and embraced incremental, iterative development processes. Each iteration starts with a mini failure, fixes it, and keeps going (mini being the keyword here). But how do we know if we failed? + +The only way to know for sure is to have a measurable test or goal. The measurable test will let us know if—and how—we failed. + +Now that we have set the stage and exposed the fundamentals of the blameless, failure-centric culture, the next article in this series will dive into a more detailed exposition on how to iterate over failed attempts to satisfy measurable tests and goals. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/failure-feature-blameless-devops + +作者:[Alex Bunardzic][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/alex-bunardzic +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_failure_celebrate.png?itok=LbvDAEZF (failure sign at a party, celebrating failure) +[2]: https://opensource.com/sites/default/files/uploads/valuestreamfeedbackloop.jpg (Value generation via feedback loop) +[3]: https://opensource.com/sites/default/files/uploads/valuestreamfeedbackloopfailure.jpg (Failure is central to feedback loop) From fd12dec536b3216e7c8135e07818692f3442f951 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Aug 2019 01:00:26 +0800 Subject: [PATCH 235/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=20Cisco?= =?UTF-8?q?=20assesses=20the=20top=20enterprise=20SD-WAN=20technology=20dr?= =?UTF-8?q?ivers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190801 Cisco assesses the top enterprise SD-WAN technology drivers.md --- ...op enterprise SD-WAN technology drivers.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/talk/20190801 Cisco assesses the top enterprise SD-WAN technology drivers.md diff --git a/sources/talk/20190801 Cisco assesses the top enterprise SD-WAN technology drivers.md b/sources/talk/20190801 Cisco assesses the top enterprise SD-WAN technology drivers.md new file mode 100644 index 0000000000..b6f845b4a7 --- /dev/null +++ b/sources/talk/20190801 Cisco assesses the top enterprise SD-WAN technology drivers.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Cisco assesses the top enterprise SD-WAN technology drivers) +[#]: via: (https://www.networkworld.com/article/3429186/cisco-assesses-the-top-enterprise-sd-wan-technology-drivers.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Cisco assesses the top enterprise SD-WAN technology drivers +====== +Cisco SD-WAN customer National Instruments touts benefits of the technology: Speed, efficiency, security, cost savings +![Getty Images][1] + +Cisco this week celebrated the [second anniversary][2] of its purchase of SD-WAN vendor Viptela and reiterated its expectation that 2019 will see the [technology change][3] enterprise networks in major ways. + +In a blog outlining trends in the SD-WAN world, Anand Oswal, Cisco senior vice president, engineering, in the company’s Enterprise Networking Business described how SD-WAN technology has changed the network for one of its customers,  test and measurement systems vendor National Instruments.  + +**More about SD-WAN** + + * [How to buy SD-WAN technology: Key questions to consider when selecting a supplier][4] + * [How to pick an off-site data-backup method][5] + * [SD-Branch: What it is and why you’ll need it][6] + * [What are the options for security SD-WAN?][7] + + + +“The existing WAN greatly constrained video conferencing, slowed large software transfers, and couldn’t provide acceptable application performance,” [Oswald wrote][8].  Implementing SD-WAN turned those issues around by: + + * Reducing MPLS spending by 25% while increasing bandwidth by 3,075% + * Categorizing traffic by function and type, sending backup traffic over the Internet under an SLA, eliminating bandwidth bottleneck on MPLS circuits + * Reducing the time for software updates to replicate across the network from 8 hours to 10 minutes + * Adding new internet-based services used to take months, but with the agility of SD-WAN, new services can be deployed in the cloud immediately + * Eliminating the need for call -dmission controls and limiting video quality for conferencing + + + +National Instruments' bandwidth requirements were growing10 to 25 percent per year, overwhelming the budget, Luis Castillo, global network team manager told Cisco in a [case study][9] of the SD-WAN project. “Part of the problem was that these sites can have very different requirements. R&D shops need lots of bandwidth. One site may have a special customer that requires unique segmentation and security. Our contact centers need to support mission-critical voice services. All of that is dependent on the WAN, which means escalating complexity and constantly growing costs.” + +After the shift to SD-WAN, the company no longer has 80 people with diverse IT workloads copeting for a sinlge 10-Mbit circuit, Castillo says. + +It’s not just cost savings by supplementing or replacing MPLS with direct internet connections that is motivating the transition to software-defined WAN architecture, Oswald said.   “It’s also about gaining flexibility and stability with intelligent, continuously monitored connections to multicloud resources and SaaS applications that are fueling the current SD-WAN transition.” + +In its most recent [SD-WAN Infrastructure Forecast][10], IDC researchers talked about a number of other factors driving SD-WAN evolution. + +"First, traditional enterprise WANs are increasingly not meeting the needs of today's modern digital businesses, especially as it relates to supporting SaaS apps and multi- and hybrid-cloud usage. Second, enterprises are interested in easier management of multiple connection types across their WAN to improve application performance and end-user experience," said [Rohit Mehra][11], vice president, [Network Infrastructure][12] at IDC. "Combined with the rapid embrace of SD-WAN by leading communications service providers globally, these trends continue to drive deployments of SD-WAN, providing enterprises with dynamic management of hybrid WAN connections and the ability to guarantee high levels of quality of service on a per-application basis." + +IDC also said that the SD-WAN infrastructure market continues to be highly competitive with sales increasing 64.9% in 2018 to $1.37 billion. IDC stated Cisco holds the largest share of the SD-WAN infrastructure market, with VMware coming in second followed by Silver Peak, Nokia-Nuage, and Riverbed. + +IDC also [recently wrote][13] about how security is also a key driver in recent SD-WAN deployments.  + +“With SD-WAN, mission-critical traffic and assets can be partitioned and protected against vulnerabilities in other parts of the enterprise. This use case appears to be especially popular in verticals such as retail, healthcare, and financial,” IDC wrote.  + +"SD-WAN can also protect application traffic from threats within the enterprise and from outside by leveraging a full stack of security solutions included in SD-WAN such as next-gen firewalls, IPS, URL filtering, malware protection, and cloud security.  + +These security features can enable Layer 3-7 protection for WAN traffic regardless of where it's headed - to the cloud or to the data center, IDC wrote. + +Application traffic to the cloud straight from the branch can now be secured using an internet or cloud gateway, IDC wrote. Users, applications and their data at the branch edge can be protected by the stack of security solutions incorporated into the SD-WAN on-premises appliance, vCPE or router, which typically includes  next-gen firewall, intrusion protection, malware protection and URL filtering, IDC wrote. + +Cisco [most recently][14] added support for its cloud-based security gateway – known as Umbrella – to its SD-WAN software offerings.  According to Cisco, Umbrella can provide the first line of defense against threats on the internet. By analyzing and learning from internet activity patterns, Umbrella automatically uncovers attacker infrastructure and blocks requests to malicious destinations before a connection is even established — without adding latency for users. With Umbrella, customers can stop phishing and malware infections earlier, identify already infected devices faster and prevent data exfiltration, Cisco says. + +The Umbrella announcement is on top of other recent SD-WAN security enhancements the company has made. In May Cisco added support for Advanced Malware Protection (AMP) to its million-plus ISR/ASR edge routers in an effort to reinforce branch- and core-network malware protection across the SD-WAN. AMP support is added to a menu of security features already included in Cisco's SD-WAN software including support for URL filtering, Snort Intrusion Prevention, the ability to segment users across the WAN and embedded platform security, including the Cisco Trust Anchor module. + +Last year Cisco added its Viptela SD-WAN technology to the IOS XE version 16.9.1 software that runs its core ISR/ASR routers. + +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/3429186/cisco-assesses-the-top-enterprise-sd-wan-technology-drivers.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://images.idgesg.net/images/article/2018/08/2_networks_smart-city_iot_connected-100769196-large.jpg +[2]: https://www.networkworld.com/article/3193888/why-cisco-needs-sd-wan-vendor-viptela.html +[3]: https://blog.cimicorp.com/?p=3781 +[4]: https://www.networkworld.com/article/3323407/sd-wan/how-to-buy-sd-wan-technology-key-questions-to-consider-when-selecting-a-supplier.html +[5]: https://www.networkworld.com/article/3328488/backup-systems-and-services/how-to-pick-an-off-site-data-backup-method.html +[6]: https://www.networkworld.com/article/3250664/lan-wan/sd-branch-what-it-is-and-why-youll-need-it.html +[7]: https://www.networkworld.com/article/3285728/sd-wan/what-are-the-options-for-securing-sd-wan.html?nsdr=true +[8]: https://blogs.cisco.com/author/anandoswal +[9]: https://www.cisco.com/c/dam/en_us/services/it-case-studies/ni-case-study.pdf +[10]: https://www.idc.com/getdoc.jsp?containerId=prUS45380319 +[11]: https://www.idc.com/getdoc.jsp?containerId=PRF003513 +[12]: https://www.idc.com/getdoc.jsp?containerId=IDC_P2 +[13]: https://www.cisco.com/c/dam/en/us/solutions/collateral/enterprise-networks/intelligent-wan/idc-tangible-benefits.pdf +[14]: https://www.networkworld.com/article/3402079/cisco-offers-cloud-based-security-for-sd-wan-resources.html +[15]: https://www.facebook.com/NetworkWorld/ +[16]: https://www.linkedin.com/company/network-world From e5dd244a0adb9ab82ec30b6c3fba40dade4ba57a Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Thu, 1 Aug 2019 17:00:57 +0000 Subject: [PATCH 236/951] Revert "translating by guevaraya" This reverts commit df46a53ce9f18da3fae98793577471413dfcb412. --- sources/tech/20190628 How to Install and Use R on Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190628 How to Install and Use R on Ubuntu.md b/sources/tech/20190628 How to Install and Use R on Ubuntu.md index abbbeef6a2..84699fbc8e 100644 --- a/sources/tech/20190628 How to Install and Use R on Ubuntu.md +++ b/sources/tech/20190628 How to Install and Use R on Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (guevaraya) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 0f7472ae437fe4882392651ff84379869a398e25 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Aug 2019 01:01:30 +0800 Subject: [PATCH 237/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190731=20Cisco?= =?UTF-8?q?=20simplifies=20Kubernetes=20container=20deployment=20with=20Mi?= =?UTF-8?q?crosoft=20Azure=20collaboration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190731 Cisco simplifies Kubernetes container deployment with Microsoft Azure collaboration.md --- ...ment with Microsoft Azure collaboration.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/talk/20190731 Cisco simplifies Kubernetes container deployment with Microsoft Azure collaboration.md diff --git a/sources/talk/20190731 Cisco simplifies Kubernetes container deployment with Microsoft Azure collaboration.md b/sources/talk/20190731 Cisco simplifies Kubernetes container deployment with Microsoft Azure collaboration.md new file mode 100644 index 0000000000..423cd7180a --- /dev/null +++ b/sources/talk/20190731 Cisco simplifies Kubernetes container deployment with Microsoft Azure collaboration.md @@ -0,0 +1,67 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Cisco simplifies Kubernetes container deployment with Microsoft Azure collaboration) +[#]: via: (https://www.networkworld.com/article/3429116/cisco-simplifies-kubernetes-container-deployment-with-microsoft-azure-collaboration.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Cisco simplifies Kubernetes container deployment with Microsoft Azure collaboration +====== +Microsoft's Azure Kubernetes Service (AKS) has been added to the Kubernetes managed services that natively integrate with the Cisco Container Platform. +![Viti / Getty Images][1] + +Cisco seeks to enhance container deployment with a service to let enterprise customers run containerized applications across both Cisco-based on-premises environments and in the Microsoft Azure cloud. + +Customers can now further simplify deploying and managing Kubernetes clusters on-premises and in Azure Kubernetes Service (AKS) with one tool, using common identify and control policies, reducing manual tasks and ultimately time-to-market for their application environments, wrote Cisco’s Kip Compton, senior vice president of the company’s Cloud Platform and Solutions group in a [blog][2] about the work.  + +[RELATED: How to make hybrid cloud work][3] + +Specifically, AKS has been added to Kubernetes managed services that natively integrate with the [Cisco Container Platform][4]. Cisco introduced its Kubernetes-based Container Platform in January 2018 and said it allows for self-service deployment and management of container clusters.  + +Cisco has added multivendor support to the platform, including support of SAP’s Data Hub to integrate large data sets that may be in public clouds, such as Amazon Web Services, Hadoop, Microsoft or Google, and integrate them with private cloud or enterprise apps such as SAP S/4 HANA. + +Kubernetes, originally designed by Google, is an open-source-based system for developing and orchestrating containerized applications. Containers can be deployed across multiple server hosts and Kubernetes orchestration lets customers build application services that span multiple containers, schedule those containers across a cluster, scale those containers and manage the container health.  + +Cisco has been working to further integrate with Azure services for quite a while  now.  For example, the [Cisco Integrated System for Microsoft Azure Stack][5] lets organizations access development tools, data repositories, and related Azure services to reinvent applications and gain new information from secured data. Azure Stack provides the same APIs and user interface as the Azure public cloud. + +In future phases, the Cisco Container Platform will integrate more features to support Microsoft Windows container applications with the potential to leverage virtual-kubelet or Windows node pools in Azure, Compton stated. “In addition, we will support Azure Active Directory common identity integration for both on-prem and AKS clusters so customer/applications experience a single consistent environment across hybrid cloud.” + +In addition, Cisco has a substantial portfolio of offerings running in the Azure cloud and available in the Azure Marketplace.  For example,  the company offers its Cloud Services Router, CSV1000v, as well as Meraki vMX, Stealthwatch Cloud, the Adaptive Security Virtual Appliance and its Next Generation Firewall.  + +The Azure work broadens Cisco’s drive into cloud.  For example Cisco and [Amazon Web Services (AWS) offer][6] enterprise customers an integrated platform that promises to help them more simply build, secure and connect Kubernetes clusters across private data centers and the AWS cloud.  + +The package, Cisco Hybrid Solution for Kubernetes on AWS, combines Cisco, AWS and open-source technologies to simplify complexity and helps eliminate challenges for customers who use Kubernetes to enable deploying applications on premises and across the AWS cloud in a secure, consistent manner.  The hybrid service integrates Cisco Container Platform (CCP) and Amazon Elastic Container Service for Kubernetes (EKS), so customers can provision clusters on premises and on EKS in the cloud. + +Cisco [also released a cloud-service program][7] on its flagship software-defined networking (SDN) software that will let customers manage and secure applications running in the data center or in Amazon Web Service cloud environments. The service, Cisco Cloud application centric infrastructure (ACI) for AWS lets users configure inter-site connectivity, define policies and monitor the health of network infrastructure across hybrid environments, Cisco said. + +Meanwhile, Cisco and Google have done extensive work on their own joint cloud-development activities to help customers more easily build secure multicloud and hybrid applications everywhere from on-premises data centers to public clouds.  + +Cisco and Google have been working closely together since October 2017, when the companies said they were working on an open hybrid cloud platform that bridges on-premises and cloud environments. That package, [Cisco Hybrid Cloud Platform for Google Cloud][8], became generally available in September 2018. It lets customer develop enterprise-grade capabilities from Google Cloud-managed Kubernetes containers that include Cisco networking and security technology as well as service mesh monitoring from Istio. + +Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3429116/cisco-simplifies-kubernetes-container-deployment-with-microsoft-azure-collaboration.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://images.idgesg.net/images/article/2019/07/africa_guinea_conakry_harbor_harbour_shipping_containers_cranes_by_viti_gettyimages-1154922310_2400x1600-100802866-large.jpg +[2]: https://www.networkworld.com/cms/article/%20https:/blogs.cisco.com/news/cisco-microsoft%20%E2%80%8E +[3]: https://www.networkworld.com/article/3119362/hybrid-cloud/how-to-make-hybrid-cloud-work.html#tk.nww-fsb +[4]: https://www.networkworld.com/article/3252810/cisco-unveils-container-management-on-hyperflex.html +[5]: https://blogs.cisco.com/datacenter/cisco-integrated-system-for-microsoft-azure-stack-it-is-here-and-shipping +[6]: https://www.networkworld.com/article/3319782/cisco-aws-marriage-simplifies-hybrid-cloud-app-development.html +[7]: https://www.networkworld.com/article/3388679/cisco-taps-into-aws-for-data-center-cloud-applications.html +[8]: https://cloud.google.com/cisco/ +[9]: https://www.facebook.com/NetworkWorld/ +[10]: https://www.linkedin.com/company/network-world From 04d95e3647b5bceb0ec1b1c30a3fad6e7b6aade8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Aug 2019 01:02:21 +0800 Subject: [PATCH 238/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190731=20VMware?= =?UTF-8?q?=E2=80=99s=20Bitfusion=20acquisition=20could=20be=20a=20game-ch?= =?UTF-8?q?anger=20for=20GPU=20computing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190731 VMware-s Bitfusion acquisition could be a game-changer for GPU computing.md --- ...uld be a game-changer for GPU computing.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sources/talk/20190731 VMware-s Bitfusion acquisition could be a game-changer for GPU computing.md diff --git a/sources/talk/20190731 VMware-s Bitfusion acquisition could be a game-changer for GPU computing.md b/sources/talk/20190731 VMware-s Bitfusion acquisition could be a game-changer for GPU computing.md new file mode 100644 index 0000000000..4946824820 --- /dev/null +++ b/sources/talk/20190731 VMware-s Bitfusion acquisition could be a game-changer for GPU computing.md @@ -0,0 +1,58 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (VMware’s Bitfusion acquisition could be a game-changer for GPU computing) +[#]: via: (https://www.networkworld.com/article/3429036/vmwares-bitfusion-acquisition-could-be-a-game-changer-for-gpu-computing.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +VMware’s Bitfusion acquisition could be a game-changer for GPU computing +====== +VMware will integrate Bitfusion technology into vSphere, bolstering VMware’s strategy of supporting AI- and ML-based workloads by virtualizing hardware accelerators. +![Vladimir Timofeev / Getty Images][1] + +In a low-key move that went under the radar of a lot of us, last week VMware snapped up a startup called Bitfusion, which makes virtualization software for accelerated computing. It improves performance of virtual machines by offloading processing to accelerator chips, such as GPUs, FPGAs, or other custom ASICs. + +Bitfusion provides sharing of GPU resources among isolated GPU compute workloads, allowing workloads to be shared across the customer’s network. This way workloads are not tied to one physical server but shared as a pool of resources, and if multiple GPUs are brought to bear, performance naturally increases. + +“In many ways, Bitfusion offers for hardware acceleration what VMware offered to the compute landscape several years ago. Bitfusion also aligns well with VMware’s ‘Any Cloud, Any App, Any Device’ vision with its ability to work across AI frameworks, clouds, networks, and formats such as virtual machines and containers,” said Krish Prasad, senior vice president and general manager of the Cloud Platform Business Unit at VMware, in a [blog post][2] announcing the deal. + +**[ Also read: [After virtualization and cloud, what's left on premises?][3] ]** + +When the acquisition closes, VMware will integrate Bitfusion technology into vSphere. Prasad said the inclusion of Bitfusion will bolster VMware’s strategy of supporting artificial intelligence- and machine learning-based workloads by virtualizing hardware accelerators. + +“Multi-vendor hardware accelerators and the ecosystem around them are key components for delivering modern applications. These accelerators can be used regardless of location in the environment—on-premises and/or in the cloud,” he wrote. The platform can be extended to support other accelerator chips, such as FGPAs and ASICs, he wrote. + +Prasad noted that hardware accelerators today are deployed “with bare-metal practices, which force poor utilization, poor efficiencies, and limit organizations from sharing, abstracting, and automating the infrastructure. This provides a perfect opportunity to virtualize them—providing increased sharing of resources and lowering costs.” + +He added: “The platform can share GPUs in a virtualized infrastructure as a pool of network-accessible resources rather than isolated resources per server.” + +This is a real game-changer, much the way VMware added storage virtualization and software-defined networks (SDN) to expand the use of vSphere. It gives them a major competitive advantage over Microsoft Hyper-V and Linux’s KVM now as well. + +By virtualizing and pooling GPUs, it lets users bring multiple GPUs to bear rather than locking one physical processor to a server and application. The same applies to FPGAs and the numerous AI processor chips either on or coming to market. + +### VMware also buys Uhana + +That wasn’t VMware’s only purchase. The company also acquired Uhana, which provides an AI engine specifically for telcos and other carriers that discovers anomalies in the network or application, prioritizes them based on their potential impact, and automatically recommends optimization strategies. That means improved network operations and operational efficiently. + +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/3429036/vmwares-bitfusion-acquisition-could-be-a-game-changer-for-gpu-computing.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://images.idgesg.net/images/article/2018/08/clouded_view_of_data_center_server_virtualization_by_vladimir_timofeev_gettyimages-600404124_1200x800-100768156-large.jpg +[2]: https://blogs.vmware.com/vsphere/2019/07/vmware-to-acquire-bitfusion.html +[3]: https://https//www.networkworld.com/article/3232626/virtualization/extreme-virtualization-impact-on-enterprises.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From 0723a24ba8d23ac60ede6369e6c8367db8b59be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 2 Aug 2019 05:48:52 +0800 Subject: [PATCH 239/951] Translated --- ... do after Installing Debian 10 (Buster).md | 285 ------------------ ... do after Installing Debian 10 (Buster).md | 285 ++++++++++++++++++ 2 files changed, 285 insertions(+), 285 deletions(-) delete mode 100644 sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md create mode 100644 translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md diff --git a/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md b/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md deleted file mode 100644 index ea470a2418..0000000000 --- a/sources/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md +++ /dev/null @@ -1,285 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top 8 Things to do after Installing Debian 10 (Buster)) -[#]: via: (https://www.linuxtechi.com/things-to-do-after-installing-debian-10/) -[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) - -Top 8 Things to do after Installing Debian 10 (Buster) -====== - -Debian 10 code name Buster is the latest LTS release from the house of Debian and the latest release comes packed with a lot of features. So if you have already installed the Debian 10 in your system and thinking what next, then please continue reading the article till the end as we provide you with the top 8 things to do after installing Debian 10. For those who haven’t installed Debian 10, please read this guide [**Debian 10 (Buster) Installation Steps with Screenshots**][1]. So lets continue with the article: - - - -### 1) Install and Configure sudo - -Once you complete setting up Debian 10 in your system, the first thing you need to do is install the sudo package as it enables you to get administrative privileges to install any package you need. In order to install and configure sudo, please use the following command: - -Become the root user and then install sudo package using the beneath command, - -``` -root@linuxtechi:~$ su - -Password: -root@linuxtechi:~# apt install sudo -y -``` - -Add your local user to sudo group using the following [usermod][2] command, - -``` -root@linuxtechi:~# usermod -aG sudo pkumar -root@linuxtechi:~# -``` - -Now verify whether local user got the sudo rights or not, - -``` -root@linuxtechi:~$ id -uid=1000(pkumar) gid=1000(pkumar) groups=1000(pkumar),27(sudo) -root@linuxtechi:~$ sudo vi /etc/hosts -[sudo] password for pkumar: -root@linuxtechi:~$ -``` - -### 2) Fix Date and time - -Once you’ve successfully configured the sudo package, next thing you need to  fix the date and time according to your location. In order to fix the date and time, - -Go to System **Settings** –> **Details** –> **Date and Time** and then change your time zone that suits to your location. - - - -Once the time zone is changed, you can see the time changed automatically in your clock - -### 3) Apply all updates - -After Debian 10 installation, it is recommended to install all updates which are available via Debian 10 package repositories, execute the beneath apt command, - -``` -root@linuxtechi:~$ sudo apt update -root@linuxtechi:~$ sudo apt upgrade -y -``` - -**Note:** If you are a big fan of vi editor then install vim using the following command apt command, - -``` -root@linuxtechi:~$ sudo apt install vim -y -``` - -### 4) Install Flash Player Plugin - -By default, the Debian 10 (Buster) repositories don’t come packed with the Flash plugin and hence users looking to install flash player in their system need to follow the steps outlined below: - -Configure Repository for flash player: - -``` -root@linuxtechi:~$ echo "deb http://ftp.de.debian.org/debian buster main contrib" | sudo tee -a /etc/apt/sources.list -deb http://ftp.de.debian.org/debian buster main contrib -root@linuxtechi:~ -``` - -Now update package index using following command, - -``` -root@linuxtechi:~$ sudo apt update -``` - -Install flash plugin using following apt command - -``` -root@linuxtechi:~$ sudo apt install pepperflashplugin-nonfree -y -``` - -Once package is installed successfully, then try to play videos in YouTube, - - - -### 5)  Install Software like VLC, SKYPE, FileZilla and Screenshot tool - -So now we’ve enabled flash player, it is time to install all other software like VLC, Skype, Filezilla and screenshot tool like flameshot in our Debian 10 system. - -**Install VLC Media Player** - -To install VLC player in your system using apt command, - -``` -root@linuxtechi:~$ sudo apt install vlc -y -``` - -After the successful installation of VLC player, try to play your favorite videos - - - -**Install Skype:** - -First download the latest Skype package as shown below: - -``` -root@linuxtechi:~$ wget https://go.skype.com/skypeforlinux-64.deb -``` - -Next install the package using the apt command as shown below: - -``` -root@linuxtechi:~$ sudo apt install ./skypeforlinux-64.deb -``` - -After successful installation of Skype, try to access it and enter your Credentials, - - - -**Install Filezilla** - -To install Filezilla in your system use the following apt command, - -``` -root@linuxtechi:~$ sudo apt install filezilla -y -``` - -Once FileZilla package is installed successfully, try to access it, - - - -**Install Screenshot tool (flameshot)** - -Use the following command to install screenshoot tool flameshot, - -``` -root@linuxtechi:~$ sudo apt install flameshot -y -``` - -**Note:** Shutter Tool in Debian 10 has been removed - - - -### 6) Enable and Start Firewall - -It is always recommended to start firewall to make your secure over the network. If you are looking to enable firewall in Debian 10, **UFW** (Uncomplicated Firewall) is the best tool handle firewall. Since UFW is available in the Debian repositories, it is quite easy to install as shown below: - -``` -root@linuxtechi:~$ sudo apt install ufw -``` - -Once you have installed UFW, the next step is to set up the firewall. So, to setup the firewall, disable all incoming traffic by denying the ports and allow only the required ports like ssh, http and https. - -``` -root@linuxtechi:~$ sudo ufw default deny incoming -Default incoming policy changed to 'deny' -(be sure to update your rules accordingly) -root@linuxtechi:~$ sudo ufw default allow outgoing -Default outgoing policy changed to 'allow' -(be sure to update your rules accordingly) -root@linuxtechi:~$ -``` - -Allow SSH port - -``` -root@linuxtechi:~$ sudo ufw allow ssh -Rules updated -Rules updated (v6) -root@linuxtechi:~$ -``` - -In case you have installed Web Server in your system then allow their ports too in the firewall using the following ufw command, - -``` -root@linuxtechi:~$ sudo ufw allow 80 -Rules updated -Rules updated (v6) -root@linuxtechi:~$ sudo ufw allow 443 -Rules updated -Rules updated (v6) -root@linuxtechi:~$ -``` - -Finally, you can enable UFW using the following command - -``` -root@linuxtechi:~$ sudo ufw enable -Command may disrupt existing ssh connections. Proceed with operation (y|n)? y -Firewall is active and enabled on system startup -root@linuxtechi:~$ -``` - -In case if you want to check the status of your firewall, you can check it using the following command - -``` -root@linuxtechi:~$ sudo ufw status -``` - -### 7) Install Virtualization Software (VirtualBox) - -First step in installing Virtualbox is by importing the public keys of the Oracle VirtualBox repository to your Debian 10 system - -``` -root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - -OK -root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - -OK -root@linuxtechi:~$ -``` - -If the import is successful, you will see a “OK” message displayed. - -Next you need to add the repository to the source list - -``` -root@linuxtechi:~$ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian buster contrib" -root@linuxtechi:~$ -``` - -Finally, it is time to install VirtualBox 6.0 in your system - -``` -root@linuxtechi:~$ sudo apt update -root@linuxtechi:~$ sudo apt install virtualbox-6.0 -y -``` - -Once VirtualBox packages are installed successfully, try access it and start creating virtual machines, - - - -### 8) Install latest AMD Drivers - -Finally, you can also install additional AMD drivers needed like the graphics card, ATI Proprietary and Nvidia Graphics drivers. To Install the latest AMD Drivers, first we must modify **/etc/apt/sources.list** file, add **non-free** word in lines which contains **main** and **contrib**, example is shown below - -``` -root@linuxtechi:~$ sudo vi /etc/apt/sources.list -………………… -deb http://deb.debian.org/debian/ buster main non-free contrib -deb-src http://deb.debian.org/debian/ buster main non-free contrib - -deb http://security.debian.org/debian-security buster/updates main contrib non-free -deb-src http://security.debian.org/debian-security buster/updates main contrib non-free - -deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free -…………………… -``` - -Now use the following apt commands to install latest AMD drivers in Debian 10 system - -``` -root@linuxtechi:~$ sudo apt update -root@linuxtechi:~$ sudo apt install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu -y -``` - -That’s all from this article, I hope you got an idea what one should after installing Debian 10. Please do share your feedback and comments in comments section below. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/things-to-do-after-installing-debian-10/ - -作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ -[2]: https://www.linuxtechi.com/linux-commands-to-manage-local-accounts/ diff --git a/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md b/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md new file mode 100644 index 0000000000..8075cdca03 --- /dev/null +++ b/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md @@ -0,0 +1,285 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Top 8 Things to do after Installing Debian 10 (Buster)) +[#]: via: (https://www.linuxtechi.com/things-to-do-after-installing-debian-10/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +Debian 10 (Buster) 安装后要做的前8件事 +====== + +Debian 10 代码名称是 Buster ,它是来自 Debian 家族的最新 LTS 发布版本,并包含大量的特色。因此,如果你已经在你的电脑上安装 Debian 10 ,并在思考接下来做什么,那么,请继续阅读这篇文章直到结尾,因为我们为你提供在安装 Debian 10 后要做的前8件事。对于还没有安装 Debian 10 的人们,请阅读这篇指南 [ ** 图解 Debian 10 (Buster) 安装步骤 ** ][1]。 让我们继续这篇文章: + + + +### 1) 安装和配置 sudo + +在设置完成 Debian 10 后,你需要做的第一件事是安装 sudo 软件包,因为它能够使你获得管理员权限来安装你需要的软件包。为安装和配置 sudo ,请使用下面的命令: + +变成 root 用户,然后使用下面的命令安装 sudo 软件包, + +``` +root@linuxtechi:~$ su - +Password: +root@linuxtechi:~# apt install sudo -y +``` + +添加你的本地用户到 sudo 组,使用下面的 [usermod][2] 命令, + +``` +root@linuxtechi:~# usermod -aG sudo pkumar +root@linuxtechi:~# +``` + +现在验证是否本地用户获得 sudo 权限, + +``` +root@linuxtechi:~$ id +uid=1000(pkumar) gid=1000(pkumar) groups=1000(pkumar),27(sudo) +root@linuxtechi:~$ sudo vi /etc/hosts +[sudo] password for pkumar: +root@linuxtechi:~$ +``` + +### 2) 校正日期和时间 + +在你成功配置 sudo 软件包后,接下来,你需要根据你的位置来校正日期和时间。为了校正日期和时间, + +转到系统 **设置** –> **详细说明** –> **日期和时间** ,然后更改为适合你的位置的时区。 + + + +一旦时区被更改,你可以看到时钟中的时间自动更改 + +### 3) 应用所有更新 + +在 Debian 10 安装后,建议安装所有 Debian 10 软件包存储库中可用的更新,执行下面的 apt 命令, + +``` +root@linuxtechi:~$ sudo apt update +root@linuxtechi:~$ sudo apt upgrade -y +``` + +**注意:** 如果你是 vi 编辑器的一个大粉丝,那么使用下面的 apt 命令安装 vim , + +``` +root@linuxtechi:~$ sudo apt install vim -y +``` + +### 4) 安装 Flash Player 插件 + +默认情况下,Debian 10 (Buster) 存储库不包含 Flash 插件,因此,用户需要遵循下面的概述来在他们的系统中查找和安装 flash player : + +为 flash player 配置存储库: + +``` +root@linuxtechi:~$ echo "deb http://ftp.de.debian.org/debian buster main contrib" | sudo tee -a /etc/apt/sources.list +deb http://ftp.de.debian.org/debian buster main contrib +root@linuxtechi:~ +``` + +现在使用下面的命令更新软件包索引, + +``` +root@linuxtechi:~$ sudo apt update +``` + +使用下面的 apt 命令安装 flash 插件 + +``` +root@linuxtechi:~$ sudo apt install pepperflashplugin-nonfree -y +``` + +一旦软件包被成功安装,接下来,尝试播放 YouTube 中的视频, + + + +### 5)  安装软件,像 VLC,SKYPE,FileZilla 和截图工具 + +如此,现在我们已经启用 flash player,是时候在我们的 Debian 10 系统中安装所有其它的软件,像 VLC,Skype,Filezilla 和截图工具,像 flameshot 。 + +**安装 VLC 多媒体播放器** + +为在你的系统中安装 VLC 播放器,使用下面的 apt 命令, + +``` +root@linuxtechi:~$ sudo apt install vlc -y +``` + +在成功安装 VLC 播放器后,尝试播放你喜欢的视频 + + + +**安装 Skype :** + +首先,下载最新的 Skype 软件包: + +``` +root@linuxtechi:~$ wget https://go.skype.com/skypeforlinux-64.deb +``` + +接下来,使用 apt 命令安装软件包: + +``` +root@linuxtechi:~$ sudo apt install ./skypeforlinux-64.deb +``` + +在成功安装 Skype 后,尝试访问它,并输入你的用户名和密码, + + + +**安装 Filezilla** + +为在你的系统中安装 Filezilla,使用下面的 apt 命令, + +``` +root@linuxtechi:~$ sudo apt install filezilla -y +``` + +一旦 FileZilla 软件包被成功安装,尝试访问它, + + + +**安装截图工具 (flameshot)** + +使用下面的命令来阿紫截图工具: flameshot , + +``` +root@linuxtechi:~$ sudo apt install flameshot -y +``` + +**注意:** Shutter 工具在 Debian 10 中被移除 + + + +### 6) 启用和启动防火墙 + +总是建议启动防火墙来使你的网络安全。如果你正在期望在 Debian 10 中启用防火墙, **UFW** (简单的防火墙)是最好的处理防火墙的工具。既然 UFW 在 Debian 存储库中可用,它非常容易安装,如下显示: + +``` +root@linuxtechi:~$ sudo apt install ufw +``` + +在你安装 UFW 后,接下来的步骤是设置防火墙。因此,为设置防火墙,通过拒绝端口来禁用所有的传入流量,并且只允许需要的端口,像 ssh ,http 和 https 。 + +``` +root@linuxtechi:~$ sudo ufw default deny incoming +Default incoming policy changed to 'deny' +(be sure to update your rules accordingly) +root@linuxtechi:~$ sudo ufw default allow outgoing +Default outgoing policy changed to 'allow' +(be sure to update your rules accordingly) +root@linuxtechi:~$ +``` + +允许 SSH 端口 + +``` +root@linuxtechi:~$ sudo ufw allow ssh +Rules updated +Rules updated (v6) +root@linuxtechi:~$ +``` + +假使你在系统中已经安装 Web 服务器,那么使用下面的 ufw 命令来在防火墙中允许它们的端口, + +``` +root@linuxtechi:~$ sudo ufw allow 80 +Rules updated +Rules updated (v6) +root@linuxtechi:~$ sudo ufw allow 443 +Rules updated +Rules updated (v6) +root@linuxtechi:~$ +``` + +最后,你可以使用下面的命令启用 UFW + +``` +root@linuxtechi:~$ sudo ufw enable +Command may disrupt existing ssh connections. Proceed with operation (y|n)? y +Firewall is active and enabled on system startup +root@linuxtechi:~$ +``` + +假使你想检查你的防火墙的状态,你可以使用下面的命令检查它 + +``` +root@linuxtechi:~$ sudo ufw status +``` + +### 7) 安装虚拟化软件 (VirtualBox) + +安装 Virtualbox 的第一步是将 Oracle VirtualBox 存储库的公钥导入到你的 Debian 10 系统 + +``` +root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - +OK +root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - +OK +root@linuxtechi:~$ +``` + +如果导入成功,你将看到一个 “OK” 显示信息。 + +接下来,你需要添加存储库到 source list + +``` +root@linuxtechi:~$ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian buster contrib" +root@linuxtechi:~$ +``` + +最后,是时候在你的系统中安装 VirtualBox 6.0 + +``` +root@linuxtechi:~$ sudo apt update +root@linuxtechi:~$ sudo apt install virtualbox-6.0 -y +``` + +一旦 VirtualBox 软件包被成功安装,尝试访问它,并开始创建虚拟机, + + + +### 8) 安装最新的 AMD 驱动程序 + +最后,你也可以安装需要的附加 AMD 驱动程序,像显卡,ATI 专有的和 Nvidia 图形驱动程序。为安装最新的 AMD 驱动程序,首先,我们必需修改 **/etc/apt/sources.list** 文件,在包含 **main** 和 **contrib** 的行中添加 **non-free** 单词,示例如下显示 + +``` +root@linuxtechi:~$ sudo vi /etc/apt/sources.list +………………… +deb http://deb.debian.org/debian/ buster main non-free contrib +deb-src http://deb.debian.org/debian/ buster main non-free contrib + +deb http://security.debian.org/debian-security buster/updates main contrib non-free +deb-src http://security.debian.org/debian-security buster/updates main contrib non-free + +deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free +…………………… +``` + +现在,使用下面的 apt 命令来在 Debian 10 系统中安装最新的 AMD 驱动程序 + +``` +root@linuxtechi:~$ sudo apt update +root@linuxtechi:~$ sudo apt install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu -y +``` + +这就是这篇文章的全部内存,我希望你有在安装 Debian 10 后应该有的想法。请在下面的评论区,分享你的反馈和评论。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/things-to-do-after-installing-debian-10/ + +作者:[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]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ +[2]: https://www.linuxtechi.com/linux-commands-to-manage-local-accounts/ From ae0f53bcfb03a3fe0f0f4ae8b089444aec854079 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 2 Aug 2019 08:42:29 +0800 Subject: [PATCH 240/951] translated --- ...our passwords with Bitwarden and Podman.md | 126 ------------------ ...our passwords with Bitwarden and Podman.md | 126 ++++++++++++++++++ 2 files changed, 126 insertions(+), 126 deletions(-) delete mode 100644 sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md create mode 100644 translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md diff --git a/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md b/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md deleted file mode 100644 index 4d52087778..0000000000 --- a/sources/tech/20190726 Manage your passwords with Bitwarden and Podman.md +++ /dev/null @@ -1,126 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage your passwords with Bitwarden and Podman) -[#]: via: (https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/) -[#]: author: (Eric Gustavsson https://fedoramagazine.org/author/egustavs/) - -Manage your passwords with Bitwarden and Podman -====== - -![][1] - -You might have encountered a few advertisements the past year trying to sell you a password manager. Some examples are [LastPass][2], [1Password][3], or [Dashlane][4]. A password manager removes the burden of remembering the passwords for all your websites. No longer do you need to re-use passwords or use easy-to-remember passwords. Instead, you only need to remember one single password that can unlock all your other passwords for you. - -This can make you more secure by having one strong password instead of many weak passwords. You can also sync your passwords across devices if you have a cloud-based password manager like LastPass, 1Password, or Dashlane. Unfortunately, none of these products are open source. Luckily there are open source alternatives available. - -### Open source password managers - -These alternatives include Bitwarden, [LessPass][5], or [KeePass][6]. Bitwarden is [an open source password manager][7] that stores all your passwords encrypted on the server, which works the same way as LastPass, 1Password, or Dashlane. LessPass is a bit different as it focuses on being a stateless password manager. This means it derives passwords based on a master password, the website, and your username rather than storing the passwords encrypted. On the other side of the spectrum there’s KeePass, a file-based password manager with a lot of flexibility with its plugins and applications. - -Each of these three apps has its own downsides. Bitwarden stores everything in one place and is exposed to the web through its API and website interface. LessPass can’t store custom passwords since it’s stateless, so you need to use their derived passwords. KeePass, a file-based password manager, can’t easily sync between devices. You can utilize a cloud-storage provider together with [WebDAV][8] to get around this, but a lot of clients do not support it and you might get file conflicts if devices do not sync correctly. - -This article focuses on Bitwarden. - -### Running an unofficial Bitwarden implementation - -There is a community implementation of the server and its API called [bitwarden_rs][9]. This implementation is fully open source as it can use SQLite or MariaDB/MySQL, instead of the proprietary Microsoft SQL Server that the official server uses. - -It’s important to recognize some differences exist between the official and the unofficial version. For instance, the [official server has been audited by a third-party][10], whereas the unofficial one hasn’t. When it comes to implementations, the unofficial version lacks [email confirmation and support for two-factor authentication using Duo or email codes][11]. - -Let’s get started running the server with SELinux in mind. Following the documentation for bitwarden_rs you can construct a Podman command as follows: - -``` -$ podman run -d \ - --userns=keep-id \ - --name bitwarden \ - -e SIGNUPS_ALLOWED=false \ - -e ROCKET_PORT=8080 \ - -v /home/egustavs/Bitwarden/bw-data/:/data/:Z \ - -p 8080:8080 \ - bitwardenrs/server:latest -``` - -This downloads the bitwarden_rs image and runs it in a user container under the user’s namespace. It uses a port above 1024 so that non-root users can bind to it. It also changes the volume’s SELinux context with _:Z_ to prevent permission issues with read-write on _/data_. - -If you host this under a domain, it’s recommended to put this server under a reverse proxy with Apache or Nginx. That way you can use port 80 and 443 which points to the container’s 8080 port without running the container as root. - -### Running under systemd - -With Bitwarden now running, you probably want to keep it that way. Next, create a unit file that keeps the container running, automatically restarts if it doesn’t respond, and starts running after a system restart. Create this file as _/etc/systemd/system/bitwarden.service_: - -``` -[Unit] -Description=Bitwarden Podman container -Wants=syslog.service - -[Service] -User=egustavs -Group=egustavs -TimeoutStartSec=0 -ExecStart=/usr/bin/podman run 'bitwarden' -ExecStop=-/usr/bin/podman stop -t 10 'bitwarden' -Restart=always -RestartSec=30s -KillMode=none - -[Install] -WantedBy=multi-user.target -``` - -Now, enable and start it [using][12] _[sudo][12]_: - -``` -$ sudo systemctl enable bitwarden.service && sudo systemctl start bitwarden.service -$ systemctl status bitwarden.service -bitwarden.service - Bitwarden Podman container - Loaded: loaded (/etc/systemd/system/bitwarden.service; enabled; vendor preset: disabled) - Active: active (running) since Tue 2019-07-09 20:23:16 UTC; 1 day 14h ago - Main PID: 14861 (podman) - Tasks: 44 (limit: 4696) - Memory: 463.4M -``` - -Success! Bitwarden is now running under system and will keep running. - -### Adding LetsEncrypt - -It’s strongly recommended to run your Bitwarden instance through an encrypted channel with something like LetsEncrypt if you have a domain. Certbot is a bot that creates LetsEncrypt certificates for us, and they have a [guide for doing this through Fedora][13]. - -After you generate a certificate, you can follow the [bitwarden_rs guide about HTTPS][14]. Just remember to append _:Z_ to the LetsEncrypt volume to handle permissions while not changing the port. - -* * * - -*Photo by _[_CMDR Shane_][15]_ on *[_Unsplash_][16]. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/ - -作者:[Eric Gustavsson][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/egustavs/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/bitwarden-816x345.jpg -[2]: https://www.lastpass.com -[3]: https://1password.com/ -[4]: https://www.dashlane.com/ -[5]: https://lesspass.com/ -[6]: https://keepass.info/ -[7]: https://bitwarden.com/ -[8]: https://en.wikipedia.org/wiki/WebDAV -[9]: https://github.com/dani-garcia/bitwarden_rs/ -[10]: https://blog.bitwarden.com/bitwarden-completes-third-party-security-audit-c1cc81b6d33 -[11]: https://github.com/dani-garcia/bitwarden_rs/wiki#missing-features -[12]: https://fedoramagazine.org/howto-use-sudo/ -[13]: https://certbot.eff.org/instructions -[14]: https://github.com/dani-garcia/bitwarden_rs/wiki/Enabling-HTTPS -[15]: https://unsplash.com/@cmdrshane?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[16]: https://unsplash.com/search/photos/password?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md b/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md new file mode 100644 index 0000000000..e81cd53013 --- /dev/null +++ b/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md @@ -0,0 +1,126 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Manage your passwords with Bitwarden and Podman) +[#]: via: (https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/) +[#]: author: (Eric Gustavsson https://fedoramagazine.org/author/egustavs/) + +使用 Bitwarden 和 Podman 管理你的密码 +====== + +![][1] + +在过去的一年中,你可能会遇到一些试图向你推销密码管理器的广告。比如 [LastPass][2]、[1Password][3] 或 [Dashlane][4]。密码管理器消除了记住所有网站密码的负担。你不再需要使用重复或容易记住的密码。相反,你只需要记住一个可以解锁所有其他密码的密码。 + +通过使用一个强密码而​​不是许多弱密码,这可以使你更安全。如果你有基于云的密码管理器(例如 LastPass、1Password 或 Dashlane),你还可以跨设备同步密码。不幸的是,这些产品都不是开源的。幸运的是,还有其他开源替代品。 + +### 开源密码管理器 + +替代方案包括 Bitwarden、[LessPass][5] 或 [KeePass][6]。Bitwarden 是一款[开源密码管理器][7],它会将所有密码加密存储在服务器上,它的工作方式与 LastPass、1Password 或 Dashlane 相同。LessPass 有点不同,因为它专注于成为无状态密码管理器。这意味着它根据主密码、网站和用户名生成密码,而不是保存加密的密码。另一方面,KeePass 是一个基于文件的密码管理器,它的插件和应用具有很大的灵活性。 + +这三个应用中的每一个都有其自身的缺点。Bitwarden 将所有东西保存在一个地方,并通过其 API 和网站接口暴露给网络。LessPass 无法保存自定义密码,因为它是无状态的,因此你需要使用它生成的密码。KeePass 是一个基于文件的密码管理器,因此无法在设备之间轻松同步。你可以使用云存储和 [WebDAV][8] 来解决此问题,但是有许多客户端不支持它,如果设备无法正确同步,你可能会遇到文件冲突。 + +本文重点介绍 Bitwarden。 + +### 运行非官方的 Bitwarden 实现 + +有一个名为 [bitwarden_rs][9] 的服务器及其 API 的社区实现。这个实现是完全开源的,因为它可以使用 SQLite 或 MariaDB/MySQL,而不是官方服务器使用的专有 Microsoft SQL Server。 + +有一点重要的是要认识到官方和非官方版本之间存在一些差异。例如,[官方服务器已经由第三方审核][10],而非官方服务器还没有。在实现方面,非官方版本缺少[电子邮件确认和采用 Duo 或邮件码的双因素身份验证][11]。 + +让我们在 SELinux 中运行服务器。根据 bitwarden_rs 的文档,你可以如下构建一个 Podman 命令: + +``` +$ podman run -d \ + --userns=keep-id \ + --name bitwarden \ + -e SIGNUPS_ALLOWED=false \ + -e ROCKET_PORT=8080 \ + -v /home/egustavs/Bitwarden/bw-data/:/data/:Z \ + -p 8080:8080 \ + bitwardenrs/server:latest +``` + +这将下载 bitwarden_rs 镜像并在用户命名空间下的用户容器中运行它。它使用 1024 以上的端口,以便非 root 用户可以绑定它。它还使用 _:Z_ 更改卷的 SELinux 上下文,以防止在 _ /data_ 中的读写权限问题。 + +如果你在某个域下托管它,建议将此服务器放在 Apache 或 Nginx 的反向代理下。这样,你可以使用 80 和 443 端口指向容器的 8080 端口,而无需以 root 身份运行容器。 + +### 在 systemd 下运行 + +Bitwarden 现在运行了,你可能希望保持这种状态。接下来,创建一个使容器保持运行的单元文件,如果它没有响应则自动重新启动,并在系统重启后开始运行。创建文件 _/etc/systemd/system/bitwarden.service_: + +``` +[Unit] +Description=Bitwarden Podman container +Wants=syslog.service + +[Service] +User=egustavs +Group=egustavs +TimeoutStartSec=0 +ExecStart=/usr/bin/podman run 'bitwarden' +ExecStop=-/usr/bin/podman stop -t 10 'bitwarden' +Restart=always +RestartSec=30s +KillMode=none + +[Install] +WantedBy=multi-user.target +``` + +现在使用 _[sudo][12]_ 启用并启动: + +``` +$ sudo systemctl enable bitwarden.service && sudo systemctl start bitwarden.service +$ systemctl status bitwarden.service +bitwarden.service - Bitwarden Podman container + Loaded: loaded (/etc/systemd/system/bitwarden.service; enabled; vendor preset: disabled) + Active: active (running) since Tue 2019-07-09 20:23:16 UTC; 1 day 14h ago + Main PID: 14861 (podman) + Tasks: 44 (limit: 4696) + Memory: 463.4M +``` + +成功了!Bitwarden 现在运行了并将继续运行。 + +### 添加 LetsEncrypt + +如果你有域名,强烈建议你使用类似 LetsEncrypt 的加密证书运行你的 Bitwarden 实例。Certbot 是一个为我们创建 LetsEncrypt 证书的机器人,这里有个[在 Fedora 中操作的指南][13]。 + +生成证书后,你可以按照 [bitwarden_rs 指南中关于 HTTPS 的部分来][14]。只要记得将 _:Z_ 附加到 LetsEncrypt 来处理权限,而不用更改端口。 + +* * * + +* 照片由 _[_CMDR Shane_][15]_  拍摄,发表在 [_Unsplash_][16] 上。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/ + +作者:[Eric Gustavsson][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://fedoramagazine.org/author/egustavs/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/bitwarden-816x345.jpg +[2]: https://www.lastpass.com +[3]: https://1password.com/ +[4]: https://www.dashlane.com/ +[5]: https://lesspass.com/ +[6]: https://keepass.info/ +[7]: https://bitwarden.com/ +[8]: https://en.wikipedia.org/wiki/WebDAV +[9]: https://github.com/dani-garcia/bitwarden_rs/ +[10]: https://blog.bitwarden.com/bitwarden-completes-third-party-security-audit-c1cc81b6d33 +[11]: https://github.com/dani-garcia/bitwarden_rs/wiki#missing-features +[12]: https://fedoramagazine.org/howto-use-sudo/ +[13]: https://certbot.eff.org/instructions +[14]: https://github.com/dani-garcia/bitwarden_rs/wiki/Enabling-HTTPS +[15]: https://unsplash.com/@cmdrshane?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[16]: https://unsplash.com/search/photos/password?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText From 4b23150832c932855d8e470be4b9db6d37bd2f77 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 2 Aug 2019 08:47:38 +0800 Subject: [PATCH 241/951] translating --- sources/tech/20190801 5 Free Partition Managers for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190801 5 Free Partition Managers for Linux.md b/sources/tech/20190801 5 Free Partition Managers for Linux.md index 294d484145..134e41a819 100644 --- a/sources/tech/20190801 5 Free Partition Managers for Linux.md +++ b/sources/tech/20190801 5 Free Partition Managers for Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From dac8f0d24cca8b94999ca407697b741105c907f3 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 2 Aug 2019 10:22:41 +0800 Subject: [PATCH 242/951] Rename sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md to sources/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md --- ...0190802 Linux Smartphone Librem 5 is Available for Preorder.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20190802 Linux Smartphone Librem 5 is Available for Preorder.md (100%) diff --git a/sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md b/sources/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md similarity index 100% rename from sources/tech/20190802 Linux Smartphone Librem 5 is Available for Preorder.md rename to sources/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md From 80befce349901eb3dcb36b083364d6b4cc8ad0d8 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 2 Aug 2019 10:25:33 +0800 Subject: [PATCH 243/951] Rename sources/tech/20190801 Failure is a feature in blameless DevOps.md to sources/talk/20190801 Failure is a feature in blameless DevOps.md --- .../20190801 Failure is a feature in blameless DevOps.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190801 Failure is a feature in blameless DevOps.md (100%) diff --git a/sources/tech/20190801 Failure is a feature in blameless DevOps.md b/sources/talk/20190801 Failure is a feature in blameless DevOps.md similarity index 100% rename from sources/tech/20190801 Failure is a feature in blameless DevOps.md rename to sources/talk/20190801 Failure is a feature in blameless DevOps.md From e1821b068888a134b2c80f70167f7c14894384ae Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Aug 2019 10:47:47 +0800 Subject: [PATCH 244/951] PRF @geekpi --- ...190304 How to Install MongoDB on Ubuntu.md | 68 +++++++++---------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/translated/tech/20190304 How to Install MongoDB on Ubuntu.md b/translated/tech/20190304 How to Install MongoDB on Ubuntu.md index 205215f4a4..772d2a7c9b 100644 --- a/translated/tech/20190304 How to Install MongoDB on Ubuntu.md +++ b/translated/tech/20190304 How to Install MongoDB on Ubuntu.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Install MongoDB on Ubuntu) @@ -10,9 +10,9 @@ 如何在 Ubuntu 上安装 MongoDB ====== -**本教程介绍了在 Ubuntu 和基于 Ubuntu 的 Linux 发行版上安装 MongoDB 的两种方法。** +> 本教程介绍了在 Ubuntu 和基于 Ubuntu 的 Linux 发行版上安装 MongoDB 的两种方法。 -[MongoDB][1]是一个越来越流行的免费和开源的 NoSQL 数据库,它将数据存储在类似 JSON 的灵活文档集中,这与 SQL 数据库中常见的表格形式形成对比。 +[MongoDB][1] 是一个越来越流行的自由开源的 NoSQL 数据库,它将数据存储在类似 JSON 的灵活文档集中,这与 SQL 数据库中常见的表格形式形成对比。 你很可能发现在现代 Web 应用中使用 MongoDB。它的文档模型使得使用各种编程语言能非常直观地访问和处理它。 @@ -22,20 +22,18 @@ ### 在基于 Ubuntu 的发行版上安装 MongoDB - 1. 使用 Ubuntu 仓库安装 MongoDB。简单但不是最新版本的 MongoDB -  2. 使用其官方仓库安装 MongoDB。稍微复杂,但你能得到最新版本的 MongoDB。 - - +1. 使用 Ubuntu 仓库安装 MongoDB。简单但不是最新版本的 MongoDB +2. 使用其官方仓库安装 MongoDB。稍微复杂,但你能得到最新版本的 MongoDB。 第一种安装方法更容易,但如果你计划使用官方支持的最新版本,那么我建议使用第二种方法。 -S有些人可能更喜欢使用 snap 包。Ubuntu 软件中心提供了 snap,但我不建议使用它们,因为现在已经过时了,因此我这里不会提到。 +有些人可能更喜欢使用 snap 包。Ubuntu 软件中心提供了 snap,但我不建议使用它们,因为他们现在已经过期了,因此我这里不会提到。 -#### 方法 1:从 Ubuntu 仓库安装 MongoDB +### 方法 1:从 Ubuntu 仓库安装 MongoDB 这是在系统中安装 MongoDB 的简便方法,你只需输入一个命令即可。 -##### 安装 MongoDB +#### 安装 MongoDB 首先,确保你的包是最新的。打开终端并输入: @@ -61,9 +59,9 @@ sudo systemctl status mongodb 你可以看到该服务是**活动**的。 -##### 运行 MongoDB +#### 运行 MongoDB -MongoDB 目前是一个 systemd 服务,因此我们使用 **systemctl** 来检查和修改它的状态,使用以下命令: +MongoDB 目前是一个 systemd 服务,因此我们使用 `systemctl` 来检查和修改它的状态,使用以下命令: ``` sudo systemctl status mongodb @@ -72,7 +70,7 @@ sudo systemctl start mongodb sudo systemctl restart mongodb ``` -你也可以修改 MongoDB 是否自动随系统启动(**默认**:启用): +你也可以修改 MongoDB 是否自动随系统启动(默认:启用): ``` sudo systemctl disable mongodb @@ -87,9 +85,9 @@ mongo 这将启动 **mongo shell**。有关查询和选项的详细信息,请查看[手册][4]。 -**注意:**根据你计划使用 MongoDB 的方式,你可能需要调整防火墙。不幸的是,这超出了本篇的内容,并且取决于你的配置。 +**注意:**根据你计划使用 MongoDB 的方式,你可能需要调整防火墙。不过这超出了本篇的内容,并且取决于你的配置。 -##### 卸载 MongoDB +#### 卸载 MongoDB 如果你从 Ubuntu 仓库安装 MongoDB 并想要卸载它(可能要使用官方支持的方式安装),请输入: @@ -101,15 +99,15 @@ sudo apt autoremove 这应该会完全卸载 MongoDB。确保**备份**你可能想要保留的任何集合或文档,因为它们将被删除! -#### 方法 2:在 Ubuntu 上安装 MongoDB 社区版 +### 方法 2:在 Ubuntu 上安装 MongoDB 社区版 这是推荐的安装 MongoDB 的方法,它使用包管理器。你需要多打几条命令,对于 Linux 新手而言,这可能会感到害怕。 但没有什么可怕的!我们将一步步说明安装过程。 -##### 安装 MongoDB +#### 安装 MongoDB -由 MongoDB Inc. 维护的包称为 **mongodb-org** ,而不是 **mongodb**(这是 Ubuntu 仓库中包的名称)。在开始之前,请确保系统上未安装 **mongodb**。因为包之间会发生冲突。让我们开始吧! +由 MongoDB Inc. 维护的包称为 `mongodb-org`,而不是 `mongodb`(这是 Ubuntu 仓库中包的名称)。在开始之前,请确保系统上未安装 `mongodb`。因为包之间会发生冲突。让我们开始吧! 首先,我们必须导入公钥: @@ -123,7 +121,7 @@ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD7 echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list ``` -为了安装 **mongodb-org**,我们需要我们的包数据库,以便系统知道可用的新包: +要安装 `mongodb-org`,我们需要更新我们的包数据库,以便系统知道可用的新包: ``` sudo apt update @@ -135,16 +133,15 @@ sudo apt update sudo apt install -y mongodb-org ``` -或者某个**特定版本**(在**等号**后面修改版本号) +或者某个**特定版本**(在 `=` 后面修改版本号) ``` sudo apt install -y mongodb-org=4.0.6 mongodb-org-server=4.0.6 mongodb-org-shell=4.0.6 mongodb-org-mongos=4.0.6 mongodb-org-tools=4.0.6 ``` -如果你选择安装特定版本,请确保在所有位置都修改了版本号。如果你修改了 **mongodb-org=4.0.6**,你将安装最新版本。 +如果你选择安装特定版本,请确保在所有位置都修改了版本号。如果你修改了 `mongodb-org=4.0.6`,你将安装最新版本。 - -默认情况下,使用包管理器(**apt-get**)更新时,MongoDB 将更新为最新的版本。要阻止这种情况发生(并冻结为已安装的版本),请使用: +默认情况下,使用包管理器(`apt-get`)更新时,MongoDB 将更新为最新的版本。要阻止这种情况发生(并冻结为已安装的版本),请使用: ``` echo "mongodb-org hold" | sudo dpkg --set-selections @@ -156,24 +153,23 @@ echo "mongodb-org-tools hold" | sudo dpkg --set-selections 你现在已经成功安装了 MongoDB! -##### 配置 MongoDB +#### 配置 MongoDB -默认情况下,包管理器将创建 **/var/lib/mongodb** 和 **/var/log/mongodb**,MongoDB 将使用 **mongodb** 用户帐户运行。 +默认情况下,包管理器将创建 `/var/lib/mongodb` 和 `/var/log/mongodb`,MongoDB 将使用 `mongodb` 用户帐户运行。 我不会去更改这些默认设置,因为这超出了本指南的范围。有关详细信息,请查看[手册][5]。 -**/etc/mongod.conf** 中的设置在启动/重新启动 **mongodb** 服务实例时生效。 - +`/etc/mongod.conf` 中的设置在启动/重新启动 **mongodb** 服务实例时生效。 ##### 运行 MongoDB -要启动 mongodb 的守护进程 **mongod**,请输入: +要启动 mongodb 的守护进程 `mongod`,请输入: ``` sudo service mongod start ``` -现在你应该验证 **mongod** 进程是否已成功启动。此信息(默认情况下)保存在 **/var/log/mongodb/mongod.log** 中。我们来看看文件的内容: +现在你应该验证 `mongod` 进程是否已成功启动。此信息(默认情况下)保存在 `/var/log/mongodb/mongod.log` 中。我们来看看文件的内容: ``` sudo cat /var/log/mongodb/mongod.log @@ -181,11 +177,11 @@ sudo cat /var/log/mongodb/mongod.log ![Check MongoDB logs to see if the process is running properly.][6] -只要你在某处看到:**[initandlisten] waiting for connections on port 27017**,就说明进程正常运行。 +只要你在某处看到:`[initandlisten] waiting for connections on port 27017`,就说明进程正常运行。 -**注意:27017** 是 **mongod** 的默认端口。 +**注意**:27017 是 `mongod` 的默认端口。 -要停止/重启 **mongod**,请输入: +要停止/重启 `mongod`,请输入: ``` sudo service mongod stop @@ -198,9 +194,9 @@ sudo service mongod restart mongo ``` -##### 卸载 MongoDB +#### 卸载 MongoDB -运行以下命令 +运行以下命令: ``` sudo service mongod stop @@ -214,7 +210,7 @@ sudo rm -r /var/log/mongodb sudo rm -r /var/lib/mongodb ``` -**总结** +### 总结 MongoDB 是一个很棒的 NoSQL 数据库,它易于集成到现代项目中。我希望本教程能帮助你在 Ubuntu 上安装它!在下面的评论中告诉我们你计划如何使用 MongoDB。 @@ -225,7 +221,7 @@ via: https://itsfoss.com/install-mongodb-ubuntu 作者:[Sergiu][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 8edfe5ad6ab3b8fd28f2e4cb27c37a487a9e6d75 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Aug 2019 10:48:26 +0800 Subject: [PATCH 245/951] PUB @geekpi https://linux.cn/article-11175-1.html --- .../20190304 How to Install MongoDB on Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190304 How to Install MongoDB on Ubuntu.md (99%) diff --git a/translated/tech/20190304 How to Install MongoDB on Ubuntu.md b/published/20190304 How to Install MongoDB on Ubuntu.md similarity index 99% rename from translated/tech/20190304 How to Install MongoDB on Ubuntu.md rename to published/20190304 How to Install MongoDB on Ubuntu.md index 772d2a7c9b..1ba0edae1f 100644 --- a/translated/tech/20190304 How to Install MongoDB on Ubuntu.md +++ b/published/20190304 How to Install MongoDB on Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11175-1.html) [#]: subject: (How to Install MongoDB on Ubuntu) [#]: via: (https://itsfoss.com/install-mongodb-ubuntu) [#]: author: (Sergiu https://itsfoss.com/author/sergiu/) From 1985fa5c32aca7c6dce8d7863d34fabefea4276b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Aug 2019 11:24:22 +0800 Subject: [PATCH 246/951] PRF @LazyWolfLin --- ...ntegration testing for the Linux kernel.md | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md index 4b07612098..30b3353595 100644 --- a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/translated/tech/20190613 Continuous integration testing for the Linux kernel.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (LazyWolfLin) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Continuous integration testing for the Linux kernel) @@ -10,11 +10,11 @@ Linux 内核的持续集成测试 ====== -> 这个团队是如何防止 bug 被合并到 Linux 内核中。 +> CKI 团队是如何防止 bug 被合并到 Linux 内核中。 -![Linux kernel source code \(C\) in Visual Studio Code][1] +![](https://img.linux.net.cn/data/attachment/album/201908/02/112520aidijdddo9wwvbiv.jpg) -Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14,000 个更改,很显然,这使得 Linux 内核快速迭代的同时也产生了巨大的复杂性问题。内核上 Bug 有小麻烦也有大问题,例如系统奔溃和数据丢失。 +Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14,000 个变更集,很显然,这使得 Linux 内核快速迭代的同时也产生了巨大的复杂性问题。内核上 Bug 有小麻烦也有大问题,有时是系统崩溃,有时是数据丢失。 随着越来越多的项目对于持续集成(CI)的呼声,[内核持续集成(CKI)][2]小组秉承着一个任务目标:防止 Bug 被合并到内核当中。 @@ -26,37 +26,33 @@ Linux 内核的每个发布版本包含了来自 1,700 个开发者产生的 14, #### CI 和 Linux -许多现代软件代码库都采用某种自动化 CI 测试机制,能够在提交进入代码存储库之前对其进行测试。这种自动化测试使得维护人员可以通过查看 CI 测试报告来发现软件质量问题以及大多数的错误。一些更方便的项目,比如某个 python 库,附带的大量工具使得整个检查过程更简单。 +许多现代软件代码库都采用某种自动化 CI 测试机制,能够在提交进入代码存储库之前对其进行测试。这种自动化测试使得维护人员可以通过查看 CI 测试报告来发现软件质量问题以及大多数的错误。一些简单的项目,比如某个 Python 库,附带的大量工具使得整个检查过程更简单。 -在任何测试之前都需要配置和编译 Linux。而这么做将耗费大量的时间和计算资源。此外,Linux 内核必需在虚拟机或者裸机上启动才能进行测试。而访问某些硬件架构需要额外的开销或者非常慢的仿真。因此,必需有人确定一组能够触发错误或者验证修复的测试集。 +在任何测试之前都需要配置和编译 Linux。而这么做将耗费大量的时间和计算资源。此外,Linux 内核必需在虚拟机或者裸机上启动才能进行测试。而访问某些硬件架构需要额外的开销或者非常慢的仿真。因此,人们必须确定一组能够触发错误或者验证修复的测试集。 #### CKI 团队如何运作? Red Hat 公司的 CKI 团队当前正追踪来自数个内部内核分支和上游的[稳定内核分支树][3]等内核分支的更改。我们关注每个代码库的两类关键事件: 1. 当维护人员合并 PR 或者补丁时,代码库变化后的最终结果。 + 2. 当开发人员通过拼凑或者稳定补丁队列发起变更合并时。 - 2. 当开发人员通过拼凑的或者稳定的补丁队列发起合并时。 - -当这些事件发生时,自动化工具开始执行,[GitLab CI 管道][4]开始进行测试。一旦管道开始执行 [linting][5] 脚本,合并每一个补丁,并为多种硬件架构编译内核,真正的测试便开始了。我们会在六分钟内完成四种硬件架构的内核编译工作,并且通常会在两个小时或更短的时间内将反馈提交到稳定邮件列表中。(自 2019 年 1 月起)每月执行超过 100,000 次内核测试,并有超过 11,000 个 GitLab 管道已经完成。 +当这些事件发生时,自动化工具开始执行,[GitLab CI 管道][4]开始进行测试。一旦管道开始执行 [linting][5] 脚本、合并每一个补丁,并为多种硬件架构编译内核,真正的测试便开始了。我们会在六分钟内完成四种硬件架构的内核编译工作,并且通常会在两个小时或更短的时间内将反馈提交到稳定邮件列表中。(自 2019 年 1 月起)每月执行超过 100,000 次内核测试,并完成了超过 11,000 个 GitLab 管道。 每个内核都会在本地硬件架构上启动,其中包含: -* [aarch64][6]:64-bit [ARM][7], 例如 [Cavium(当前是 Marvell)ThunderX][8]。 - +* [aarch64][6]:64 位 [ARM][7],例如 [Cavium(当前是 Marvell)ThunderX][8]。 * [ppc64/ppc64le][9]:大端和小端的 [IBM POWER][10] 系统。 - * [s390x][11]:[IBM Zseries][12] 大型机 - -* [x86_64][13]:[Intel][14] 和 [AMD][15] 工作站,笔记本和服务器。 +* [x86_64][13]:[Intel][14] 和 [AMD][15] 工作站、笔记本和服务器。 这些内核上运行了包括 [Linux 测试项目(LTP)][16]在内的多个测试,其中包括使用常用测试工具的大量测试。我们 CKI 团队开源了超过 44 个测试并将继续开源更多测试。 ### 参与其中 -上游的内核测试工作日渐增多。包括[Google][17]、Intel、[Linaro][18] 和 [Sony][19] 在内的许多公司为各种内核提供测试输出。每一项工作都专注于为上游内核以及每个公司的客户群带来价值。 +上游的内核测试工作日渐增多。包括 [Google][17]、Intel、[Linaro][18] 和 [Sony][19] 在内的许多公司为各种内核提供了测试输出。每一项工作都专注于为上游内核以及每个公司的客户群带来价值。 -如果你或者你的公司想要参与这一工作,请参加在葡萄牙里斯本举办的 [Linux Plumbers Conference 2019][20]。在会议结束后的两天加入我们的 Kernel CI hackfest 活动,并推动快速内核测试的发展。 +如果你或者你的公司想要参与这一工作,请参加在 9 月份在葡萄牙里斯本举办的 [Linux Plumbers Conference 2019][20]。在会议结束后的两天加入我们的 Kernel CI hackfest 活动,并推动快速内核测试的发展。 更多详细信息,[请见][21]我在 Texas Linux Fest 2019 上的演讲。 @@ -67,7 +63,7 @@ via: https://opensource.com/article/19/6/continuous-kernel-integration-linux 作者:[Major Hayden][a] 选题:[lujun9972][b] 译者:[LazyWolfLin](https://github.com/LazyWolfLin) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From abdfb8df13e08131294802738ea5a150da77da59 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Aug 2019 11:25:14 +0800 Subject: [PATCH 247/951] PUB @LazyWolfLin https://linux.cn/article-11176-1.html --- ...613 Continuous integration testing for the Linux kernel.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190613 Continuous integration testing for the Linux kernel.md (98%) diff --git a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md b/published/20190613 Continuous integration testing for the Linux kernel.md similarity index 98% rename from translated/tech/20190613 Continuous integration testing for the Linux kernel.md rename to published/20190613 Continuous integration testing for the Linux kernel.md index 30b3353595..38f262eabe 100644 --- a/translated/tech/20190613 Continuous integration testing for the Linux kernel.md +++ b/published/20190613 Continuous integration testing for the Linux kernel.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (LazyWolfLin) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11176-1.html) [#]: subject: (Continuous integration testing for the Linux kernel) [#]: via: (https://opensource.com/article/19/6/continuous-kernel-integration-linux) [#]: author: (Major Hayden https://opensource.com/users/mhayden) From 9d06ed7f18e0e423680c02d02c0a2429b0708b15 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Aug 2019 14:02:53 +0800 Subject: [PATCH 248/951] PRF @robsean --- ... do after Installing Debian 10 (Buster).md | 113 +++++++++--------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md b/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md index 8075cdca03..92b76e78f4 100644 --- a/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md +++ b/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md @@ -1,22 +1,22 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Top 8 Things to do after Installing Debian 10 (Buster)) [#]: via: (https://www.linuxtechi.com/things-to-do-after-installing-debian-10/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) -Debian 10 (Buster) 安装后要做的前8件事 +Debian 10(Buster)安装后要做的前 8 件事 ====== -Debian 10 代码名称是 Buster ,它是来自 Debian 家族的最新 LTS 发布版本,并包含大量的特色。因此,如果你已经在你的电脑上安装 Debian 10 ,并在思考接下来做什么,那么,请继续阅读这篇文章直到结尾,因为我们为你提供在安装 Debian 10 后要做的前8件事。对于还没有安装 Debian 10 的人们,请阅读这篇指南 [ ** 图解 Debian 10 (Buster) 安装步骤 ** ][1]。 让我们继续这篇文章: +Debian 10 的代号是 Buster,它是来自 Debian 家族的最新 LTS 发布版本,并包含大量的特色功能。因此,如果你已经在你的电脑上安装了 Debian 10,并在思考接下来该做什么,那么,请继续阅读这篇文章直到结尾,因为我们为你提供在安装 Debian 10 后要做的前 8 件事。对于还没有安装 Debian 10 的人们,请阅读这篇指南 [图解 Debian 10 (Buster) 安装步骤][1]。 让我们继续这篇文章。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/Things-to-do-after-installing-debian10.jpg) ### 1) 安装和配置 sudo -在设置完成 Debian 10 后,你需要做的第一件事是安装 sudo 软件包,因为它能够使你获得管理员权限来安装你需要的软件包。为安装和配置 sudo ,请使用下面的命令: +在设置完成 Debian 10 后,你需要做的第一件事是安装 sudo 软件包,因为它能够使你获得管理员权限来安装你需要的软件包。为安装和配置 sudo,请使用下面的命令: 变成 root 用户,然后使用下面的命令安装 sudo 软件包, @@ -29,11 +29,11 @@ root@linuxtechi:~# apt install sudo -y 添加你的本地用户到 sudo 组,使用下面的 [usermod][2] 命令, ``` -root@linuxtechi:~# usermod -aG sudo pkumar +root@linuxtechi:~# usermod -aG sudo pkumar root@linuxtechi:~# ``` -现在验证是否本地用户获得 sudo 权限, +现在验证是否本地用户获得 sudo 权限: ``` root@linuxtechi:~$ id @@ -49,30 +49,30 @@ root@linuxtechi:~$ 转到系统 **设置** –> **详细说明** –> **日期和时间** ,然后更改为适合你的位置的时区。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/Adjust-date-time-Debian10.jpg) -一旦时区被更改,你可以看到时钟中的时间自动更改 +一旦时区被更改,你可以看到时钟中的时间自动更改。 ### 3) 应用所有更新 -在 Debian 10 安装后,建议安装所有 Debian 10 软件包存储库中可用的更新,执行下面的 apt 命令, +在 Debian 10 安装后,建议安装所有 Debian 10 软件包存储库中可用的更新,执行下面的 `apt` 命令: ``` root@linuxtechi:~$ sudo apt update root@linuxtechi:~$ sudo apt upgrade -y ``` -**注意:** 如果你是 vi 编辑器的一个大粉丝,那么使用下面的 apt 命令安装 vim , +**注意:** 如果你是 vi 编辑器的忠实粉丝,那么使用下面的 `apt` 命令安装 `vim`: ``` root@linuxtechi:~$ sudo apt install vim -y ``` -### 4) 安装 Flash Player 插件 +### 4) 安装 Flash 播放器插件 -默认情况下,Debian 10 (Buster) 存储库不包含 Flash 插件,因此,用户需要遵循下面的概述来在他们的系统中查找和安装 flash player : +默认情况下,Debian 10(Buster)存储库不包含 Flash 插件,因此,用户需要遵循下面的介绍来在他们的系统中查找和安装 flash 播放器。 -为 flash player 配置存储库: +为 Flash 播放器配置存储库: ``` root@linuxtechi:~$ echo "deb http://ftp.de.debian.org/debian buster main contrib" | sudo tee -a /etc/apt/sources.list @@ -80,39 +80,39 @@ deb http://ftp.de.debian.org/debian buster main contrib root@linuxtechi:~ ``` -现在使用下面的命令更新软件包索引, +现在使用下面的命令更新软件包索引: ``` root@linuxtechi:~$ sudo apt update ``` -使用下面的 apt 命令安装 flash 插件 +使用下面的 `apt` 命令安装 Flash 插件: ``` root@linuxtechi:~$ sudo apt install pepperflashplugin-nonfree -y ``` -一旦软件包被成功安装,接下来,尝试播放 YouTube 中的视频, +一旦软件包被成功安装,接下来,尝试播放 YouTube 中的视频: - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/Flash-Player-plugin-Debian10.jpg) -### 5)  安装软件,像 VLC,SKYPE,FileZilla 和截图工具 +### 5) 安装软件,如 VLC、Skype、FileZilla 和截图工具 -如此,现在我们已经启用 flash player,是时候在我们的 Debian 10 系统中安装所有其它的软件,像 VLC,Skype,Filezilla 和截图工具,像 flameshot 。 +如此,现在我们已经启用 Flash 播放器,是时候在我们的 Debian 10 系统中安装所有其它的软件,如 VLC、Skype,Filezilla 和截图工具(flameshot)。 -**安装 VLC 多媒体播放器** +#### 安装 VLC 多媒体播放器 -为在你的系统中安装 VLC 播放器,使用下面的 apt 命令, +为在你的系统中安装 VLC 播放器,使用下面的 `apt` 命令: ``` root@linuxtechi:~$ sudo apt install vlc -y ``` -在成功安装 VLC 播放器后,尝试播放你喜欢的视频 +在成功安装 VLC 播放器后,尝试播放你喜欢的视频。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/Debian10-VLC.jpg) -**安装 Skype :** +#### 安装 Skype 首先,下载最新的 Skype 软件包: @@ -120,49 +120,49 @@ root@linuxtechi:~$ sudo apt install vlc -y root@linuxtechi:~$ wget https://go.skype.com/skypeforlinux-64.deb ``` -接下来,使用 apt 命令安装软件包: +接下来,使用 `apt` 命令安装软件包: ``` root@linuxtechi:~$ sudo apt install ./skypeforlinux-64.deb ``` -在成功安装 Skype 后,尝试访问它,并输入你的用户名和密码, +在成功安装 Skype 后,尝试访问它,并输入你的用户名和密码。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/skype-Debian10.jpg) -**安装 Filezilla** +#### 安装 Filezilla -为在你的系统中安装 Filezilla,使用下面的 apt 命令, +为在你的系统中安装 Filezilla,使用下面的 `apt` 命令, ``` root@linuxtechi:~$ sudo apt install filezilla -y ``` -一旦 FileZilla 软件包被成功安装,尝试访问它, +一旦 FileZilla 软件包被成功安装,尝试访问它。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/FileZilla-Debian10.jpg) -**安装截图工具 (flameshot)** +#### 安装截图工具(flameshot) -使用下面的命令来阿紫截图工具: flameshot , +使用下面的命令来安装截图工具:flameshot, ``` root@linuxtechi:~$ sudo apt install flameshot -y ``` -**注意:** Shutter 工具在 Debian 10 中被移除 +**注意:** Shutter 工具在 Debian 10 中已被移除。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/flameshoot-debian10.jpg) ### 6) 启用和启动防火墙 -总是建议启动防火墙来使你的网络安全。如果你正在期望在 Debian 10 中启用防火墙, **UFW** (简单的防火墙)是最好的处理防火墙的工具。既然 UFW 在 Debian 存储库中可用,它非常容易安装,如下显示: +总是建议启动防火墙来使你的网络安全。如果你希望在 Debian 10 中启用防火墙, **UFW**(简单的防火墙)是最好的控制防火墙的工具。UFW 在 Debian 存储库中可用,它非常容易安装,如下: ``` root@linuxtechi:~$ sudo apt install ufw ``` -在你安装 UFW 后,接下来的步骤是设置防火墙。因此,为设置防火墙,通过拒绝端口来禁用所有的传入流量,并且只允许需要的端口,像 ssh ,http 和 https 。 +在你安装 UFW 后,接下来的步骤是设置防火墙。因此,设置防火墙,通过拒绝端口来禁用所有的传入流量,并且只允许需要的端口传出,像 ssh、http 和 https。 ``` root@linuxtechi:~$ sudo ufw default deny incoming @@ -174,7 +174,7 @@ Default outgoing policy changed to 'allow' root@linuxtechi:~$ ``` -允许 SSH 端口 +允许 SSH 端口: ``` root@linuxtechi:~$ sudo ufw allow ssh @@ -183,7 +183,7 @@ Rules updated (v6) root@linuxtechi:~$ ``` -假使你在系统中已经安装 Web 服务器,那么使用下面的 ufw 命令来在防火墙中允许它们的端口, +假使你在系统中已经安装 Web 服务器,那么使用下面的 `ufw` 命令来在防火墙中允许它们的端口: ``` root@linuxtechi:~$ sudo ufw allow 80 @@ -195,7 +195,7 @@ Rules updated (v6) root@linuxtechi:~$ ``` -最后,你可以使用下面的命令启用 UFW +最后,你可以使用下面的命令启用 UFW: ``` root@linuxtechi:~$ sudo ufw enable @@ -204,15 +204,15 @@ Firewall is active and enabled on system startup root@linuxtechi:~$ ``` -假使你想检查你的防火墙的状态,你可以使用下面的命令检查它 +假使你想检查你的防火墙的状态,你可以使用下面的命令检查它: ``` root@linuxtechi:~$ sudo ufw status ``` -### 7) 安装虚拟化软件 (VirtualBox) +### 7) 安装虚拟化软件(VirtualBox) -安装 Virtualbox 的第一步是将 Oracle VirtualBox 存储库的公钥导入到你的 Debian 10 系统 +安装 Virtualbox 的第一步是将 Oracle VirtualBox 存储库的公钥导入到你的 Debian 10 系统: ``` root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - @@ -224,31 +224,34 @@ root@linuxtechi:~$ 如果导入成功,你将看到一个 “OK” 显示信息。 -接下来,你需要添加存储库到 source list +接下来,你需要添加存储库到仓库列表: ``` root@linuxtechi:~$ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian buster contrib" root@linuxtechi:~$ ``` -最后,是时候在你的系统中安装 VirtualBox 6.0 +最后,是时候在你的系统中安装 VirtualBox 6.0: ``` root@linuxtechi:~$ sudo apt update root@linuxtechi:~$ sudo apt install virtualbox-6.0 -y ``` -一旦 VirtualBox 软件包被成功安装,尝试访问它,并开始创建虚拟机, +一旦 VirtualBox 软件包被成功安装,尝试访问它,并开始创建虚拟机。 - +![](https://www.linuxtechi.com/wp-content/uploads/2019/07/VirtualBox6-Debian10-Workstation.jpg) ### 8) 安装最新的 AMD 驱动程序 -最后,你也可以安装需要的附加 AMD 驱动程序,像显卡,ATI 专有的和 Nvidia 图形驱动程序。为安装最新的 AMD 驱动程序,首先,我们必需修改 **/etc/apt/sources.list** 文件,在包含 **main** 和 **contrib** 的行中添加 **non-free** 单词,示例如下显示 +最后,你也可以安装需要的附加 AMD 显卡驱动程序(如 ATI 专有驱动)和 Nvidia 图形驱动程序。为安装最新的 AMD 驱动程序,首先,我们需要修改 `/etc/apt/sources.list` 文件,在包含 **main** 和 **contrib** 的行中添加 **non-free** 单词,示例如下显示: ``` root@linuxtechi:~$ sudo vi /etc/apt/sources.list -………………… +``` + +``` +... deb http://deb.debian.org/debian/ buster main non-free contrib deb-src http://deb.debian.org/debian/ buster main non-free contrib @@ -256,17 +259,17 @@ deb http://security.debian.org/debian-security buster/updates main contrib non-f deb-src http://security.debian.org/debian-security buster/updates main contrib non-free deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free -…………………… +... ``` -现在,使用下面的 apt 命令来在 Debian 10 系统中安装最新的 AMD 驱动程序 +现在,使用下面的 `apt` 命令来在 Debian 10 系统中安装最新的 AMD 驱动程序。 ``` root@linuxtechi:~$ sudo apt update root@linuxtechi:~$ sudo apt install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu -y ``` -这就是这篇文章的全部内存,我希望你有在安装 Debian 10 后应该有的想法。请在下面的评论区,分享你的反馈和评论。 +这就是这篇文章的全部内容,我希望你了解在安装 Debian 10 后应该做什么。请在下面的评论区,分享你的反馈和评论。 -------------------------------------------------------------------------------- @@ -275,11 +278,11 @@ via: https://www.linuxtechi.com/things-to-do-after-installing-debian-10/ 作者:[Pradeep Kumar][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/) 荣誉推出 [a]: https://www.linuxtechi.com/author/pradeep/ [b]: https://github.com/lujun9972 -[1]: https://www.linuxtechi.com/debian-10-buster-installation-guide/ +[1]: https://linux.cn/article-11083-1.html [2]: https://www.linuxtechi.com/linux-commands-to-manage-local-accounts/ From 5ce00b2a48af86ac416d3edc6b03b13724841de8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Aug 2019 14:03:39 +0800 Subject: [PATCH 249/951] PUB @robsean https://linux.cn/article-11178-1.html --- ... Top 8 Things to do after Installing Debian 10 (Buster).md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md (99%) diff --git a/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md b/published/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md similarity index 99% rename from translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md rename to published/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md index 92b76e78f4..48264d8479 100644 --- a/translated/tech/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md +++ b/published/20190729 Top 8 Things to do after Installing Debian 10 (Buster).md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11178-1.html) [#]: subject: (Top 8 Things to do after Installing Debian 10 (Buster)) [#]: via: (https://www.linuxtechi.com/things-to-do-after-installing-debian-10/) [#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) From 8024ddadcfcd24d59d9a33fb5811ea72ae18803f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Aug 2019 21:38:55 +0800 Subject: [PATCH 250/951] =?UTF-8?q?APL:Bash=20aliases=20you=20can=E2=80=99?= =?UTF-8?q?t=20live=20without?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20190731 Bash aliases you can-t live without.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190731 Bash aliases you can-t live without.md b/sources/tech/20190731 Bash aliases you can-t live without.md index 7d93633b6d..a4d4fedd23 100644 --- a/sources/tech/20190731 Bash aliases you can-t live without.md +++ b/sources/tech/20190731 Bash aliases you can-t live without.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7673fbbe07ba194573cc6cb517e562dcf7877f1a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 00:24:40 +0800 Subject: [PATCH 251/951] TSL PART --- ...731 Bash aliases you can-t live without.md | 197 ++++++++---------- 1 file changed, 85 insertions(+), 112 deletions(-) diff --git a/sources/tech/20190731 Bash aliases you can-t live without.md b/sources/tech/20190731 Bash aliases you can-t live without.md index a4d4fedd23..f6a90c218e 100644 --- a/sources/tech/20190731 Bash aliases you can-t live without.md +++ b/sources/tech/20190731 Bash aliases you can-t live without.md @@ -7,46 +7,42 @@ [#]: via: (https://opensource.com/article/19/7/bash-aliases) [#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/samwebstudiohttps://opensource.com/users/greg-phttps://opensource.com/users/greg-p) -Bash aliases you can’t live without +不可或缺的 Bash 别名 ====== -Tired of typing the same long commands over and over? Do you feel -inefficient working on the command line? Bash aliases can make a world -of difference. +> 厌倦了一遍又一遍地输入相同的长命令?你觉得在命令行上工作效率低吗?Bash 别名可以为你创造一个与众不同的世界。 + ![bash logo on green background][1] -A Bash alias is a method of supplementing or overriding Bash commands with new ones. Bash aliases make it easy for users to customize their experience in a [POSIX][2] terminal. They are often defined in **$HOME/.bashrc** or **$HOME/bash_aliases** (which must be loaded by **$HOME/.bashrc**). - -Most distributions add at least some popular aliases in the default **.bashrc** file of any new user account. These are simple ones to demonstrate the syntax of a Bash alias: +Bash 别名是一种用新的命令补充或覆盖 Bash 命令的方法。Bash 别名使用户可以轻松地在 [POSIX][2] 终端中自定义其体验。它们通常定义在 `$HOME/.bashrc` 或 `$HOME/bash_aliases` 中(它是由 `$HOME/.bashrc` 加载的)。 +大多数发行版在新用户帐户的默认 `.bashrc` 文件中至少添加一些流行的别名。这些可以用来简单演示 Bash 别名的语法: ``` alias ls='ls -F' alias ll='ls -lh' ``` -Not all distributions ship with pre-populated aliases, though. If you add aliases manually, then you must load them into your current Bash session: - +但并非所有发行版都附带预先添加好的别名。如果你想手动添加别名,则必须将它们加载到当前的 Bash 会话中: ``` $ source ~/.bashrc ``` -Otherwise, you can close your terminal and re-open it so that it reloads its configuration file. +否则,你可以关闭终端并重新打开它,以便重新加载其配置文件。 -With those aliases defined in your Bash initialization script, you can then type **ll** and get the results of **ls -l**, and when you type **ls** you get, instead of the output of plain old ****[ls][3]. +使用 Bash 初始化脚本中定义的那些别名,然后你可以键入 `ll` 而得到 `ls -l` 的结果,当你键入 `ls` 时,得到也不是原来的 [ls][3] 的普通输出。 -Those aliases are great to have, but they just scratch the surface of what’s possible. Here are the top 10 Bash aliases that, once you try them, you won’t be able to live without. +那些别名很棒,但它们只是浅尝辄止。以下是十大 Bash 别名,一旦你试过它们,你会发现再也不能离开它们。 -### Set up first - -Before beginning, create a file called **~/.bash_aliases**: +### 首先设置 +在开始之前,创建一个名为 `~/.bash_aliases` 的文件: ``` $ touch ~/.bash_aliases ``` -Then, make sure that this code appears in your **~/.bashrc** file: +然后,确认这些代码出现在你的 `~/.bashrc` 文件当中: ``` @@ -55,21 +51,19 @@ if [ -e $HOME/.bash_aliases ]; then fi ``` -If you want to try any of the aliases in this article for yourself, enter them into your **.bash_aliases** file, and then load them into your Bash session with the **source ~/.bashrc** command. +如果你想亲自尝试本文中的任何别名,请将它们输入到 `.bash_aliases` 文件当中,然后使用 `source ~/.bashrc` 命令将它们加载到 Bash 会话中。 -### Sort by file size +### 按文件大小排序 -If you started your computing life with GUI file managers like Nautilus in GNOME, the Finder in MacOS, or Explorer in Windows, then you’re probably used to sorting a list of files by their size. You can do that in a terminal as well, but it’s not exactly succinct. - -Add this alias to your configuration on a GNU system: +如果你一开始使用过 GNOME 中的 Nautilus、MacOS 中的 Finder 或 Windows 中的资源管理器等 GUI 文件管理器,那么你可能习惯按文件大小排序文件列表。你也可以在终端上做到这一点,但这条命令并不完全简洁。 +将此别名添加到 GNU 系统上的配置中: ``` alias lt='ls --human-readable --size -1 -S --classify' ``` -This alias replaces **lt** with an **ls** command that displays the size of each item, and then sorts it by size, in a single column, with a notation to indicate the kind of file. Load your new alias, and then try it out: - +此别名将 `lt` 替换为 `ls` 命令,该命令在单个列中显示每个项目的大小,然后按大小对其进行排序,并使用符号表示文件类型。加载新别名,然后试一下: ``` $ source ~/.bashrc @@ -98,15 +92,13 @@ total 344K    0 COPYING@ ``` -On MacOS or BSD, the **ls** command doesn’t have the same options, so this alias works instead: - +在 MacOS 或 BSD 上,`ls` 命令没有相同的选项,因此这个别名可以改为: ``` alias lt='du -sh * | sort -h' ``` -The results of this version are a little different: - +这个版本的结果稍有不同: ``` $ du -sh * | sort -h @@ -133,16 +125,15 @@ $ du -sh * | sort -h 476K    autom4te.cache ``` -In fact, even on Linux, that command is useful, because ****using **ls** lists directories and symlinks as being 0 in size, which may not be the information you actually want. It’s your choice. +实际上,即使在 Linux上,上面这个命令也很有用,因为使用 `ls` 列出的目录和符号链接的大小为 0,这可能不是你真正想要的信息。使用哪个看你自己的喜好。 -_Thanks to Brad Alexander for this alias idea._ +*感谢 Brad Alexander 的这个别名的想法。* -### View only mounted drives +### 只查看挂载的驱动器 -The **mount** command used to be so simple. With just one command, you could get a list of all the mounted filesystems on your computer, and it was frequently used for an overview of what drives were attached to a workstation. It used to be impressive to see more than three or four entries because most computers don’t have many more USB ports than that, so the results were manageable. - -Computers are a little more complicated now, and between LVM, physical drives, network storage, and virtual filesystems, the results of **mount** can be difficult to parse: +`mount` 命令过去很简单。只需一个命令,你就可以获得计算机上所有已挂载的文件系统的列表,并且它经常用于概览连接到工作站有哪些驱动器。在过去看到超过三个或四个条目就令人印象深刻,因为大多数计算机没有比这更多的 USB 端口,因此这个结果还是比较好查看的。 +现在计算机有点复杂,有 LVM、物理驱动器、网络存储和虚拟文件系统,`mount` 的结果就很难一目了然: ``` sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel) @@ -159,14 +150,13 @@ gvfsd-fuse on /run/user/100977/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relati binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) ``` -To solve that problem, try an alias like this: - +要解决这个问题,试试这个别名: ``` alias mnt='mount | awk -F' ' '{ printf "%s\t%s\n",$1,$3; }' | column -t | egrep ^/dev/ | sort' ``` -This alias uses **awk** to parse the output of **mount** by column, reducing the output to what you probably looking for (what hard drives, and not file systems, are mounted): +此别名使用 `awk` 按列解析 `mount` 的输出,将输出减少到你可能想要查找的内容(挂载了哪些硬盘驱动器,而不是文件系统): ``` @@ -178,15 +168,13 @@ $ mnt /dev/sdc1                /run/media/seth/trip ``` -On MacOS, the **mount** command doesn’t provide terribly verbose output, so an alias may be overkill. However, if you prefer a succinct report, try this: - +在 MacOS 上,`mount` 命令不提供非常详细的输出,因此这个别名可能过度精简了。但是,如果你更喜欢简洁的报告,请尝试以下方法: ``` alias mnt='mount | grep -E ^/dev | column -t' ``` -The results: - +结果: ``` $ mnt @@ -194,21 +182,19 @@ $ mnt /dev/disk1s4  on  /private/var/vm  (apfs,  local,  noexec,     journaled,  noatime,  nobrowse) ``` -### Find a command in your grep history +### 在你的 grep 历史中查找命令 -Sometimes you figure out how to do something in the terminal, and promise yourself that you’ll never forget what you’ve just learned. Then an hour goes by, and you’ve completely forgotten what you did. +有时你好不容易弄清楚了如何在终端完成某件事,并保证自己永远不会忘记你刚学到的东西。然后,一个小时过去之后你就完全忘记了你做了什么。 -Searching through your Bash history is something everyone has to do from time to time. If you know exactly what you’re searching for, you can use **Ctrl+R** to do a reverse search through your history, but sometimes you can’t remember the exact command you want to find. - -Here’s an alias to make that task a little easier: +搜索 Bash 历史记录是每个人不时要做的事情。如果你确切地知道要搜索的内容,可以使用 `Ctrl + R` 对历史记录进行反向搜索,但有时你无法记住要查找的确切命令。 +这是使该任务更容易的别名: ``` alias gh='history|grep' ``` -Here’s an example of how to use it: - +这是如何使用的例子: ``` $ gh bash @@ -218,19 +204,17 @@ $ gh bash 531 source ~/.bashrc ``` -### Sort by modification time +### 按修改时间排序 -It happens every Monday: You get to work, you sit down at your computer, you open a terminal, and you find you’ve forgotten what you were doing last Friday. What you need is an alias to list the most recently modified files. - -You can use the **ls** command to create an alias to help you find where you left off: +每个星期一都会这样:你坐在你的电脑前开始工作,你打开一个终端,你发现你已经忘记了上周五你在做什么。你需要的是列出最近修改的文件的别名。 +你可以使用 `ls` 命令创建别名,以帮助你找到上次离开的位置: ``` alias left='ls -t -1' ``` -The output is simple, although you can extend it with the --**long** option if you prefer. The alias, as listed, displays this: - +输出很简单,但如果你愿意,可以使用 `--long` 选项扩展它。这个别名列出的显示如下: ``` $ left @@ -242,21 +226,19 @@ brainstorm.txt query-letter.xml ``` -### Count files +### 文件计数 -If you need to know how many files you have in a directory, the solution is one of the most classic examples of UNIX command construction: You list files with the **ls** command, control its output to be only one column with the **-1** option, and then pipe that output to the **wc** (word count) command to count how many lines of single files there are. +如果你需要知道目录中有多少文件,那么该解决方案是 UNIX 命令构造的最典型示例之一:使用 `ls` 命令列出文件,用`-1` 选项将其输出控制为只有一列,然后输出到 `wc`(单词计数)命令的管道,以计算有多少行。 -It’s a brilliant demonstration of how the UNIX philosophy allows users to build their own solutions using small system components. This command combination is also a lot to type if you happen to do it several times a day, and it doesn’t exactly work for a directory of directories without using the **-R** option, which introduces new lines to the output and renders the exercise useless. - -Instead, this alias makes the process easy: +这是 UNIX 理念如何允许用户使用小型的系统组件构建自己的解决方案的精彩演示。如果你碰巧每天都要做几次,这个命令组合也要输入很多字母,如果没有使用 `-R` 选项,它就不能完全用于目录,这会为输出引入新行并导致无用的结果。 +相反,这个别名使这个过程变得简单: ``` alias count='find . -type f | wc -l' ``` -This one counts files, ignoring directories, but _not_ the contents of directories. If you have a project folder containing two directories, each of which contains two files, the alias returns four, because there are four files in the entire project. - +这个别名会计算文件,忽略目录,但**不会**忽略目录的内容。如果你有一个包含两个目录的项目文件夹,每个目录包含两个文件,则该别名将返回 4,因为整个项目中有 4 个文件。 ``` $ ls @@ -265,23 +247,22 @@ $ count 4 ``` -### Create a Python virtual environment +### 创建 Python 虚拟环境 -Do you code in Python? +你用 Python 编程吗? -Do you code in Python a lot? +你用 Python 编写了很多程序吗? -If you do, then you know that creating a Python virtual environment requires, at the very least, 53 keystrokes. -That’s 49 too many, but that’s easily circumvented with two new aliases called **ve** and **va**: +如果是这样,那么你就知道创建 Python 虚拟环境至少需要 53 次击键。 +这个数字有 49 次是多余的,很容易被两个名为 `ve` 和 `va` 的新别名所解决: ``` alias ve='python3 -m venv ./venv' alias va='source ./venv/bin/activate' ``` -Running **ve** creates a new directory, called **venv**, containing the usual virtual environment filesystem for Python3. The **va** alias activates the environment in your current shell: - +运行 `ve` 会创建一个名为 `venv` 的新目录,其中包含 Python 3 的常用虚拟环境文件系统。`va` 别名在当前 shell 中的激活该环境: ``` $ cd my-project @@ -290,48 +271,44 @@ $ va (venv) $ ``` -### Add a copy progress bar +### 增加一个复制进度条 -Everybody pokes fun at progress bars because they’re infamously inaccurate. And yet, deep down, we all seem to want them. The UNIX **cp** command has no progress bar, but it does have a **-v** option for verbosity, meaning that it echoes the name of each file being copied to your terminal. That’s a pretty good hack, but it doesn’t work so well when you’re copying one big file and want some indication of how much of the file has yet to be transferred. +每个人都会吐槽进度条,因为它们似乎总是不合时宜。然而,在内心深处,我们似乎都想要它们。UNIX 的 `cp` 命令没有进度条,但它有一个 `-v` 选项用于显示详细信息,它回显了复制的每个文件名称到终端。 这是一个相当不错的技巧,但是当你复制一个大文件并且想要了解有多少文件尚未传输时,它的作用就没那么大了。 -The **pv** command provides a progress bar during copy, but it’s not common as a default application. On the other hand, the **rsync** command is included in the default installation of nearly every POSIX system available, and it’s widely recognized as one of the smartest ways to copy files both remotely and locally. - -Better yet, it has a built-in progress bar. +`pv` 命令可以在复制期间提供进度条,但它不常使用。另一方面,`rsync` 命令包含在几乎所有的 POSIX 系统的默认安装中,并且它被普遍认为是远程和本地复制文件的最智能方法之一。 +更好的是,它有一个内置的进度条。 ``` alias cpv='rsync -ah --info=progress2' ``` -Using this alias is the same as using the **cp** command: - +像使用 `cp` 命令一样使用此别名: ``` $ cpv bigfile.flac /run/media/seth/audio/           3.83M 6%  213.15MB/s    0:00:00 (xfr#4, to-chk=0/4) ``` -An interesting side effect of using this command is that **rsync** copies both files and directories without the **-r** flag that **cp** would otherwise require. +使用此命令的一个有趣的副作用是 `rsync` 无需 `-r` 标志就可以复制文件和目录,而 `cp` 则需要。 -### Protect yourself from file removal accidents +### 避免意外删除 -You shouldn’t use the **rm** command. The **rm** manual even says so: +你不应该使用 `rm` 命令。`rm` 手册甚至这样说: -> _Warning_: If you use ‘rm’ to remove a file, it is usually possible to recover the contents of that file. If you want more assurance that the contents are truly unrecoverable, consider using ‘shred’. +> **警告:**如果使用 `rm` 删除文件,通常可以恢复该文件的内容。如果你想要更加确保内容真正无法恢复,请考虑使用 `shred`。 -If you want to remove a file, you should move the file to your Trash, just as you do when using a desktop. +如果要删除文件,则应将文件移动到“废纸篓”,就像使用桌面时一样。 -POSIX makes this easy, because the Trash is an accessible, actual location in your filesystem. That location may change, depending on your platform: On a [FreeDesktop][4], the Trash is located at **~/.local/share/Trash**, while on MacOS it’s **~/.Trash**, but either way, it’s just a directory into which you place files that you want out of sight until you’re ready to erase them forever. - -This simple alias provides a way to toss files into the Trash bin from your terminal: +POSIX 使这很简单,因为垃圾桶是文件系统中可访问的一个实际位置。该位置可能会发生变化,具体取决于你的平台:在 [FreeDesktop][4] 上,“垃圾桶”位于 `~/.local/share/Trash`,而在 MacOS 上则是 `~/.Trash`,但无论如何,它只是一个目录,你可以将文件藏在那个看不见的地方,直到你准备永久删除它们为止。 +这个简单的别名提供了一种从终端将文件扔进垃圾桶的方法: ``` alias tcn='mv --force -t ~/.local/share/Trash ' ``` -This alias uses a little-known **mv** flag that enables you to provide the file you want to move as the final argument, ignoring the usual requirement for that file to be listed first. Now you can use your new command to move files and folders to your system Trash: - +该别名使用一个鲜为人知的 `mv` 标志,使你能够提供作为最终移动目标的参数,而忽略了首先列出要移动的文件的通常要求。现在,你可以使用新命令将文件和文件夹移动到系统垃圾桶: ``` $ ls @@ -341,47 +318,45 @@ $ ls bar ``` -Now the file is "gone," but only until you realize in a cold sweat that you still need it. At that point, you can rescue the file from your system Trash; be sure to tip the Bash and **mv** developers on the way out. +现在文件已“消失”,但只有在你一头冷汗的时候才意识到你还需要它。此时,你可以从系统垃圾桶中抢救该文件;这肯定可以给 Bash 和 `mv` 开发人员提供帮助。 -**Note:** If you need a more robust **Trash** command with better FreeDesktop compliance, see [Trashy][5]. +**注意:**如果你需要一个具有更好的 FreeDesktop 兼容性的更强大的垃圾桶命令,请参阅 [Trashy][5]。 -### Simplify your Git workflow +### 简化 Git 工作流 -Everyone has a unique workflow, but there are usually repetitive tasks no matter what. If you work with Git on a regular basis, then there’s probably some sequence you find yourself repeating pretty frequently. Maybe you find yourself going back to the master branch and pulling the latest changes over and over again during the day, or maybe you find yourself creating tags and then pushing them to the remote, or maybe it’s something else entirely. +每个人都有一个独特的工作流程,但无论如何,通常都会有重复的任务。如果你定期使用 Git,那么你可能会发现自己经常重复的一些操作序列。也许你会发现自己回到主分支并整天一遍又一遍地拉取最新的变化,或者你可能发现自己创建标签然后将它们推到远端,抑或可能完全是其的什么东西。 -No matter what Git incantation you’ve grown tired of typing, you may be able to alleviate some pain with a Bash alias. Largely thanks to its ability to pass arguments to hooks, Git has a rich set of introspective commands that save you from having to perform uncanny feats in Bash. +无论让你厌倦一遍遍输入的 Git 魔咒是什么,你都可以通过 Bash 别名减轻一些痛苦。很大程度上,由于它能够将参数传递给钩子,Git 拥有着丰富的内省命令,可以让你不必在 Bash 中执行那些丑陋冗长的命令。 -For instance, while you might struggle to locate, in Bash, a project’s top-level directory (which, as far as Bash is concerned, is an entirely arbitrary designation, since the absolute top level to a computer is the root directory), Git knows its top level with a simple query. If you study up on Git hooks, you’ll find yourself able to find out all kinds of information that Bash knows nothing about, but you can leverage that information with a Bash alias. - -Here’s an alias to find the top level of a Git project, no matter where in that project you are currently working, and then to change directory to it, change to the master branch, and perform a Git pull: +例如,虽然你可能很难在 Bash 中找到项目的顶级目录(就 Bash 而言,它是一个完全随意的名称,因为计算机的绝对顶级是根目录),Git 可以通过简单的查询找到项目的顶级目录。如果你研究过 Git 钩子,你会发现自己能够找到 Bash 一无所知的各种信息,而你可以利用 Bash 别名来利用这些信息。 +这是一个来查找 Git 项目的顶级目录的别名,无论你当前在哪个项目中工作,都可以将目录切换为顶级目录,切换为主分支,并执行 Git 拉取: ``` -alias startgit='cd `git rev-parse --show-toplevel` && git checkout master && git pull' +alias startgit='cd `git rev-parse --show-toplevel` && git checkout master && git pull' ``` -This kind of alias is by no means a universally useful alias, but it demonstrates how a relatively simple alias can eliminate a lot of laborious navigation, commands, and waiting for prompts. - -A simpler, and probably more universal, alias returns you to the Git project’s top level. This alias is useful because when you’re working on a project, that project more or less becomes your "temporary home" directory. It should be as simple to go "home" as it is to go to your actual home, and here’s an alias to do it: +这种别名绝不是一个普遍有用的别名,但它演示了一个相对简单的别名如何能够消除大量繁琐的导航、命令和等待提示。 +一个更简单,可能更通用的别名将使你返回到 Git 项目的顶级目录。这个别名非常有用,因为当你处理项目时,该项目或多或少会成为你的“临时家目录”。它应该像回家一样简单,就像去你真正的家一样,这里有一个别名: ``` alias cg='cd `git rev-parse --show-toplevel`' ``` -Now the command **cg** takes you to the top of your Git project, no matter how deep into its directory structure you have descended. +现在,命令 `cg` 将你带到 Git 项目的顶部,无论你下潜的目录结构有多深。 -### Change directories and view the contents at the same time +### 切换目录并同时查看目录内容 -It was once (allegedly) proposed by a leading scientist that we could solve many of the planet’s energy problems by harnessing the energy expended by geeks typing **cd** followed by **ls**. -It’s a common pattern, because generally when you change directories, you have the impulse or the need to see what’s around. +(据称)曾经由一位著名科学家提出,我们可以通过利用极客输入 `cd` 后跟 `ls` 消耗的能量来解决地球上的许多能量问题。 -But "walking" your computer’s directory tree doesn’t have to be a start-and-stop process. +这是一种常见的用法,因为通常当你更改目录时,你都会有查看周围的内容的冲动或需要。 -This one’s cheating, because it’s not an alias at all, but it’s a great excuse to explore Bash functions. While aliases are great for quick substitutions, Bash allows you to add local functions in your **.bashrc** file (or a separate functions file that you load into **.bashrc**, just as you do your aliases file). +但是在你的计算机的目录树中移动不一定是一个启停的过程。 -To keep things modular, create a new file called **~/.bash_functions** and then have your **.bashrc** load it: +这是一个作弊,因为它根本不是别名,但它是探索 Bash 功能的一个很好的借口。虽然别名非常适合快速替换,但 Bash 允许你在 `.bashrc` 文件中添加本地函数(或者你加载到 `.bashrc` 中的单独函数文件,就像你的别名文件一样)。 +为了保持模块化,创建一个名为 `~/.bash_functions` 的新文件,然后让你的 `.bashrc` 加载它: ``` if [ -e $HOME/.bash_functions ]; then @@ -389,8 +364,7 @@ if [ -e $HOME/.bash_functions ]; then fi ``` -In the functions file, add this code: - +在该函数文件中,添加这些代码: ``` function cl() { @@ -405,8 +379,7 @@ function cl() { } ``` -Load the function into your Bash session and then try it out: - +将函数加载到 Bash 会话中,然后尝试: ``` $ source ~/.bash_functions @@ -421,13 +394,13 @@ $ pwd /home/seth ``` -Functions are much more flexible than aliases, but with that flexibility comes the responsibility for you to ensure that your code makes sense and does what you expect. Aliases are meant to be simple, so keep them easy, but useful. For serious modifications to how Bash behaves, use functions or custom shell scripts saved to a location in your **PATH**. +函数比别名更灵活,但有了这种灵活性,你就有责任确保代码有意义并达到你的期望。别名是简单的,所以要保持简单,但有用。要严格修改 Bash 的行为,请使用保存到 `PATH` 环境变量中某个位置的函数或自定义 shell 脚本。 -For the record, there _are_ some clever hacks to implement the **cd** and **ls** sequence as an alias, so if you’re patient enough, then the sky is the limit even using humble aliases. +为了记录,有一些巧妙的黑客来实现 `cd` 和 `ls` 序列作为别名,所以如果你足够耐心,那么即使使用卑微的别名,天空也是极限。 -### Start aliasing and functioning +### 开始别名化和函数化吧 -Customizing your environment is what makes Linux fun, and increasing your efficiency is what makes Linux life-changing. Get started with simple aliases, graduate to functions, and post your must-have aliases in the comments! +可以定制你的环境是让 Linux 变得如此有趣的原因,提高效率是 Linux 改变生活的原因。开始使用简单的别名,逐步完成功能,并在评论中发布您必须拥有的别名! -------------------------------------------------------------------------------- @@ -435,7 +408,7 @@ via: https://opensource.com/article/19/7/bash-aliases 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[wxy](https://github.com/wxy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2577de23ab49252d006d186a7120e99af0c6124b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Aug 2019 01:13:44 +0800 Subject: [PATCH 252/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190802=20Use=20?= =?UTF-8?q?Postfix=20to=20get=20email=20from=20your=20Fedora=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190802 Use Postfix to get email from your Fedora system.md --- ...ix to get email from your Fedora system.md | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 sources/tech/20190802 Use Postfix to get email from your Fedora system.md diff --git a/sources/tech/20190802 Use Postfix to get email from your Fedora system.md b/sources/tech/20190802 Use Postfix to get email from your Fedora system.md new file mode 100644 index 0000000000..e9c4336a5b --- /dev/null +++ b/sources/tech/20190802 Use Postfix to get email from your Fedora system.md @@ -0,0 +1,179 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use Postfix to get email from your Fedora system) +[#]: via: (https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/) +[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) + +Use Postfix to get email from your Fedora system +====== + +![][1] + +Communication is key. Your computer might be trying to tell you something important. But if your mail transport agent ([MTA][2]) isn’t properly configured, you might not be getting the notifications. Postfix is a MTA [that’s easy to configure and known for a strong security record][3]. Follow these steps to ensure that email notifications sent from local services will get routed to your internet email account through the Postfix MTA. + +### Install packages + +Use _dnf_ to install the required packages ([you configured][4] _[sudo][4]_[, right?][4]): + +``` +$ sudo -i +# dnf install postfix mailx +``` + +If you previously had a different MTA configured, you may need to set Postfix to be the system default. Use the _alternatives_ command to set your system default MTA: + +``` +$ sudo alternatives --config mta +There are 2 programs which provide 'mta'. + Selection Command +*+ 1 /usr/sbin/sendmail.sendmail + 2 /usr/sbin/sendmail.postfix +Enter to keep the current selection[+], or type selection number: 2 +``` + +### Create a _password_maps_ file + +You will need to create a Postfix lookup table entry containing the email address and password of the account that you want to use to for sending email: + +``` +# MY_EMAIL_ADDRESS=glb@gmail.com +# MY_EMAIL_PASSWORD=abcdefghijklmnop +# MY_SMTP_SERVER=smtp.gmail.com +# MY_SMTP_SERVER_PORT=587 +# echo "[$MY_SMTP_SERVER]:$MY_SMTP_SERVER_PORT $MY_EMAIL_ADDRESS:$MY_EMAIL_PASSWORD" >> /etc/postfix/password_maps +# chmod 600 /etc/postfix/password_maps +# unset MY_EMAIL_PASSWORD +# history -c +``` + +If you are using a Gmail account, you’ll need to configure an “app password” for Postfix, rather than using your gmail password. See “[Sign in using App Passwords][5]” for instructions on configuring an app password. + +Next, you must run the _postmap_ command against the Postfix lookup table to create or update the hashed version of the file that Postfix actually uses: + +``` +# postmap /etc/postfix/password_maps +``` + +The hashed version will have the same file name but it will be suffixed with _.db_. + +### Update the _main.cf_ file + +Update Postfix’s _main.cf_ configuration file to reference the Postfix lookup table you just created. Edit the file and add these lines. + +``` +relayhost = smtp.gmail.com:587 +smtp_tls_security_level = verify +smtp_tls_mandatory_ciphers = high +smtp_tls_verify_cert_match = hostname +smtp_sasl_auth_enable = yes +smtp_sasl_security_options = noanonymous +smtp_sasl_password_maps = hash:/etc/postfix/password_maps +``` + +The example assumes you’re using Gmail for the _relayhost_ setting, but you can substitute the correct hostname and port for the mail host to which your system should hand off mail for sending. + +For the most up-to-date details about the above configuration options, see the man page: + +``` +$ man postconf.5 +``` + +### Enable, start, and test Postfix + +After you have updated the main.cf file, enable and start the Postfix service: + +``` +# systemctl enable --now postfix.service +``` + +You can then exit your _sudo_ session as root using the _exit_ command or **Ctrl+D**. You should now be able to test your configuration with the _mail_ command: + +``` +$ echo 'It worked!' | mail -s "Test: $(date)" glb@gmail.com +``` + +### Update services + +If you have services like [logwatch][6], [mdadm][7], [fail2ban][8], [apcupsd][9] or [certwatch][10] installed, you can now update their configurations so that their email notifications will go to your internet email address. + +Optionally, you may want to configure all email that is sent to your local system’s root account to go to your internet email address. Add this line to the _/etc/aliases_ file on your system (you’ll need to use _sudo_ to edit this file, or switch to the _root_ account first): + +``` +root: glb+root@gmail.com +``` + +Now run this command to re-read the aliases: + +``` +# newaliases +``` + + * TIP: If you are using Gmail, you can [add an alpha-numeric mark][11] between your username and the **@** symbol as demonstrated above to make it easier to identify and filter the email that you will receive from your computer(s). + + + +### Troubleshooting + +**View the mail queue:** + +``` +$ mailq +``` + +**Clear all email from the queues:** + +``` +# postsuper -d ALL +``` + +**Filter the configuration settings for interesting values:** + +``` +$ postconf | grep "^relayhost\|^smtp_" +``` + +**View the _postfix/smtp_ logs:** + +``` +$ journalctl --no-pager -t postfix/smtp +``` + +**Reload _postfix_ after making configuration changes:** + +``` +$ systemctl reload postfix +``` + +* * * + +_Photo by _[_Sharon McCutcheon_][12]_ on [Unsplash][13]_. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/ + +作者:[Gregory Bartholomew][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/glb/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/postfix-816x345.jpg +[2]: https://en.wikipedia.org/wiki/Message_transfer_agent +[3]: https://en.wikipedia.org/wiki/Postfix_(software) +[4]: https://fedoramagazine.org/howto-use-sudo/ +[5]: https://support.google.com/accounts/answer/185833 +[6]: https://src.fedoraproject.org/rpms/logwatch +[7]: https://fedoramagazine.org/mirror-your-system-drive-using-software-raid/ +[8]: https://fedoraproject.org/wiki/Fail2ban_with_FirewallD +[9]: https://src.fedoraproject.org/rpms/apcupsd +[10]: https://www.linux.com/learn/automated-certificate-expiration-checks-centos +[11]: https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html +[12]: https://unsplash.com/@sharonmccutcheon?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[13]: https://unsplash.com/search/photos/envelopes?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText From fe275afd981738efa356eef10b613e2f37a22dad Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Aug 2019 01:14:59 +0800 Subject: [PATCH 253/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190802=20Unders?= =?UTF-8?q?tanding=20file=20paths=20and=20how=20to=20use=20them=20in=20Lin?= =?UTF-8?q?ux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190802 Understanding file paths and how to use them in Linux.md --- ...file paths and how to use them in Linux.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20190802 Understanding file paths and how to use them in Linux.md diff --git a/sources/tech/20190802 Understanding file paths and how to use them in Linux.md b/sources/tech/20190802 Understanding file paths and how to use them in Linux.md new file mode 100644 index 0000000000..1332b99161 --- /dev/null +++ b/sources/tech/20190802 Understanding file paths and how to use them in Linux.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Understanding file paths and how to use them in Linux) +[#]: via: (https://opensource.com/article/19/8/understanding-file-paths-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/jrbarnett) + +Understanding file paths and how to use them in Linux +====== +If you're used to drag-and-drop environments, then file paths may be +frustrating. Learn here how they work, and some basic tricks to make +using them easier. +![open source button on keyboard][1] + +A file path is the human-readable representation of a file or folder’s location on a computer system. You’ve seen file paths, although you may not realize it, on the internet: An internet URL, despite ancient battles fought by proprietary companies like AOL and CompuServe, is actually just a path to a (sometimes dynamically created) file on someone else’s computer. For instance, when you navigate to example.com/index.html, you are actually viewing the HTML file index.html, probably located in the **var** directory on the example.com server. Files on your computer have file paths, too, and this article explains how to understand them, and why they’re important. + +When computers became a household item, they took on increasingly stronger analogies to real-world models. For instance, instead of accounts and directories, personal computers were said to have _desktops_ and _folders_, and eventually, people developed the latent impression that the computer was a window into a virtual version of the real world. It’s a useful analogy, because everyone is familiar with the concept of desktops and file cabinets, while fewer people understand digital storage and memory addresses. + +Imagine for a moment that you invented computers or operating systems. You would probably have created a way to group common files together, because humans love to classify and organize things. Since all files on a computer are on the hard drive, the biggest container you probably would have designated is the drive itself; that is, all files on a drive are in the drive. + +As it turns out, the creators of UNIX had the same instinct, only they called these units of organization _directories_ or _folders_. All files on your computer’s drive are in the system’s base (root) directory. Even external drives are brought into this root directory, just as you might place important related items into one container if you were organizing your office space or hobby room. + +Files and folders on Linux are given names containing the usual components like the letters, numbers, and other characters on a keyboard. But when a file is inside a folder, or a folder is inside another folder, the **/** character shows the relationship between them. That’s why you often see files listed in the format **/usr/bin/python3** or **/etc/os-release**. The forward slashes indicate that one item is stored inside of the item preceding it. + +Every file and folder on a [POSIX][2] system can be expressed as a path. If I have the file **penguin.jpg** in the **photos** folder within my home directory, and my username is **seth**, then the file path can be expressed as **/home/seth/Pictures/penguin.jpg**. + +Most users interact primarily with their home directory, so the tilde (**~**) character is used as a shorthand. That fact means that I can express my example penguin picture as either **/home/seth/Pictures/penguin.jpg** or as **~/Pictures/penguin.jpg**. + +### Practice makes perfect + +Computers use file paths whether you’re thinking of what that path is or not. There’s not necessarily a reason for you to have to think of files in terms of a path. However, file paths are part of a useful framework for understanding how computers work, and learning to think of files in a path can be useful if you’re looking to become a developer (you need to understand the paths to support libraries), a web designer (file paths ensure you’re pointing your HTML to the appropriate CSS), a system administrator, or just a power user. + +#### When in doubt, drag and drop + +If you’re not used to thinking of the structure of your hard drive as a path, then it can be difficult to construct a full path for an arbitrary file. On Linux, most file managers either natively display (or have the option to) the full file path to where you are, which helps reinforce the concept on a daily basis: + +![Dolphin file manager][3] + +opensource.com + +If you’re using a terminal, it might help to know that modern terminals, unlike the teletype machines they emulate, can accept files by way of drag-and-drop. When you copying a file to a server over SSH, for instance, and you’re not certain of how to express the file path, try dragging the file from your GUI file manager into your terminal. The GUI object representing the file gets translated into a text file path in the terminal: + +![Terminals accept drag and drop actions][4] + +opensource.com + +Don’t waste time typing in guesses. Just drag and drop. + +#### **Tab** is your friend + +On a system famous for eschewing three-letter commands when two or even one-letter commands will do, rest assured that no seasoned POSIX user _ever_ types out everything. In the Bash shell, the **Tab** key means _autocomplete_, and autocomplete never lies. For instance, to type the example **penguin.jpg** file’s location, you can start with: + + +``` +$ ~/Pi +``` + +and then press the **Tab** key. As long as there is only one item starting with Pi, the folder **Pictures** autocompletes for you. + +If there are two or more items starting with the letters you attempt to autocomplete, then Bash displays what those items are. You manually type more until you reach a unique string that the shell can safely autocomplete. The best thing about this process isn’t necessarily that it saves you from typing (though that’s definitely a selling point), but that autocomplete is never wrong. No matter how much you fight the computer to autocomplete something that isn’t there, in the end, you’ll find that autocomplete understands paths better than anyone. + +Assume that you, in a fit of late-night reorganization, move **penguin.jpg** from your **~/Pictures** folder to your **~/Spheniscidae** directory. You fall asleep and wake up refreshed, but with no memory that you’ve reorganized, so you try to copy **~/Pictures/penguin.jpg** to your web server, in the terminal, using autocomplete. + +No matter how much you pound on the **Tab** key, Bash refuses to autocomplete. The file you want simply does not exist in the location where you think it exists. That feature can be helpful when you’re trying to point your web page to a font or CSS file _you were sure_ you’d uploaded, or when you’re pointing a compiler to a library you’re _100% positive_ you already compiled. + +#### This isn’t your grandma’s autocompletion + +If you like Bash’s autocompletion, you’ll come to scoff at it once you try the autocomplete in [Zsh][5]. The Z shell, along with the [Oh My Zsh][6] site, provides a dynamic experience filled with plugins for specific programming languages and environments, visual themes packed with useful feedback, and a vibrant community of passionate shell users: + +![A modest Zsh configuration.][7] + +If you’re a visual thinker and find the display of most terminals stagnant and numbing, Zsh may well change the way you interact with your computer. + +### Practice more + +File paths are important on any system. You might be a visual thinker who prefers to think of files as literal documents inside of literal folders, but the computer sees files and folders as named tags in a pool of data. The way it identifies one collection of data from another is by following its designated path. If you understand these paths, you can also come to visualize them, and you can speak the same language as your OS, making file operations much, much faster. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/understanding-file-paths-linux + +作者:[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/sethhttps://opensource.com/users/jrbarnett +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx (open source button on keyboard) +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/sites/default/files/images/dolphin-file-path.jpg +[4]: https://opensource.com/sites/default/files/images/terminal-drag-drop.jpg +[5]: https://opensource.com/article/18/9/tips-productivity-zsh +[6]: https://ohmyz.sh/ +[7]: https://opensource.com/sites/default/files/uploads/zsh-simple.jpg (A modest Zsh configuration.) From f06375b3e9fe09080ebe2506179e74f876d2d4a3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Aug 2019 01:15:48 +0800 Subject: [PATCH 254/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190802=20New=20?= =?UTF-8?q?research=20article=20type=20embeds=20live=20code=20and=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190802 New research article type embeds live code and data.md --- ... article type embeds live code and data.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/tech/20190802 New research article type embeds live code and data.md diff --git a/sources/tech/20190802 New research article type embeds live code and data.md b/sources/tech/20190802 New research article type embeds live code and data.md new file mode 100644 index 0000000000..a6e256f9b4 --- /dev/null +++ b/sources/tech/20190802 New research article type embeds live code and data.md @@ -0,0 +1,79 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (New research article type embeds live code and data) +[#]: via: (https://opensource.com/article/19/8/reproducible-research) +[#]: author: (Giuliano Maciocci https://opensource.com/users/gmacioccihttps://opensource.com/users/etsang) + +New research article type embeds live code and data +====== +The non-profit scientific research publication platform eLife recently +announced the Reproducible Document Stack (RDS). +![magnifying glass on computer screen][1] + +While science is supposed to be about building on each other's findings to improve our understanding of the world around us, reproducing and reusing previously published results remains challenging, even in the age of the internet. The basic format of the scientific paper—the primary means through which scientists communicate their findings—has more or less remained the same since the first papers were published in the 18th century. + +This is particularly problematic because, thanks to the technological advancements in research over the last two decades, the richness and sophistication of the methods used by researchers have far outstripped the publishing industry's ability to publish them in full. Indeed, the Methods section in research articles remains primarily a huge section of text that does not reflect the complexity or facilitate the reuse of the methods used to obtain the published results. + +### Working together on a solution + +To counter these challenges, eLife [teamed up][2] with [Substance][3] and [Stencila][4] in 2017 to develop a stack of open source tools for authoring, compiling, and publishing computationally reproducible manuscripts online. Our vision for the project is to create a new type of research article that embeds live code, data, and interactive figures within the flow of the traditional manuscript and to provide authors and publishers with the tools to support this new format throughout the publishing lifecycle. + +As a result of our collaboration, we published eLife's [first computationally reproducible article][5] in February 2019. It was based on [a paper][6] in the [Reproducibility Project: Cancer Biology][7] collection. The reproducible version of the article showcases some of the possibilities with the new RDS tools: scientists can share the richness of their research more fully, telling the complete story of their work, while others can directly interact with the authors, interrogate them, and build on their code and data with minimal effort. + +The response from the research community to the release of our first reproducible manuscript was overwhelmingly positive. Thousands of scientists explored the paper's inline code re-execution abilities by manipulating its plots, and several authors approached us directly to ask how they might publish a reproducible version of their own manuscripts. + +Encouraged by this interest and feedback, [in May we announced][8] our roadmap towards an open, scalable infrastructure for the publication of computationally reproducible articles. The goal of this next phase in the RDS project is to ship researcher-centered, publisher-friendly open source solutions that will allow for the hosting and publication of reproducible documents, at scale, by anyone. This includes: + + 1. Developing conversion, rendering, and authoring tools to allow researchers to compose articles from multiple starting points, including GSuite tools, Microsoft Word, and Jupyter notebooks + 2. Optimizing containerization tools to provide reliant and performant reproducible computing environments + 3. Building the backend infrastructure needed to enable the options for live-code re-execution in the browser and PDF export at the same time + 4. Formalizing an open, portable format (DAR) for reproducible document archives + + + +### What's next, and how can you get involved? + +Our first step is to publish reproducible articles as companions of already accepted papers. We will endeavor to accept submissions of reproducible manuscripts in the form of DAR files by the end of 2019. You can learn more about the key areas of innovation in this next phase of development in our article "[Reproducible Document Stack: Towards a scalable solution for reproducible articles][8]." + +The RDS project is being built with three core principles in mind: + + * **Openness:** We prioritize building on top of existing open technologies as well as engaging and involving a community of open source technologists and researchers to create an inclusive tool stack that evolves continuously based on user needs. + * **Interoperability:** We want to make it easy for scientists to create and for publishers to publish reproducible documents from multiple starting points. + * **Modularity:** We're developing tools within the stack in such a way that they can be taken out and integrated into other publisher workflows. + + + +And you can help. We welcome all developers and researchers who wish to contribute to this exciting project. Since the release of eLife's first reproducible article, we have been actively collecting feedback from both the research and open source communities, and this has been (and will continue to be) crucial to shaping the development of the RDS. + +If you'd like to stay up to date on our progress, please sign up for the [RDS community newsletter][9]. For any questions or comments, please [contact us][10]. We look forward to having you with us on the journey. + +* * * + +_This article is based in part on "[Reproducible Document Stack: Towards a scalable solution for reproducible articles][8]" by Giuliano Maciocci, Emmy Tsang, Nokome Bentley, and Michael Aufreiter._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/reproducible-research + +作者:[Giuliano Maciocci][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/gmacioccihttps://opensource.com/users/etsang +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen) +[2]: https://elifesciences.org/for-the-press/e6038800/elife-supports-development-of-open-technology-stack-for-publishing-reproducible-manuscripts-online +[3]: https://substance.io/ +[4]: https://stenci.la/ +[5]: https://repro.elifesciences.org/example.html +[6]: https://elifesciences.org/articles/30274 +[7]: https://osf.io/e81xl/wiki/home/ +[8]: https://elifesciences.org/labs/b521cf4d/reproducible-document-stack-towards-a-scalable-solution-for-reproducible-articles +[9]: https://crm.elifesciences.org/crm/RDS-updates +[10]: mailto:innovation@elifesciences.org From 9ca266cc33b8956c1ab46ffc664e8fe96851a0eb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Aug 2019 01:16:24 +0800 Subject: [PATCH 255/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190802=20Gettin?= =?UTF-8?q?g=20started=20with=20the=20BBC=20Microbit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190802 Getting started with the BBC Microbit.md --- ...2 Getting started with the BBC Microbit.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sources/tech/20190802 Getting started with the BBC Microbit.md diff --git a/sources/tech/20190802 Getting started with the BBC Microbit.md b/sources/tech/20190802 Getting started with the BBC Microbit.md new file mode 100644 index 0000000000..6e32536f04 --- /dev/null +++ b/sources/tech/20190802 Getting started with the BBC Microbit.md @@ -0,0 +1,92 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with the BBC Microbit) +[#]: via: (https://opensource.com/article/19/8/getting-started-bbc-microbit) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +Getting started with the BBC Microbit +====== +Tiny open hardware board makes it easy for anyone to learn to code with +fun projects. +![BBC Microbit board][1] + +Whether you are a maker, a teacher, or someone looking to expand your Python skillset, the [BBC:Microbit][2] has something for you. It was designed by the British Broadcasting Corporation to support computer education in the United Kingdom. + +The [open hardware board][3] is half the size of a credit card and packed with an ARM processor, a three-axis accelerometer, a three-axis magnetometer, a Micro USB port, a 25-pin edge connector, and 25 LEDs in a 5x5 array. + +I purchased my Microbit online for $19.99. It came in a small box and included a battery pack and a USB-to-Micro USB cable. It connects to my Linux laptop very easily and shows up as a USB drive. + +![BBC Microbit board][4] + +### Start coding + +Microbit's website offers several ways to start exploring and [coding][5] quickly, including links to [third-party code editors][6] and its two official editors: [Microsoft MakeCode][7] and [MicroPython][8], which both operate in any browser using any computer (including a Chromebook). MakeCode is a block coding editor, like the popular Scratch interface, and MicroPython is a Python 3 implementation that includes a small subset of the Python library and is designed to work on microcontrollers. Both save your created code as a HEX file, which you can download and copy to the device, just as you would with any other file you are writing to a USB drive. + +The [documentation][9] suggests using the [Mu Python editor][10], which I [wrote about][11] last year, because it's designed to work with the Microbit. One advantage of the Mu editor is it uses the Python REPL (read–evaluate–print loop) to enter code directly to the device, rather than having to download and copy it over. + +When you're writing code for the Microbit, it's important to begin each program with **From microbit import ***. This is true even when you're using the REPL in Mu because it imports all the objects and functions in the Microbit library. + +![Beginning a Microbit project][12] + +### Example projects + +The documentation provides a wealth of code examples and [projects][13] that got me started hacking these incredible devices right away. + +You can start out easy by getting the Microbit to say "Hello." Load your new code using the **Flash** button at the top of the Mu editor. + +![Flash button loads new code][14] + +There are many built-in [images][15] you can load, and you can make your own, too. To display an image, enter the code **display.show(Image.IMAGE)** where IMAGE is the name of the image you want to use. For example, **display.show(Image.HEART)** shows the built-in heart image. + +The **sleep** command adds time between display commands, which I found useful for making the display work a little slower. + +Here is a simple **for** loop with images and a scrolling banner for my favorite NFL football team, the Buffalo Bills. In the code, **display** is a Python object that controls the 25 LEDs on the front of the Microbit. The **show** method within the **display** object indicates which image to show. The **scroll** within the **display** object scrolls the string _"The Buffalo Bills are my team"_ across the LED array. + +![Code for Microbit to display Buffalo Bills tribute][16] + +The Microbit also has two buttons, Button A and Button B, that can be programmed to perform many tasks. Here is a simple example. + +![Code to program Microbit buttons][17] + +By attaching a speaker, the device can speak, beep, and play music. You can also program it to function as a compass and accelerometer and to respond to gestures and movement. Check the documentation for more information about these and other capabilities. + +### Get involved + +Research studies have found that 90% of [teachers in Denmark][18] and [students in the United Kingdom][19] learned to code by using the Microbit. As pressure mounts for programming to become a larger part of the K-12 school curriculum, inexpensive devices like the Microbit can play an important role in achieving that goal. If you want to get involved with the Microbit, be sure to join its [developer community][20]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/getting-started-bbc-microbit + +作者:[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/bbc_microbit_board_hardware.jpg?itok=3HiIupG- (BBC Microbit board) +[2]: https://microbit.org/ +[3]: https://tech.microbit.org/hardware/ +[4]: https://opensource.com/sites/default/files/uploads/image-1.jpg (BBC Microbit board) +[5]: https://microbit.org/code/ +[6]: https://microbit.org/code-alternative-editors/ +[7]: https://makecode.microbit.org/ +[8]: https://python.microbit.org/v/1.1 +[9]: https://microbit-micropython.readthedocs.io/en/latest/tutorials/introduction.html +[10]: https://codewith.mu/en/ +[11]: https://opensource.com/article/18/8/getting-started-mu-python-editor-beginners +[12]: https://opensource.com/sites/default/files/uploads/microbit1_frommicrobitimport.png (Beginning a Microbit project) +[13]: https://microbit.org/ideas/ +[14]: https://opensource.com/sites/default/files/uploads/microbit2_hello.png (Flash button loads new code) +[15]: https://microbit-micropython.readthedocs.io/en/latest/tutorials/images.html +[16]: https://opensource.com/sites/default/files/uploads/microbit3_bills.png (Code for Microbit to display Buffalo Bills tribute) +[17]: https://opensource.com/sites/default/files/uploads/microbit4_buttons.png (Code to program Microbit buttons) +[18]: https://microbit.org/assets/2019-03-05-ultrabit.pdf +[19]: https://www.bbc.co.uk/mediacentre/latestnews/2017/microbit-first-year +[20]: https://tech.microbit.org/get-involved/where-to-find/ From 87523ba22e82bee305546ed15b81dc5c60b837ef Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Aug 2019 01:18:29 +0800 Subject: [PATCH 256/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=20IBM=20?= =?UTF-8?q?fuses=20its=20software=20with=20Red=20Hat=E2=80=99s=20to=20laun?= =?UTF-8?q?ch=20hybrid-cloud=20juggernaut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190801 IBM fuses its software with Red Hat-s to launch hybrid-cloud juggernaut.md --- ...Hat-s to launch hybrid-cloud juggernaut.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/talk/20190801 IBM fuses its software with Red Hat-s to launch hybrid-cloud juggernaut.md diff --git a/sources/talk/20190801 IBM fuses its software with Red Hat-s to launch hybrid-cloud juggernaut.md b/sources/talk/20190801 IBM fuses its software with Red Hat-s to launch hybrid-cloud juggernaut.md new file mode 100644 index 0000000000..c1c3ba375e --- /dev/null +++ b/sources/talk/20190801 IBM fuses its software with Red Hat-s to launch hybrid-cloud juggernaut.md @@ -0,0 +1,68 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (IBM fuses its software with Red Hat’s to launch hybrid-cloud juggernaut) +[#]: via: (https://www.networkworld.com/article/3429596/ibm-fuses-its-software-with-red-hats-to-launch-hybrid-cloud-juggernaut.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +IBM fuses its software with Red Hat’s to launch hybrid-cloud juggernaut +====== +IBM is starting a potentially huge run at hybrid cloud by tying more than 100 of its products to the Red Hat OpenShift platform. +![Hans \(CC0\)][1] + +IBM has wasted no time aligning its own software with its newly acquired [Red Hat technoloogy][2],saying its portfolio would be transformed to work cloud natively and augmented to run on Red Hat’s OpenShift platform. + +IBM in July [finalized its $34 billion][3] purchase of Red Hat and says it will use the Linux powerhouse's open-source know-how and Linux expertise to grow larger scale hybrid-cloud customer projects and to create a web of partnerships to simplify carrying them out. + +**[ Check out [What is hybrid cloud computing][4] and learn [what you need to know about multi-cloud][5]. | Get regularly scheduled insights by [signing up for Network World newsletters][6]. ]** + +The effort has started with IBM bundling Red Hat’s Kubernetes-based OpenShift Container Platform with more than 100 IBM products in what it calls Cloud Paks. OpenShift lets enterprise customers deploy and manage containers on their choice of infrastructure of choice, be it private or public clouds, including AWS, Microsoft Azure, Google Cloud Platform, Alibaba and IBM Cloud. + +The prepackaged Cloud Paks include a secured Kubernetes container and containerized IBM middleware designed to let customers quickly spin-up enterprise-ready containers, the company said.  + +Five Cloud Paks exist today: Cloud Pak for Data, Application, Integration, Automation and Multicloud Management. The Paks will ultimately include IBM’s DB2, WebSphere, [API Connect][7], Watson Studio, [Cognos Analytics][8] and more. + +In addition, IBM said it will bring the Red Hat OpenShift Container Platform over to IBM Z mainframes and IBM LinuxONE. Together these two platforms power about 30 billion transactions a day globally, [IBM said][9].  Some of the goals here are to increase container density and help customers build containerized applications that can scale vertically and horizontally. + +“The vision is for OpenShift-enabled IBM software to become the foundational building blocks clients can use to transform their organizations and build across hybrid, multicloud environments,” Hillery Hunter, VP & CTO IBM Cloud said in an [IBM blog][10] about the announcement. + +OpenShift is the underlying Kubernetes and Container orchestration layer that supports the containerized software, she wrote, and placing the Cloud Paks atop Red Hat OpenShift gives IBM a broad reach immediately. "OpenShift is also where the common services such as logging, metering, and security that IBM Cloud Paks leverage let businesses effectively manage and understand their workloads,” Hunter stated. + +Analysts said the moves were expected but still extremely important for the company to ensure this acquisition is successful. + +“We expect IBM and Red Hat will do the obvious stuff first, and that’s what this mostly is,” said Lee Doyle, principal analyst at Doyle Research. "The challenge will be getting deeper integrations and taking the technology to the next level. What they do in the next six months to a year will be critical.” + +Over the last few years IBM has been evolving its strategy to major on-cloud computing and cognitive computing. Its argument against cloud providers like AWS, Microsoft Azure, and Google Cloud is that only 20 percent of enterprise workloads have so far moved to the cloud – the easy 20 percent. The rest are the difficult 80 percent of workloads that are complex, legacy applications, often mainframe based, that have run banking and big business for decades, wrote David Terrar, executive advisor for [Bloor Research][11]. "How do you transform those?" + +That background gives IBM enterprise expertise and customer relationships competitors don't. “IBM has been talking hybrid cloud and multicloud to these customers for a while, and the Red Hat move is like an injection of steroids to the strategy, " Terrar wrote. "When you add in its automation and cognitive positioning with Watson, and the real-world success with enterprise-grade blockchain implementations like TradeLens and the Food Trust network, I’d argue that IBM is positioning itself as the ‘Enterprise Cloud Company’.” + +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/3429596/ibm-fuses-its-software-with-red-hats-to-launch-hybrid-cloud-juggernaut.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://images.idgesg.net/images/article/2017/06/moon-2117426_1280-100726933-large.jpg +[2]: https://www.networkworld.com/article/3317517/the-ibm-red-hat-deal-what-it-means-for-enterprises.html +[3]: https://www.networkworld.com/article/3316960/ibm-closes-34b-red-hat-deal-vaults-into-multi-cloud.html +[4]: https://www.networkworld.com/article/3233132/cloud-computing/what-is-hybrid-cloud-computing.html +[5]: https://www.networkworld.com/article/3252775/hybrid-cloud/multicloud-mania-what-to-know.html +[6]: https://www.networkworld.com/newsletters/signup.html +[7]: https://www.ibm.com/cloud/api-connect +[8]: https://www.ibm.com/products/cognos-analytics +[9]: https://www.ibm.com/blogs/systems/announcing-our-direction-for-red-hat-openshift-for-ibm-z-and-linuxone/?cm_mmc=OSocial_Twitter-_-Systems_Systems+-+LinuxONE-_-WW_WW-_-OpenShift+IBM+Z+and+LinuxONE+BLOG+still+image&cm_mmca1=000001BT&cm_mmca2=10009456&linkId=71365692 +[10]: https://www.ibm.com/blogs/think/2019/08/ibm-software-on-any-cloud/ +[11]: https://www.bloorresearch.com/ +[12]: https://www.facebook.com/NetworkWorld/ +[13]: https://www.linkedin.com/company/network-world From c4327e40050e41601fb715e4e89a8d37087815a4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Aug 2019 01:19:16 +0800 Subject: [PATCH 257/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190801=20Self-o?= =?UTF-8?q?rganizing=20micro=20robots=20may=20soon=20swarm=20the=20industr?= =?UTF-8?q?ial=20IoT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190801 Self-organizing micro robots may soon swarm the industrial IoT.md --- ...obots may soon swarm the industrial IoT.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/talk/20190801 Self-organizing micro robots may soon swarm the industrial IoT.md diff --git a/sources/talk/20190801 Self-organizing micro robots may soon swarm the industrial IoT.md b/sources/talk/20190801 Self-organizing micro robots may soon swarm the industrial IoT.md new file mode 100644 index 0000000000..6c2d36337b --- /dev/null +++ b/sources/talk/20190801 Self-organizing micro robots may soon swarm the industrial IoT.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Self-organizing micro robots may soon swarm the industrial IoT) +[#]: via: (https://www.networkworld.com/article/3429200/self-organizing-micro-robots-may-soon-swarm-the-industrial-iot.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Self-organizing micro robots may soon swarm the industrial IoT +====== +Masses of ant-like, self-organizing, microbots could soon perform tasks such as push objects in factories, swarm industrial production-line trouble-spots, and report environmental data. +![Marc Delachaux / 2019 EPFL][1] + +Miniscule robots that can jump and crawl could soon be added to the [industrial internet of things][2]’ arsenal. The devices, a kind of printed circuit board with leg-like appendages, wouldn’t need wide networks to function but would self-organize and communicate efficiently, mainly with one another. + +Breakthrough inventions announced recently make the likelihood of these ant-like helpers a real possibility. + +**[ Also see: [What is edge computing?][3] and [How edge networking and IoT will reshape data centers][4] ]** + +### Vibration-powered micro robots + +The first invention is the ability to harness vibration from ultrasound and other sources, such as piezoelectric actuators, to get micro robots to respond to commands. The piezoelectric effect is when some kinds of materials generate an electrical charge in response to mechanical stresses. + +[Researchers at Georgia Tech have created 3D-printed micro robots][5] that are vibration powered. Only 0.07 inches long, the ant-like devices — which they call "micro-bristle-bots" — have four or six spindly legs and can can respond to differing quivering frequencies and move uniquely, based on their leg design. + +Researcher say the microbots could be used to sense environmental changes and to move materials. + +“As the micro-bristle-bots move up and down, the vertical motion is translated into a directional movement by optimizing the design of the legs,” says assistant professor Azadeh Ansari in a Georgia Tech article. Steering will be accomplished by frequencies and amplitudes. Jumping and swimming might also be possible, the researchers say. + +### Self-organizing micro robots that traverse any surface + +In another advancement, scientists at Ecole Polytechnique Fédérale de Lausanne (EPFL) say they have overcome limitations on locomotion and can now get [tiny, self-organizing robot devices to traverse any kind of surface][6]. Pushing objects in factories could be one use. + +The robots already jump, and now they self-organize. The Swiss school’s PCB-with-legs robots, en masse, figure for themselves how many fellow microbots to recruit for a particular job. Additionally, the ad hoc, swarming and self-organizing nature of the group means it can’t fail catastrophically—substitute robots get marshalled and join the work environment as necessary. + +Ad hoc networks are the way to go for robots. One advantage to an ad hoc network in IoT is that one can distribute the sensors randomly, and the sensors, which are basically nodes, figure out how to communicate. Routers don’t get involved. The nodes sample to find out which other nodes are nearby, including how much bandwidth is needed. + +The concept works on the same principal as how a marketer samples public opinion by just asking a representative group what they think, not everyone. Ants, too, size their nests like that—they bump into other ants, never really counting all of their neighbors. + +It’s a strong networking concept for locations where the sensor can get moved inadvertently. [I used the example of environmental sensors being strewn randomly in an active volcano][7] when I wrote about the theory some years ago. + +The Swiss robots (developed in conjunction with Osaka University) use the same concept. They, too, can travel to places requiring the environmental observation. Heat spots in a factory is one example. The collective intelligence also means one could conceivably eliminate GPS or visual feedback, which is unlike current aerial drone technology. + +### Even smaller industrial robots + +University of Pennsylvania professor Marc Miskin, presenting at the American Physical Society in March, said he is working on even smaller robots. + +“They could crawl into cellphone batteries and clean and rejuvenate them,” writes [Kenneth Chang in a New York Times article][8]. “Millions of them in a petri dish could be used to test ideas in networking and communications.” + +**More about edge networking:** + + * [How edge networking and IoT will reshape data centers][4] + * [Edge computing best practices][9] + * [How edge computing can help secure the IoT][10] + + + +Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3429200/self-organizing-micro-robots-may-soon-swarm-the-industrial-iot.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://images.idgesg.net/images/article/2019/08/epfl-robot-ants-100807019-large.jpg +[2]: https://www.networkworld.com/article/3243928/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[3]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html +[4]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html +[5]: https://www.news.gatech.edu/2019/07/16/tiny-vibration-powered-robots-are-size-worlds-smallest-ant +[6]: https://actu.epfl.ch/news/robot-ants-that-can-jump-communicate-and-work-toge/ +[7]: https://www.networkworld.com/article/3098572/how-new-ad-hoc-networks-will-organize.html +[8]: https://www.nytimes.com/2019/04/30/science/microbots-robots-silicon-wafer.html +[9]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html +[10]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html +[11]: https://www.facebook.com/NetworkWorld/ +[12]: https://www.linkedin.com/company/network-world From b20f78af0ec75cd8197ce6a4c2a700e78f2633eb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 09:57:40 +0800 Subject: [PATCH 258/951] TSL&PRF @wxy --- ...731 Bash aliases you can-t live without.md | 61 +++++++++---------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/sources/tech/20190731 Bash aliases you can-t live without.md b/sources/tech/20190731 Bash aliases you can-t live without.md index f6a90c218e..232f0f2e59 100644 --- a/sources/tech/20190731 Bash aliases you can-t live without.md +++ b/sources/tech/20190731 Bash aliases you can-t live without.md @@ -1,21 +1,22 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Bash aliases you can’t live without) [#]: via: (https://opensource.com/article/19/7/bash-aliases) -[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/samwebstudiohttps://opensource.com/users/greg-phttps://opensource.com/users/greg-p) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) 不可或缺的 Bash 别名 ====== + > 厌倦了一遍又一遍地输入相同的长命令?你觉得在命令行上工作效率低吗?Bash 别名可以为你创造一个与众不同的世界。 -![bash logo on green background][1] +![](https://img.linux.net.cn/data/attachment/album/201908/03/095855ip0h0jpi5u9t3r00.jpg) Bash 别名是一种用新的命令补充或覆盖 Bash 命令的方法。Bash 别名使用户可以轻松地在 [POSIX][2] 终端中自定义其体验。它们通常定义在 `$HOME/.bashrc` 或 `$HOME/bash_aliases` 中(它是由 `$HOME/.bashrc` 加载的)。 -大多数发行版在新用户帐户的默认 `.bashrc` 文件中至少添加一些流行的别名。这些可以用来简单演示 Bash 别名的语法: +大多数发行版在新用户帐户的默认 `.bashrc` 文件中至少添加了一些流行的别名。这些可以用来简单演示 Bash 别名的语法: ``` alias ls='ls -F' @@ -30,7 +31,7 @@ $ source ~/.bashrc 否则,你可以关闭终端并重新打开它,以便重新加载其配置文件。 -使用 Bash 初始化脚本中定义的那些别名,然后你可以键入 `ll` 而得到 `ls -l` 的结果,当你键入 `ls` 时,得到也不是原来的 [ls][3] 的普通输出。 +通过 Bash 初始化脚本中定义的那些别名,你可以键入 `ll` 而得到 `ls -l` 的结果,当你键入 `ls` 时,得到也不是原来的 [ls][3] 的普通输出。 那些别名很棒,但它们只是浅尝辄止。以下是十大 Bash 别名,一旦你试过它们,你会发现再也不能离开它们。 @@ -44,18 +45,17 @@ $ touch ~/.bash_aliases 然后,确认这些代码出现在你的 `~/.bashrc` 文件当中: - ``` if [ -e $HOME/.bash_aliases ]; then     source $HOME/.bash_aliases fi ``` -如果你想亲自尝试本文中的任何别名,请将它们输入到 `.bash_aliases` 文件当中,然后使用 `source ~/.bashrc` 命令将它们加载到 Bash 会话中。 +如果你想亲自尝试本文中的任何别名,请将它们输入到 `.bash_aliases` 文件当中,然后使用 `source ~/.bashrc` 命令将它们加载到当前 Bash 会话中。 ### 按文件大小排序 -如果你一开始使用过 GNOME 中的 Nautilus、MacOS 中的 Finder 或 Windows 中的资源管理器等 GUI 文件管理器,那么你可能习惯按文件大小排序文件列表。你也可以在终端上做到这一点,但这条命令并不完全简洁。 +如果你一开始使用过 GNOME 中的 Nautilus、MacOS 中的 Finder 或 Windows 中的资源管理器等 GUI 文件管理器,那么你很可能习惯了按文件大小排序文件列表。你也可以在终端上做到这一点,但这条命令不是很简洁。 将此别名添加到 GNU 系统上的配置中: @@ -127,11 +127,11 @@ $ du -sh * | sort -h 实际上,即使在 Linux上,上面这个命令也很有用,因为使用 `ls` 列出的目录和符号链接的大小为 0,这可能不是你真正想要的信息。使用哪个看你自己的喜好。 -*感谢 Brad Alexander 的这个别名的想法。* +*感谢 Brad Alexander 提供的这个别名的思路。* ### 只查看挂载的驱动器 -`mount` 命令过去很简单。只需一个命令,你就可以获得计算机上所有已挂载的文件系统的列表,并且它经常用于概览连接到工作站有哪些驱动器。在过去看到超过三个或四个条目就令人印象深刻,因为大多数计算机没有比这更多的 USB 端口,因此这个结果还是比较好查看的。 +`mount` 命令过去很简单。只需一个命令,你就可以获得计算机上所有已挂载的文件系统的列表,它经常用于概览连接到工作站有哪些驱动器。在过去看到超过三、四个条目就会令人印象深刻,因为大多数计算机没有那么多的 USB 端口,因此这个结果还是比较好查看的。 现在计算机有点复杂,有 LVM、物理驱动器、网络存储和虚拟文件系统,`mount` 的结果就很难一目了然: @@ -158,7 +158,6 @@ alias mnt='mount | awk -F' ' '{ printf "%s\t%s\n",$1,$3; }' | column -t | egrep 此别名使用 `awk` 按列解析 `mount` 的输出,将输出减少到你可能想要查找的内容(挂载了哪些硬盘驱动器,而不是文件系统): - ``` $ mnt /dev/mapper/fedora-root  / @@ -184,7 +183,7 @@ $ mnt ### 在你的 grep 历史中查找命令 -有时你好不容易弄清楚了如何在终端完成某件事,并保证自己永远不会忘记你刚学到的东西。然后,一个小时过去之后你就完全忘记了你做了什么。 +有时你好不容易弄清楚了如何在终端完成某件事,并觉得自己永远不会忘记你刚学到的东西。然后,一个小时过去之后你就完全忘记了你做了什么。 搜索 Bash 历史记录是每个人不时要做的事情。如果你确切地知道要搜索的内容,可以使用 `Ctrl + R` 对历史记录进行反向搜索,但有时你无法记住要查找的确切命令。 @@ -230,9 +229,9 @@ query-letter.xml 如果你需要知道目录中有多少文件,那么该解决方案是 UNIX 命令构造的最典型示例之一:使用 `ls` 命令列出文件,用`-1` 选项将其输出控制为只有一列,然后输出到 `wc`(单词计数)命令的管道,以计算有多少行。 -这是 UNIX 理念如何允许用户使用小型的系统组件构建自己的解决方案的精彩演示。如果你碰巧每天都要做几次,这个命令组合也要输入很多字母,如果没有使用 `-R` 选项,它就不能完全用于目录,这会为输出引入新行并导致无用的结果。 +这是 UNIX 理念如何允许用户使用小型的系统组件构建自己的解决方案的精彩演示。如果你碰巧每天都要做几次,这个命令组合也要输入很多字母,如果没有使用 `-R` 选项,它就不能用于目录,这会为输出引入新行并导致无用的结果。 -相反,这个别名使这个过程变得简单: +而这个别名使这个过程变得简单: ``` alias count='find . -type f | wc -l' @@ -255,7 +254,7 @@ $ count 如果是这样,那么你就知道创建 Python 虚拟环境至少需要 53 次击键。 -这个数字有 49 次是多余的,很容易被两个名为 `ve` 和 `va` 的新别名所解决: +这个数字里有 49 次是多余的,它很容易被两个名为 `ve` 和 `va` 的新别名所解决: ``` alias ve='python3 -m venv ./venv' @@ -273,9 +272,9 @@ $ va ### 增加一个复制进度条 -每个人都会吐槽进度条,因为它们似乎总是不合时宜。然而,在内心深处,我们似乎都想要它们。UNIX 的 `cp` 命令没有进度条,但它有一个 `-v` 选项用于显示详细信息,它回显了复制的每个文件名称到终端。 这是一个相当不错的技巧,但是当你复制一个大文件并且想要了解有多少文件尚未传输时,它的作用就没那么大了。 +每个人都会吐槽进度条,因为它们似乎总是不合时宜。然而,在内心深处,我们似乎都想要它们。UNIX 的 `cp` 命令没有进度条,但它有一个 `-v` 选项用于显示详细信息,它回显了复制的每个文件名到终端。这是一个相当不错的技巧,但是当你复制一个大文件并且想要了解还有多少文件尚未传输时,它的作用就没那么大了。 -`pv` 命令可以在复制期间提供进度条,但它不常使用。另一方面,`rsync` 命令包含在几乎所有的 POSIX 系统的默认安装中,并且它被普遍认为是远程和本地复制文件的最智能方法之一。 +`pv` 命令可以在复制期间提供进度条,但它并不常用。另一方面,`rsync` 命令包含在几乎所有的 POSIX 系统的默认安装中,并且它被普遍认为是远程和本地复制文件的最智能方法之一。 更好的是,它有一个内置的进度条。 @@ -308,7 +307,7 @@ POSIX 使这很简单,因为垃圾桶是文件系统中可访问的一个实 alias tcn='mv --force -t ~/.local/share/Trash ' ``` -该别名使用一个鲜为人知的 `mv` 标志,使你能够提供作为最终移动目标的参数,而忽略了首先列出要移动的文件的通常要求。现在,你可以使用新命令将文件和文件夹移动到系统垃圾桶: +该别名使用一个鲜为人知的 `mv` 标志(`-t`),使你能够提供作为最终移动目标的参数,而忽略了首先列出要移动的文件的通常要求。现在,你可以使用新命令将文件和文件夹移动到系统垃圾桶: ``` $ ls @@ -318,19 +317,19 @@ $ ls bar ``` -现在文件已“消失”,但只有在你一头冷汗的时候才意识到你还需要它。此时,你可以从系统垃圾桶中抢救该文件;这肯定可以给 Bash 和 `mv` 开发人员提供帮助。 +现在文件已“消失”,只有在你一头冷汗的时候才意识到你还需要它。此时,你可以从系统垃圾桶中抢救该文件;这肯定可以给 Bash 和 `mv` 开发人员提供一些帮助。 **注意:**如果你需要一个具有更好的 FreeDesktop 兼容性的更强大的垃圾桶命令,请参阅 [Trashy][5]。 ### 简化 Git 工作流 -每个人都有一个独特的工作流程,但无论如何,通常都会有重复的任务。如果你定期使用 Git,那么你可能会发现自己经常重复的一些操作序列。也许你会发现自己回到主分支并整天一遍又一遍地拉取最新的变化,或者你可能发现自己创建标签然后将它们推到远端,抑或可能完全是其的什么东西。 +每个人都有自己独特的工作流程,但无论如何,通常都会有重复的任务。如果你经常使用 Git,那么你可能会发现自己经常重复的一些操作序列。也许你会发现自己回到主分支并整天一遍又一遍地拉取最新的变化,或者你可能发现自己创建了标签然后将它们推到远端,抑或可能完全是其它的什么东西。 无论让你厌倦一遍遍输入的 Git 魔咒是什么,你都可以通过 Bash 别名减轻一些痛苦。很大程度上,由于它能够将参数传递给钩子,Git 拥有着丰富的内省命令,可以让你不必在 Bash 中执行那些丑陋冗长的命令。 -例如,虽然你可能很难在 Bash 中找到项目的顶级目录(就 Bash 而言,它是一个完全随意的名称,因为计算机的绝对顶级是根目录),Git 可以通过简单的查询找到项目的顶级目录。如果你研究过 Git 钩子,你会发现自己能够找到 Bash 一无所知的各种信息,而你可以利用 Bash 别名来利用这些信息。 +例如,虽然你可能很难在 Bash 中找到项目的顶级目录(就 Bash 而言,它是一个完全随意的名称,因为计算机的绝对顶级是根目录),但 Git 可以通过简单的查询找到项目的顶级目录。如果你研究过 Git 钩子,你会发现自己能够找到 Bash 一无所知的各种信息,而你可以利用 Bash 别名来利用这些信息。 -这是一个来查找 Git 项目的顶级目录的别名,无论你当前在哪个项目中工作,都可以将目录切换为顶级目录,切换为主分支,并执行 Git 拉取: +这是一个来查找 Git 项目的顶级目录的别名,无论你当前在哪个项目中工作,都可以将目录改变为顶级目录,切换到主分支,并执行 Git 拉取: ``` alias startgit='cd `git rev-parse --show-toplevel` && git checkout master && git pull' @@ -338,7 +337,7 @@ alias startgit='cd `git rev-parse --show-toplevel` && git checkout master && git 这种别名绝不是一个普遍有用的别名,但它演示了一个相对简单的别名如何能够消除大量繁琐的导航、命令和等待提示。 -一个更简单,可能更通用的别名将使你返回到 Git 项目的顶级目录。这个别名非常有用,因为当你处理项目时,该项目或多或少会成为你的“临时家目录”。它应该像回家一样简单,就像去你真正的家一样,这里有一个别名: +一个更简单,可能更通用的别名将使你返回到 Git 项目的顶级目录。这个别名非常有用,因为当你在一个项目上工作时,该项目或多或少会成为你的“临时家目录”。它应该像回家一样简单,就像回你真正的家一样,这里有一个别名: ``` alias cg='cd `git rev-parse --show-toplevel`' @@ -348,13 +347,13 @@ alias cg='cd `git rev-parse --show-toplevel`' ### 切换目录并同时查看目录内容 -(据称)曾经由一位著名科学家提出,我们可以通过利用极客输入 `cd` 后跟 `ls` 消耗的能量来解决地球上的许多能量问题。 +(据称)曾经一位著名科学家提出过,我们可以通过收集极客输入 `cd` 后跟 `ls` 消耗的能量来解决地球上的许多能量问题。 这是一种常见的用法,因为通常当你更改目录时,你都会有查看周围的内容的冲动或需要。 -但是在你的计算机的目录树中移动不一定是一个启停的过程。 +但是在你的计算机的目录树中移动并不一定是一个走走停停的过程。 -这是一个作弊,因为它根本不是别名,但它是探索 Bash 功能的一个很好的借口。虽然别名非常适合快速替换,但 Bash 允许你在 `.bashrc` 文件中添加本地函数(或者你加载到 `.bashrc` 中的单独函数文件,就像你的别名文件一样)。 +这是一个作弊,因为它根本不是别名,但它是探索 Bash 功能的一个很好的借口。虽然别名非常适合快速替换一个命令,但 Bash 也允许你在 `.bashrc` 文件中添加本地函数(或者你加载到 `.bashrc` 中的单独函数文件,就像你的别名文件一样)。 为了保持模块化,创建一个名为 `~/.bash_functions` 的新文件,然后让你的 `.bashrc` 加载它: @@ -394,13 +393,13 @@ $ pwd /home/seth ``` -函数比别名更灵活,但有了这种灵活性,你就有责任确保代码有意义并达到你的期望。别名是简单的,所以要保持简单,但有用。要严格修改 Bash 的行为,请使用保存到 `PATH` 环境变量中某个位置的函数或自定义 shell 脚本。 +函数比别名更灵活,但有了这种灵活性,你就有责任确保代码有意义并达到你的期望。别名是简单的,所以要保持简单而有用。要正式修改 Bash 的行为,请使用保存到 `PATH` 环境变量中某个位置的函数或自定义的 shell 脚本。 -为了记录,有一些巧妙的黑客来实现 `cd` 和 `ls` 序列作为别名,所以如果你足够耐心,那么即使使用卑微的别名,天空也是极限。 +附注,有一些巧妙的奇技淫巧来实现 `cd` 和 `ls` 序列作为别名,所以如果你足够耐心,那么即使是一个简单的别名也永无止限。 ### 开始别名化和函数化吧 -可以定制你的环境是让 Linux 变得如此有趣的原因,提高效率是 Linux 改变生活的原因。开始使用简单的别名,逐步完成功能,并在评论中发布您必须拥有的别名! +可以定制你的环境使得 Linux 变得如此有趣,提高效率使得 Linux 可以改变生活。开始使用简单的别名,进而使用函数,并在评论中发布你必须拥有的别名! -------------------------------------------------------------------------------- @@ -409,11 +408,11 @@ via: https://opensource.com/article/19/7/bash-aliases 作者:[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/) 荣誉推出 -[a]: https://opensource.com/users/sethhttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/samwebstudiohttps://opensource.com/users/greg-phttps://opensource.com/users/greg-p +[a]: https://opensource.com/users/seth [b]: https://github.com/lujun9972 [1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background) [2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains From af93512709a76c8fee269bad591dd0a646dfaec4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 10:02:56 +0800 Subject: [PATCH 259/951] TSL&PRF @wxy --- .../tech/20190731 Bash aliases you can-t live without.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20190731 Bash aliases you can-t live without.md (100%) diff --git a/sources/tech/20190731 Bash aliases you can-t live without.md b/translated/tech/20190731 Bash aliases you can-t live without.md similarity index 100% rename from sources/tech/20190731 Bash aliases you can-t live without.md rename to translated/tech/20190731 Bash aliases you can-t live without.md From 09aa2370922039ed74ff7b39661e7532225cdf1b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 10:07:11 +0800 Subject: [PATCH 260/951] PUB @wxy https://linux.cn/article-11179-1.html --- .../20190731 Bash aliases you can-t live without.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190731 Bash aliases you can-t live without.md (99%) diff --git a/translated/tech/20190731 Bash aliases you can-t live without.md b/published/20190731 Bash aliases you can-t live without.md similarity index 99% rename from translated/tech/20190731 Bash aliases you can-t live without.md rename to published/20190731 Bash aliases you can-t live without.md index 232f0f2e59..056c8a2006 100644 --- a/translated/tech/20190731 Bash aliases you can-t live without.md +++ b/published/20190731 Bash aliases you can-t live without.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11179-1.html) [#]: subject: (Bash aliases you can’t live without) [#]: via: (https://opensource.com/article/19/7/bash-aliases) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From bd9d70120309a0898fa4485ca0655ce78c8e89dd Mon Sep 17 00:00:00 2001 From: WWWN Date: Sat, 3 Aug 2019 10:42:35 +0800 Subject: [PATCH 261/951] Update 20190724 3 types of metric dashboards for DevOps teams.md --- ...s of metric dashboards for DevOps teams.md | 80 ++++++++++--------- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md b/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md index e54f0455f7..138b315c37 100644 --- a/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md +++ b/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md @@ -1,73 +1,78 @@ -[#]: collector: (lujun9972) -[#]: translator: (hello-wn) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 types of metric dashboards for DevOps teams) -[#]: via: (https://opensource.com/article/19/7/dashboards-devops-teams) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-ohhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/heronthecli) +[#]: collector: "lujun9972" +[#]: translator: "hello-wn" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "3 types of metric dashboards for DevOps teams" +[#]: via: "https://opensource.com/article/19/7/dashboards-devops-teams" +[#]: author: "Daniel Oh https://opensource.com/users/daniel-ohhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/heronthecli" + +# DevOps 团队必备的 3 种指标仪表板 + +仪表板帮助 DevOps 团队观测和监控系统,以提高性能。 + -3 types of metric dashboards for DevOps teams -====== -Dashboards help DevOps teams observe and monitor systems to improve -performance. ![metrics and data shown on a computer screen][1] -Metrics dashboards enable [DevOps][2] teams to monitor the entire DevOps platform so they can respond to issues in real-time, which is critical in the event of downtime or disruption in the production environment or application services. -DevOps dashboards aggregate metrics from multiple observation tools to create monitoring reports for dev and ops teams. They also allow teams to track multiple metrics, such as service deployment times, bugs, errors, work items, backlogs, and more. -The three categories of metrics dashboards described below help DevOps teams observe and monitor systems and thereby improve performance. +指标仪表板帮助  [DevOps][2] 团队监控整个 DevOps 平台,以便实时响应问题。在处理生产环境宕机或者应用服务中断等情况时,指标仪表板显得尤为重要。 -### Agile project management dashboards +DevOps 仪表板聚合了多个监测工具的指标,为开发和运维团队生成监控报告。 它还允许团队跟踪多项指标,例如服务部署时间,程序bug,报错信息,工作项,待办事项等等。 -This type of dashboard visualizes work items for DevOps teams to optimize workflows in agile projects. The dashboard should be designed for maximizing team collaboration efficiency, visualizing work, and providing flexible views—just like we used to use sticky notes on a whiteboard to share project progress, issues, and backlogs. +下面三种指标仪表板可以帮助 DevOps 团队监测系统,改善服务性能。 - * [Kanban boards][3] enable DevOps teams to create cards, labels, assignments, and columns for continuous delivery of agile projects. - * [Burndown charts][4] visualize uncompleted work or backlogs in a specified time period and provide the team's current velocity and trajectory, metrics that are typically used in agile and DevOps project management. - * [Jira boards][5] enable DevOps teams to create issues, plan sprints, and generate team stories. These flexible dashboards also allow the team to prioritize individual and team tasks in full context; provide visibility to view, report, and track work in progress; and help improve team performance. - * [GitHub project boards][6] help prioritize the team's tasks. They also support pull requests so team members can add information related to DevOps projects. +### 敏捷项目管理仪表板 + +这种类型的仪表板为 DevOps 团队的工作项提供可视化视图,优化敏捷项目的工作流。 有利于提高团队协作效率,进行可视化工作并提供灵活的视图—就像我们过去在白板上使用便利贴来共享项目进度,问题和待办事项一样。 + +- [Kanban boards][3] 允许 DevOps 团队创建卡片,标签,任务和列,便于持续交付敏捷项目。 +- [Burndown charts][4] 对指定时间段内未完成的工作或待办事项提供可视化视图,并记录团队当前的效率和轨迹,这些指标通常用于敏捷项目和 DevOps 项目管理。 +- [Jira boards][5] 帮助 DevOps 团队创建问题,计划迭代并生成团队总结。 这些灵活的仪表板还能帮助团队综合考虑并确定个人和团队任务的优先级;实时查看,汇报和跟踪正在进行的工作; 提高团队绩效。 +- [GitHub project boards][6] 帮助确定团队任务的优先级。 它们还支持拉请求,因此团队成员可以方便地提交 DevOps 项目信息。 -### Application monitoring dashboards +### 应用程序监控仪表板 -Developers are responsible for improving application and services performance and developing new functions. An app monitoring dashboard enables developers to produce bugfixes, enhance features, and release security patches as soon as possible within a continuous integration/continuous development (CI/CD) pipeline. These dashboards should also visualize request patterns, elapsed time, errors, and network topology. +开发者负责优化应用和服务的性能,并开发新功能。 应用程序监控面板则帮助开发者在持续集成/持续开发CI / CD流程下,加快修复bug,增强程序健壮性,发布安全修丁的进度。另外,这些可视化仪表板有利于查看请求模式,请求耗时,报错和网络拓扑信息。 - * [Jaeger][7] enables developers to trace the number of requests, response time for each request, and more. It also improves monitoring and tracing of cloud-native apps on a distributed networking system with the [Istio service mesh][8]. - * [OpenCensus][9] allows the team to view data on the host where an application is running, but it also has a pluggable export system for exporting data to central aggregators. +- [Jaeger][7] 帮助开发人员跟踪请求数量,请求响应时间等。 对于分布式网络系统上的云原生应用程序,它还使用 [Istio 服务网格][8]加强了监控和跟踪。 +- [OpenCensus][9] 帮助团队查看运行应用程序的主机上的数据,它还提供了一个可插拔的导出系统,用于将数据导出到数据中心。 -### DevOps platform observation dashboard +### DevOps 平台监控面板 -You might have combined technologies and tools to build a DevOps platform in the cloud or on-premises, but Linux container management tools, such as Kubernetes and OpenShift, are the foundation of a successful DevOps platform. This is because a Linux container's immutability and portability make it faster and easier to move from app development to building, testing, and deployment in production. - -DevOps platform observation dashboards enable the ops teams to orchestrate application containers and software-defined infrastructure, like networking ([SDN][10]) and storage ([SDS][11]), by collecting numeric time-series data from machine or node failures and services errors. These dashboards also visualize multi-dimensional data formats and query data patterns. - - * [Prometheus dashboards][12] scrape metrics from nodes in the platform or directly in running containerized applications. They allow DevOps teams to build a metric-based monitoring system and dashboard to observe microservices' client/server workloads to identify abnormal node failures. - * [Grafana boards][13] allow DevOps organizations to utilize event-driven metrics and visualize multiple panels, including service response duration, request volume, client/server workloads, network traffic flow, and more. DevOps teams can share metrics panels easily in a variety of ways as well as take the snapshot that encodes current monitoring data and share it with other teams. +你可能使用多种技术和工具在云上或本地构建 DevOps 平台,但 Linux 容器管理工具(如 Kubernetes 和 OpenShift )更利于搭建出一个成功的 DevOps 平台。 因为 Linux 容器的不可变性和可移植性使得应用程序从开发环境到生产环境的编译,测试和部署变得更快更容易。 -### Summary +DevOps 平台监控仪表板帮助运营团队从机器/节点故障和服务报错中,收集各种按时序排列的数据,用于编排应用程序容器和基于软件的基础架构,如网络(SDN)和存储(SDS)。 这些仪表板还能可视化多维数据格式,方便地查询数据模式。 -These dashboards visualize metrics on how your DevOps team works and can help identify current or potential issues in team collaboration, application delivery, and platform health status. They also enable DevOps teams to enhance their capabilities in areas such as fast app delivery, secured runtimes, and automated CI/CD. +- [Prometheus dashboards][12] 从平台节点或者运行中的容器化应用中收集指标。帮助DevOps团队构建基于指标的监控系统和仪表板,监控微服务的客户端/服务器工作负载,及时识别出异常节点故障。 +- [Grafana boards][13] 帮助收集事件驱动的各项指标,包括服务响应持续时间,请求量,客户端/服务器client/server工作负载,网络流量等,并提供了可视化面板。 DevOps 团队可以通过多种方式分享面板,也可以生成加密的监控数据快照分享给其他团队。 --------------------------------------------------------------------------------- + + +### 总结 + +这些仪表板提供了可视化的工作流程,能够发现团队协作,应用程序交付和平台状态中的各种问题。它们帮助开发团队增强其在快速应用交付、安全运行和自动化 CI/CD 等领域的能力。 + +------ via: https://opensource.com/article/19/7/dashboards-devops-teams 作者:[Daniel Oh][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[hello-wn](https://github.com/hello-wn) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/daniel-ohhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/heronthecli [b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- "metrics and data shown on a computer screen" [2]: https://opensource.com/resources/devops [3]: https://opensource.com/article/19/1/productivity-tool-taskboard [4]: https://openpracticelibrary.com/practice/burndown/ @@ -80,3 +85,4 @@ via: https://opensource.com/article/19/7/dashboards-devops-teams [11]: https://opensource.com/business/14/10/sage-weil-interview-openstack-ceph [12]: https://opensource.com/article/18/12/introduction-prometheus [13]: https://opensource.com/article/17/8/linux-grafana + From a16d92720450d7653061abf0c474f05e08eb2175 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 10:43:50 +0800 Subject: [PATCH 262/951] PRF @geekpi --- ...age your passwords with Bitwarden and Podman.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md b/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md index e81cd53013..ac9a34ae01 100644 --- a/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md +++ b/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Manage your passwords with Bitwarden and Podman) @@ -43,13 +43,13 @@ $ podman run -d \ bitwardenrs/server:latest ``` -这将下载 bitwarden_rs 镜像并在用户命名空间下的用户容器中运行它。它使用 1024 以上的端口,以便非 root 用户可以绑定它。它还使用 _:Z_ 更改卷的 SELinux 上下文,以防止在 _ /data_ 中的读写权限问题。 +这将下载 bitwarden_rs 镜像并在用户命名空间下的用户容器中运行它。它使用 1024 以上的端口,以便非 root 用户可以绑定它。它还使用 `:Z` 更改卷的 SELinux 上下文,以防止在 `/data` 中的读写权限问题。 如果你在某个域下托管它,建议将此服务器放在 Apache 或 Nginx 的反向代理下。这样,你可以使用 80 和 443 端口指向容器的 8080 端口,而无需以 root 身份运行容器。 ### 在 systemd 下运行 -Bitwarden 现在运行了,你可能希望保持这种状态。接下来,创建一个使容器保持运行的单元文件,如果它没有响应则自动重新启动,并在系统重启后开始运行。创建文件 _/etc/systemd/system/bitwarden.service_: +Bitwarden 现在运行了,你可能希望保持这种状态。接下来,创建一个使容器保持运行的单元文件,如果它没有响应则自动重新启动,并在系统重启后开始运行。创建文件 `/etc/systemd/system/bitwarden.service`: ``` [Unit] @@ -70,7 +70,7 @@ KillMode=none WantedBy=multi-user.target ``` -现在使用 _[sudo][12]_ 启用并启动: +现在使用 [sudo][12] 启用并启动该服务: ``` $ sudo systemctl enable bitwarden.service && sudo systemctl start bitwarden.service @@ -89,11 +89,11 @@ bitwarden.service - Bitwarden Podman container 如果你有域名,强烈建议你使用类似 LetsEncrypt 的加密证书运行你的 Bitwarden 实例。Certbot 是一个为我们创建 LetsEncrypt 证书的机器人,这里有个[在 Fedora 中操作的指南][13]。 -生成证书后,你可以按照 [bitwarden_rs 指南中关于 HTTPS 的部分来][14]。只要记得将 _:Z_ 附加到 LetsEncrypt 来处理权限,而不用更改端口。 +生成证书后,你可以按照 [bitwarden_rs 指南中关于 HTTPS 的部分来][14]。只要记得将 `:Z` 附加到 LetsEncrypt 来处理权限,而不用更改端口。 * * * -* 照片由 _[_CMDR Shane_][15]_  拍摄,发表在 [_Unsplash_][16] 上。 +照片由 [CMDR Shane][15] 拍摄,发表在 [Unsplash][16] 上。 -------------------------------------------------------------------------------- @@ -102,7 +102,7 @@ via: https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/ 作者:[Eric Gustavsson][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 557049255f34abdb9af583f61b2eb08867766687 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 10:44:29 +0800 Subject: [PATCH 263/951] PUB @geekpi https://linux.cn/article-11181-1.html --- ...0190726 Manage your passwords with Bitwarden and Podman.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190726 Manage your passwords with Bitwarden and Podman.md (98%) diff --git a/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md b/published/20190726 Manage your passwords with Bitwarden and Podman.md similarity index 98% rename from translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md rename to published/20190726 Manage your passwords with Bitwarden and Podman.md index ac9a34ae01..0abb8e1378 100644 --- a/translated/tech/20190726 Manage your passwords with Bitwarden and Podman.md +++ b/published/20190726 Manage your passwords with Bitwarden and Podman.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11181-1.html) [#]: subject: (Manage your passwords with Bitwarden and Podman) [#]: via: (https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/) [#]: author: (Eric Gustavsson https://fedoramagazine.org/author/egustavs/) From 8f1f2ab52906fa5e6e3df7b96ee22a71ed1499d1 Mon Sep 17 00:00:00 2001 From: WWWN Date: Sat, 3 Aug 2019 10:45:24 +0800 Subject: [PATCH 264/951] move to translated dir --- .../20190724 3 types of metric dashboards for DevOps teams.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20190724 3 types of metric dashboards for DevOps teams.md (100%) diff --git a/sources/tech/20190724 3 types of metric dashboards for DevOps teams.md b/translated/tech/20190724 3 types of metric dashboards for DevOps teams.md similarity index 100% rename from sources/tech/20190724 3 types of metric dashboards for DevOps teams.md rename to translated/tech/20190724 3 types of metric dashboards for DevOps teams.md From 20af9f97e99bf1f27f9ec973e16398e6f3c245e2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 10:50:57 +0800 Subject: [PATCH 265/951] APL --- ...5 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md b/sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md index 8c62453ef7..a64dbce6cd 100644 --- a/sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md +++ b/sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 72350627999c5e637a2c529f9b0353ed5c569117 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 11:17:55 +0800 Subject: [PATCH 266/951] TSL&PRF @wxy --- ... click- on Ubuntu Login Screen -Quick Tip.md | 100 ------------------ ... click- on Ubuntu Login Screen -Quick Tip.md | 98 +++++++++++++++++ 2 files changed, 98 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md create mode 100644 translated/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md diff --git a/sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md b/sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md deleted file mode 100644 index a64dbce6cd..0000000000 --- a/sources/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Enable ‘Tap to click’ on Ubuntu Login Screen [Quick Tip]) -[#]: via: (https://itsfoss.com/enable-tap-to-click-on-ubuntu-login-screen/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Enable ‘Tap to click’ on Ubuntu Login Screen [Quick Tip] -====== - -_**Brief: The tap to click option doesn’t work on the login screen in Ubuntu 18.04 GNOME desktop. In this tutorial, you’ll learn to enable the ‘tap to click’ on the Ubuntu login screen.**_ - -One of the first few things I do after installing Ubuntu is to make sure that tap to click has been enabled. As a laptop user, I prefer to tap the touchpad for making a left click. This is more convenient than using the left click button on the touchpad all the time. - -This is what happens when I have logged in and using the operating system. But if you are at the login screen, the tap to click doesn’t work and that’s an annoyance. - -On the [GDM login screen][1] in Ubuntu (or other distributions using GNOME desktop), you have to click the username in order to bring the password field. Now if you are habitual of tap to click, it doesn’t work on the login screen even if you have it enabled and use it after logging into the system. - -This is a minor annoyance but an annoyance nonetheless. The good news is that you can fix this annoyance.Let me show you how to do that in this quick tip. - -### Enabling tap to click on Ubuntu login screen - -![][2] - -You’ll have to use the terminal and a few commands here. I hope you are comfortable with it. - -[Open a terminal using Ctrl+Alt+T shortcut in Ubuntu][3]. Since Ubuntu 18.04 is still using X server, you need to enable it to connect to the [x server][4]. For that, you can add gdm to access control list. - -Switch to root user first. It’s required because you have to switch as gdm user later and you cannot do that as a non-root user. - -``` -sudo -i -``` - -[There is no password set for root user in Ubuntu][5]. You access it with your admin user account. So when asked for password, use your own password. You won’t see anything being typed on the screen when you type in your password. - -``` -xhost +SI:localuser:gdm -``` - -Here’s the output for me: - -``` -xhost +SI:localuser:gdm -localuser:gdm being added to access control list -``` - -Now run this command so that the the ‘user gdm’ has the correct tap to click setting. - -``` -gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true -``` - -If you see a warning like this: (process:6339): dconf-WARNING **: 19:52:21.217: Unable to open /root/.local/share/flatpak/exports/share/dconf/profile/user: Permission denied . Don’t worry. Just ignore it. - -[][6] - -Suggested read  How To Change Hostname on Ubuntu & Other Linux Distributions - -This will enable you to perform a tap to click on the login screen. Why were you not able to use tap to click when you made the changes in the system settings before? It’s because at the login screen, you haven’t selected your username yet. You get to use your account only when you select the user on the screen. This is why you had to use the user gdm and add the correct settings with it. - -Restart Ubuntu and you’ll see that you can now use the tap to select your user account now. - -#### Revert the changes - -If you are not happy with the tap to click on the Ubuntu login screen for some reason, you can revert the changes. - -You’ll have to perform all the steps you did in the previous section: switch to root, connect gdm with x server, switch to gdm user. But instead of the last command, you need to run this command: - -``` -gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click false -``` - -That’s it. - -As I said, it’s a tiny thing. I mean you can easily do a left click instead of the tap to click. It’s just a matter of one single click.However, it breaks the ‘continuity’ when you are forced to use the left click after a few taps. - -I hope you liked this quick little tweak. If you know some other cool tweaks, do share it with us. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/enable-tap-to-click-on-ubuntu-login-screen/ - -作者:[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.archlinux.org/index.php/GDM -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/tap-to-click-on-ubuntu-login.jpg?ssl=1 -[3]: https://itsfoss.com/ubuntu-shortcuts/ -[4]: https://en.wikipedia.org/wiki/X.Org_Server -[5]: https://itsfoss.com/change-password-ubuntu/ -[6]: https://itsfoss.com/change-hostname-ubuntu/ diff --git a/translated/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md b/translated/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md new file mode 100644 index 0000000000..b3f9ce095e --- /dev/null +++ b/translated/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Enable ‘Tap to click’ on Ubuntu Login Screen [Quick Tip]) +[#]: via: (https://itsfoss.com/enable-tap-to-click-on-ubuntu-login-screen/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在 Ubuntu 登录屏幕上启用轻击 +====== + +> 轻击tap to click选项在 Ubuntu 18.04 GNOME 桌面的登录屏幕上不起作用。在本教程中,你将学习如何在 Ubuntu 登录屏幕上启用“轻击”。 + +安装 Ubuntu 后我做的第一件事就是确保启用了轻击功能。作为笔记本电脑用户,我更喜欢轻击触摸板进行左键单击。这比使用触摸板上的左键单击按钮更方便。 + +我登录并使用操作系统时可以轻击。但是,如果你在登录屏幕上,轻击不起作用,这是一个烦恼。 + +在 Ubuntu(或使用 GNOME 桌面的其他发行版)的 [GDM 登录屏幕][1]上,你必须单击用户名才能显示密码字段。现在,如果你习惯了轻击,即使你已启用了它并在登录系统后可以使用,它也无法在登录屏幕上运行。 + +这是一个轻微的烦恼,但仍然是一个烦恼。好消息是你可以解决这个烦恼。让我告诉你如何在这个快速提示中做到这一点。 + +### 在 Ubuntu 登录屏幕上启用轻击 + +![][2] + +你必须在这里使用终端和一些命令。我希望你能够适应。 + +[在 Ubuntu 中使用 Ctrl + Alt + T 快捷键打开终端][3]。由于 Ubuntu 18.04 仍在使用 X 显示服务器,因此需要启用它才能连接到 [X 服务器][4]。为此,你可以将 `gdm` 添加到访问控制列表中。 + +首先切换到 `root` 用户。这是必需的,因为你必须稍后切换为 `gdm` 用户,而不能以非 `root` 用户身份执行此操作。 + +``` +sudo -i +``` + +[在 Ubuntu 中没有为 root 用户设置密码][5]。你可以使用管理员用户帐户访问它。因此,当要求输入密码时,请使用你自己的密码。输入密码时,屏幕上不会显示任何输入内容。 + +``` +xhost +SI:localuser:gdm +``` + +这是我的输出: + +``` +xhost +SI:localuser:gdm +localuser:gdm being added to access control list +``` + +现在运行此命令,以便 `gdm` 用户具有正确的轻击设置。 + +``` +gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true +``` + +如果你看到这样的警告:`(process:6339): dconf-WARNING **: 19:52:21.217: Unable to open /root/.local/share/flatpak/exports/share/dconf/profile/user: Permission denied`。别担心。忽略它就行。 + +[][6] + +这将使你能够轻击登录屏幕。为什么在系统设置中进行更改之前无法使用轻击?这是因为在登录屏幕上,你还没有选择用户名。只有在屏幕上选择用户时才能使用你的帐户。这就是你必须使用用户 `gdm` 并使用它添加正确设置的原因。 + +重新启动 Ubuntu,你会看到现在可以使用轻击来选择你的用户帐户。 + +#### 还原改变 + +如果你因为某些原因不喜欢在 Ubuntu 登录界面轻击,可以还原更改。 + +你必须执行上一节中的所有步骤:切换到 `root`,将 `gdm` 与 X 服务器连接,切换到 `gdm` 用户。但是,你需要运行此命令,而不是上一个命令: + +``` +gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click false +``` + +就是这样。 + +正如我所说,这是一件小事。我的意思是你可以轻松地点击左键而不是轻击。这只是一次单击的问题。但是,当你在几次轻击后被迫使用左键单击时,它会打破操作“连续性”。 + +我希望你喜欢这个快速的小调整。如果你知道其他一些很酷的调整,请与我们分享。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/enable-tap-to-click-on-ubuntu-login-screen/ + +作者:[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://wiki.archlinux.org/index.php/GDM +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/tap-to-click-on-ubuntu-login.jpg?ssl=1 +[3]: https://itsfoss.com/ubuntu-shortcuts/ +[4]: https://en.wikipedia.org/wiki/X.Org_Server +[5]: https://itsfoss.com/change-password-ubuntu/ +[6]: https://itsfoss.com/change-hostname-ubuntu/ From 741a0f51027f2d0065a02f8f9491be47c71084ad Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 15:45:15 +0800 Subject: [PATCH 267/951] PUB @wxy https://linux.cn/article-11182-1.html --- ...Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md (98%) diff --git a/translated/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md b/published/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md similarity index 98% rename from translated/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md rename to published/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md index b3f9ce095e..85b9e0ff98 100644 --- a/translated/tech/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md +++ b/published/20190705 Enable ‘Tap to click- on Ubuntu Login Screen -Quick Tip.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11182-1.html) [#]: subject: (Enable ‘Tap to click’ on Ubuntu Login Screen [Quick Tip]) [#]: via: (https://itsfoss.com/enable-tap-to-click-on-ubuntu-login-screen/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 0997ecd71a58e6f329d20c6e0e27fc728c95c4e4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 20:13:28 +0800 Subject: [PATCH 268/951] APL --- .../20190729 Command line quick tips- More about permissions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190729 Command line quick tips- More about permissions.md b/sources/tech/20190729 Command line quick tips- More about permissions.md index 63674e71c4..a3cf3d963f 100644 --- a/sources/tech/20190729 Command line quick tips- More about permissions.md +++ b/sources/tech/20190729 Command line quick tips- More about permissions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 71ece38974ac85f07cee31a44267ec0b18a9c2fc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 20:53:11 +0800 Subject: [PATCH 269/951] TSL&PRF @wxy --- ...line quick tips- More about permissions.md | 98 ------------------- ...line quick tips- More about permissions.md | 94 ++++++++++++++++++ 2 files changed, 94 insertions(+), 98 deletions(-) delete mode 100644 sources/tech/20190729 Command line quick tips- More about permissions.md create mode 100644 translated/tech/20190729 Command line quick tips- More about permissions.md diff --git a/sources/tech/20190729 Command line quick tips- More about permissions.md b/sources/tech/20190729 Command line quick tips- More about permissions.md deleted file mode 100644 index a3cf3d963f..0000000000 --- a/sources/tech/20190729 Command line quick tips- More about permissions.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Command line quick tips: More about permissions) -[#]: via: (https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/) -[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) - -Command line quick tips: More about permissions -====== - -![][1] - -A previous article [covered some basics about file permissions][2] on your Fedora system. This installment shows you additional ways to use permissions to manage file access and sharing. It also builds on the knowledge and examples in the previous article, so if you haven’t read that one, do [check it out][2]. - -### Symbolic and octal - -In the previous article you saw how there are three distinct permission sets for a file. The user that owns the file has a set, members of the group that owns the file has a set, and then a final set is for everyone else. These permissions are expressed on screen in a long listing (_ls -l_) using symbolic mode. - -Each set has **r, w,** and **x** entries for whether a particular user (owner, group member, or other) can read, write, or execute that file. But there’s another way to express these permissions: in **octal** mode. - -You’re used to the [decimal][3] numbering system, which has ten distinct values (0 through 9). The octal system, on the other hand, has eight distinct values (0 through 7). In the case of permissions, octal is used as a shorthand to show the value of the **r, w,** and **x** fields. Think of each field as having a value: - - * **r** = 4 - * **w** = 2 - * **x** = 1 - - - -Now you can express any combination with a single octal value. For instance, read and write permission, but no execute permission, would have a value of 6. Read and execute permission only would have a value of 5. A file’s **rwxr-xr-x** symbolic permission has an octal value of **755**. - -You can use octal values to set file permissions with the _chmod_ command similarly to symbolic values. The following two commands set the same permissions on a file: - -``` -chmod u=rw,g=r,o=r myfile1 -chmod 644 myfile1 -``` - -### Special permission bits - -There are several special permission bits also available on a file. These are called **setuid** (or **suid**), **setgid** (or **sgid**), and the **sticky bit** (or **delete inhibit**). Think of this as yet another set of octal values: - - * setuid = 4 - * setgid = 2 - * sticky = 1 - - - -The **setuid** bit is ignored _unless_ the file is executable. If that’s the case, the file (presumably an app or a script) runs as if it were launched by the user who owns the file. A good example of setuid is the _/bin/passwd_ utility, which allows a user to set or change passwords. This utility must be able to write to files no user should be allowed to change. Therefore it is carefully written, owned by the _root_ user, and has a setuid bit so it can alter the password related files. - -The **setgid** bit works similarly for executable files. The file will run with the permissions of the group that owns it. However, setgid also has an additional use for directories. If a file is created in a directory with setgid permission, the group owner for the file will be set to the group owner of the directory. - -Finally, the sticky bit, while ignored for files, is useful for directories. The sticky bit set on a directory will prevent a user from deleting files in that directory owned by other users. - -The way to set these bits with _chmod_ in octal mode is to add a value prefix, such as **4755** to add setuid to an executable file. In symbolic mode, the **u** and **g** can be used to set or remove setuid and setgid, such as **u+s,g+s**. The sticky bit is set using **o+t**. (Other combinations, like **o+s** or **u+t**, are meaningless and ignored.) - -### Sharing and special permissions - -Recall the example from the previous article concerning a finance team that needs to share files. As you can imagine, the special permission bits help to solve their problem even more effectively. The original solution simply made a directory the whole group could write to: - -``` -drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance -``` - -One problem with this directory is that users _dwayne_ and _jill_, who are both members of the _finance_ group, can delete each other’s files. That’s not optimal for a shared space. It might be useful in some situations, but probably not when dealing with financial records! - -Another problem is that files in this directory may not be truly shared, because they will be owned by the default groups of _dwayne_ and _jill_ — most likely the user private groups also named _dwayne_ and _jill_. - -A better way to solve this is to set both setgid and the sticky bit on the folder. This will do two things — cause files created in the folder to be owned by the _finance_ group automatically, and prevent _dwayne_ and _jill_ from deleting each other’s files. Either of these commands will work: - -``` -sudo chmod 3770 finance -sudo chmod u+rwx,g+rwxs,o+t finance -``` - -The long listing for the file now shows the new special permissions applied. The sticky bit appears as **T** and not **t** because the folder is not searchable for users outside the _finance_ group. - -``` -drwxrws--T. 2 root finance 4096 Jul 6 15:35 finance -``` - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/ - -作者:[Paul W. Frields][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/pfrields/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg -[2]: https://fedoramagazine.org/command-line-quick-tips-permissions/ -[3]: https://en.wikipedia.org/wiki/Decimal diff --git a/translated/tech/20190729 Command line quick tips- More about permissions.md b/translated/tech/20190729 Command line quick tips- More about permissions.md new file mode 100644 index 0000000000..87d603e139 --- /dev/null +++ b/translated/tech/20190729 Command line quick tips- More about permissions.md @@ -0,0 +1,94 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command line quick tips: More about permissions) +[#]: via: (https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/) +[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) + +命令行快速提示:权限进阶 +====== + +![][1] + +前一篇文章[介绍了 Fedora 系统上有关文件权限的一些基础知识][2]。本部分介绍使用权限管理文件访问和共享的其他方法。它建立在前一篇文章中的知识和示例的基础上,所以如果你还没有阅读过那篇文章,请[查看][2]它。 + +### 符号与八进制 + +在上一篇文章中,你了解到文件有三个不同的权限集。拥有该文件的用户有一个集合,拥有该文件的组的成员有一个集合,然后最终一个集合适用于其他所有人。在长列表(`ls -l`)中这些权限使用符号模式显示在屏幕上。 + +每个集合都有 `r`、`w` 和 `x` 条目,表示特定用户(所有者、组成员或其他)是否可以读取、写入或执行该文件。但是还有另一种表达这些权限的方法:八进制模式。 + +你已经习惯了[十进制][3]编号系统,它有十个不同的值(`0` 到 `9`)。另一方面,八进制系统有八个不同的值(`0` 到 `7`)。在表示权限时,八进制用作速记来显示 `r`、`w` 和 `x` 字段的值。将每个字段视为具有如下值: + + * `r` = 4 + * `w` = 2 + * `x` = 1 + +现在,你可以使用单个八进制值表达任何组合。例如,读取和写入权限(但没有执行权限)的值为 `6`。读取和执行权限的值仅为 `5`。文件的 `rwxr-xr-x` 符号权限的八进制值为 `755`。 + +与符号值类似,你可以使用八进制值使用 `chmod` 命令设置文件权限。以下两个命令对文件设置相同的权限: + +``` +chmod u=rw,g=r,o=r myfile1 +chmod 644 myfile1 +``` + +### 特殊权限位 + +文件上还有几个特殊权限位。这些被称为 `setuid`(或 `suid`)、`setgid`(或 `sgid`),以及粘滞位sticky bit(或阻止删除位delete inhibit)。 将此视为另一组八进制值: + + * `setuid` = 4 + * `setgid` = 2 + * `sticky` = 1 + +**除非**该文件是可执行的,否则 `setuid` 位是被忽略的。如果是可执行的这种情况,则该文件(可能是应用程序或脚本)的运行就像拥有该文件的用户启动的一样。`setuid` 的一个很好的例子是 `/bin/passwd` 实用程序,它允许用户设置或更改密码。此实用程序必须能够写入到不允许普通用户更改的文件中(LCTT 译注:此处是指 `/etc/passwd` 和 `/etc/shadow`)。因此它需要精心编写,由 `root` 用户拥有,并具有 `setuid` 位,以便它可以更改密码相关文件。 + +`setgid` 位对于可执行文件的工作方式类似。该文件将使用拥有它的组的权限运行。但是,`setgid` 对于目录还有一个额外的用途。如果在具有 `setgid` 权限的目录中创建文件,则该文件的组所有者将设置为该目录的组所有者。 + +最后,虽然文件粘滞位没有意义会被忽略,但它对目录很有用。在目录上设置的粘滞位将阻止用户删除其他用户拥有的该目录中的文件。 + +在八进制模式下使用 `chmod` 设置这些位的方法是添加一个值前缀,例如 `4755`,可以将 `setuid` 添加到可执行文件中。在符号模式下,`u` 和 `g` 也可用于设置或删除 `setuid` 和 `setgid`,例如 `u+s,g+s`。粘滞位使用 `o+t` 设置。(其他的组合,如 `o+s` 或 `u+t`,是没有意义的,会被忽略。) + +### 共享与特殊权限 + +回想一下前一篇文章中关于需要共享文件的财务团队的示例。可以想象,特殊权限位有助于更有效地解决问题。原来的解决方案只是创建了一个整个组可以写入的目录: + +``` +drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance +``` + +此目录的一个问题是,`finance` 组成员的用户 `dwayne` 和 `jill` 可以删除彼此的文件。这对于共享空间来说不是最佳选择。它在某些情况下可能有用,但在处理财务记录时可能不会! + +另一个问题是此目录中的文件可能无法真正共享,因为它们将由 `dwayne` 和 `jill` 的默认组拥有 - 很可能用户私有组也命名为 `dwayne` 和 `jill`,而不是 `finance`。 + +解决此问题的更好方法是在文件夹上设置 `setgid` 和粘滞位。这将做两件事:使文件夹中创建的文件自动归 `finance` 组所有,并防止 `dwayne` 和 `jill` 删除彼此的文件。下面这些命令中的任何一个都可以工作: + +``` +sudo chmod 3770 finance +sudo chmod u+rwx,g+rwxs,o+t finance +``` + +该文件的长列表现在显示了所应用的新特殊权限。粘滞位显示为 `T` 而不是 `t`,因为 `finance` 组之外的用户无法搜索该文件夹。 + +``` +drwxrws--T. 2 root finance 4096 Jul 6 15:35 finance +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/ + +作者:[Paul W. Frields][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/pfrields/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg +[2]: https://linux.cn/article-11123-1.html +[3]: https://en.wikipedia.org/wiki/Decimal From eee94ab9ad0b688fa709e1de08477e197bebbbc8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 21:02:30 +0800 Subject: [PATCH 270/951] APL --- sources/tech/20190711 What is a golden image.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190711 What is a golden image.md b/sources/tech/20190711 What is a golden image.md index 5bbb61e329..75515bcc67 100644 --- a/sources/tech/20190711 What is a golden image.md +++ b/sources/tech/20190711 What is a golden image.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 940a638d726c9120b470654ad62ea2d6ad3fe1f3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Aug 2019 22:27:46 +0800 Subject: [PATCH 271/951] TSL --- .../tech/20190711 What is a golden image.md | 77 ------------------- .../tech/20190711 What is a golden image.md | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 sources/tech/20190711 What is a golden image.md create mode 100644 translated/tech/20190711 What is a golden image.md diff --git a/sources/tech/20190711 What is a golden image.md b/sources/tech/20190711 What is a golden image.md deleted file mode 100644 index 75515bcc67..0000000000 --- a/sources/tech/20190711 What is a golden image.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is a golden image?) -[#]: via: (https://opensource.com/article/19/7/what-golden-image) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -What is a golden image? -====== -Working on projects that will be distributed widely? Learn more about -golden images so it's easy to revert to a "perfect" state if things go -wrong. -![Gold star][1] - -If you’re in quality assurance, system administration, or (believe it or not) media production, you might have heard some variation of the term _gold master_, _golden image_, or _master image_, and so on. It’s a term that has made its way into the collective consciousness of anyone involved in creating one _perfect_ model and then producing many duplicates from that mold. That’s what a gold master, or golden image, is: The virtual mold from which you cast your distributable models. - -In media production, the theory is that a crew works toward the gold master. This final product is one of a kind. It looks and sounds the best a movie or an album (or whatever it is) can possibly look and sound. Copies of this master image are made, compressed, and sent out to the eager public. - -In software, a similar idea is associated with the term. Once software has been compiled and tested and re-tested, the perfect build is declared _gold_. No further changes are allowed, and all distributable copies are generated from this master image (this used to actually mean something, back when software was distributed on CDs or DVDs). - -And in system administration, you may encounter golden images of an organization’s chosen operating system, with the important settings *baked in—*the virtual private network (VPN) certificates are already in place, incoming email servers are already set in the email client, and so on. Similarly, you might also hear this term in the world of virtual machines (VMs), where a _golden image_ of a carefully configured virtual drive is the source from which all new virtual machines are cloned. - -### GNOME Boxes - -The concept of a gold master is simple, but putting it into practice is often overlooked. Sometimes, your team is just so happy to have reached their goal that no one stops to think about designating the achievement as the authoritative version. At other times, there’s no simple mechanism for doing this. - -A golden image is equal parts historical preservation and a backup plan in advance. Once you craft a perfect model of whatever it is you were toiling over, you owe it to yourself to preserve that work, because it not only marks your progress, but it serves as a fallback should you stumble as you continue your work. - -[GNOME Boxes][2], the virtualization platform that ships with the GNOME desktop, can provide a simple demonstration. If you’ve never used GNOME Boxes, you can learn the basics from Alan Formy-Duval in his article [Getting started with GNOME Boxes][3]. - -Imagine that you used GNOME boxes to create a virtual machine, and then installed an operating system into that VM. Now, you want to make a golden image. GNOME Boxes is one step ahead of you: It has already taken a snapshot of your install, which can serve as the golden image for a stock OS installation. - -With GNOME Boxes open and in the dashboard view, right-click on any virtual machine and select **Properties**. In the **Properties** window, select the **Snapshots** tab. The first snapshot, created automatically by GNOME Boxes, is **Just Installed**. As its name suggests, this is the operating system as you originally installed it onto its virtual machine. - -![The Just Installed snapshot, or initial golden image, in GNOME Boxes.][4] - -Should your virtual machine reach a state that you did not intend, you can always revert to this **Just Installed** image. - -Of course, reverting back to the OS after it’s just been installed would be a drastic measure if you’ve already fine-tuned the environment for yourself. That’s why it’s a common workflow with virtual machines to first install the OS, then modify it to suit your requirements or preferences, and then take a snapshot, declaring that snapshot as your configured golden image. For instance, if you are using the virtual machine for [Flatpak][5] packaging, then after your initial install you might add software and Flatpak development tools, construct your working environment, and then take a snapshot. Once the snapshot is created, you can rename the virtual machine to indicate its true purpose in life. - -To rename a virtual machine, right-click on its thumbnail in the dashboard view, and select **Properties**. In the **Properties** window, enter a new name: - -![Renaming your VM image in GNOME Boxes.][6] - -To make a clone of your golden image, right-click on the virtual machine in the GNOME Boxes interfaces and select **Clone**. - -![Cloning your golden image in GNOME Boxes.][7] - -You now have a clone from your golden image’s latest snapshot. - -### Golden - -There are few disciplines that can’t benefit from golden images. Whether you’re tagging releases in [Git][8], taking snapshots in Boxes, pressing a prototype vinyl, printing a book for approval, designing a screen print for mass production, or fashioning a literal mold, the archetype is everything. It’s just one more way that modern technology lets us humans work smarter rather than harder, so make a golden image for your project, and generate clones as often as you need. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/what-golden-image - -作者:[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/origami_star_gold_best_top.jpg?itok=aEc0eutt (Gold star) -[2]: https://wiki.gnome.org/Apps/Boxes -[3]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization -[4]: https://opensource.com/sites/default/files/uploads/snapshots.jpg (The Just Installed snapshot, or initial golden image.) -[5]: https://opensource.com/business/16/8/flatpak -[6]: https://opensource.com/sites/default/files/uploads/boxes-rename_0.jpg (Renaming your virtual machine in GNOME Boxes.) -[7]: https://opensource.com/sites/default/files/uploads/boxes-clone.jpg (Cloning your golden image in GNOME Boxes.) -[8]: https://git-scm.com diff --git a/translated/tech/20190711 What is a golden image.md b/translated/tech/20190711 What is a golden image.md new file mode 100644 index 0000000000..fee6d53874 --- /dev/null +++ b/translated/tech/20190711 What is a golden image.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What is a golden image?) +[#]: via: (https://opensource.com/article/19/7/what-golden-image) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +什么是黄金镜像? +====== + +> 正在开发一个将广泛分发的项目吗?了解一下黄金镜像吧,以便在出现问题时轻松恢复到“完美”状态。 + +![Gold star][1] + +如果你正在进行质量保证、系统管理或媒体制作(没想到吧),你可能听说过正式版gold master黄金镜像golden image母片master image等等这一术语的某些变体。这个术语已经进入了每个参与创建一个**完美**模具的人的集体意识,然后从该模具中产生许多复制品。母片或黄金镜像就是:一种虚拟模具,你可以从中打造可分发的模型。 + +在媒体制作中,这就是全体人员努力开发母片的过程。这个最终产品是独一无二的。它看起来和听起来像是能够看和听的最好的电影或专辑(或其他任何东西)。可以制作和压缩该母片的副本并发送给急切的公众。 + +在软件中,与该术语相关联的也是类似的思路。一旦软件经过编译和一再测试,完美的构建就会被声明为**黄金版本**。不允许对它进一步更改,并且所有可分发的副本都是从此母片生成的(当软件是用 CD 或 DVD 分发时,这实际上意味着母盘)。 + +在系统管理中,你可能会遇到你的机构所选的操作系统的黄金镜像,其中的重要设置已经就绪,如安装好的虚拟专用网络(VPN)证书、设置好的电子邮件收件服务器的邮件客户端,等等。同样,你可能也会在虚拟机(VM)的世界中听到这个术语,其中精心配置的虚拟驱动器的黄金镜像是所有克隆的新虚拟机的源头。 + +### GNOME Boxes + +正式版的概念很简单,但往往忽视将其付诸实践。有时,你的团队很高兴能够达成他们的目标,但没有人停下来考虑将这些成就指定为权威版本。在其他时候,没有简单的机制来做到这一点。 + +黄金镜像等同于部分历史保存和提前备份计划。一旦你制作了一个完美的模型,无论你正在努力做什么,你都应该为自己保留这项工作,因为它不仅标志着你的进步,而且如果你继续工作时遇到问题,它就会成为一个后备。 + +[GNOME Boxes][2],是随 GNOME 桌面一起提供的虚拟化平台,可以提供简单的演示。如果你从未使用过GNOME Boxes,你可以在 Alan Formy-Duval 的文章 [GNOME Boxes 入门][3]中学习它的基础知识。 + +想象一下,你使用 GNOME Boxes 创建虚拟机,然后将操作系统安装到该 VM 中。现在,你想要制作一个黄金镜像。GNOME Boxes 已经率先摄取了你的安装快照,可以作为库存的操作系统安装的黄金镜像。 + +打开 GNOME Boxes 并在仪表板视图中,右键单击任何虚拟机,然后选择**属性**。 在**属性**窗口中,选择**快照**选项卡。由 GNOME Boxes 自动创建的第一个快照是“Just Installed”。顾名思义,这是你最初安装到虚拟机上的操作系统。 + +![The Just Installed snapshot, or initial golden image, in GNOME Boxes.][4] + +如果你的虚拟机变成了你不想要的状态,你可以随时恢复为“Just Installed”镜像。 + +当然,如果你已经为自己调整了环境,那么在安装后恢复操作系统将是一个极大的工程。这就是为什么虚拟机的常见工作流程是:首先安装操作系统,然后根据你的要求或偏好修改它,然后拍摄快照,将该快照声明为配置好的黄金镜像。例如,如果你使用虚拟机进行 [Flatpak][5] 打包,那么在初始安装之后,你可以添加软件和 Flatpak 开发工具,构建工作环境,然后拍摄快照。创建快照后,你可以重命名该虚拟机以指示其真实用途。 + +要重命名虚拟机,请在仪表板视图中右键单击其缩略图,然后选择**属性**。在**属性**窗口中,输入新名称: + +![Renaming your VM image in GNOME Boxes.][6] + +要克隆你的黄金映像,请右键单击 GNOME Boxes 界面中的虚拟机,然后选择**克隆**。 + +![Cloning your golden image in GNOME Boxes.][7] + +你现在可以从黄金映像的最新快照中克隆了。 + +### 黄金镜像 + +很少有学科无法从黄金镜像中受益。无论你是在 [Git][8] 中标记版本、在 Boxes 中拍摄快照、出版原型黑胶唱片、打印书籍以进行审核、设计用于批量生产的丝网印刷、还是制作文字模具,到处都是各种原型。这只是现代技术让我们人类更聪明而不是更努力的另一种方式,因此为你的项目制作一个黄金镜像,并根据需要随时生成克隆。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/what-golden-image + +作者:[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/origami_star_gold_best_top.jpg?itok=aEc0eutt (Gold star) +[2]: https://wiki.gnome.org/Apps/Boxes +[3]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization +[4]: https://opensource.com/sites/default/files/uploads/snapshots.jpg (The Just Installed snapshot, or initial golden image.) +[5]: https://opensource.com/business/16/8/flatpak +[6]: https://opensource.com/sites/default/files/uploads/boxes-rename_0.jpg (Renaming your virtual machine in GNOME Boxes.) +[7]: https://opensource.com/sites/default/files/uploads/boxes-clone.jpg (Cloning your golden image in GNOME Boxes.) +[8]: https://git-scm.com From 9a4a7bca0ab64be6bb214d3c66bbed39bc917304 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 4 Aug 2019 00:57:08 +0800 Subject: [PATCH 272/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190803=20The=20?= =?UTF-8?q?fastest=20open=20source=20CPU=20ever,=20Facebook=20shares=20AI?= =?UTF-8?q?=20algorithms=20fighting=20harmful=20content,=20and=20more=20ne?= =?UTF-8?q?ws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md --- ...fighting harmful content, and more news.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md diff --git a/sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md b/sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md new file mode 100644 index 0000000000..c9d67696bf --- /dev/null +++ b/sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news) +[#]: via: (https://opensource.com/article/19/8/news-august-3) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) + +The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news +====== +Catch up on the biggest open source headlines from the past two weeks. +![Weekly news roundup with TV][1] + +In this edition of our open source news roundup, we share Facebook's choice to open source two algorithms for finding harmful content, Apple's new role in the Data Transfer Project, and more news you should know. + +### Facebook open sources algorithms used to find harmful content + +Facebook announced that it has [open sourced two algorithms][2] used to find child exploitation, threats of terrorism, and graphic violence on the platform. In a blog post on August 1st, Facebook shared that PDQ and TMK+PDQF–two technologies that store files as digital hashes, then compare them with known examples of harmful content–are [now live on GitHub][3].  + +The code release comes amidst increased pressure to get harmful content off the platform as soon as possible. After March's mass murder in New Zealand was streamed on Facebook Live, the Australian government [threatened Facebook execs with fines and jail time][4] if the video wasn't promptly removed. By releasing the source code for these algorithms, Facebook said that it hopes nonprofits, tech companies, and solo developers can all help them find and remove harmful content faster.  + +### Alibaba launches the fastest open source CPU + +Pingtouge Semiconductor - an Alibaba subsidiary - [announced its Xuantie 91 processor][5] last month. It's equipped to manage infrastructure for AI, the IoT, 5G, and autonomous vehicles, among other projects. It boasts a a 7.1 Coremark/MHz, making it the fastest open source CPU on the market. + +Pintogue announced plans to make its polished code available on GitHub this September. Analysts view this release as a power move to help China hit its goal of using local suppliers to meet 40 percent of processor demand by 2021. Recent tariffs on behalf of the U.S. threaten to derail this goal, creating the need for open source computer components. + +### Mattermost makes the case for open source collaboration apps + +All open source communities benefit from one or more places to communicate with each other. The world of team chat apps seems dominated by minimal, mighty tools like Slack and Microsoft Teams. Most options are cloud-based and proprietary; Mattermost takes a different approach by selling the value of open source collaboration apps. + +> “People want an open-source alternative because they need the trust, the flexibility and the innovation that only open source is able to deliver,” said Ian Tien, co-founder and CEO of Mattermost. + +With clients that range from Uber to the Department of Defense, Mattermost cornered a crucial market: Teams that want open source software they can trust and install on their own servers. For businesses that need collaboration apps to run on their internal infrastructure, Mattermost fills a gap that [Atlassian left bare][6]. In an article for Computerworld, Matthew Finnegan [explores][7] why on-premises, open source chat tools aren't dead yet. + +### Apple joins the open source Data Transfer Project + +Google, Facebook, Twitter, and Microsoft united last year to create the Data Transfer Project (DTP). Hailed as a way to boost data security and user agency over their own data, the DTP is a rare show of solidarity in tech. This week, Apple announced that they'll [join the fold][8].  + +The DTP's goal is to help users transfer their data from one online service to another via an open source platform. DTP aims to take out the middleman by using APIs and authorization tools to let users transfer their data from one service to another. This would erase the need for users to download their data, then upload it to another service. Apple's choice to join the DTP will allow users to transfer data in and out of iCloud, and could be a big win for privacy advocates. + +#### In other news + + * [FlexiWAN's open source SD-WAN available for download in public beta release][9] + + * [Open source Windows Calculator app to get Always-on-Top mode][10] + + * [With Zowe, open source and DevOps are democratizing the mainframe computer][11] + + * [Mozilla debuts implementation of WebThings Gateway open source router firmware][12] + + * [Updated: Contributing to the Mozilla code base][13] + + + + +_Thanks, as always, to Opensource.com staff members and moderators for their help this week._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/news-august-3 + +作者:[Lauren Maffeo][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/lmaffeo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV) +[2]: https://www.theverge.com/2019/8/1/20750752/facebook-child-exploitation-terrorism-open-source-algorithm-pdq-tmk +[3]: https://github.com/facebook/ThreatExchange/tree/master/hashing/tmk +[4]: https://www.buzzfeed.com/hannahryan/social-media-facebook-livestreaming-laws-christchurch +[5]: https://hexus.net/tech/news/cpu/133229-alibabas-16-core-risc-v-fastest-open-source-cpu-yet/ +[6]: https://lab.getapp.com/atlassian-slack-on-premise-software/ +[7]: https://www.computerworld.com/article/3428679/mattermost-makes-case-for-open-source-as-team-messaging-market-booms.html +[8]: https://www.techspot.com/news/81221-apple-joins-data-transfer-project-open-source-project.html +[9]: https://www.fiercetelecom.com/telecom/flexiwan-s-open-source-sd-wan-available-for-download-public-beta-release +[10]: https://mspoweruser.com/open-source-windows-calculator-app-to-get-always-on-top-mode/ +[11]: https://siliconangle.com/2019/07/29/zowe-open-source-devops-democratizing-mainframe-computer/ +[12]: https://venturebeat.com/2019/07/25/mozilla-debuts-webthings-gateway-open-source-router-firmware-for-turris-omnia/ +[13]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction From 9bc39012b1264a8b3a436827b22e176cd4985250 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 4 Aug 2019 08:01:22 +0800 Subject: [PATCH 273/951] Rename sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md to sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md --- ...hares AI algorithms fighting harmful content, and more news.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md (100%) diff --git a/sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md b/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md similarity index 100% rename from sources/tech/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md rename to sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md From 2fff30162f334f686c9a40dcbac70ca99442d735 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 4 Aug 2019 08:33:58 +0800 Subject: [PATCH 274/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @hellow-wn 请注意你的编辑器会修改 MD 格式带来不兼容,请尽量维持原有格式。 --- ...s of metric dashboards for DevOps teams.md | 64 ++++++++----------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/translated/tech/20190724 3 types of metric dashboards for DevOps teams.md b/translated/tech/20190724 3 types of metric dashboards for DevOps teams.md index 138b315c37..febb340a4a 100644 --- a/translated/tech/20190724 3 types of metric dashboards for DevOps teams.md +++ b/translated/tech/20190724 3 types of metric dashboards for DevOps teams.md @@ -1,63 +1,53 @@ -[#]: collector: "lujun9972" -[#]: translator: "hello-wn" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "3 types of metric dashboards for DevOps teams" -[#]: via: "https://opensource.com/article/19/7/dashboards-devops-teams" -[#]: author: "Daniel Oh https://opensource.com/users/daniel-ohhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/heronthecli" +[#]: collector: "lujun9972" +[#]: translator: "hello-wn" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " +[#]: subject: "3 types of metric dashboards for DevOps teams" +[#]: via: "https://opensource.com/article/19/7/dashboards-devops-teams" +[#]: author: "Daniel Oh https://opensource.com/users/daniel-oh" -# DevOps 团队必备的 3 种指标仪表板 +DevOps 团队必备的 3 种指标仪表板 +========= -仪表板帮助 DevOps 团队观测和监控系统,以提高性能。 +> 仪表板可以帮助 DevOps 团队观测和监控系统,以提高性能。 +![](https://img.linux.net.cn/data/attachment/album/201908/04/083434ixlm9lgv8ev8dlyd.jpg) -![metrics and data shown on a computer screen][1] +指标仪表板帮助 [DevOps][2] 团队监控整个 DevOps 平台,以便实时响应议题issue。在处理生产环境宕机或者应用服务中断等情况时,指标仪表板显得尤为重要。 - - -指标仪表板帮助  [DevOps][2] 团队监控整个 DevOps 平台,以便实时响应问题。在处理生产环境宕机或者应用服务中断等情况时,指标仪表板显得尤为重要。 - -DevOps 仪表板聚合了多个监测工具的指标,为开发和运维团队生成监控报告。 它还允许团队跟踪多项指标,例如服务部署时间,程序bug,报错信息,工作项,待办事项等等。 +DevOps 仪表板聚合了多个监测工具的指标,为开发和运维团队生成监控报告。它还允许团队跟踪多项指标,例如服务部署时间、程序 bug、报错信息、工作项、待办事项等等。 下面三种指标仪表板可以帮助 DevOps 团队监测系统,改善服务性能。 ### 敏捷项目管理仪表板 -这种类型的仪表板为 DevOps 团队的工作项提供可视化视图,优化敏捷项目的工作流。 有利于提高团队协作效率,进行可视化工作并提供灵活的视图—就像我们过去在白板上使用便利贴来共享项目进度,问题和待办事项一样。 +这种类型的仪表板为 DevOps 团队的工作项提供可视化视图,优化敏捷项目的工作流。有利于提高团队协作效率,对工作进行可视化并提供灵活的视图 —— 就像我们过去在白板上使用便利贴来共享项目进度、议题issue和待办事项一样。 -- [Kanban boards][3] 允许 DevOps 团队创建卡片,标签,任务和列,便于持续交付敏捷项目。 +- [Kanban boards][3] 允许 DevOps 团队创建卡片、标签、任务和栏目,便于持续交付敏捷项目。 - [Burndown charts][4] 对指定时间段内未完成的工作或待办事项提供可视化视图,并记录团队当前的效率和轨迹,这些指标通常用于敏捷项目和 DevOps 项目管理。 -- [Jira boards][5] 帮助 DevOps 团队创建问题,计划迭代并生成团队总结。 这些灵活的仪表板还能帮助团队综合考虑并确定个人和团队任务的优先级;实时查看,汇报和跟踪正在进行的工作; 提高团队绩效。 -- [GitHub project boards][6] 帮助确定团队任务的优先级。 它们还支持拉请求,因此团队成员可以方便地提交 DevOps 项目信息。 - - +- [Jira boards][5] 帮助 DevOps 团队创建议题、计划迭代并生成团队总结。这些灵活的仪表板还能帮助团队综合考虑并确定个人和团队任务的优先级;实时查看、汇报和跟踪正在进行的工作;并提高团队绩效。 +- [GitHub project boards][6] 帮助确定团队任务的优先级。它们还支持拉取请求,因此团队成员可以方便地提交 DevOps 项目相关的信息。 ### 应用程序监控仪表板 -开发者负责优化应用和服务的性能,并开发新功能。 应用程序监控面板则帮助开发者在持续集成/持续开发CI / CD流程下,加快修复bug,增强程序健壮性,发布安全修丁的进度。另外,这些可视化仪表板有利于查看请求模式,请求耗时,报错和网络拓扑信息。 +开发者负责优化应用和服务的性能,并开发新功能。应用程序监控面板则帮助开发者在持续集成/持续开发CI / CD流程下,加快修复 bug、增强程序健壮性、发布安全修丁的进度。另外,这些可视化仪表板有利于查看请求模式、请求耗时、报错和网络拓扑信息。 -- [Jaeger][7] 帮助开发人员跟踪请求数量,请求响应时间等。 对于分布式网络系统上的云原生应用程序,它还使用 [Istio 服务网格][8]加强了监控和跟踪。 +- [Jaeger][7] 帮助开发人员跟踪请求数量、请求响应时间等。对于分布式网络系统上的云原生应用程序,它还使用 [Istio 服务网格][8]加强了监控和跟踪。 - [OpenCensus][9] 帮助团队查看运行应用程序的主机上的数据,它还提供了一个可插拔的导出系统,用于将数据导出到数据中心。 - - ### DevOps 平台监控面板 -你可能使用多种技术和工具在云上或本地构建 DevOps 平台,但 Linux 容器管理工具(如 Kubernetes 和 OpenShift )更利于搭建出一个成功的 DevOps 平台。 因为 Linux 容器的不可变性和可移植性使得应用程序从开发环境到生产环境的编译,测试和部署变得更快更容易。 - - - -DevOps 平台监控仪表板帮助运营团队从机器/节点故障和服务报错中,收集各种按时序排列的数据,用于编排应用程序容器和基于软件的基础架构,如网络(SDN)和存储(SDS)。 这些仪表板还能可视化多维数据格式,方便地查询数据模式。 - -- [Prometheus dashboards][12] 从平台节点或者运行中的容器化应用中收集指标。帮助DevOps团队构建基于指标的监控系统和仪表板,监控微服务的客户端/服务器工作负载,及时识别出异常节点故障。 -- [Grafana boards][13] 帮助收集事件驱动的各项指标,包括服务响应持续时间,请求量,客户端/服务器client/server工作负载,网络流量等,并提供了可视化面板。 DevOps 团队可以通过多种方式分享面板,也可以生成加密的监控数据快照分享给其他团队。 +你可能使用多种技术和工具在云上或本地构建 DevOps 平台,但 Linux 容器管理工具(如 Kubernetes 和 OpenShift )更利于搭建出一个成功的 DevOps 平台。因为 Linux 容器的不可变性和可移植性使得应用程序从开发环境到生产环境的编译、测试和部署变得更快更容易。 +DevOps 平台监控仪表板帮助运营团队从机器/节点故障和服务报错中收集各种按时序排列的数据,用于编排应用程序容器和基于软件的基础架构,如网络(SDN)和存储(SDS)。这些仪表板还能可视化多维数据格式,方便地查询数据模式。 +- [Prometheus dashboards][12] 从平台节点或者运行中的容器化应用中收集指标。帮助 DevOps 团队构建基于指标的监控系统和仪表板,监控微服务的客户端/服务器工作负载,及时识别出异常节点故障。 +- [Grafana boards][13] 帮助收集事件驱动的各项指标,包括服务响应持续时间、请求量、客户端/服务器client/server工作负载、网络流量等,并提供了可视化面板。DevOps 团队可以通过多种方式分享指标面板,也可以生成编码的当前监控数据快照分享给其他团队。 ### 总结 -这些仪表板提供了可视化的工作流程,能够发现团队协作,应用程序交付和平台状态中的各种问题。它们帮助开发团队增强其在快速应用交付、安全运行和自动化 CI/CD 等领域的能力。 +这些仪表板提供了可视化的工作流程,能够发现团队协作、应用程序交付和平台状态中的各种问题。它们帮助开发团队增强其在快速应用交付、安全运行和自动化 CI/CD 等领域的能力。 ------ @@ -66,13 +56,13 @@ via: https://opensource.com/article/19/7/dashboards-devops-teams 作者:[Daniel Oh][a] 选题:[lujun9972][b] 译者:[hello-wn](https://github.com/hello-wn) -校对:[校对者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/daniel-ohhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/heronthecli [b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- "metrics and data shown on a computer screen" +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png [2]: https://opensource.com/resources/devops [3]: https://opensource.com/article/19/1/productivity-tool-taskboard [4]: https://openpracticelibrary.com/practice/burndown/ From a9aa0bdb412d11dd39e6509640f23fb81090e892 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 4 Aug 2019 08:35:02 +0800 Subject: [PATCH 275/951] PUB @hello-wn https://linux.cn/article-11183-1.html --- .../20190724 3 types of metric dashboards for DevOps teams.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190724 3 types of metric dashboards for DevOps teams.md (98%) diff --git a/translated/tech/20190724 3 types of metric dashboards for DevOps teams.md b/published/20190724 3 types of metric dashboards for DevOps teams.md similarity index 98% rename from translated/tech/20190724 3 types of metric dashboards for DevOps teams.md rename to published/20190724 3 types of metric dashboards for DevOps teams.md index febb340a4a..8d2f7aebe5 100644 --- a/translated/tech/20190724 3 types of metric dashboards for DevOps teams.md +++ b/published/20190724 3 types of metric dashboards for DevOps teams.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "hello-wn" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-11183-1.html" [#]: subject: "3 types of metric dashboards for DevOps teams" [#]: via: "https://opensource.com/article/19/7/dashboards-devops-teams" [#]: author: "Daniel Oh https://opensource.com/users/daniel-oh" From ac3bc2b2cd4e88c7286071bee7ad638d8709d314 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 4 Aug 2019 09:50:26 +0800 Subject: [PATCH 276/951] PUB @wxy https://linux.cn/article-11185-1.html --- ...90729 Command line quick tips- More about permissions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190729 Command line quick tips- More about permissions.md (98%) diff --git a/translated/tech/20190729 Command line quick tips- More about permissions.md b/published/20190729 Command line quick tips- More about permissions.md similarity index 98% rename from translated/tech/20190729 Command line quick tips- More about permissions.md rename to published/20190729 Command line quick tips- More about permissions.md index 87d603e139..bbe0b4c66a 100644 --- a/translated/tech/20190729 Command line quick tips- More about permissions.md +++ b/published/20190729 Command line quick tips- More about permissions.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11185-1.html) [#]: subject: (Command line quick tips: More about permissions) [#]: via: (https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/) [#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) From 166b902dbeaa64e22db188d2d76ba19883b282b7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 4 Aug 2019 20:37:49 +0800 Subject: [PATCH 277/951] APL --- ...res AI algorithms fighting harmful content, and more news.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md b/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md index c9d67696bf..ee8b131ec9 100644 --- a/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md +++ b/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2170828944df2d5502a5a28954b50d48d28d82c7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 4 Aug 2019 21:22:21 +0800 Subject: [PATCH 278/951] TSL&PRF @wxy --- ...fighting harmful content, and more news.md | 85 ------------------- ...fighting harmful content, and more news.md | 80 +++++++++++++++++ 2 files changed, 80 insertions(+), 85 deletions(-) delete mode 100644 sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md create mode 100644 translated/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md diff --git a/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md b/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md deleted file mode 100644 index ee8b131ec9..0000000000 --- a/sources/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news) -[#]: via: (https://opensource.com/article/19/8/news-august-3) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) - -The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news -====== -Catch up on the biggest open source headlines from the past two weeks. -![Weekly news roundup with TV][1] - -In this edition of our open source news roundup, we share Facebook's choice to open source two algorithms for finding harmful content, Apple's new role in the Data Transfer Project, and more news you should know. - -### Facebook open sources algorithms used to find harmful content - -Facebook announced that it has [open sourced two algorithms][2] used to find child exploitation, threats of terrorism, and graphic violence on the platform. In a blog post on August 1st, Facebook shared that PDQ and TMK+PDQF–two technologies that store files as digital hashes, then compare them with known examples of harmful content–are [now live on GitHub][3].  - -The code release comes amidst increased pressure to get harmful content off the platform as soon as possible. After March's mass murder in New Zealand was streamed on Facebook Live, the Australian government [threatened Facebook execs with fines and jail time][4] if the video wasn't promptly removed. By releasing the source code for these algorithms, Facebook said that it hopes nonprofits, tech companies, and solo developers can all help them find and remove harmful content faster.  - -### Alibaba launches the fastest open source CPU - -Pingtouge Semiconductor - an Alibaba subsidiary - [announced its Xuantie 91 processor][5] last month. It's equipped to manage infrastructure for AI, the IoT, 5G, and autonomous vehicles, among other projects. It boasts a a 7.1 Coremark/MHz, making it the fastest open source CPU on the market. - -Pintogue announced plans to make its polished code available on GitHub this September. Analysts view this release as a power move to help China hit its goal of using local suppliers to meet 40 percent of processor demand by 2021. Recent tariffs on behalf of the U.S. threaten to derail this goal, creating the need for open source computer components. - -### Mattermost makes the case for open source collaboration apps - -All open source communities benefit from one or more places to communicate with each other. The world of team chat apps seems dominated by minimal, mighty tools like Slack and Microsoft Teams. Most options are cloud-based and proprietary; Mattermost takes a different approach by selling the value of open source collaboration apps. - -> “People want an open-source alternative because they need the trust, the flexibility and the innovation that only open source is able to deliver,” said Ian Tien, co-founder and CEO of Mattermost. - -With clients that range from Uber to the Department of Defense, Mattermost cornered a crucial market: Teams that want open source software they can trust and install on their own servers. For businesses that need collaboration apps to run on their internal infrastructure, Mattermost fills a gap that [Atlassian left bare][6]. In an article for Computerworld, Matthew Finnegan [explores][7] why on-premises, open source chat tools aren't dead yet. - -### Apple joins the open source Data Transfer Project - -Google, Facebook, Twitter, and Microsoft united last year to create the Data Transfer Project (DTP). Hailed as a way to boost data security and user agency over their own data, the DTP is a rare show of solidarity in tech. This week, Apple announced that they'll [join the fold][8].  - -The DTP's goal is to help users transfer their data from one online service to another via an open source platform. DTP aims to take out the middleman by using APIs and authorization tools to let users transfer their data from one service to another. This would erase the need for users to download their data, then upload it to another service. Apple's choice to join the DTP will allow users to transfer data in and out of iCloud, and could be a big win for privacy advocates. - -#### In other news - - * [FlexiWAN's open source SD-WAN available for download in public beta release][9] - - * [Open source Windows Calculator app to get Always-on-Top mode][10] - - * [With Zowe, open source and DevOps are democratizing the mainframe computer][11] - - * [Mozilla debuts implementation of WebThings Gateway open source router firmware][12] - - * [Updated: Contributing to the Mozilla code base][13] - - - - -_Thanks, as always, to Opensource.com staff members and moderators for their help this week._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/news-august-3 - -作者:[Lauren Maffeo][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/lmaffeo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV) -[2]: https://www.theverge.com/2019/8/1/20750752/facebook-child-exploitation-terrorism-open-source-algorithm-pdq-tmk -[3]: https://github.com/facebook/ThreatExchange/tree/master/hashing/tmk -[4]: https://www.buzzfeed.com/hannahryan/social-media-facebook-livestreaming-laws-christchurch -[5]: https://hexus.net/tech/news/cpu/133229-alibabas-16-core-risc-v-fastest-open-source-cpu-yet/ -[6]: https://lab.getapp.com/atlassian-slack-on-premise-software/ -[7]: https://www.computerworld.com/article/3428679/mattermost-makes-case-for-open-source-as-team-messaging-market-booms.html -[8]: https://www.techspot.com/news/81221-apple-joins-data-transfer-project-open-source-project.html -[9]: https://www.fiercetelecom.com/telecom/flexiwan-s-open-source-sd-wan-available-for-download-public-beta-release -[10]: https://mspoweruser.com/open-source-windows-calculator-app-to-get-always-on-top-mode/ -[11]: https://siliconangle.com/2019/07/29/zowe-open-source-devops-democratizing-mainframe-computer/ -[12]: https://venturebeat.com/2019/07/25/mozilla-debuts-webthings-gateway-open-source-router-firmware-for-turris-omnia/ -[13]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction diff --git a/translated/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md b/translated/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md new file mode 100644 index 0000000000..88d301c01c --- /dev/null +++ b/translated/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news) +[#]: via: (https://opensource.com/article/19/8/news-august-3) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) + +开源新闻综述:有史以来最快的开源 CPU、Facebook 分享对抗有害内容的 AI 算法 +====== + +> 不要错过最近两周最大的开源新闻。 + +![Weekly news roundup with TV][1] + +在本期开源新闻综述中,我们分享了 Facebook 开源了两种算法来查找有害内容,Apple 在数据传输项目中的新角色以及你应该知道的更多新闻。 + +### Facebook 开源算法用于查找有害内容 + +Facebook 宣布它[开源两种算法][2]用于在该平台上发现儿童剥削、恐怖主义威胁和写实暴力。在 8 月 1 日的博客文章中,Facebook 分享了 PDQ 和 TMK + PDQF 这两种将文件存储为数字哈希的技术,然后将它们与已知的有害内容示例进行比较 - [现在已放在 GitHub 上][3]。 + +该代码是在 Facebook 要尽快将有害内容从平台上移除的压力之下发布的。三月份在新西兰的大规模谋杀案被曝光在 Facebook Live 上,澳大利亚政府[威胁][4]如果视频没有及时删除 Facebook 高管将被处以罚款和入狱。通过发布这些算法的源代码,Facebook 表示希望非营利组织、科技公司和独立开发人员都能帮助他们更快地找到并删除有害内容。 + +### 阿里巴巴发布了最快的开源 CPU + +上个月,阿里巴巴的子公司平头哥半导体公司[发布了其玄铁 91 处理器][5]。它可以用于人工智能、物联网、5G 和自动驾驶汽车等基础设施。它拥有 7.1 Coremark/MHz 的基准,使其成为市场上最快的开源 CPU。 + +平头哥宣布计划在今年 9 月在 GitHub 上提供其优质代码。分析师认为此次发布旨在帮助中国实现其目标,即到 2021 年使用本地供应商满足 40% 的处理器需求。近期美国的关税调整威胁要破坏这一目标,从而造成了对开源计算机组件的需求。 + +### Mattermost 为开源协作应用提供了理由 + +所有开源社区都受益于可以从一个或多个地方彼此进行通信。团队聊天应用程序的世界似乎由 Slack 和 Microsoft Teams 等极少数的强大工具主导。大多数选择都是基于云的和专有产品的;而 Mattermost 采用了不同的方法,销售开源协作应用程序的价值。 + +“人们想要一个开源替代品,因为他们需要信任、灵活性和只有开源才能提供的创新,”Mattermost 的联合创始人兼首席执行官 Ian Tien 说。 + +随着从优步到国防部的客户,Mattermost 走上了一个关键市场:需要开源软件的团队,他们可以信任这些软件并安装在他们自己的服务器上。对于需要协作应用程序在其内部基础架构上运行的企业,Mattermost 填补了 [Atlassian 离开后][6] 的空白。在 Computerworld 的一篇文章中,Matthew Finnegan [探讨][7]了为什么在本地部署的开源聊天工具尚未死亡。 + +### Apple 加入了开源数据传输项目 + +Google、Facebook、Twitter 和微软去年联合创建了数据传输项目Data Transfer Project(DTP)。DTP 被誉为通过自己的数据提升数据安全性和用户代理的一种方式,是一种罕见的技术上的团结展示。本周,Apple 宣布他们也将[加入][8]。 + +DTP 的目标是帮助用户通过开源平台将数据从一个在线服务转移到另一个在线服务。DTP 旨在通过使用 API 和授权工具来取消中间人,以便用户将数据从一个服务转移到另一个服务。这将消除用户下载数据然后将其上传到另一个服务的需要。Apple 加入 DTP 的选择将允许用户将数据传入和传出 iCloud,这可能是隐私权拥护者的一大胜利。 + +#### 其它新闻 + +* [FlexiWAN 的开源 SD-WAN 可在公共测试版中下载] [9] +* [开源的 Windows 计算器应用程序获得了永远置顶模式] [10] +* [通过 Zowe,开源和 DevOps 正在使大型计算机民主化] [11] +* [Mozilla 首次推出 WebThings Gateway 开源路由器固件的实现] [12] +* [更新:向 Mozilla 代码库做成贡献][13] + +*谢谢 Opensource.com 的工作人员和主持人本周的帮助。* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/news-august-3 + +作者:[Lauren Maffeo][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://opensource.com/users/lmaffeo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV) +[2]: https://www.theverge.com/2019/8/1/20750752/facebook-child-exploitation-terrorism-open-source-algorithm-pdq-tmk +[3]: https://github.com/facebook/ThreatExchange/tree/master/hashing/tmk +[4]: https://www.buzzfeed.com/hannahryan/social-media-facebook-livestreaming-laws-christchurch +[5]: https://hexus.net/tech/news/cpu/133229-alibabas-16-core-risc-v-fastest-open-source-cpu-yet/ +[6]: https://lab.getapp.com/atlassian-slack-on-premise-software/ +[7]: https://www.computerworld.com/article/3428679/mattermost-makes-case-for-open-source-as-team-messaging-market-booms.html +[8]: https://www.techspot.com/news/81221-apple-joins-data-transfer-project-open-source-project.html +[9]: https://www.fiercetelecom.com/telecom/flexiwan-s-open-source-sd-wan-available-for-download-public-beta-release +[10]: https://mspoweruser.com/open-source-windows-calculator-app-to-get-always-on-top-mode/ +[11]: https://siliconangle.com/2019/07/29/zowe-open-source-devops-democratizing-mainframe-computer/ +[12]: https://venturebeat.com/2019/07/25/mozilla-debuts-webthings-gateway-open-source-router-firmware-for-turris-omnia/ +[13]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction From 6c40e767c8bb5b23268736a9c65a4dc6b316e52e Mon Sep 17 00:00:00 2001 From: beamrolling <33046439+beamrolling@users.noreply.github.com> Date: Sun, 4 Aug 2019 22:34:48 +0800 Subject: [PATCH 279/951] =?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 --- ...0725 How to transition into a career as a DevOps engineer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190725 How to transition into a career as a DevOps engineer.md b/sources/talk/20190725 How to transition into a career as a DevOps engineer.md index f3f97ff6fa..05ae0f717e 100644 --- a/sources/talk/20190725 How to transition into a career as a DevOps engineer.md +++ b/sources/talk/20190725 How to transition into a career as a DevOps engineer.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (beamrolling) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 1789b8e5a5d2157d1334f982ce0000a3dccf0168 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 4 Aug 2019 23:19:53 +0800 Subject: [PATCH 280/951] PUB @wxy https://linux.cn/article-11187-1.html --- ...s AI algorithms fighting harmful content, and more news.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md (98%) diff --git a/translated/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md b/published/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md similarity index 98% rename from translated/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md rename to published/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md index 88d301c01c..d721d097c0 100644 --- a/translated/news/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md +++ b/published/20190803 The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11187-1.html) [#]: subject: (The fastest open source CPU ever, Facebook shares AI algorithms fighting harmful content, and more news) [#]: via: (https://opensource.com/article/19/8/news-august-3) [#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) From e272a484a8fb5191dff2bb3e7c05aecfca2f64f0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 4 Aug 2019 23:31:38 +0800 Subject: [PATCH 281/951] APL --- ...180928 Quiet log noise with Python and machine learning.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20180928 Quiet log noise with Python and machine learning.md b/sources/tech/20180928 Quiet log noise with Python and machine learning.md index f1fe2f1b7f..2252b9dfde 100644 --- a/sources/tech/20180928 Quiet log noise with Python and machine learning.md +++ b/sources/tech/20180928 Quiet log noise with Python and machine learning.md @@ -1,3 +1,5 @@ +wxy applied + Quiet log noise with Python and machine learning ====== @@ -92,7 +94,7 @@ via: https://opensource.com/article/18/9/quiet-log-noise-python-and-machine-lear 作者:[Tristan de Cacqueray][a] 选题:[lujun9972](https://github.com/lujun9972) -译者:[译者ID](https://github.com/译者ID) +译者:[wxy](https://github.com/wxy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cbd1905432f5d5bf0dfdc8a1458ba3b2ca996a7b Mon Sep 17 00:00:00 2001 From: furrybear Date: Sun, 4 Aug 2019 23:52:09 +0800 Subject: [PATCH 282/951] =?UTF-8?q?translating=F0=9F=99=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20190730 How to create a pull request in GitHub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190730 How to create a pull request in GitHub.md b/sources/tech/20190730 How to create a pull request in GitHub.md index 41d49bbea5..b41dec1ee6 100644 --- a/sources/tech/20190730 How to create a pull request in GitHub.md +++ b/sources/tech/20190730 How to create a pull request in GitHub.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (furrybear) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2b60853b947fceac36b74fb17c96bff84600ab9d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Aug 2019 00:23:21 +0800 Subject: [PATCH 283/951] TSL&PRF --- ... noise with Python and machine learning.md | 112 ------------------ ... noise with Python and machine learning.md | 106 +++++++++++++++++ 2 files changed, 106 insertions(+), 112 deletions(-) delete mode 100644 sources/tech/20180928 Quiet log noise with Python and machine learning.md create mode 100644 translated/tech/20180928 Quiet log noise with Python and machine learning.md diff --git a/sources/tech/20180928 Quiet log noise with Python and machine learning.md b/sources/tech/20180928 Quiet log noise with Python and machine learning.md deleted file mode 100644 index 2252b9dfde..0000000000 --- a/sources/tech/20180928 Quiet log noise with Python and machine learning.md +++ /dev/null @@ -1,112 +0,0 @@ -wxy applied - -Quiet log noise with Python and machine learning -====== - -Logreduce saves debugging time by picking out anomalies from mountains of log data. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sound-radio-noise-communication.png?itok=KMNn9QrZ) - -Continuous integration (CI) jobs can generate massive volumes of data. When a job fails, figuring out what went wrong can be a tedious process that involves investigating logs to discover the root cause—which is often found in a fraction of the total job output. To make it easier to separate the most relevant data from the rest, the [Logreduce][1] machine learning model is trained using previous successful job runs to extract anomalies from failed runs' logs. - -This principle can also be applied to other use cases, for example, extracting anomalies from [Journald][2] or other systemwide regular log files. - -### Using machine learning to reduce noise - -A typical log file contains many nominal events ("baselines") along with a few exceptions that are relevant to the developer. Baselines may contain random elements such as timestamps or unique identifiers that are difficult to detect and remove. To remove the baseline events, we can use a [k-nearest neighbors pattern recognition algorithm][3] (k-NN). - -![](https://opensource.com/sites/default/files/uploads/ml-generic-workflow.png) - -Log events must be converted to numeric values for k-NN regression. Using the generic feature extraction tool [HashingVectorizer][4] enables the process to be applied to any type of log. It hashes each word and encodes each event in a sparse matrix. To further reduce the search space, tokenization removes known random words, such as dates or IP addresses. - -![](https://opensource.com/sites/default/files/uploads/hashing-vectorizer.png) - -Once the model is trained, the k-NN search tells us the distance of each new event from the baseline. - -![](https://opensource.com/sites/default/files/uploads/kneighbors.png) - -This [Jupyter notebook][5] demonstrates the process and graphs the sparse matrix vectors. - -![](https://opensource.com/sites/default/files/uploads/anomaly-detection-with-scikit-learn.png) - -### Introducing Logreduce - -The Logreduce Python software transparently implements this process. Logreduce's initial goal was to assist with [Zuul CI][6] job failure analyses using the build database, and it is now integrated into the [Software Factory][7] development forge's job logs process. - -At its simplest, Logreduce compares files or directories and removes lines that are similar. Logreduce builds a model for each source file and outputs any of the target's lines whose distances are above a defined threshold by using the following syntax: **distance | filename:line-number: line-content**. - -``` -$ logreduce diff /var/log/audit/audit.log.1 /var/log/audit/audit.log -INFO  logreduce.Classifier - Training took 21.982s at 0.364MB/s (1.314kl/s) (8.000 MB - 28.884 kilo-lines) -0.244 | audit.log:19963:        type=USER_AUTH acct="root" exe="/usr/bin/su" hostname=managesf.sftests.com -INFO  logreduce.Classifier - Testing took 18.297s at 0.306MB/s (1.094kl/s) (5.607 MB - 20.015 kilo-lines) -99.99% reduction (from 20015 lines to 1 - -``` - -A more advanced Logreduce use can train a model offline to be reused. Many variants of the baselines can be used to fit the k-NN search tree. - -``` -$ logreduce dir-train audit.clf /var/log/audit/audit.log.* -INFO  logreduce.Classifier - Training took 80.883s at 0.396MB/s (1.397kl/s) (32.001 MB - 112.977 kilo-lines) -DEBUG logreduce.Classifier - audit.clf: written -$ logreduce dir-run audit.clf /var/log/audit/audit.log -``` - -Logreduce also implements interfaces to discover baselines for Journald time ranges (days/weeks/months) and Zuul CI job build histories. It can also generate HTML reports that group anomalies found in multiple files in a simple interface. - -![](https://opensource.com/sites/default/files/uploads/html-report.png) - -### Managing baselines - -The key to using k-NN regression for anomaly detection is to have a database of known good baselines, which the model uses to detect lines that deviate too far. This method relies on the baselines containing all nominal events, as anything that isn't found in the baseline will be reported as anomalous. - -CI jobs are great targets for k-NN regression because the job outputs are often deterministic and previous runs can be automatically used as baselines. Logreduce features Zuul job roles that can be used as part of a failed job post task in order to issue a concise report (instead of the full job's logs). This principle can be applied to other cases, as long as baselines can be constructed in advance. For example, a nominal system's [SoS report][8] can be used to find issues in a defective deployment. - -![](https://opensource.com/sites/default/files/uploads/baselines.png) - -### Anomaly classification service - -The next version of Logreduce introduces a server mode to offload log processing to an external service where reports can be further analyzed. It also supports importing existing reports and requests to analyze a Zuul build. The services run analyses asynchronously and feature a web interface to adjust scores and remove false positives. - -![](https://opensource.com/sites/default/files/uploads/classification-interface.png) - -Reviewed reports can be archived as a standalone dataset with the target log files and the scores for anomalous lines recorded in a flat JSON file. - -### Project roadmap - -Logreduce is already being used effectively, but there are many opportunities for improving the tool. Plans for the future include: - - * Curating many annotated anomalies found in log files and producing a public domain dataset to enable further research. Anomaly detection in log files is a challenging topic, and having a common dataset to test new models would help identify new solutions. - * Reusing the annotated anomalies with the model to refine the distances reported. For example, when users mark lines as false positives by setting their distance to zero, the model could reduce the score of those lines in future reports. - * Fingerprinting archived anomalies to detect when a new report contains an already known anomaly. Thus, instead of reporting the anomaly's content, the service could notify the user that the job hit a known issue. When the issue is fixed, the service could automatically restart the job. - * Supporting more baseline discovery interfaces for targets such as SOS reports, Jenkins builds, Travis CI, and more. - - - -If you are interested in getting involved in this project, please contact us on the **#log-classify** Freenode IRC channel. Feedback is always appreciated! - -Tristan Cacqueray will present [Reduce your log noise using machine learning][9] at the [OpenStack Summit][10], November 13-15 in Berlin. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/9/quiet-log-noise-python-and-machine-learning - -作者:[Tristan de Cacqueray][a] -选题:[lujun9972](https://github.com/lujun9972) -译者:[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/tristanc -[1]: https://pypi.org/project/logreduce/ -[2]: http://man7.org/linux/man-pages/man8/systemd-journald.service.8.html -[3]: https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm -[4]: http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.HashingVectorizer.html -[5]: https://github.com/TristanCacqueray/anomaly-detection-workshop-opendev/blob/master/datasets/notebook/anomaly-detection-with-scikit-learn.ipynb -[6]: https://zuul-ci.org -[7]: https://www.softwarefactory-project.io -[8]: https://sos.readthedocs.io/en/latest/ -[9]: https://www.openstack.org/summit/berlin-2018/summit-schedule/speakers/4307 -[10]: https://www.openstack.org/summit/berlin-2018/ diff --git a/translated/tech/20180928 Quiet log noise with Python and machine learning.md b/translated/tech/20180928 Quiet log noise with Python and machine learning.md new file mode 100644 index 0000000000..d6471b3969 --- /dev/null +++ b/translated/tech/20180928 Quiet log noise with Python and machine learning.md @@ -0,0 +1,106 @@ +Logreduce:用 Python 和机器学习去除日志噪音 +====== + +> Logreduce 可以通过从大量日志数据中挑选出异常来节省调试时间。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sound-radio-noise-communication.png?itok=KMNn9QrZ) + +持续集成(CI)作业会生成大量数据。当一个作业失败时,弄清楚出了什么问题可能是一个繁琐的过程,它涉及到调查日志以发现根本原因 —— 这通常只能在全部的作业输出的一小部分中找到。为了更容易地将最相关的数据与其余数据分开,可以使用先前成功运行的作业结果来训练 [Logreduce][1] 机器学习模型,以从失败的运行日志中提取异常。 + +此方法也可以应用于其他用例,例如,从 [Journald][2] 或其他系统级的常规日志文件中提取异常。 + +### 使用机器学习来降低噪音 + +典型的日志文件包含许多标称事件(“基线”)以及与开发人员相关的一些例外事件。基线可能包含随机元素,例如难以检测和删除的时间戳或唯一标识符。要删除基线事件,我们可以使用 [k-最近邻模式识别算法][3](k-NN)。 + +![](https://opensource.com/sites/default/files/uploads/ml-generic-workflow.png) + +日志事件必须转换为可用于 k-NN 回归的数值。使用通用特征提取工具 [HashingVectorizer][4] 可以将该过程应用于任何类型的日志。它散列每个单词并在稀疏矩阵中对每个事件进行编码。为了进一步减少搜索空间,这个标记化过程删除了已知的随机单词,例如日期或 IP 地址。 + +![](https://opensource.com/sites/default/files/uploads/hashing-vectorizer.png) + +训练模型后,k-NN 搜索可以告诉我们每个新事件与基线的距离。 + +![](https://opensource.com/sites/default/files/uploads/kneighbors.png) + +这个 [Jupyter 笔记本][5] 演示了该稀疏矩阵向量的处理和图形。 + +![](https://opensource.com/sites/default/files/uploads/anomaly-detection-with-scikit-learn.png) + +### Logreduce 介绍 + +Logreduce Python 软件透明地实现了这个过程。Logreduce 的最初目标是使用构建数据库来协助分析 [Zuul CI][6] 作业的失败问题,现在它已集成到 [Software Factory 开发车间][7]的作业日志处理中。 + +最简单的是,Logreduce 会比较文件或目录并删除相似的行。Logreduce 为每个源文件构建模型,并使用以下语法输出距离高于定义阈值的任何目标行:`distance | filename:line-number: line-content`。 + +``` +$ logreduce diff /var/log/audit/audit.log.1 /var/log/audit/audit.log +INFO  logreduce.Classifier - Training took 21.982s at 0.364MB/s (1.314kl/s) (8.000 MB - 28.884 kilo-lines) +0.244 | audit.log:19963:        type=USER_AUTH acct="root" exe="/usr/bin/su" hostname=managesf.sftests.com +INFO  logreduce.Classifier - Testing took 18.297s at 0.306MB/s (1.094kl/s) (5.607 MB - 20.015 kilo-lines) +99.99% reduction (from 20015 lines to 1 + +``` + +更高级的 Logreduce 用法可以离线训练模型以便重复使用。可以使用基线的许多变体来拟合 k-NN 搜索树。 + +``` +$ logreduce dir-train audit.clf /var/log/audit/audit.log.* +INFO  logreduce.Classifier - Training took 80.883s at 0.396MB/s (1.397kl/s) (32.001 MB - 112.977 kilo-lines) +DEBUG logreduce.Classifier - audit.clf: written +$ logreduce dir-run audit.clf /var/log/audit/audit.log +``` + +Logreduce 还实现了接口,以发现 Journald 时间范围(天/周/月)和 Zuul CI 作业构建历史的基线。它还可以生成 HTML 报告,该报告在一个简单的界面中将在多个文件中发现的异常进行分组。 + +![](https://opensource.com/sites/default/files/uploads/html-report.png) + +### 管理基线 + +使用 k-NN 回归进行异常检测的关键是拥有一个已知良好基线的数据库,该模型使用数据库来检测偏离太远的日志行。此方法依赖于包含所有标称事件的基线,因为基线中未找到的任何内容都将报告为异常。 + +CI 作业是 k-NN 回归的重要目标,因为作业的输出通常是确定性的,之前的运行结果可以自动用作基线。 Logreduce 具有 Zuul 作业角色,可以将其用作失败的作业发布任务的一部分,以便发布简明报告(而不是完整作业的日志)。只要可以提前构建基线,该原则就可以应用于其他情况。例如,标称系统的 [SoS 报告][8] 可用于查找缺陷部署中的问题。 + +![](https://opensource.com/sites/default/files/uploads/baselines.png) + +### 异常分类服务 + +下一版本的 Logreduce 引入了一种服务器模式,可以将日志处理卸载到外部服务,在外部服务中可以进一步分析该报告。它还支持导入现有报告和请求以分析 Zuul 构建。这些服务以异步方式运行分析,并具有 Web 界面以调整分数并消除误报。 + +![](https://opensource.com/sites/default/files/uploads/classification-interface.png) + +已审核的报告可以作为独立数据集存档,其中包含目标日志文件和记录在一个普通的 JSON 文件中的异常行的分数。 + +### 项目路线图 + +Logreduce 已经能有效使用,但是有很多机会来改进该工具。未来的计划包括: + +* 策划在日志文件中发现的许多带注释的异常,并生成一个公共域数据集以进行进一步研究。日志文件中的异常检测是一个具有挑战性的主题,并且有一个用于测试新模型的通用数据集将有助于识别新的解决方案。 +* 重复使用带注释的异常模型来优化所报告的距离。例如,当用户通过将距离设置为零来将日志行标记为误报时,模型可能会降低未来报告中这些日志行的得分。 +* 对存档异常取指纹特征以检测新报告何时包含已知的异常。因此,该服务可以通知用户该作业遇到已知问题,而不是报告异常的内容。解决问题后,该服务可以自动重新启动该作业。 +* 支持更多基准发现接口,用于 SOS 报告、Jenkins 构建、Travis CI 等目标。 + +如果你有兴趣参与此项目,请通过 #log-classify Freenode IRC 频道与我们联系。欢迎反馈! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/9/quiet-log-noise-python-and-machine-learning + +作者:[Tristan de Cacqueray][a] +选题:[lujun9972](https://github.com/lujun9972) +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/tristanc +[1]: https://pypi.org/project/logreduce/ +[2]: http://man7.org/linux/man-pages/man8/systemd-journald.service.8.html +[3]: https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm +[4]: http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.HashingVectorizer.html +[5]: https://github.com/TristanCacqueray/anomaly-detection-workshop-opendev/blob/master/datasets/notebook/anomaly-detection-with-scikit-learn.ipynb +[6]: https://zuul-ci.org +[7]: https://www.softwarefactory-project.io +[8]: https://sos.readthedocs.io/en/latest/ +[9]: https://www.openstack.org/summit/berlin-2018/summit-schedule/speakers/4307 +[10]: https://www.openstack.org/summit/berlin-2018/ From 1c9545bc95e7050cd6a87f85c46aa49129a75500 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 5 Aug 2019 00:52:52 +0800 Subject: [PATCH 284/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20How=20?= =?UTF-8?q?to=20Install=20and=20Configure=20PostgreSQL=20on=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 How to Install and Configure PostgreSQL on Ubuntu.md --- ...tall and Configure PostgreSQL on Ubuntu.md | 267 ++++++++++++++++++ 1 file changed, 267 insertions(+) create mode 100644 sources/tech/20190805 How to Install and Configure PostgreSQL on Ubuntu.md diff --git a/sources/tech/20190805 How to Install and Configure PostgreSQL on Ubuntu.md b/sources/tech/20190805 How to Install and Configure PostgreSQL on Ubuntu.md new file mode 100644 index 0000000000..8b9677ba83 --- /dev/null +++ b/sources/tech/20190805 How to Install and Configure PostgreSQL on Ubuntu.md @@ -0,0 +1,267 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Install and Configure PostgreSQL on Ubuntu) +[#]: via: (https://itsfoss.com/install-postgresql-ubuntu/) +[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) + +How to Install and Configure PostgreSQL on Ubuntu +====== + +_**In this tutorial, you’ll learn how to install and use the open source database PostgreSQL on Ubuntu Linux.**_ + +[PostgreSQL][1] (or Postgres) is a powerful, free and open-source relational database management system ([RDBMS][2]) that has a strong reputation for reliability, feature robustness, and performance. It is designed to handle various tasks, of any size. It is cross-platform, and the default database for [macOS Server][3]. + +PostgreSQL might just be the right tool for you if you’re a fan of a simple to use SQL database manager. It supports SQL standards and offers additional features, while also being heavily extendable by the user as the user can add data types, functions, and do many more things. + +Earlier I discussed [installing MySQL on Ubuntu][4]. In this article, I’ll show you how to install and configure PostgreSQL, so that you are ready to use it to suit whatever your needs may be. + +![][5] + +### Installing PostgreSQL on Ubuntu + +PostgreSQL is available in Ubuntu main repository. However, like many other development tools, it may not be the latest version. + +First check the PostgreSQL version available in [Ubuntu repositories][6] using this [apt command][7] in the terminal: + +``` +apt show postgresql +``` + +In my Ubuntu 18.04, it showed that the available version of PostgreSQL is version 10 (10+190 means version 10) whereas PostgreSQL version 11 is already released. + +``` +Package: postgresql +Version: 10+190 +Priority: optional +Section: database +Source: postgresql-common (190) +Origin: Ubuntu +``` + +Based on this information, you can make your mind whether you want to install the version available from Ubuntu or you want to get the latest released version of PostgreSQL. + +I’ll show both methods to you. + +#### Method 1: Install PostgreSQL from Ubuntu repositories + +In the terminal, use the following command to install PostgreSQL + +``` +sudo apt update +sudo apt install postgresql postgresql-contrib +``` + +Enter your password when asked and you should have it installed in a few seconds/minutes depending on your internet speed. Speaking of that, feel free to check various [network bandwidth in Ubuntu][8]. + +What is postgresql-contrib? + +The postgresql-contrib or the contrib package consists some additional utilities and functionalities that are not part of the core PostgreSQL package. In most cases, it’s good to have the contrib package installed along with the PostgreSQL core. + +[][9] + +Suggested read  Fix gvfsd-smb-browse Taking 100% CPU In Ubuntu 16.04 + +#### Method 2: Installing the latest version 11 of PostgreSQL in Ubuntu + +To install PostgreSQL 11, you need to add the official PostgreSQL repository in your sources.list, add its certificate and then install it from there. + +Don’t worry, it’s not complicated. Just follow these steps. + +Add the GPG key first: + +``` +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - +``` + +Now add the repository with the below command. If you are using Linux Mint, you’ll have to manually replace the `lsb_release -cs` the Ubuntu version your Mint release is based on. + +``` +sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' +``` + +Everything is ready now. Install PostgreSQL with the following commands: + +``` +sudo apt update +sudo apt install postgresql postgresql-contrib +``` + +PostgreSQL GUI application + +You may also install a GUI application (pgAdmin) for managing PostgreSQL databases: + +_sudo apt install pgadmin4_ + +### Configuring PostgreSQL + +You can check if **PostgreSQL** is running by executing: + +``` +service postgresql status +``` + +Via the **service** command you can also **start**, **stop** or **restart** **postgresql**. Typing in **service postgresql** and pressing **Enter** should output all options. Now, onto the users. + +By default, PostgreSQL creates a special user postgres that has all rights. To actually use PostgreSQL, you must first log in to that account: + +``` +sudo su postgres +``` + +Your prompt should change to something similar to: + +``` +[email protected]:/home/ubuntu$ +``` + +Now, run the **PostgreSQL Shell** with the utility **psql**: + +``` +psql +``` + +You should be prompted with: + +``` +postgress=# +``` + +You can type in **\q** to **quit** and **\?** for **help**. + +To see all existing tables, enter: + +``` +\l +``` + +The output will look similar to this (Hit the key **q** to exit this view): + +![PostgreSQL Tables][10] + +With **\du** you can display the **PostgreSQL users**: + +![PostgreSQLUsers][11] + +You can change the password of any user (including **postgres**) with: + +``` +ALTER USER postgres WITH PASSWORD 'my_password'; +``` + +**Note:** _Replace **postgres** with the name of the user and **my_password** with the wanted password._ Also, don’t forget the **;** (**semicolumn**) after every statement. + +It is recommended that you create another user (it is bad practice to use the default **postgres** user). To do so, use the command: + +``` +CREATE USER my_user WITH PASSWORD 'my_password'; +``` + +If you run **\du**, you will see, however, that **my_user** has no attributes yet. Let’s add **Superuser** to it: + +``` +ALTER USER my_user WITH SUPERUSER; +``` + +You can **remove users** with: + +``` +DROP USER my_user; +``` + +To **log in** as another user, quit the prompt (**\q**) and then use the command: + +``` +psql -U my_user +``` + +You can connect directly to a database with the **-d** flag: + +``` +psql -U my_user -d my_db +``` + +You should call the PostgreSQL user the same as another existing user. For example, my use is **ubuntu**. To log in, from the terminal I use: + +``` +psql -U ubuntu -d postgres +``` + +**Note:** _You must specify a database (by default it will try connecting you to the database named the same as the user you are logged in as)._ + +If you have a the error: + +``` +psql: FATAL: Peer authentication failed for user "my_user" +``` + +Make sure you are logging as the correct user and edit **/etc/postgresql/11/main/pg_hba.conf** with administrator rights: + +``` +sudo vim /etc/postgresql/11/main/pg_hba.conf +``` + +**Note:** _Replace **11** with your version (e.g. **10**)._ + +Here, replace the line: + +``` +local all postgres peer +``` + +With: + +``` +local all postgres md5 +``` + +Then restart **PostgreSQL**: + +``` +sudo service postgresql restart +``` + +Using **PostgreSQL** is the same as using any other **SQL** type database. I won’t go into the specific commands, since this article is about getting you started with a working setup. However, here is a [very useful gist][12] to reference! Also, the man page (**man psql**) and the [documentation][13] are very helpful. + +[][14] + +Suggested read  [How To] Share And Sync Any Folder With Dropbox in Ubuntu + +**Wrapping Up** + +Reading this article has hopefully guided you through the process of installing and preparing PostgreSQL on an Ubuntu system. If you are new to SQL, you should read this article to know the [basic SQL commands][15]: + +[Basic SQL Commands][15] + +If you have any issues or questions, please feel free to ask in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-postgresql-ubuntu/ + +作者:[Sergiu][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/sergiu/ +[b]: https://github.com/lujun9972 +[1]: https://www.postgresql.org/ +[2]: https://www.codecademy.com/articles/what-is-rdbms-sql +[3]: https://www.apple.com/in/macos/server/ +[4]: https://itsfoss.com/install-mysql-ubuntu/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/install-postgresql-ubuntu.png?resize=800%2C450&ssl=1 +[6]: https://itsfoss.com/ubuntu-repositories/ +[7]: https://itsfoss.com/apt-command-guide/ +[8]: https://itsfoss.com/network-speed-monitor-linux/ +[9]: https://itsfoss.com/fix-gvfsd-smb-high-cpu-ubuntu/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/postgresql_tables.png?fit=800%2C303&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/postgresql_users.png?fit=800%2C244&ssl=1 +[12]: https://gist.github.com/Kartones/dd3ff5ec5ea238d4c546 +[13]: https://www.postgresql.org/docs/manuals/ +[14]: https://itsfoss.com/sync-any-folder-with-dropbox/ +[15]: https://itsfoss.com/basic-sql-commands/ From 08ec2ba3370cf78f8a53b7870da3760f989cd4da Mon Sep 17 00:00:00 2001 From: zionfuo Date: Mon, 5 Aug 2019 08:26:35 +0800 Subject: [PATCH 285/951] =?UTF-8?q?=F0=9F=8D=AD=20Update=20Blockchain=202.?= =?UTF-8?q?0=20Part=208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...on To Hyperledger Project (HLP) -Part 8.md | 88 ------------------- ...on To Hyperledger Project (HLP) -Part 8.md | 86 ++++++++++++++++++ 2 files changed, 86 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md create mode 100644 translated/tech/20190805 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md diff --git a/sources/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md b/sources/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md deleted file mode 100644 index bb1d187ea4..0000000000 --- a/sources/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Blockchain 2.0 – An Introduction To Hyperledger Project (HLP) [Part 8]) -[#]: via: (https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/) -[#]: author: (editor https://www.ostechnix.com/author/editor/) - -Blockchain 2.0 – An Introduction To Hyperledger Project (HLP) [Part 8] -====== - -![Introduction To Hyperledger Project][1] - -Once a new technology platform reaches a threshold level of popularity in terms of active development and commercial interests, major global companies and smaller start-ups alike rush to catch a slice of the pie. **Linux** was one such platform back in the day. Once the ubiquity of its applications was realized individuals, firms, and institutions started displaying their interest in it and by 2000 the **Linux foundation** was formed. - -The Linux foundation aims to standardize and develop Linux as a platform by sponsoring their development team. The Linux Foundation is a non-profit organization that is supported by software and IT behemoths such as Microsoft, Oracle, Samsung, Cisco, IBM, Intel among others[1]. This is excluding the hundreds of individual developers who offer their services for the betterment of the platform. Over the years the Linux foundation has taken many projects under its roof. The **Hyperledger Project** is their fastest growing one till date. - -Such consortium led development have a lot of advantages when it comes to furthering tech into usable useful forms. Developing the standards, libraries and all the back-end protocols for large scale projects are expensive and resource intensive without a shred of income generating from it. Hence, it makes sense for companies to pool in their resources to develop the common “boring” parts by supporting such organizations and later upon completing work on these standard parts to simply plug & play and customize their products afterwards. Apart from the economics of the model, such collaborative efforts also yield standards allowing for easier use and integration into aspiring products and services. - -Other major innovations that were once or are currently being developed following the said consortium model include standards for WiFi (The Wi-Fi alliance), Mobile Telephony etc. - -### Introduction to Hyperledger Project (HLP) - -The Hyperledger project was launched in December 2015 by the Linux foundation as is currently among the fastest growing project they’ve incubated. It’s an umbrella organization for collaborative efforts into developing and advancing tools & standards for [**blockchain**][2] based distributed ledger technologies(DLT). Major industry players supporting the project include **IBM** , **Intel** and **SAP Ariba** among [**others**][3]. The HLP aims to create frameworks for individuals and companies to create shared as well as closed blockchains as required to further their own requirements. The design principles include a strong tilt toward developing a globally deployable, scalable, robust platform with a focus on privacy, and future auditability[2]. It is also important to note that most of the blockchains proposed and the frame. - -### Development goals and structure: Making it plug & play - -Although enterprise facing platforms exist from the likes of the Ethereum alliance, HLP is by definition business facing and supported by industry behemoths who contribute and further development in the many modules that come under the HLP banner. The HLP incubates projects in development after their induction into the cause and after finishing work on it and correcting the knick-knacks rolls it out for the public. Members of the Hyperledger project contribute their own work such as how IBM contributed their Fabric platform for collaborative development. The codebase is absorbed and developed in house by the group in the project and rolled out for all members equally for their use. - -Such processes make the modules in HLP highly flexible plug-in frameworks which will support rapid development and roll-outs in enterprise settings. Furthermore, other comparable platforms are open **permission-less blockchains** or rather **public chains** by default and even though it is possible to adapt them to specific applications, HLP modules support the feature natively. - -The differences and use cases of public & private blockchains are covered more [**here**][4] in this comparative primer on the same. - -The Hyperledger project’s mission is four-fold according to **Brian Behlendorf** , the executive director of the project. - -They are: - - 1. To create an enterprise grade DLT framework and standards which anyone can port to suit their specific industrial or personal needs. - 2. To give rise to a robust open source community to aid the ecosystem. - 3. To promote and further participation of industry members of the said ecosystem such as member firms. - 4. To host a neutral unbiased infrastructure for the HLP community to gather and share updates and developments regarding the same. - - - -The original document can be accessed [**here**][5]****. - -### Structure of the HLP - -The **HLP consists of 12 projects** that are classified as independent modules, each usually structured and working independently to develop their module. These are first studied for their capabilities and viability before being incubated. Proposals for additions can be made by any member of the organization. After the project is incubated active development ensues after which it is rolled out. The interoperability between these modules are given a high priority, hence regular communication between these groups are maintained by the community. Currently 4 of these projects are categorized as active. The active tag implies these are ready for use but not ready for a major release yet. These 4 are arguably the most significant or rather fundamental modules to furthering the blockchain revolution. We’ll look at the individual modules and their functionalities at a later time in detail. However, a brief description of a the Hyperledger Fabric platform, arguably the most popular among them follows. - -### Hyperledger Fabric - -The **Hyperledger Fabric** [2] is a fully open-source, permissioned (non-public) blockchain-based DLT platform that is designed keeping enterprise uses in mind. The platform provides features and is structured to fit the enterprise environment. It is highly modular allowing its developers to choose from different consensus protocols, **chain code protocols ([smart contracts][6])** , or identity management systems etc., as they go along. **It is a permissioned blockchain based platform** that’s makes use of an identity management system, meaning participants will be aware of each other’s identities which is required in an enterprise setting. Fabric allows for smart contract ( _ **“chaincode”, is the term that the Hyperledger team uses**_ ) development in a variety of mainstream programming languages including **Java** , **Javascript** , **Go** etc. This allows institutions and enterprises to make use of their existing talent in the area without hiring or re-training developers to develop their own smart contracts. Fabric also uses an execute-order-validate system to handle smart contracts for better reliability compared to the standard order-validate system that is used by other platforms providing smart contract functionality. Pluggable performance, identity management systems, DBMS, Consensus platforms etc. are other features of Fabric that keeps it miles ahead of its competition. - -### Conclusion - -Projects such as the Hyperledger Fabric platforms enable a faster rate of adoption of blockchain technology in mainstream use-cases. The Hyperledger community structure itself supports open governance principles and since all the projects are led as open source platforms, this improves the security and accountability that the teams exhibit in pushing out commitments. - -Since major applications of such projects involve working with enterprises to further development of platforms and standards, the Hyperledger project is currently at a great position with respect to comparable projects by others. - -**References:** - - * **[1][Samsung takes a seat with Intel and IBM at the Linux Foundation | TheINQUIRER][7]** - * **[2] E. Androulaki et al., “Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains,” 2018.** - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/ - -作者:[editor][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/editor/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/Introduction-To-Hyperledger-Project-720x340.png -[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction/ -[3]: https://www.hyperledger.org/members -[4]: https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/ -[5]: http://www.hitachi.com/rev/archive/2017/r2017_01/expert/index.html -[6]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/ -[7]: https://www.theinquirer.net/inquirer/news/2182438/samsung-takes-seat-intel-ibm-linux-foundation diff --git a/translated/tech/20190805 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md b/translated/tech/20190805 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md new file mode 100644 index 0000000000..792de128c6 --- /dev/null +++ b/translated/tech/20190805 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: (zionfuo) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Blockchain 2.0 – An Introduction To Hyperledger Project (HLP) [Part 8]) +[#]: via: (https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/) +[#]: author: (editor https://www.ostechnix.com/author/editor/) + +区块链2.0:Hyperledger项目简介(八) +====== + +![Introduction To Hyperledger Project][1] + +一旦,一个新技术平台在积极发展和商业利益方面达到了普及的门槛,全球的主要公司和小型的初创企业都急于抓住这块蛋糕。在当时**Linux**就是这样的平台。一旦实现了其应用程序的普及,个人、公司和机构就开始对其表现出兴趣,到2000年,**Linux基金会**成立了。 + +Linux 基金会旨在通过赞助他们的开发团队来制定规范和开发Linux作为平台。Linux基金会是一个由软件和IT巨头(如微软、甲骨文、三星、思科、 IBM 、英特尔等[[1][7]]支持的非营利组织。这不包括为改善平台而提供服务的数百名个人开发者。多年来,Linux基金会已经开展了许多项目。**Hyperledger**项目是迄今为止发展最快的项目。 + +在将技术推进至可用且有用的方面上,这种联合主导的开发具有很多优势。为大型项目提供开发标准、库和所有后端协议既昂贵又资源密集型,而且不会从中产生丝毫收入。因此, 对于公司来说,通过支持这些组织来汇集他们的资源来开发常见的那些 “烦人” 部分是有很意义的,以及随后完成这些标准部分的工作以简单地即插即用和定制他们的产品。除了模型的经济性之外,这种合作努力还产生了标准,使其容易使用和集成到优秀的产品和服务中。 + +上述联盟模式,在曾经或当下使WiFi (The Wi-Fi alliance) 、移动电话等标准在制定方面得到了创新。 + + +### Hyperledger (HLP) 项目简介 + +Hyperledger 项目于 2015年12月由 Linux 基金会启动,目前是其孵化的增长最快的项目之一。它是一个伞式组织(umbrella organization),用于合作开发和推进基于[区块链][2]的分布式账本技术 (DLT) 的工具和标准。支持该项目的主要行业参与者包括**IBM**、**英特尔**和**SAP Ariba**[等][3]。HLP 旨在为个人和公司创建框架,以便根据需要创建共享和封闭的区块链,以满足他们自己的需求。设计原则是开发一个专注于隐私和未来可审计性的全球可部署、可扩展、强大的区块链平台。 + +### 开发目标和构造: 即插即用 + +虽然面向企业的平台有以太坊联盟之类的产品,但根据定义,HLP是面向企业的,并得到行业巨头的支持,他们在HLP旗下的许多模块中做出贡献并进一步发展。还孵化开发的周边项目,并这些创意项目推向公众。Hyperledger 项目的成员贡献了他们自己的力量,例如IBM如何为协作开发贡献他们的Fabric平台。该代码库由IBM在其内部研究和开发,并开源出来供所有成员使用。 + +这些过程使得 HLP 中的模块具有高度灵活的插件框架,这将支持企业设置中的快速开发和推出。此外,默认情况下,其他类似的平台是开放的**无需许可链**(permission-less blockchain)或是**公有链**(public blockchain),HLP模块本身就是支持通过调试可以适应特定的功能。 + +在这篇关于[公有链和私有链][4]的比较入门文章中,更多地涵盖了公有链和私有链的差异和用例。 + +根据项目执行董事**Brian Behlendorf**的说法,Hyperledger项目的使命有四个。 + +分别是: + + 1. 创建企业级DLT框架和标准,任何人都可以移植以满足其特定的工业或个人需求。 + 2. 创建一个强大的开源社区来帮助生态系统。 + 3. 促进所述生态系统的行业成员(如成员公司)的参与。 + 4. 为HLP社区提供中立且无偏见的基础设施,以收集和分享相关的更新和发展。 + +可以在这里访问[原始文档][5]。 + +### HLP的架构 + +HLP由12个项目组成,这些项目被归类为独立的模块,每个项目通常都是独立构建和工作的,以开发他们的模块。在孵化之前,首先对它们的能力和生存能力进行研究。组织的任何成员都可以提出增加的建议。在项目孵化后,就会出现积极开发,然后才会推出。这些模块之间的互操作性被赋予了很高的优先级,因此这些组之间的定期通信由社区维护。目前,这些项目中有4个被归类为活动项目。活动标签意味着这些标签已经准备好使用,但还没有准备好发布重大版本。这4个模块可以说是推动区块链革命的最重要或最基本的模块。稍后,我们将详细介绍各个模块及其功能。然而,Hyperledger Fabric平台的简要描述,可以说是其中最受欢迎的。 + +### Hyperledger Fabric + +**Hyperledger Fabric**[2]是一个完全开源的、基于区块链的许可 (非公开) DLT 平台,设计时考虑了企业的使用。该平台提供了适合企业环境的功能和结构。它是高度模块化的,允许开发人员在不同的一致协议、**链码协议**([智能合约][6]) 或身份管理系统等中进行选择。这是一个基于区块链的许可平台,利用身份管理系统,这意味着参与者将知道彼此在企业环境中需要的身份。Fabric允许以各种主流编程语言 (包括Java、Javascript、Go等) 开发智能合约(“链码”,是Hyperledger团队使用的术语)。这使得机构和企业可以利用他们在该领域的现有人才,而无需雇佣或重新培训开发人员来开发他们自己的智能合约。与标准订单验证系统相比,Fabric还使用执行顺序验证系统来处理智能合约,以提供更好的可靠性,这些系统由提供智能合约功能的其他平台使用。与标准订单验证系统相比,Fabric还使用执行顺序验证系统来处理智能合约,以提供更好的可靠性,这些系统由提供智能合约功能的其他平台使用。可插拔性能、身份管理系统、数据库管理系统、共识平台等是Fabric的其他功能,这些功能使它在竞争中保持领先地位。 + + +### 结论 + +诸如Hyperledger Fabric平台这样的项目能够在主流用例中更快地采用区块链技术。Hyperledger社区结构本身支持开放治理原则,并且由于所有项目都是作为开源平台引导的,因此这提高了团队在履行承诺时表现出来的安全性和责任感。 + +由于此类项目的主要应用涉及与企业合作及进一步开发平台和标准,因此Hyperledger项目目前在其他类似项目前面处于有利地位。 + +**参考资料** + + * **[1][Samsung takes a seat with Intel and IBM at the Linux Foundation | TheINQUIRER][7]** + * **[2] E. Androulaki et al., “Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains,” 2018.** + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/ + +作者:[editor][a] +选题:[lujun9972][b] +译者:[zionfuo](https://github.com/zionfuo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/editor/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/Introduction-To-Hyperledger-Project-720x340.png +[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction/ +[3]: https://www.hyperledger.org/members +[4]: https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/ +[5]: http://www.hitachi.com/rev/archive/2017/r2017_01/expert/index.html +[6]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/ +[7]: https://www.theinquirer.net/inquirer/news/2182438/samsung-takes-seat-intel-ibm-linux-foundation From 5571a59d6892cef75f90c5be373db2d983a40f5d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Aug 2019 08:34:33 +0800 Subject: [PATCH 286/951] PUB @wxy https://linux.cn/article-11189-1.html --- .../20180928 Quiet log noise with Python and machine learning.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180928 Quiet log noise with Python and machine learning.md (100%) diff --git a/translated/tech/20180928 Quiet log noise with Python and machine learning.md b/published/20180928 Quiet log noise with Python and machine learning.md similarity index 100% rename from translated/tech/20180928 Quiet log noise with Python and machine learning.md rename to published/20180928 Quiet log noise with Python and machine learning.md From f438c83ca3b5a102a4c76f69ad79df3af19da2a0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 5 Aug 2019 08:40:17 +0800 Subject: [PATCH 287/951] translated --- ... Open Source Project for VR Development.md | 86 ------------------- ... Open Source Project for VR Development.md | 81 +++++++++++++++++ 2 files changed, 81 insertions(+), 86 deletions(-) delete mode 100644 sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md create mode 100644 translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md diff --git a/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md b/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md deleted file mode 100644 index cea8ca3a0e..0000000000 --- a/sources/tech/20190730 OpenHMD- Open Source Project for VR Development.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (OpenHMD: Open Source Project for VR Development) -[#]: via: (https://itsfoss.com/openhmd/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -OpenHMD: Open Source Project for VR Development -====== - -In this day and age, there are open-source alternatives for all your computing needs. There is even an open-source platform for VR goggles and the like. Let’s have a quick look at the OpenHMD project. - -### What is OpenHMD? - -![][1] - -[OpenHMD][2] is a project that aims to create an open-source API and drivers for immersive technology. This category includes head-mounted displays with built-in head tracking. - -They currently support quite a few systems, including Android, FreeBSD, Linux, OpenBSD, mac OS, and Windows. The [devices][3] that they support include Oculus Rift, HTC Vive, DreamWorld DreamGlass, Playstation Move, and others. They also offer support for a wide range of languages, including Go, Java, .NET, Perl, Python, and Rust. - -The OpenHMD project is released under the [Boost License][4]. - -### More and Improved Features in the new Release - -![][5] - -Recently, the OpenHMD project [released version 0.3.0][6] codenamed Djungelvral. ([Djungelvral][7] is a salted licorice from Sweden.) This brought quite a few changes. - -The update added support for the following devices: - - * 3Glasses D3 - * Oculus Rift CV1 - * HTC Vive and HTC Vive Pro - * NOLO VR - * Windows Mixed Reality HMD support - * Deepoon E2 - * GearVR Gen1 - - - -A universal distortion shader was added to OpenHMD. This additions “makes it possible to simply set some variables in the drivers that gives information to the shader regarding lens size, chromatic aberration, position and quirks.” - -They also announced plans to change the build system. OpenHMD added support for Meson and will remove support for Autotools in the next (0.4) release. - -The team behind OpenHMD also had to remove some features because they want their system to work for everyone. Support for PlayStation VR has been disabled because of some issue with Windows and mac OS due to incomplete HID headers. NOLO has a bunch of firmware version, many will small changes. OpenHMD is unable to test all of the firmware versions, so some version might not work. They recommend upgrading to the latest firmware release. Finally, several devices only have limited support and therefore are not included in this release. - -[][8] - -Suggested read  To Do App Remember The Milk Is Now Available For Linux - -They accounted that they will be speeding up the OpenHMD release cycle to get newer features and support for more devices to users quicker. Their main priority will be to get “currently disabled devices in master ready for a patch release will be priority as well, among getting the elusive positional tracking functional for supported HMD’s.” - -### Final Thoughts - -I don’t have a VR device and have never used one. I do believe that they have great potential, even beyond gaming. I am thrill (but not surprised) that there is an open-source implementation that seeks to support many devices. I’m glad that they are focusing on a wide range of devices, instead of focussing on some off-brand VR effort. - -I wish the OpenHMD team well and hope they create a platform that will make them the goto VR project. - -Have you ever used or encountered OpenHMD? Have you ever used VR for gaming and other pursuits? If yes, have you encountered any open-source hardware or software? Please let us know in the comments below. - -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/openhmd/ - -作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/openhmd-logo.png?resize=300%2C195&ssl=1 -[2]: http://www.openhmd.net/ -[3]: http://www.openhmd.net/index.php/devices/ -[4]: https://github.com/OpenHMD/OpenHMD/blob/master/LICENSE -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/virtual-reality-development.jpg?ssl=1 -[6]: http://www.openhmd.net/index.php/2019/07/12/openhmd-0-3-0-djungelvral-released/ -[7]: https://www.youtube.com/watch?v=byP5i6LdDXs -[8]: https://itsfoss.com/remember-the-milk-linux/ -[9]: http://reddit.com/r/linuxusersgroup diff --git a/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md b/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md new file mode 100644 index 0000000000..f114e57a14 --- /dev/null +++ b/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (OpenHMD: Open Source Project for VR Development) +[#]: via: (https://itsfoss.com/openhmd/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +OpenHMD:用于 VR 开发的开源项目 +====== + +在这个时代,有一些开源替代品可满足你的所有计算需求。甚至还有一个 VR 眼镜之类的开源平台。让我们快速看一下 OpenHMD 这个项目。 + +### 什么是 OpenHMD? + +![][1] + +[OpenHMD][2] 是一个为沉浸式技术创建开源 API 及驱动的项目。这类技术包括带内置头部跟踪的头戴式显示器。 + +它目前支持很多系统,包括 Android、FreeBSD、Linux、OpenBSD、mac OS 和 Windows。它支持的[设备][3]包括 Oculus Rift、HTC Vive、DreamWorld DreamGlass、Playstation Move 等。它还支持各种语言,包括 Go、Java、.NET、Perl、Python 和 Rust。 + +OpenHMD 项目是在 [Boost 许可证][4]下发布的。 + +### 新版本中的更多功能和改进功能 + +![][5] + +最近,OpenHMD 项目[发布版本 0.3.0][6],代号为 Djungelvral([Djungelvral][7] 是来自瑞典的盐渍甘草)。它带来了不少变化。 + +这次更新添加了对以下设备的支持: + + * 3Glasses D3 + * Oculus Rift CV1 + * HTC Vive 和 HTC Vive Pro + * NOLO VR + * Windows Mixed Reality HMD 支持 + * Deepoon E2 + * GearVR Gen1 + + + +OpenHMD 增加了一个通用扭曲着色器。这一新增功能“可以方便地在驱动程序中设置一些变量,为着色器提供有关镜头尺寸、色差、位置和 Quirks 的信息。” + +他们还宣布计划改变构建系统。OpenHMD 增加了对 Meson 的支持,并将在下一个 (0.4) 版本中将删除对 Autotools 的支持。 + +OpenHMD 背后的团队还不得不删除一些功能,因为他们希望他们的系统适合所有人。由于 Windows 和 mac OS 对 HID 头的兼容问题,因此禁用了对 PlayStation VR 的支持。NOLO 有一堆固件版本,很多都会有小改动。OpenHMD 无法测试所有固件版本,因此某些版本可能无法正常工作。他们建议升级到最新的固件版本。最后,几个设备仅提供有限的支持,因此不包含在此版本中。 + +他们预计将加快 OpenHMD 发布周期,以便更快地获得更新的功能并为用户提供更多设备支持。他们优先要做的是“让当前在主干分支中禁用的设备在下次发布补丁时能够试用,同时让支持的头戴式显示器支持位置跟踪。” + +### 最后总结 + +我没有 VR 设备而且从未使用过。我相信它们有很大的潜力,甚至能超越游戏。我很兴奋(但并不惊讶)有一个开源实现会去支持许多设备。我很高兴他们专注于各种各样的设备,而不是专注于一些非品牌的 VR 的努力。 + +我希望 OpenHMD 团队做得不错,并希望他们创建一个平台,让它们成为 VR项目。 + +你曾经使用或看到过 OpenHMD 吗?你有没有使用 VR 进行游戏和其他用途?如果是,你是否用过任何开源硬件或软件?请在下面的评论中告诉我们。 + +如果你觉得这篇文章很有趣,请在社交媒体、Hacker News 或 [Reddit][9] 上分享它。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/openhmd/ + +作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/openhmd-logo.png?resize=300%2C195&ssl=1 +[2]: http://www.openhmd.net/ +[3]: http://www.openhmd.net/index.php/devices/ +[4]: https://github.com/OpenHMD/OpenHMD/blob/master/LICENSE +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/virtual-reality-development.jpg?ssl=1 +[6]: http://www.openhmd.net/index.php/2019/07/12/openhmd-0-3-0-djungelvral-released/ +[7]: https://www.youtube.com/watch?v=byP5i6LdDXs +[9]: http://reddit.com/r/linuxusersgroup From 8ca9750ed1089da16763b1eeae4ffb86dcab7db9 Mon Sep 17 00:00:00 2001 From: zionfuo Date: Mon, 5 Aug 2019 08:41:12 +0800 Subject: [PATCH 288/951] =?UTF-8?q?=F0=9F=8D=AD=20Update=20Blockchain=202.?= =?UTF-8?q?0=20Part=208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{20190805 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md => 20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md} (100%) diff --git a/translated/tech/20190805 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md b/translated/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md similarity index 100% rename from translated/tech/20190805 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md rename to translated/tech/20190505 Blockchain 2.0 - An Introduction To Hyperledger Project (HLP) -Part 8.md From a54591386dc1a9298e85bded17ff53a75b79be6b Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 5 Aug 2019 08:45:31 +0800 Subject: [PATCH 289/951] translating --- ... Send a Mail When a New User Account is Created in System.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md b/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md index 769acc1b27..684a940ac8 100644 --- a/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md +++ b/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4e79d25d6160d52c6350758bd68c58e8a962d2a1 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:05:27 +0800 Subject: [PATCH 290/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20How=20?= =?UTF-8?q?To=20Find=20Hardware=20Specifications=20On=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 How To Find Hardware Specifications On Linux.md --- ...o Find Hardware Specifications On Linux.md | 358 ++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 sources/tech/20190805 How To Find Hardware Specifications On Linux.md diff --git a/sources/tech/20190805 How To Find Hardware Specifications On Linux.md b/sources/tech/20190805 How To Find Hardware Specifications On Linux.md new file mode 100644 index 0000000000..720765a9da --- /dev/null +++ b/sources/tech/20190805 How To Find Hardware Specifications On Linux.md @@ -0,0 +1,358 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Find Hardware Specifications On Linux) +[#]: via: (https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Find Hardware Specifications On Linux +====== + +There are plenty of tools available to find hardware specifications on Linux systems. Here, I have listed four most commonly used tools to get almost all hardware (and software) details of a Linux system. Good thing is these tools comes pre-installed by default on some Linux distributions. I tested these tools on Ubuntu 18.04 LTS desktop, however they should work on other Linux distros as well. + +### 1\. LSHW + +**Lshw (Hardware Lister)** is a simple, yet full-featured utility that provides detailed information on the hardware configuration of a Linux system. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed etc. Information can be output in plain text, XML or HTML. + +It currently supports DMI (x86 and EFI only), Open Firmware device tree (PowerPC only), PCI/AGP, ISA PnP (x86), CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), USB and SCSI. + +Like I already said, lshw comes pre-installed with Ubuntu by default. If it isn’t installed in your Ubuntu system, install it using the command: + +``` +$ sudo apt install lshw lshw-gtk +``` + +On other Linux distributions, for example Arch Linux, run: + +``` +$ sudo pacman -S lshw lshw-gtk +``` + +Once installed, run lshw to find your system hardware details: + +``` +$ sudo lshw +``` + +You will see the detailed output of your system’s hardware specifications. + +**Sample output:** + +![][2] + +Find Hardware Specifications On Linux using lshw + +Please be mindful that if you run lshw command without sudo rights, the output may be incomplete or inaccurate. + +Lshw can display the output as an HTML page. To do so, use: + +``` +$ sudo lshw -html +``` + +Likewise, we can output the device tree as XML and json formats like below. + +``` +$ sudo lshw -xml + +$ sudo lshw -json +``` + +To output the device tree showing hardware paths, use -short option: + +``` +$ sudo lshw -short +``` + +![][3] + +Show device tree with hardware path using lshw + +To list devices with bus information, detailing SCSI, USB, IDE and PCI addresses, run: + +``` +$ sudo lshw -businfo +``` + +By default, lshw display all hardware details. You can also view the hardware information of a specific hardware details based on **Class** options such as processor, memory, display etc. The class options can be found using **lshw -short** or **lshw -businfo** commands. + +To display a specific hardware details, for example Processor, do: + +``` +$ sudo lshw -class processor +``` + +Sample output: + +``` +*-cpu +description: CPU +product: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz +vendor: Intel Corp. +physical id: 4 +bus info: [email protected] +version: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz +serial: To Be Filled By O.E.M. +slot: CPU 1 +size: 913MHz +capacity: 2300MHz +width: 64 bits +clock: 100MHz +capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts md_clear flush_l1d cpufreq +configuration: cores=2 enabledcores=1 threads=2 +``` + +Similarly, we can get system details using command: + +``` +$ sudo lshw -class system +``` + +Get hard disk details: + +``` +$ sudo lshw -class disk +``` + +Get network details: + +``` +$ sudo lshw -class network +``` + +Get memory details: + +``` +$ sudo lshw -class memory +``` + +Also, we can list details of multiple devices like below. + +``` +$ sudo lshw -class storage -class power -class volume +``` + +If you want to view the details with hardware path, just add **-short** option. + +``` +$ sudo lshw -short -class processor +``` + +Output: + +``` +H/W path Device Class Description +======================================================= +/0/4 processor Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz +``` + +Sometimes you might want to share your hardware details to someone, for example customer support person. If so, you can remove potentially sensitive information, such as IP addresses, serial numbers, etc., from output like below. + +``` +$ lshw -sanitize +``` + +**Lshw-gtk GUI utility +** + +If you’re not comfortable with CLI, you can use **lshw-gtk** which is the graphical interface for lshw command line tool. + +It can be opened either from Terminal or Dash. + +To launch it from Terminal, simply do: + +``` +$ sudo lshw-gtk +``` + +Here is the default GUI interface of lshw tool. + +![][4] + +Find Hardware Specifications On Linux using lshw-gtk + +Just double click on “Portable Computer” to expand it further. + +![][5] + +Find Hardware Specifications On Linux using lshw-gtk GUI + +You can keep double click on subsequent hardware tab to get the detailed view. + +For more details, refer man pages. + +``` +$ man lshw +``` + +### 2\. Inxi + +**Inxi** is my another favorite tool to find almost everything about a Linux system. It is a free, open source, and full featured command line system information tool. It shows system hardware, CPU, drivers, Xorg, Desktop, Kernel, GCC version(s), Processes, RAM usage, and a wide variety of other useful information. Be it a hard disk or CPU, mother board or the complete detail of the entire system, inxi will display it more accurately in seconds. Since it is CLI tool, you can use it in Desktop or server edition. For more details, refer the following guide. + + * [**How To Find Linux System Details Using inxi**][6] + + + +### 3\. Hardinfo + +**Hardinfo** will get you the both hardware and software details of your system which isn’t available in the _lshw._ +HardInfo can gather information about your system’s hardware and operating system, perform benchmarks, and generate printable reports either in HTML or in plain text formats. + +If Hardinfo isn’t installed in Ubuntu, install it using the command:*** + +* * * + +``` +$ sudo apt install hardinfo +``` + +Once installed, Hardinfo tool either from the Terminal or Menu. + +Here is how Hardinfo default interface looks like. + +![][7] + +Find Hardware Specifications On Linux Using Hardinfo + +As you see in the above screenshot, Hardinfo has simple and intuitive GUI. + +All hardware information have grouped in four main groups namely **Computer** , **Devices** , **Network** , and **Benchmarks**. Each group has shows specific hardware details. + +For example, to view your processor details, click on “Processor” option under “Devices” group. + +![][8] + +Show processor details using hardinfo + +Unlike lshw, Hardinfo helps you to find basic software specifications like operating system details, kernel modules, locale information, filesystem usage, users/groups, and development tools etc. + +![][9] + +Show operating system details using hardinfo + +Another notable feature of Hardinfo is it allows us to do simple benchmarks to test CPU and FPU capabilities and some of the graphical user interface capabilities. + +![][10] + +Perform benchmarks using hardinfo + +* * * + +**Suggested read:** + + * [**Phoronix Test Suite – An Open Source Testing And Benchmarking Tool**][11] + * [**UnixBench – A Benchmark Suite For Unix-like Systems**][12] + * [**How To Benchmark Linux Commands And Programs From Commandline**][13] + + + +* * * + +We can generate reports of our entire system as well as individual devices. To generate report, simply click on “Generate Report” button on the menu bar and choose the information that you want to include in the report. + +![][14] + +Generate system reports using hardinfo + +Hardinfo has few command line options as well. + +For instance, to generate report and display it in the Terminal, run: + +``` +$ hardinfo -r +``` + +List modules: + +``` +$ hardinfo -l +``` + +For more details, refer man pages. + +``` +$ man hardinfo +``` + +### 4\. Sysinfo + +**Sysinfo** is yet another alternative to HardInfo and lshw-gtk utilities that can be used to get both hardware and software information as listed below. + + * System details such as distribution release, versions of GNOME, kernel, gcc and Xorg and hostname. + * CPU details like vendor identification, model name, frequency, L2 cache, model numbers and flags. + * Memory details such as total system RAM, free memory, swap space total and free, cached, active/inactive memory. + * Storage Controllers such as IDE interface, all IDE devices, SCSI devices. + * Hardware details such as motherboard, graphic card, sound card and network devices. + + + +Let us install sysinfo using the command: + +``` +$ sudo apt install sysinfo +``` + +Sysinfo can be launched either from from Terminal or Dash. + +To launch it from terminal, run: + +$ sysinfo + +Here is the default interface of Sysinfo utility. + +![][15] + +sysinfo interface + +As you can see, all hardware(and software) details have been grouped under five categories namely System, CPU, Memory, Storage and Hardware. Click on a category on the navigation bar to get respective details. + +![][16] + +Find Hardware Specifications On Linux Using Sysinfo + +Further details can be found on man pages. + +``` +$ man sysinfo +``` + +And, that’s all. Like I already mentioned there could be many tools available to display Hardware/Software Specifications. However, these four tools are just enough to find everything about your Linux distribution. + +**Inxi** is my another favorite tool to find almost everything about a Linux system. It is a free, open source, and full featured command line system information tool. It shows system hardware, CPU, drivers, Xorg, Desktop, Kernel, GCC version(s), Processes, RAM usage, and a wide variety of other useful information. Be it a hard disk or CPU, mother board or the complete detail of the entire system, inxi will display it more accurately in seconds. Since it is CLI tool, you can use it in Desktop or server edition. For more details, refer the following guide. + + * [**How To Find Linux System Details Using inxi**][6] + + + +### 3\. Hardinfo + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-1.png +[3]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-device-tree-with-hardware-path-using-lshw.png +[4]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-gtk-1.png +[5]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-gtk-2.png +[6]: https://www.ostechnix.com/how-to-find-your-system-details-using-inxi/ +[7]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-Using-Hardinfo.png +[8]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-processor-details-using-hardinfo.png +[9]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-operating-system-details-using-hardinfo.png +[10]: https://www.ostechnix.com/wp-content/uploads/2013/01/Perform-benchmarks-using-hardinfo.png +[11]: https://www.ostechnix.com/phoronix-test-suite-open-source-testing-benchmarking-tool/ +[12]: https://www.ostechnix.com/unixbench-benchmark-suite-unix-like-systems/ +[13]: https://www.ostechnix.com/how-to-benchmark-linux-commands-and-programs-from-commandline/ +[14]: https://www.ostechnix.com/wp-content/uploads/2013/01/Generate-system-reports-using-hardinfo.png +[15]: https://www.ostechnix.com/wp-content/uploads/2013/01/sysinfo-interface.png +[16]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-Using-Sysinfo.png From c50cab78abf0608e239352dfe5931ec0176c256c Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:07:20 +0800 Subject: [PATCH 291/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20Find?= =?UTF-8?q?=20The=20Linux=20Distribution=20Name,=20Version=20And=20Kernel?= =?UTF-8?q?=20Details?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md --- ...bution Name, Version And Kernel Details.md | 199 ++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md diff --git a/sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md b/sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md new file mode 100644 index 0000000000..b7f481bcb4 --- /dev/null +++ b/sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md @@ -0,0 +1,199 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Find The Linux Distribution Name, Version And Kernel Details) +[#]: via: (https://www.ostechnix.com/find-out-the-linux-distribution-name-version-and-kernel-details/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +Find The Linux Distribution Name, Version And Kernel Details +====== + +![Find The Linux Distribution Name, Version And Kernel Details][1] + +This guide explains how to find the Linux distribution name, version and Kernel details. If your Linux system has GUI mode, you can find these details easily from the System’s Settings. But in CLI mode, it is bit difficult for beginners to find out such details. No problem! Here I have given a few command line methods to find the Linux system information. There could be many, but these methods will work on most Linux distributions. + +### 1\. Find Linux distribution name, version + +There are many methods to find out what OS is running on in your VPS. + +##### Method 1: + +Open your Terminal and run the following command: + +``` +$ cat /etc/*-release +``` + +**Sample output from CentOS 7:** + +``` +CentOS Linux release 7.0.1406 (Core) +NAME="CentOS Linux" +VERSION="7 (Core)" +ID="centos" +ID_LIKE="rhel fedora" +VERSION_ID="7" +PRETTY_NAME="CentOS Linux 7 (Core)" +ANSI_COLOR="0;31" +CPE_NAME="cpe:/o:centos:centos:7" +HOME_URL="https://www.centos.org/" +BUG_REPORT_URL="https://bugs.centos.org/" + +CentOS Linux release 7.0.1406 (Core) +CentOS Linux release 7.0.1406 (Core) +``` + +**Sample output from Ubuntu 18.04:** + +``` +DISTRIB_ID=Ubuntu +DISTRIB_RELEASE=18.04 +DISTRIB_CODENAME=bionic +DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS" +NAME="Ubuntu" +VERSION="18.04.2 LTS (Bionic Beaver)" +ID=ubuntu +ID_LIKE=debian +PRETTY_NAME="Ubuntu 18.04.2 LTS" +VERSION_ID="18.04" +HOME_URL="https://www.ubuntu.com/" +SUPPORT_URL="https://help.ubuntu.com/" +BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" +PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" +VERSION_CODENAME=bionic +UBUNTU_CODENAME=bionic +``` + +##### Method 2: + +The following command will also get your distribution details. + +``` +$ cat /etc/issue +``` + +**Sample output from Ubuntu 18.04:** + +``` +Ubuntu 18.04.2 LTS \n \l +``` + +##### Method 3: + +The following command will get you the distribution details in Debian and its variants like Ubuntu, Linux Mint etc. + +``` +$ lsb_release -a +``` + +**Sample output:** + +``` +No LSB modules are available. +Distributor ID: Ubuntu +Description: Ubuntu 18.04.2 LTS +Release: 18.04 +Codename: bionic +``` + +### 2\. Find Linux Kernel details + +##### Method 1: + +To find out your Linux kernel details, run the following command from your Terminal. + +``` +$ uname -a +``` + +**Sample output in CentOS 7:** + +``` +Linux server.ostechnix.lan 3.10.0-123.9.3.el7.x86_64 #1 SMP Thu Nov 6 15:06:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux +``` + +**Sample output in Ubuntu 18.04:** + +``` +Linux ostechnix 4.18.0-25-generic #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux +``` + +Or, + +``` +$ uname -mrs +``` + +**Sample output:** + +``` +Linux 4.18.0-25-generic x86_64 +``` + +Where, + + * **Linux** – Kernel name + * **4.18.0-25-generic** – Kernel version + * **x86_64** – System hardware architecture (i.e 64 bit system) + + + +For more details about uname command, refer the man page. + +``` +$ man uname +``` + +##### Method 2: + +From your Terminal, run the following command: + +``` +$ cat /proc/version +``` + +**Sample output from CentOS 7:** + +``` +Linux version 3.10.0-123.9.3.el7.x86_64 ([email protected]) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Thu Nov 6 15:06:03 UTC 2014 +``` + +**Sample output from Ubuntu 18.04:** + +``` +Linux version 4.18.0-25-generic ([email protected]) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019 +``` + +* * * + +**Suggested read:** + + * [**How To Find Linux System Details Using inxi**][2] + * [**Neofetch – Display Linux system Information In Terminal**][3] + * [**How To Find Hardware And Software Specifications In Ubuntu**][4] + + + +* * * + +These are few ways to find find out a Linux distribution’s name, version and Kernel details. Hope you find it useful. + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/find-out-the-linux-distribution-name-version-and-kernel-details/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2015/08/Linux-Distribution-Name-Version-Kernel-720x340.png +[2]: https://www.ostechnix.com/how-to-find-your-system-details-using-inxi/ +[3]: https://www.ostechnix.com/neofetch-display-linux-systems-information/ +[4]: https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/ From 746c66c1e0b756bf6ed7b5c4c5a709f46b594237 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:07:59 +0800 Subject: [PATCH 292/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20How=20?= =?UTF-8?q?To=20Set=20Up=20Time=20Synchronization=20On=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md --- ...o Set Up Time Synchronization On Ubuntu.md | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md diff --git a/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md b/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md new file mode 100644 index 0000000000..861cdb6bfc --- /dev/null +++ b/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md @@ -0,0 +1,236 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Set Up Time Synchronization On Ubuntu) +[#]: via: (https://www.ostechnix.com/how-to-set-up-time-synchronization-on-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Set Up Time Synchronization On Ubuntu +====== + +![Set Up Time Synchronization On Ubuntu][1] + +You might have set up [**cron jobs**][2] that runs at a specific time to backup important files or perform any system related tasks. Or, you might have configured a [**log server to rotate the logs**][3] out of your system at regular interval time. If your clock is out-of-sync, these jobs will not execute at the desired time. This is why setting up a correct time zone on the Linux systems and keep the clock synchronized with Internet is important. This guide describes how to set up time synchronization on Ubuntu Linux. The steps given below have been tested on Ubuntu 18.04, however they are same for other Ubuntu-based systems that uses systemd’s **timesyncd** service. + +### Set Up Time Synchronization On Ubuntu + +Usually, we set time zone during installation. You can however change it or set different time zone if you want to. + +First, let us see the current time zone in our Ubuntu system using “date” command: + +``` +$ date +``` + +Sample output: + +``` +Tue Jul 30 11:47:39 UTC 2019 +``` + +As you see in the above output, the “date” command shows the actual date as well as the current time. Here, my current time zone is **UTC** which stands for **Coordinated Universal Time**. + +Alternatively, you can look up the **/etc/timezone** file to find the current time zone. + +``` +$ cat /etc/timezone +UTC +``` + +Now, let us see if the clock is synchronized with Internet. To do so, simply run: + +``` +$ timedatectl +``` + +Sample output: + +``` +Local time: Tue 2019-07-30 11:53:58 UTC +Universal time: Tue 2019-07-30 11:53:58 UTC +RTC time: Tue 2019-07-30 11:53:59 +Time zone: Etc/UTC (UTC, +0000) +System clock synchronized: yes +systemd-timesyncd.service active: yes +RTC in local TZ: no +``` + +As you can see, the “timedatectl” command displays the local time, universal time, time zone and whether the system clock is synchronized with Internet servers and if the **systemd-timesyncd.service** is active or inactive. In my case, the system clock is synchronizing with Internet time servers. + +If the clock is out-of-sync, you would see **“System clock synchronized: no”** as shown in the below screenshot. + +![][4] + +Time synchronization is disabled. + +Note: The above screenshot is old one. That’s why you see the different date. + +If you see **“System clock synchronized:** value set as **no** , the timesyncd service might be inactive. So, simply restart the service and see if it helps. + +``` +$ sudo systemctl restart systemd-timesyncd.service +``` + +Now check the timesyncd service status: + +``` +$ sudo systemctl status systemd-timesyncd.service +● systemd-timesyncd.service - Network Time Synchronization +Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) +Active: active (running) since Tue 2019-07-30 10:50:18 UTC; 1h 11min ago +Docs: man:systemd-timesyncd.service(8) +Main PID: 498 (systemd-timesyn) +Status: "Synchronized to time server [2001:67c:1560:8003::c7]:123 (ntp.ubuntu.com)." +Tasks: 2 (limit: 2319) +CGroup: /system.slice/systemd-timesyncd.service +└─498 /lib/systemd/systemd-timesyncd + +Jul 30 10:50:30 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:31 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:31 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:32 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:32 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:35 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:35 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:35 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:50:35 ubuntuserver systemd-timesyncd[498]: Network configuration changed, trying to estab +Jul 30 10:51:06 ubuntuserver systemd-timesyncd[498]: Synchronized to time server [2001:67c:1560:800 +``` + +If this service is enabled and active, your system clock should sync with Internet time servers. + +You can verify if the time synchronization is enabled or not using command: + +``` +$ timedatectl +``` + +If it still not works, run the following command to enable the time synchronization: + +``` +$ sudo timedatectl set-ntp true +``` + +Now your system clock will synchronize with Internet time servers. + +##### Change time zone using Timedatectl command + +What if I want to use different time zone other than UTC? It is easy! + +First, list of available time zones using command: + +``` +$ timedatectl list-timezones +``` + +You will see an output similar to below image. + +![][5] + +List time zones using timedatectl command + +You can set the desired time zone(E.g. Asia/Kolkata) using command: + +``` +$ sudo timedatectl set-timezone Asia/Kolkata +``` + +Check again if the time zone has been really changed using “date” command: + +**$ date** +Tue Jul 30 17:52:33 **IST** 2019 + +Or, use timedatectl command if you want the detailed output: + +``` +$ timedatectl +Local time: Tue 2019-07-30 17:52:35 IST +Universal time: Tue 2019-07-30 12:22:35 UTC +RTC time: Tue 2019-07-30 12:22:36 +Time zone: Asia/Kolkata (IST, +0530) +System clock synchronized: yes +systemd-timesyncd.service active: yes +RTC in local TZ: no +``` + +As you noticed, I have changed the time zone from UTC to IST (Indian standard time). + +To switch back to UTC time zone, simply run: + +``` +$ sudo timedatectl set-timezone UTC +``` + +##### Change time zone using Tzdata + +In older Ubuntu versions, the Timedatectl command is not available. In such cases, you can use **Tzdata** (Time zone data) to set up time synchronization. + +``` +$ sudo dpkg-reconfigure tzdata +``` + +Choose the geographic area in which you live. In my case, I chose **Asia**. Select OK and hit ENTER key. + +![][6] + +Next, select the city or region corresponding to your time zone. Here I’ve chosen **Kolkata**. + +![][7] + +Finally, you will see an output something like below in the Terminal. + +``` +Current default time zone: 'Asia/Kolkata' +Local time is now: Tue Jul 30 19:29:25 IST 2019. +Universal Time is now: Tue Jul 30 13:59:25 UTC 2019. +``` + +##### Configure time zone in graphical mode + +Some users may not be comfortable with CLI way. If you’re one of them, you can easily change do all this from system settings panel in graphical mode. + +Hit the **Super key** (Windows key), type **settings** in the Ubuntu dash and click on **Settings** icon. + +![][8] + +Launch System’s settings from Ubuntu dash + +Alternatively, click on the down arrow located at the top right corner of your Ubuntu desktop and click the Settings icon in the left corner. + +![][9] + +Launch System’s settings from top panel + +In the next window, choose **Details** and then Click **Date & Time** option. Turn on both **Automatic Date & Time** and **Automatic Time Zone** options. + +![][10] + +Set automatic time zone in Ubuntu + +Close the Settings window an you’re done! Your system clock should now sync with Internet time servers. + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-set-up-time-synchronization-on-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Set-Up-Time-Synchronization-On-Ubuntu-720x340.png +[2]: https://www.ostechnix.com/a-beginners-guide-to-cron-jobs/ +[3]: https://www.ostechnix.com/manage-log-files-using-logrotate-linux/ +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/timedatectl-command-output-ubuntu.jpeg +[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/List-timezones-using-timedatectl-command.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/configure-time-zone-using-tzdata-1.png +[7]: https://www.ostechnix.com/wp-content/uploads/2019/07/configure-time-zone-using-tzdata-2.png +[8]: https://www.ostechnix.com/wp-content/uploads/2019/07/System-settings-Ubuntu-dash.png +[9]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-system-settings.png +[10]: https://www.ostechnix.com/wp-content/uploads/2019/07/Set-automatic-timezone-in-ubuntu.png From 4050eeb0158ce51c647866b335089227ee166187 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:09:07 +0800 Subject: [PATCH 293/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20How=20?= =?UTF-8?q?To=20Verify=20ISO=20Images=20In=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 How To Verify ISO Images In Linux.md --- ...90805 How To Verify ISO Images In Linux.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sources/tech/20190805 How To Verify ISO Images In Linux.md diff --git a/sources/tech/20190805 How To Verify ISO Images In Linux.md b/sources/tech/20190805 How To Verify ISO Images In Linux.md new file mode 100644 index 0000000000..24e6f525f7 --- /dev/null +++ b/sources/tech/20190805 How To Verify ISO Images In Linux.md @@ -0,0 +1,155 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Verify ISO Images In Linux) +[#]: via: (https://www.ostechnix.com/how-to-verify-iso-images-in-linux/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Verify ISO Images In Linux +====== + +![How To Verify ISO Images In Linux][1] + +You just downloaded an ISO image of your favorite Linux distribution from the official site or a third party site, now what? [**Create bootable medium**][2] and start installing the OS? No, wait. Before start using it, It is highly recommended to verify that the downloaded ISO in your local system is the exact copy of the ISO present in the download mirrors. Because, [**Linux Mint’s website is hacked**][3] few years ago and the hackers made a modified Linux Mint ISO, with a backdoor in it. So, It is important to check the authenticity and integrity of your Linux ISO images. If you don’t know how to verify ISO images in Linux, this brief guide will help. Read on! + +### Verify ISO Images In Linux + +We can verify ISO images using the **Checksum** values. Checksum is a sequence of letters and numbers used to check data for errors and verify the authenticity and integrity of the downloaded files. There are different types of checksums, such as SHA-0, SHA-1, SHA-2 (224, 256, 384, 512) and MD5. MD5 sums have been the most popular, but nowadays SHA-256 sums are mostly used by modern Linux distros. + +We are going to use two tools namely **“gpg”** and **“sha256”** to verify authenticity and integrity of the ISO images. + +##### Download checksums and signatures + +For the purpose of this guide, I am going to use Ubuntu 18.04 LTS server ISO image. However, the steps given below should work on other Linux distributions as well. + +Near the top of the Ubuntu download page, you will see a few extra files (checksums and signatures) as shown in the following picture. + +![][4] + +Ubuntu 18.04 checksum and signature + +Here, the **SHA256SUMS** file contains checksums for all the available images and the **SHA256SUMS.gpg** file is the GnuPG signature for that file. We use this signature file to **verify** the checksum file in subsequent steps. + +Download the Ubuntu ISO images and these two files and put them all in a directory, for example **ISO**. + +``` +$ ls ISO/ +SHA256SUMS SHA256SUMS.gpg ubuntu-18.04.2-live-server-amd64.iso +``` + +As you see in the above output, I have downloaded Ubuntu 18.04.2 LTS server image along with checksum and signature values. + +##### Download valid signature key + +Now, download the correct signature key using command: + +``` +$ gpg --keyid-format long --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x46181433FBB75451 0xD94AA3F0EFE21092 +``` + +Sample output: + +``` +gpg: key D94AA3F0EFE21092: 57 signatures not checked due to missing keys +gpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" imported +gpg: key 46181433FBB75451: 105 signatures not checked due to missing keys +gpg: key 46181433FBB75451: public key "Ubuntu CD Image Automatic Signing Key <[email protected]>" imported +gpg: no ultimately trusted keys found +gpg: Total number processed: 2 +gpg: imported: 2 +``` + +##### Verify SHA-256 checksum + +Next verify the checksum file using the signature with command: + +``` +$ gpg --keyid-format long --verify SHA256SUMS.gpg SHA256SUMS +``` + +Sample output: + +``` +gpg: Signature made Friday 15 February 2019 04:23:33 AM IST +gpg: using DSA key 46181433FBB75451 +gpg: Good signature from "Ubuntu CD Image Automatic Signing Key <[email protected]>" [unknown] +gpg: WARNING: This key is not certified with a trusted signature! +gpg: There is no indication that the signature belongs to the owner. +Primary key fingerprint: C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451 +gpg: Signature made Friday 15 February 2019 04:23:33 AM IST +gpg: using RSA key D94AA3F0EFE21092 +gpg: Good signature from "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" [unknown] +gpg: WARNING: This key is not certified with a trusted signature! +gpg: There is no indication that the signature belongs to the owner. +Primary key fingerprint: 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 +``` + +If you see “Good signature” in the output,the checksum file is created by Ubuntu developer and signed by the owner of the key file. + +##### Check the downloaded ISO file + +Next, let us go ahead and check the downloaded ISO file matches the checksum. To do so, simply run: + +``` +$ sha256sum -c SHA256SUMS 2>&1 | grep OK +ubuntu-18.04.2-live-server-amd64.iso: OK +``` + +If the checksum values are matched, you will see the **“OK”** message. Meaning – the downloaded file is legitimate and hasn’t altered or tampered. + +If you don’t get any output or different than above output, the ISO file has been modified or incorrectly downloaded. You must re-download the file again from a good source. + +Some Linux distributions have included the checksum value in the download page itself. For example, **Pop!_os** developers have provided the SHA-256 checksum values for all ISO images in the download page itself, so you can quickly verify the ISO images. + +![][5] + +Pop os SHA256 sum value in download page + +After downloading the the ISO image, verify it using command: + +``` +$ sha256sum Soft_backup/ISOs/pop-os_18.04_amd64_intel_54.iso +``` + +Sample output: + +``` +680e1aa5a76c86843750e8120e2e50c2787973343430956b5cbe275d3ec228a6 Soft_backup/ISOs/pop-os_18.04_amd64_intel_54.iso +``` + +![][6] + +Pop os SHA256 sum value + +Here, the random string starting with **“680elaa…”** is the SHA-256 checksum value. Compare this value with the SHA-256 sum value provided on the downloads page. If both values are same, you’re good to go! The downloaded ISO file is legitimate and it hasn’t changed or modified from its original state. + +This is how we can verify the authenticity and integrity of an ISO file in Linux. Whether you download ISOs from official or third-party sources, it is always recommended to do a quick verification before using them. Hope this was useful. + +**Reference:** + + * [**https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu**][7] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-verify-iso-images-in-linux/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Verify-ISO-Images-In-Linux-720x340.png +[2]: https://www.ostechnix.com/etcher-beauitiful-app-create-bootable-sd-cards-usb-drives/ +[3]: https://blog.linuxmint.com/?p=2994 +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-18.04-checksum-and-signature.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Pop-os-SHA256-sum.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Pop-os-SHA256-sum-value.png +[7]: https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu From 4b92e2ccdf15af73ba3f5ec55e4d8ebd39d47222 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:09:43 +0800 Subject: [PATCH 294/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20How=20?= =?UTF-8?q?To=20Screenshot=20Right=20Click=20Context=20Menu=20On=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 How To Screenshot Right Click Context Menu On Linux.md --- ...nshot Right Click Context Menu On Linux.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/tech/20190805 How To Screenshot Right Click Context Menu On Linux.md diff --git a/sources/tech/20190805 How To Screenshot Right Click Context Menu On Linux.md b/sources/tech/20190805 How To Screenshot Right Click Context Menu On Linux.md new file mode 100644 index 0000000000..17f13338dc --- /dev/null +++ b/sources/tech/20190805 How To Screenshot Right Click Context Menu On Linux.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Screenshot Right Click Context Menu On Linux) +[#]: via: (https://www.ostechnix.com/how-to-screenshot-right-click-context-menu-on-linux/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Screenshot Right Click Context Menu On Linux +====== + +![How To Screenshot Right Click Context Menu On Linux][1] + +Taking screenshots is part of my work. I take a lot of screenshots daily to use them in my guides. The other day, I had to screenshot the right-click context menu while writing a guide to show our readers how to [**add ‘New Document’ option in right click context menu in Ubuntu 18.04 LTS desktop**][2]. Usually, I take screenshots with **Print screen** button in the keyboard and **Deepin Screenshot** application. While trying to screenshot the context menu using Deepin Screenshot app, the context menu automatically disappeared as soon as I clicked the Deepin Screenshot. Printscreen also doesn’t work when the context menu is open. If you happened to be in this situation, here are two simple workarounds to screenshot right click context menu on Linux systems with GNOME DE. + +### Screenshot Right-click Context Menu On Linux + +If you want to take the screenshot of right click context menu when it is open, simply instruct the screenshot apps to wait for a particular seconds before taking a screenshot. + +We can do this in two ways, the CLI way and GUI way. First, we will see the CLI way. + +##### 1\. Schedule screenshots using Scrot + +As you might already know, [**Scrot**][3] (short for **SCR** eensh **OT** ) is a command-line screenshot tool for taking screenshots in Unix-like operating systems. Scrot comes pre-installed in most Linux distributions. Just in case, if it is not installed already, you can install it using your distribution’s default package manager. For example, run the following command to install Scrot on Ubuntu and its derivatives: + +``` +$ sudo apt install scrot +``` + +Now we are going to instruct Scrot to wait for X seconds, for example 5 seconds, before taking a screenshot using command: + +``` +$ scrot -d 5 +``` + +Now, right click anywhere to open the context menu and wait for 5 seconds. Scrot will take screenshot exactly after 5 seconds. + +![][4] + +Screenshot Right-click Context Menu On Linux Using Scrot + +You can set the timeout value as you wish. + +If you’re not comfortable with CLI way, no problem! We can do this in GUI way as well. + +##### 2\. Schedule screenshots using Gnome Screenshot + +Open Gnome Screenshot application. it comes pre-installed with GNOME desktop. Now, set a time (E.g. 5 seconds) after which the picture has to be taken, click **Take screenshot** button, open the right click context menu and simply wait for 5 seconds. The screenshot will be taken in 5 seconds. + +![][5] + +Screenshot Right-click Context Menu On Linux Using Gnome screenshot + +And, that’s all. This is how we can take screenshots when a menu is open or running. Of course, some advanced screenshot applications like **Shutter** can do this as well. But I find these two ways much easier. + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-screenshot-right-click-context-menu-on-linux/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Screenshot-Right-Click-Context-Menu-720x340.png +[2]: https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/ +[3]: https://www.ostechnix.com/take-screenshots-command-line-using-scrot-linux/ +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Screenshot-Right-click-Context-Menu-On-Linux.gif +[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Screenshot-Right-click-Context-Menu-On-Linux-Using-Gnome-screenshot.gif From d0ecadbc8b0240f3534a5b4b0b21db13698a98be Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:10:46 +0800 Subject: [PATCH 295/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20How=20?= =?UTF-8?q?To=20Add=20=E2=80=98New=20Document=E2=80=99=20Option=20In=20Rig?= =?UTF-8?q?ht=20Click=20Context=20Menu=20In=20Ubuntu=2018.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md --- ... Right Click Context Menu In Ubuntu 18.04.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md diff --git a/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md b/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md new file mode 100644 index 0000000000..53fb5a5906 --- /dev/null +++ b/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md @@ -0,0 +1,109 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04) +[#]: via: (https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04 +====== + +![Add 'New Document' Option In Right Click Context Menu In Ubuntu 18.04 GNOME desktop][1] + +The other day, I was collecting reference notes for [**Linux package managers**][2] on various online sources. When I tried to create a text file to save those notes, I noticed that the ‘New document’ option is missing in my Ubuntu 18.04 LTS desktop. I thought somehow the option is gone in my system. After googling a bit, It turns out to be the “new document” option is not included in Ubuntu GNOME editions. Luckily, I have found an easy solution to add ‘New Document’ option in right click context menu in Ubuntu 18.04 LTS desktop. + +As you can see in the following screenshot, the “New Doucment” option is missing in the right-click context menu of Nautilus file manager. + +![][3] + +new document option is missing in right-click context menu ubuntu 18.04 + +If you want to add this option, just follow the steps given below. + +### Add ‘New Document’ Option In Right Click Context Menu In Ubuntu + +First, make sure you have **~/Templates** directory in your system. If it is not available create one like below. + +``` +$ mkdir ~/Templates +``` + +Next open the Terminal application and cd into the **~/Templates** folder using command: + +``` +$ cd ~/Templates +``` + +Create an empty file: + +``` +$ touch Empty\ Document +``` + +Or, + +``` +$ touch "Empty Document" +``` + +![][4] + +Now open your Nautilus file manager and check if “New Doucment” option is added in context menu. + +![][5] + +Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04 + +As you can see in the above screenshot, the “New Document” option is back again. + +You can also additionally add options for different files types like below. + +``` +$ cd ~/Templates + +$ touch New\ Word\ Document.docx +$ touch New\ PDF\ Document.pdf +$ touch New\ Text\ Document.txt +$ touch New\ PyScript.py +``` + +![][6] + +Add options for different files types in New Document sub-menu + +Please note that all files should be created inside the **~/Templates** directory. + +Now, open the Nautilus and check if the newly created file types are present in “New Document” sub-menu. + +![][7] + +If you want to remove any file type from the sub-menu, simply remove the appropriate file from the Templates directory. + +``` +$ rm ~/Templates/New\ Word\ Document.docx +``` + +I am wondering why this option has been removed in recent Ubuntu GNOME editions. I use it frequently. However, it is easy to re-enable this option in couple minutes. + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-1-720x340.png +[2]: https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/ +[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/new-document-option-missing.png +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Create-empty-document-in-Templates-directory.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-In-Ubuntu.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-options-for-different-files-types.png +[7]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu.png From a91cefa64167c64459327e5b7ae141e70a797d40 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:12:38 +0800 Subject: [PATCH 296/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20How=20?= =?UTF-8?q?To=20Magnify=20Screen=20Areas=20On=20Linux=20Desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 How To Magnify Screen Areas On Linux Desktop.md --- ...o Magnify Screen Areas On Linux Desktop.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/tech/20190805 How To Magnify Screen Areas On Linux Desktop.md diff --git a/sources/tech/20190805 How To Magnify Screen Areas On Linux Desktop.md b/sources/tech/20190805 How To Magnify Screen Areas On Linux Desktop.md new file mode 100644 index 0000000000..cd53bf8941 --- /dev/null +++ b/sources/tech/20190805 How To Magnify Screen Areas On Linux Desktop.md @@ -0,0 +1,127 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Magnify Screen Areas On Linux Desktop) +[#]: via: (https://www.ostechnix.com/how-to-magnify-screen-areas-on-linux-desktop/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Magnify Screen Areas On Linux Desktop +====== + +Have you ever been in a situation where you wanted to magnify a particular portion of your screen? If you’re a graphic designer, you might be definitely in this situation often. Please note that I am not talking about enlarging a text. Magnifying the screen area is different than merely enlarging the text size. Magnification is the process of enlarging something (E.g. Images) only in appearance, not in physical size. Fortunately, there are many applications available to magnify screen areas on Linux systems. The magnifiers can help the artists or graphic designers for accurate graphical design and/or detail work. This can also help to those who have poor eyesight or small screen size monitor with low resolutions in general. + +### Magnify Screen Areas On Linux Desktop + +There could be several ways, applications to do this. I am aware of the following two methods as of writing this guide. I will keep looking for more ways and applications which will help to magnify, try them out and update this guide in future. + +##### Method 1 – Using Magnus + +Magnus is a small and simple desktop magnifier application for Linux. It literally follows the mouse cursor, allowing you to move around by zooming in on parts of the screen. It shows the screen areas around the mouse pointer in a separate window magnified up to five times. Magnus is free, open source application released under MIT license. + +Magnus is available as [**snap**][1] application. So we can install it on Linux distributions that supports snaps using command: + +``` +$ sudo snap install magnus +``` + +There is also a PPA for Magnus is available. + +``` +$ sudo add-apt-repository ppa:flexiondotorg/magnus + +$ sudo apt update + +$ sudo apt install magnus +``` + +Once Magnus is installed, launch it from menu or application launcher. + +You will see a small window on the top left corner of your screen. You can move it to any side of the screen and increase its size by simply dragging the hot corners windows. + +![][3] + +Magnus screen magnifier Interface + +Now, move the mouse pointer around the screen areas to magnify them. + +![][4] + +Magnify Screen Areas On Linux Desktop Using Magnus + +You can increase the zooming level (by 2x, 3x, 4x and 5x) from the drop-down box in the tool bar of Magnus app. By default, Magnus will magnify the areas in 2x size. + +##### Method 2 – Using Universal Access menu + +If you’re a GNOME user, you need not to install any external applications. GNOME desktop comes with a built-in feature called **Universal Access** which will provide many accessibility features such as, + + * Magnifying screen areas, + * Read screen aloud, + * Read screen in Braille, + * Change text size, + * Adjust contrast, + * Adjust speed of mouse/touchpad, + * Use on-screen keyboard, + * And many. + + + +We will look into only one feature i.e magnifying screen areas. + +Launch Universal Access menu. It is usually found under System Settings. Or, click on a person-like icon on the top bar. + +There are many accessibility options available in Universal access menu as shown in the picture below. To enable magnification, click on **Zoom** tab. + +![][5] + +Universal Access menu + +In the Zoom options window, simply enable Zoom option. Just click the **ON/OFF slider button** to enable/disable zoom option. + +![][6] + +Magnify Screen Areas On Linux Desktop Using Universal Access menu + +Once you enabled the zoom option, the screen areas will simply magnify when you move the mouse pointer around them. You can increase or decrease the zooming level by simply clicking on the +/- buttons besides Magnification option. + +Unlike Magnus application, Universal access menu offers a few additional functionalities as listed below. + + * Change mouse tracking. This setting can be applied in the **Magnifier tab** of Zoom options window. + * Change position of the magnified view on the screen i.e entire screen or part of the screen like top half, bottom half, left half and right half. To adjust these settings, go to **Magnifier tab**. + * Activate crosshairs to help you find the mouse or touchpad pointer. Also, we can adjust mouse or touchpad thickness, length and color. These settings can be changed in the **Crosshairs tab**. + * Adjust color effects such as brightness, contrast, color. All of these settings can be adjusted in **Color effects tab**. + + + +I tested these two methods on Ubuntu 18.04 desktop and I could easily magnify the screen areas. + +To be honest, I never knew that we can magnify a screen area in Linux. Before I know about this, all I would do is just screenshot the area and zoom in/out using an image viewer application. Well, not anymore! I know now how to magnify a screen area on Linux desktop and I hope this will be useful to you too. + +**Resources:** + + * [**Magnus GitHub Repository**][7] + * [**Ubuntu documentation**][8] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-magnify-screen-areas-on-linux-desktop/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/introduction-ubuntus-snap-packages/ +[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/Magnus-launch.png +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Magnify-Screen-Areas-On-Linux-Desktop-Using-Magnus.gif +[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Universal-Access-menu.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Magnify-Screen-Areas-On-Linux-Desktop-Using-Universal-Access-menu.png +[7]: https://github.com/stuartlangridge/magnus +[8]: https://help.ubuntu.com/stable/ubuntu-help/a11y-mag.html.en From 4499766e1a49513e578e1bc417b0b0c3cbb827b3 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 5 Aug 2019 11:14:10 +0800 Subject: [PATCH 297/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20GameMo?= =?UTF-8?q?de=20=E2=80=93=20A=20Tool=20To=20Improve=20Gaming=20Performance?= =?UTF-8?q?=20On=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md --- ... To Improve Gaming Performance On Linux.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md diff --git a/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md b/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md new file mode 100644 index 0000000000..797b147aef --- /dev/null +++ b/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md @@ -0,0 +1,117 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GameMode – A Tool To Improve Gaming Performance On Linux) +[#]: via: (https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +GameMode – A Tool To Improve Gaming Performance On Linux +====== + +![Gamemmode improve gaming performance on Linux][1] + +Ask some Linux users why they still sticks with Windows dual boot, probably the answer would be – “Games!”. It was true! Luckily, open source gaming platforms like [**Lutris**][2] and Proprietary gaming platform **Steam** have brought many games to Linux platforms and improved the Linux gaming experience significantly over the years. Today, I stumbled upon yet another Linux gaming-related, open source tool named **GameMode** , which allows the users to improve gaming performance on Linux. + +GameMode is basically a daemon/lib combo that lets the games optimise Linux system performance on demand. I thought GameMode is a kind of tool that would kill some resource-hungry tools running in the background. But it is different. What it does actually is just instruct the CPU to **automatically run in Performance mode when playing games** and helps the Linux users to get best possible performance out of their games. + +GameMode improves the gaming performance significantly by requesting a set of optimisations be temporarily applied to the host OS while playing the games. Currently, It includes support for optimisations including the following: + + * CPU governor, + * I/O priority, + * Process niceness, + * Kernel scheduler (SCHED_ISO), + * Screensaver inhibiting, + * GPU performance mode (NVIDIA and AMD), GPU overclocking (NVIDIA), + * Custom scripts. + + + +GameMode is free and open source system tool developed by [**Feral Interactive**][3], a world-leading publisher of games. + +### Install GameMode + +GameMode is available for many Linux distributions. + +On Arch Linux and its variants, you can install it from [**AUR**][4] using any AUR helper programs, for example [**Yay**][5]. + +``` +$ yay -S gamemode +``` + +On Debian, Ubuntu, Linux Mint and other Deb-based systems: + +``` +$ sudo apt install gamemode +``` + +If GameMode is not available for your system, you can manually compile and install it from source as described in its Github page under Development section. + +### Activate GameMode support to improve Gaming Performance on Linux + +Here are the list of games with GameMode integration, so we need not to do any additional configuration to activate GameMode support. + + * Rise of the Tomb Raider + * Total War Saga: Thrones of Britannia + * Total War: WARHAMMER II + * DiRT 4 + * Total War: Three Kingdoms + + + +Simply run these games and GameMode support will be enabled automatically. + +There is also an [**extension**][6] is available to integrate GameMode support with GNOME shell. It indicates when GameMode is active in the top panel. + +For other games, you may need to manually request GameMode support like below. + +``` +gamemoderun ./game +``` + +I am not fond of games and I haven’t played any games for years. So, I can’t share any actual benchmarks. + +However, I’ve found a short video tutorial on Youtube to enable GameMode support for Lutris games. It is a good start point for those who wants to try GameMode for the first time. + + + +By looking at the comments in the video, I can say that that GameMode has indeed improved gaming performance on Linux. + +For more details, refer the [**GameMode GitHub repository**][7]. + +* * * + +**Related read:** + + * [**GameHub – An Unified Library To Put All Games Under One Roof**][8] + * [**How To Run MS-DOS Games And Programs In Linux**][9] + + + +* * * + +Have you used GameMode tool? Did it really improve the Gaming performance on your Linux box? Share you thoughts in the comment section below. + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Gamemode-720x340.png +[2]: https://www.ostechnix.com/manage-games-using-lutris-linux/ +[3]: http://www.feralinteractive.com/en/ +[4]: https://aur.archlinux.org/packages/gamemode/ +[5]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/ +[6]: https://github.com/gicmo/gamemode-extension +[7]: https://github.com/FeralInteractive/gamemode +[8]: https://www.ostechnix.com/gamehub-an-unified-library-to-put-all-games-under-one-roof/ +[9]: https://www.ostechnix.com/how-to-run-ms-dos-games-and-programs-in-linux/ From 29cef4e77bd6e31ead60b3f03c6336fe3c621fac Mon Sep 17 00:00:00 2001 From: furrybear Date: Mon, 5 Aug 2019 11:56:14 +0800 Subject: [PATCH 298/951] Update 20190730 How to create a pull request in GitHub.md --- sources/tech/20190730 How to create a pull request in GitHub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190730 How to create a pull request in GitHub.md b/sources/tech/20190730 How to create a pull request in GitHub.md index b41dec1ee6..3c8ace6cf4 100644 --- a/sources/tech/20190730 How to create a pull request in GitHub.md +++ b/sources/tech/20190730 How to create a pull request in GitHub.md @@ -7,7 +7,7 @@ [#]: via: (https://opensource.com/article/19/7/create-pull-request-github) [#]: author: (Kedar Vijay Kulkarni https://opensource.com/users/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p) -How to create a pull request in GitHub +如何在Github上创建一个拉取请求 ====== Learn how to fork a repo, make changes, and ask the maintainers to review and merge it. From 119c0915ff35ce82921dc9d6cd76f6da8f74a9ea Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Aug 2019 20:18:17 +0800 Subject: [PATCH 299/951] APL --- .../20190805 How To Find Hardware Specifications On Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190805 How To Find Hardware Specifications On Linux.md b/sources/tech/20190805 How To Find Hardware Specifications On Linux.md index 720765a9da..da9249efb3 100644 --- a/sources/tech/20190805 How To Find Hardware Specifications On Linux.md +++ b/sources/tech/20190805 How To Find Hardware Specifications On Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From a9c6e2fc456836be9a86d57effbfdd9ffd2c5d4e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Aug 2019 22:08:37 +0800 Subject: [PATCH 300/951] TSL --- ...o Find Hardware Specifications On Linux.md | 358 ------------------ ...o Find Hardware Specifications On Linux.md | 339 +++++++++++++++++ 2 files changed, 339 insertions(+), 358 deletions(-) delete mode 100644 sources/tech/20190805 How To Find Hardware Specifications On Linux.md create mode 100644 translated/tech/20190805 How To Find Hardware Specifications On Linux.md diff --git a/sources/tech/20190805 How To Find Hardware Specifications On Linux.md b/sources/tech/20190805 How To Find Hardware Specifications On Linux.md deleted file mode 100644 index da9249efb3..0000000000 --- a/sources/tech/20190805 How To Find Hardware Specifications On Linux.md +++ /dev/null @@ -1,358 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Find Hardware Specifications On Linux) -[#]: via: (https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -How To Find Hardware Specifications On Linux -====== - -There are plenty of tools available to find hardware specifications on Linux systems. Here, I have listed four most commonly used tools to get almost all hardware (and software) details of a Linux system. Good thing is these tools comes pre-installed by default on some Linux distributions. I tested these tools on Ubuntu 18.04 LTS desktop, however they should work on other Linux distros as well. - -### 1\. LSHW - -**Lshw (Hardware Lister)** is a simple, yet full-featured utility that provides detailed information on the hardware configuration of a Linux system. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed etc. Information can be output in plain text, XML or HTML. - -It currently supports DMI (x86 and EFI only), Open Firmware device tree (PowerPC only), PCI/AGP, ISA PnP (x86), CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), USB and SCSI. - -Like I already said, lshw comes pre-installed with Ubuntu by default. If it isn’t installed in your Ubuntu system, install it using the command: - -``` -$ sudo apt install lshw lshw-gtk -``` - -On other Linux distributions, for example Arch Linux, run: - -``` -$ sudo pacman -S lshw lshw-gtk -``` - -Once installed, run lshw to find your system hardware details: - -``` -$ sudo lshw -``` - -You will see the detailed output of your system’s hardware specifications. - -**Sample output:** - -![][2] - -Find Hardware Specifications On Linux using lshw - -Please be mindful that if you run lshw command without sudo rights, the output may be incomplete or inaccurate. - -Lshw can display the output as an HTML page. To do so, use: - -``` -$ sudo lshw -html -``` - -Likewise, we can output the device tree as XML and json formats like below. - -``` -$ sudo lshw -xml - -$ sudo lshw -json -``` - -To output the device tree showing hardware paths, use -short option: - -``` -$ sudo lshw -short -``` - -![][3] - -Show device tree with hardware path using lshw - -To list devices with bus information, detailing SCSI, USB, IDE and PCI addresses, run: - -``` -$ sudo lshw -businfo -``` - -By default, lshw display all hardware details. You can also view the hardware information of a specific hardware details based on **Class** options such as processor, memory, display etc. The class options can be found using **lshw -short** or **lshw -businfo** commands. - -To display a specific hardware details, for example Processor, do: - -``` -$ sudo lshw -class processor -``` - -Sample output: - -``` -*-cpu -description: CPU -product: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz -vendor: Intel Corp. -physical id: 4 -bus info: [email protected] -version: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz -serial: To Be Filled By O.E.M. -slot: CPU 1 -size: 913MHz -capacity: 2300MHz -width: 64 bits -clock: 100MHz -capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts md_clear flush_l1d cpufreq -configuration: cores=2 enabledcores=1 threads=2 -``` - -Similarly, we can get system details using command: - -``` -$ sudo lshw -class system -``` - -Get hard disk details: - -``` -$ sudo lshw -class disk -``` - -Get network details: - -``` -$ sudo lshw -class network -``` - -Get memory details: - -``` -$ sudo lshw -class memory -``` - -Also, we can list details of multiple devices like below. - -``` -$ sudo lshw -class storage -class power -class volume -``` - -If you want to view the details with hardware path, just add **-short** option. - -``` -$ sudo lshw -short -class processor -``` - -Output: - -``` -H/W path Device Class Description -======================================================= -/0/4 processor Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz -``` - -Sometimes you might want to share your hardware details to someone, for example customer support person. If so, you can remove potentially sensitive information, such as IP addresses, serial numbers, etc., from output like below. - -``` -$ lshw -sanitize -``` - -**Lshw-gtk GUI utility -** - -If you’re not comfortable with CLI, you can use **lshw-gtk** which is the graphical interface for lshw command line tool. - -It can be opened either from Terminal or Dash. - -To launch it from Terminal, simply do: - -``` -$ sudo lshw-gtk -``` - -Here is the default GUI interface of lshw tool. - -![][4] - -Find Hardware Specifications On Linux using lshw-gtk - -Just double click on “Portable Computer” to expand it further. - -![][5] - -Find Hardware Specifications On Linux using lshw-gtk GUI - -You can keep double click on subsequent hardware tab to get the detailed view. - -For more details, refer man pages. - -``` -$ man lshw -``` - -### 2\. Inxi - -**Inxi** is my another favorite tool to find almost everything about a Linux system. It is a free, open source, and full featured command line system information tool. It shows system hardware, CPU, drivers, Xorg, Desktop, Kernel, GCC version(s), Processes, RAM usage, and a wide variety of other useful information. Be it a hard disk or CPU, mother board or the complete detail of the entire system, inxi will display it more accurately in seconds. Since it is CLI tool, you can use it in Desktop or server edition. For more details, refer the following guide. - - * [**How To Find Linux System Details Using inxi**][6] - - - -### 3\. Hardinfo - -**Hardinfo** will get you the both hardware and software details of your system which isn’t available in the _lshw._ -HardInfo can gather information about your system’s hardware and operating system, perform benchmarks, and generate printable reports either in HTML or in plain text formats. - -If Hardinfo isn’t installed in Ubuntu, install it using the command:*** - -* * * - -``` -$ sudo apt install hardinfo -``` - -Once installed, Hardinfo tool either from the Terminal or Menu. - -Here is how Hardinfo default interface looks like. - -![][7] - -Find Hardware Specifications On Linux Using Hardinfo - -As you see in the above screenshot, Hardinfo has simple and intuitive GUI. - -All hardware information have grouped in four main groups namely **Computer** , **Devices** , **Network** , and **Benchmarks**. Each group has shows specific hardware details. - -For example, to view your processor details, click on “Processor” option under “Devices” group. - -![][8] - -Show processor details using hardinfo - -Unlike lshw, Hardinfo helps you to find basic software specifications like operating system details, kernel modules, locale information, filesystem usage, users/groups, and development tools etc. - -![][9] - -Show operating system details using hardinfo - -Another notable feature of Hardinfo is it allows us to do simple benchmarks to test CPU and FPU capabilities and some of the graphical user interface capabilities. - -![][10] - -Perform benchmarks using hardinfo - -* * * - -**Suggested read:** - - * [**Phoronix Test Suite – An Open Source Testing And Benchmarking Tool**][11] - * [**UnixBench – A Benchmark Suite For Unix-like Systems**][12] - * [**How To Benchmark Linux Commands And Programs From Commandline**][13] - - - -* * * - -We can generate reports of our entire system as well as individual devices. To generate report, simply click on “Generate Report” button on the menu bar and choose the information that you want to include in the report. - -![][14] - -Generate system reports using hardinfo - -Hardinfo has few command line options as well. - -For instance, to generate report and display it in the Terminal, run: - -``` -$ hardinfo -r -``` - -List modules: - -``` -$ hardinfo -l -``` - -For more details, refer man pages. - -``` -$ man hardinfo -``` - -### 4\. Sysinfo - -**Sysinfo** is yet another alternative to HardInfo and lshw-gtk utilities that can be used to get both hardware and software information as listed below. - - * System details such as distribution release, versions of GNOME, kernel, gcc and Xorg and hostname. - * CPU details like vendor identification, model name, frequency, L2 cache, model numbers and flags. - * Memory details such as total system RAM, free memory, swap space total and free, cached, active/inactive memory. - * Storage Controllers such as IDE interface, all IDE devices, SCSI devices. - * Hardware details such as motherboard, graphic card, sound card and network devices. - - - -Let us install sysinfo using the command: - -``` -$ sudo apt install sysinfo -``` - -Sysinfo can be launched either from from Terminal or Dash. - -To launch it from terminal, run: - -$ sysinfo - -Here is the default interface of Sysinfo utility. - -![][15] - -sysinfo interface - -As you can see, all hardware(and software) details have been grouped under five categories namely System, CPU, Memory, Storage and Hardware. Click on a category on the navigation bar to get respective details. - -![][16] - -Find Hardware Specifications On Linux Using Sysinfo - -Further details can be found on man pages. - -``` -$ man sysinfo -``` - -And, that’s all. Like I already mentioned there could be many tools available to display Hardware/Software Specifications. However, these four tools are just enough to find everything about your Linux distribution. - -**Inxi** is my another favorite tool to find almost everything about a Linux system. It is a free, open source, and full featured command line system information tool. It shows system hardware, CPU, drivers, Xorg, Desktop, Kernel, GCC version(s), Processes, RAM usage, and a wide variety of other useful information. Be it a hard disk or CPU, mother board or the complete detail of the entire system, inxi will display it more accurately in seconds. Since it is CLI tool, you can use it in Desktop or server edition. For more details, refer the following guide. - - * [**How To Find Linux System Details Using inxi**][6] - - - -### 3\. Hardinfo - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[2]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-1.png -[3]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-device-tree-with-hardware-path-using-lshw.png -[4]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-gtk-1.png -[5]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-gtk-2.png -[6]: https://www.ostechnix.com/how-to-find-your-system-details-using-inxi/ -[7]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-Using-Hardinfo.png -[8]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-processor-details-using-hardinfo.png -[9]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-operating-system-details-using-hardinfo.png -[10]: https://www.ostechnix.com/wp-content/uploads/2013/01/Perform-benchmarks-using-hardinfo.png -[11]: https://www.ostechnix.com/phoronix-test-suite-open-source-testing-benchmarking-tool/ -[12]: https://www.ostechnix.com/unixbench-benchmark-suite-unix-like-systems/ -[13]: https://www.ostechnix.com/how-to-benchmark-linux-commands-and-programs-from-commandline/ -[14]: https://www.ostechnix.com/wp-content/uploads/2013/01/Generate-system-reports-using-hardinfo.png -[15]: https://www.ostechnix.com/wp-content/uploads/2013/01/sysinfo-interface.png -[16]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-Using-Sysinfo.png diff --git a/translated/tech/20190805 How To Find Hardware Specifications On Linux.md b/translated/tech/20190805 How To Find Hardware Specifications On Linux.md new file mode 100644 index 0000000000..85e6a78df6 --- /dev/null +++ b/translated/tech/20190805 How To Find Hardware Specifications On Linux.md @@ -0,0 +1,339 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Find Hardware Specifications On Linux) +[#]: via: (https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +如何在 Linux 上查找硬件规格 +====== + +在 Linux 系统上有许多工具可用于查找硬件规格。在这里,我列出了四种最常用的工具,可以获取 Linux 系统的几乎所有硬件(和软件)细节。好在是这些工具在某些 Linux 发行版上默认预装。我在 Ubuntu 18.04 LTS 桌面上测试了这些工具,但是它们也适用于其他 Linux 发行版。 + +### 1、LSHW + +lshw(硬件列表)是一个简单但功能齐全的实用程序,它提供了 Linux 系统上的硬件规格的详细信息。它可以报告确切的内存规格、固件版本、主板规格、CPU 版本和速度、缓存规格、总线速度等。信息可以以纯文本、XML 或 HTML 格式输出。 + +它目前支持 DMI(仅限 x86 和 EFI)、Open Firmware 设备树(仅限 PowerPC)、PCI/AGP、ISA PnP(x86)、CPUID(x86)、IDE/ATA/ATAPI、PCMCIA(仅在 x86 上测试过)、USB 和 SCSI。 + +就像我已经说过的那样,Ubuntu 默认预装了 lshw。如果它未安装在你的 Ubuntu 系统中,请使用以下命令安装它: + +``` +$ sudo apt install lshw lshw-gtk +``` + +在其他 Linux 发行版上,例如 Arch Linux,运行: + +``` +$ sudo pacman -S lshw lshw-gtk +``` + +安装后,运行 `lshw` 以查找系统硬件详细信息: + +``` +$ sudo lshw +``` + +你将看到输出详细的系统硬件。 + +示例输出: + +![][2] + +*使用 lshw 在 Linux 上查找硬件规格* + +请注意,如果你没有使用 `sudo` 权限运行 `lshw` 命令,则输出可能不完整或不准确。 + +`lshw` 可以将输出显示为 HTML 页面。为此,请使用: + +``` +$ sudo lshw -html +``` + +同样,我们可以将设备树输出为 XML 和 json 格式,如下所示: + +``` +$ sudo lshw -xml +$ sudo lshw -json +``` + +要输出显示硬件路径的设备树,请使用 `-short` 选项: + +``` +$ sudo lshw -short +``` + +![][3] + +*使用 lshw 显示具有硬件路径的设备树* + +要列出设备的总线信息、详细的 SCSI、USB、IDE 和 PCI 地址,请运行: + +``` +$ sudo lshw -businfo +``` + +默认情况下,`lshw` 显示所有硬件详细信息。你还可以居于 `-class` 选项查看特定硬件详细信息的硬件信息,例如处理器、内存、显示器等。可以使用 `lshw -short` 或 `lshw -businfo` 找到 `-class` 选项。 + +要显示特定硬件详细信息,例如处理器,请执行以下操作: + +``` +$ sudo lshw -class processor +``` + +示例输出: + +``` +*-cpu +description: CPU +product: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz +vendor: Intel Corp. +physical id: 4 +bus info: [email protected] +version: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz +serial: To Be Filled By O.E.M. +slot: CPU 1 +size: 913MHz +capacity: 2300MHz +width: 64 bits +clock: 100MHz +capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts md_clear flush_l1d cpufreq +configuration: cores=2 enabledcores=1 threads=2 +``` + +类似的,你可以得到系统细节: + +``` +$ sudo lshw -class system +``` + +硬盘细节: + +``` +$ sudo lshw -class disk +``` + +网络细节: + +``` +$ sudo lshw -class network +``` + +内存细节: + +``` +$ sudo lshw -class memory +``` + +你也可以像下面这样列出多个设备的细节: + +``` +$ sudo lshw -class storage -class power -class volume +``` + +如果你想要查看带有硬件路径的细节信息,加上 `-short` 选项即可: + +``` +$ sudo lshw -short -class processor +``` + +示例输出: + +``` +H/W path Device Class Description +======================================================= +/0/4 processor Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz +``` + +有时,你可能希望将某些硬件详细信息共享给别人,例如客户支持人员。如果是这样,你可以从输出中删除潜在的敏感信息,如 IP 地址、序列号等,如下所示。 + +``` +$ lshw -sanitize +``` + +#### lshw-gtk GUI 工具 + +如果你对 CLI 不熟悉,可以使用 `lshw-gtk`,这是 `lshw` 命令行工具的图形界面。 + +它可以从终端或 Dash 中打开。 + +要从终端启动它,只需执行以下操作: + +``` +$ sudo lshw-gtk +``` + +这是 lshw 工具的默认 GUI 界面。 + +![][4] + +*使用 lshw-gtk 在 Linux 上查找硬件* + +只需双击“Portable Computer”即可进一步展开细节。 + +![][5] + +*使用 lshw-gtk GUI 在 Linux 上查找硬件* + +你可以双击后续的硬件选项卡以获取详细视图。 + +有关更多详细信息,请参阅手册页。 + +``` +$ man lshw +``` + +### 2、Inxi + +Inxi 是我查找 Linux 系统上几乎所有内容的另一个最喜欢的工具。它是一个自由开源的功能齐全的命令行系统信息工具。它显示了系统硬件、CPU、驱动程序、Xorg、桌面、内核、GCC 版本、进程、RAM 使用情况以及各种其他有用信息。无论是硬盘还是 CPU、主板还是整个系统的完整细节,inxi 都能在几秒钟内更准确地显示它。由于它是 CLI 工具,你可以在桌面或服务器版本中使用它。有关更多详细信息,请参阅以下指南。 + +* [如何使用 inxi 发现系统细节][6] + +### 3、Hardinfo + +Hardinfo 将为你提供 `lshw` 中没有的系统硬件和软件详细信息。 + +HardInfo 可以收集有关系统硬件和操作系统的信息,执行基准测试,并以 HTML 或纯文本格式生成可打印的报告。 + +如果 Ubuntu 中未安装 Hardinfo,请使用以下命令安装: + +``` +$ sudo apt install hardinfo +``` + +安装后,Hardinfo 工具可以从终端或菜单中进行。 + +以下是 Hardinfo 默认界面的外观。 + +![][7] + +*使用 Hardinfo 在 Linux 上查找硬件* + +正如你在上面的屏幕截图中看到的,Hardinfo 的 GUI 简单直观。 + +所有硬件信息分为四个主要组:计算机、设备、网络和基准。每个组都显示特定的硬件详细信息。 + +例如,要查看处理器详细信息,请单击“设备”组下的“处理器”选项。 + +![][8] + +*使用 hardinfo 显示处理器详细信息* + +与 `lshw` 不同,Hardinfo 可帮助你查找基本软件规范,如操作系统详细信息、内核模块、区域设置信息、文件系统使用情况、用户/组和开发工具等。 + +![][9] + +*使用 hardinfo 显示操作系统详细信息* + +Hardinfo 的另一个显着特点是它允许我们做简单的基准测试来测试 CPU 和 FPU 功能以及一些图形用户界面功能。 + +![][10] + +*使用 hardinfo 执行基准测试* + +建议阅读: + +* [Phoronix 测试套件 - 开源测试和基准测试工具][11] +* [UnixBench - 类 Unix 系统的基准套件][12] +* [如何从命令行对 Linux 命令和程序进行基准测试][13] + +我们可以生成整个系统以及各个设备的报告。要生成报告,只需单击菜单栏上的“生成报告”按钮,然后选择要包含在报告中的信息。 + +![][14] + +*使用 hardinfo 生成系统报告* + +Hardinfo 也有几个命令行选项。 + +例如,要生成报告并在终端中显示它,请运行: + +``` +$ hardinfo -r +``` + +列出模块: + +``` +$ hardinfo -l +``` + +更多信息请参考手册: + +``` +$ man hardinfo +``` + +### 4、Sysinfo + +Sysinfo 是 HardInfo 和 lshw-gtk 实用程序的另一个替代品,可用于获取下面列出的硬件和软件信息。 + +* 系统详细信息,如发行版版本、GNOME 版本、内核、gcc 和 Xorg 以及主机名。 +* CPU 详细信息,如供应商标识、型号名称、频率、L2 缓存、型号和标志。 +* 内存详细信息,如系统全部内存、可用内存、交换空间总量和空闲、缓存、活动/非活动的内存。 +* 存储控制器,如 IDE 接口、所有 IDE 设备、SCSI 设备。 +* 硬件详细信息,如主板、图形卡、声卡和网络设备。 + +让我们使用以下命令安装 sysinfo: + +``` +$ sudo apt install sysinfo +``` + +Sysinfo 可以从终端或 Dash 启动。 + +要从终端启动它,请运行: + +``` +$ sysinfo +``` + +这是 Sysinfo 实用程序的默认界面。 + +![][15] + +*sysinfo 界面* + +如你所见,所有硬件(和软件)详细信息都分为五类,即系统、CPU、内存、存储和硬件。单击导航栏上的类别以获取相应的详细信息。 + +![][16] + +*使用 Sysinfo 在 Linux 上查找硬件* + +更多细节可以在手册页上找到。 + +``` +$ man sysinfo +``` + +就这样。就像我已经提到的那样,可以有很多工具可用于显示硬件/软件规范。但是,这四个工具足以找到你的 Linux 发行版的所有软硬件规格信息。 + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/ + +作者:[sk][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.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-1.png +[3]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-device-tree-with-hardware-path-using-lshw.png +[4]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-gtk-1.png +[5]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-using-lshw-gtk-2.png +[6]: https://www.ostechnix.com/how-to-find-your-system-details-using-inxi/ +[7]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-Using-Hardinfo.png +[8]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-processor-details-using-hardinfo.png +[9]: https://www.ostechnix.com/wp-content/uploads/2013/01/Show-operating-system-details-using-hardinfo.png +[10]: https://www.ostechnix.com/wp-content/uploads/2013/01/Perform-benchmarks-using-hardinfo.png +[11]: https://www.ostechnix.com/phoronix-test-suite-open-source-testing-benchmarking-tool/ +[12]: https://www.ostechnix.com/unixbench-benchmark-suite-unix-like-systems/ +[13]: https://www.ostechnix.com/how-to-benchmark-linux-commands-and-programs-from-commandline/ +[14]: https://www.ostechnix.com/wp-content/uploads/2013/01/Generate-system-reports-using-hardinfo.png +[15]: https://www.ostechnix.com/wp-content/uploads/2013/01/sysinfo-interface.png +[16]: https://www.ostechnix.com/wp-content/uploads/2013/01/Find-Hardware-Specifications-On-Linux-Using-Sysinfo.png From 5557ae6f58e1d92b8d2ee31cfadeb87f8408c7cd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Aug 2019 22:33:45 +0800 Subject: [PATCH 301/951] APL --- sources/tech/20171216 Sysadmin 101- Troubleshooting.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20171216 Sysadmin 101- Troubleshooting.md b/sources/tech/20171216 Sysadmin 101- Troubleshooting.md index a08081e3fd..cdb3a369c4 100644 --- a/sources/tech/20171216 Sysadmin 101- Troubleshooting.md +++ b/sources/tech/20171216 Sysadmin 101- Troubleshooting.md @@ -1,3 +1,5 @@ +wxy applied + Sysadmin 101: Troubleshooting ====== I typically keep this blog strictly technical, keeping observations, opinions and the like to a minimum. But this, and the next few posts will be about basics and fundamentals for starting out in system administration/SRE/system engineer/sysops/devops-ops (whatever you want to call yourself) roles more generally. From d4c0dd57f2bfb4f6cb448e0b5907e1e4eb91a079 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Aug 2019 01:00:21 +0800 Subject: [PATCH 302/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=20Bash?= =?UTF-8?q?=20Script=20to=20Automatically=20Start=20a=20Services=20When=20?= =?UTF-8?q?it=20Goes=20Down=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md --- ...t a Services When it Goes Down on Linux.md | 545 ++++++++++++++++++ 1 file changed, 545 insertions(+) create mode 100644 sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md diff --git a/sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md b/sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md new file mode 100644 index 0000000000..fda3063c02 --- /dev/null +++ b/sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md @@ -0,0 +1,545 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bash Script to Automatically Start a Services When it Goes Down on Linux) +[#]: via: (https://www.2daygeek.com/linux-bash-script-auto-restart-services-when-down/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Bash Script to Automatically Start a Services When it Goes Down on Linux +====== + +There are many open source monitoring tools are currently available in market to monitor Linux systems performance. + +Those are send an email alert when the system reaches the specified threshold limit for CPU, Memory, and Disk space or any service is down. + +But, it doesn’t have an intelligence to auto start the services, if it crash/goes down. + +There are various reasons for the process to crash, which you can investigate and fix the issue but it may take a while. + +If you don’t want to make your service down for a while and if you would like to bring them up immediately whenever it goes down? + +If so, what to do in this situation? How to mitigate this? + +We can write our own bash script to start a service whenever it goes down. Writing a shell script is not a big deal and you have to understand few things to achieve this. + +Once you familiar on this, you can write your own shell script to automate the day to day activities, which will save lots of time. + +We had added many useful shell scripts in the past. If you want to check those, navigate to the below link. + + * **[How to automate day to day activities using shell scripts?][1]** + + + +I have added totally six shell scripts for this usage and you can choose which one is suitable for you. + +I had applied different commands and methodology in each shell script. + +**`Note:`**` ` You need to change the email id instead of ours. + +### 1) How to Automatically Start a Service When it Goes Down on SysVinit Linux System? + +Use the following bash script, if you would like to start a single service in SysVinit Linux System. + +I have added **`httpd`**` ` service in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor.sh + +#!/bin/bash + +serv=httpd + +sstat=stopped + +service $serv status | grep -i 'running\|stopped' | awk '{print $3}' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + service $serv start + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done +``` + +Set an executable permission to **`service-monitor.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-1.sh + +#!/bin/bash + +serv=httpd + +sstat=$(pidof $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running fine!!!" + +else + +echo "$serv is down/dead" + +service $serv start + +echo "$serv service is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi +``` + +Set an executable permission to **`service-monitor-1.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-1.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-1.sh +``` + +### 2) How to Automatically Start a Service When it Goes Down on systemd Linux System? + +Use the following bash script, if you would like to start a single service in systemd Linux System. + +I have added **`httpd`**` ` service in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-2.sh + +#!/bin/bash + +serv=httpd + +sstat=dead + +systemctl status $serv | grep -i 'running\|dead' | awk '{print $3}' | sed 's/[()]//g' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + systemctl start $serv + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done +``` + +Set an executable permission to **`service-monitor-2.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-2.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-2.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-3.sh + +#!/bin/bash + +serv=httpd + +sstat=$(pidof $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running fine!!!" + +else + +echo "$serv is down/dead" + +systemctl start $serv + +echo "$serv service is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi +``` + +Set an executable permission to **`service-monitor-3.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-3.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-3.sh +``` + +### 3) How to Automatically Start Multiple Services When it Goes Down on SysVinit Linux System? + +Use the following bash script, if you would like to start multiple service in SysVinit Linux System. + +I have added **`httpd`**` ` and **`rsyslog`**` ` services in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-4.sh + +#!/bin/bash + +sstat=stopped + +for serv in httpd rsyslog + +do + +service $serv status | grep -i 'running\|stopped' | awk '{print $3}' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + service $serv start + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done +done +``` + +Set an executable permission to **`service-monitor-4.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-4.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-4.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-5.sh + +#!/bin/bash + +for serv in rsyslog httpd + +do + +sstat=$(pgrep $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running!!!" + +else + +echo "$serv is down/dead" + +service $serv start + +echo "$serv serv is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi + +done +``` + +Set an executable permission to **`service-monitor-5.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-5.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-5.sh +``` + +### 4) How to Automatically Start Multiple Service When it Goes Down on systemd Linux System? + +Use the following bash script, if you would like to start multiple services in systemd Linux System. + +I have added **`httpd`**` ` and **`rsyslog`**` ` services in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-6.sh + +#!/bin/bash + +sstat=dead + +for serv in httpd rsyslog + +do + +systemctl status $serv | grep -i 'running\|dead' | awk '{print $3}' | sed 's/[()]//g' | while read output; + +do + +echo $output + +if [ "$output" == "$sstat" ]; then + + systemctl start $serv + + echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + + else + + echo "$serv service is running" + + fi + +done + +done +``` + +Set an executable permission to **`service-monitor-6.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-6.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-6.sh +``` + +Alternatively, you can use the following script. + +``` +# vi /opt/scripts/service-monitor-7.sh + +#!/bin/bash + +for serv in rsyslog httpd + +do + +sstat=$(pgrep $serv | wc -l ) + +if [ $sstat -gt 0 ] + +then + +echo "$serv is running!!!" + +else + +echo "$serv is down/dead" + +systemctl start $serv + +echo "$serv serv is UP now!!!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi + +done +``` + +Set an executable permission to **`service-monitor-7.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-7.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-7.sh +``` + +### 5) How to Automatically Start a Service When it Goes Down on systemd and SysVinit Linux System? + +Use the following bash script, if you would like to start a service in systemd and SysVinit Linux System. + +I have added **`httpd`**` ` service in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-8.sh + +#!/bin/bash + +smanager=$(ps -p1 | grep "init\|systemd" | awk '{print $4}') + +serv=httpd + +if (( $(pidof $serv | wc -l) > 0 )) + +then + +echo "$serv is running!!!" + +elif [ "$smanager" == "init" ] + +then + +service $serv start + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +else + +systemctl start $serv + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi +``` + +Set an executable permission to **`service-monitor-8.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-8.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-8.sh +``` + +### 6) How to Automatically Start Multiple Services When it Goes Down on systemd and SysVinit Linux System? + +Use the following bash script, if you would like to start multiple services in systemd and SysVinit Linux System. + +I have added **`httpd`**` ` and **`rsyslog`**` ` services in this script but you can add the service, which you want to monitor. + +``` +# vi /opt/scripts/service-monitor-9.sh + +#!/bin/bash + +smanager=$(ps -p1 | grep "init\|systemd" | awk '{print $4}') + +for serv in rsyslog httpd + +do + +if (( $(pgrep $serv | wc -l) > 0 )) + +then + +echo "$serv is running!!!" + +elif [ "$smanager" == "init" ] + +then + +service $serv start + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +else + +systemctl start $serv + +echo "$serv service is UP now.!" | mail -s "$serv service is DOWN and restarted now On $(hostname)" [email protected] + +fi + +done +``` + +Set an executable permission to **`service-monitor-9.sh`**` ` file. + +``` +$ chmod +x /opt/scripts/service-monitor-9.sh +``` + +Finally add a cronjob to automate this. It will run every 5 minutes. + +``` +# crontab -e + +*/5 * * * * /bin/bash /opt/scripts/service-monitor-9.sh +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-bash-script-auto-restart-services-when-down/ + +作者:[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/shell-script/ From 687d66cf13dc46e773629a47d0c526d9e2d79df4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Aug 2019 01:13:36 +0800 Subject: [PATCH 303/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=204=20co?= =?UTF-8?q?ol=20new=20projects=20to=20try=20in=20COPR=20for=20August=20201?= =?UTF-8?q?9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md --- ...projects to try in COPR for August 2019.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md diff --git a/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md b/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md new file mode 100644 index 0000000000..c7a54360b4 --- /dev/null +++ b/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md @@ -0,0 +1,105 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 cool new projects to try in COPR for August 2019) +[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/) +[#]: author: (Dominik Turecek https://fedoramagazine.org/author/dturecek/) + +4 cool new projects to try in COPR for August 2019 +====== + +![][1] + +COPR is a [collection][2] of personal repositories for software that isn’t carried in Fedora. Some software doesn’t conform to standards that allow easy packaging. Or it may not meet other Fedora standards, despite being free and open source. COPR can offer these projects outside the Fedora set of packages. Software in COPR isn’t supported by Fedora infrastructure or signed by the project. However, it can be a neat way to try new or experimental software. + +Here’s a set of new and interesting projects in COPR. + +### Duc + +[Duc][3] is a collection of tools for disk usage inspection and visualization. Duc uses an indexed database to store sizes of files on your system. Once the indexing is done, you can then quickly overview your disk usage either by its command-line interface or the GUI. + +![][4] + +#### Installation instructions + +The [repo][5] currently provides duc for EPEL 7, Fedora 29 and 30. To install duc, use these commands: + +``` +sudo dnf copr enable terrywang/duc +sudo dnf install duc +``` + +### MuseScore + +[MuseScore][6] is a software for working with music notation. With MuseScore, you can create sheet music either by using a mouse, virtual keyboard or a MIDI controller. MuseScore can then play the created music or export it as a PDF, MIDI or MusicXML. Additionally, there’s an extensive database of sheet music created by Musescore users. + +![][7] + +#### Installation instructions + +The [repo][8] currently provides MuseScore for Fedora 29 and 30. To install MuseScore, use these commands: + +``` +sudo dnf copr enable jjames/MuseScore +sudo dnf install musescore +``` + +### Dynamic Wallpaper Editor + +[Dynamic Wallpaper Editor][9] is a tool for creating and editing a collection of wallpapers in GNOME that change in time. This can be done using XML files, however, Dynamic Wallpaper Editor makes this easy with its graphical interface, where you can simply add pictures, arrange them and set the duration of each picture and transitions between them. + +![][10] + +#### Installation instructions + +The [repo][11] currently provides dynamic-wallpaper-editor for Fedora 30 and Rawhide. To install dynamic-wallpaper-editor, use these commands: + +``` +sudo dnf copr enable atim/dynamic-wallpaper-editor +sudo dnf install dynamic-wallpaper-editor +``` + +### Manuskript + +[Manuskript][12] is a tool for writers and is aimed to make creating large writing projects easier. It serves as an editor for writing the text itself, as well as a tool for organizing notes about the story itself, characters of the story and individual plots. + +![][13] + +#### Installation instructions + +The [repo][14] currently provides Manuskript for Fedora 29, 30 and Rawhide. To install Manuskript, use these commands: + +``` +sudo dnf copr enable notsag/manuskript +sudo dnf install manuskript +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/ + +作者:[Dominik Turecek][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/dturecek/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg +[2]: https://copr.fedorainfracloud.org/ +[3]: https://duc.zevv.nl/ +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/duc.png +[5]: https://copr.fedorainfracloud.org/coprs/terrywang/duc/ +[6]: https://musescore.org/ +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/musescore-1024x512.png +[8]: https://copr.fedorainfracloud.org/coprs/jjames/MuseScore/ +[9]: https://github.com/maoschanz/dynamic-wallpaper-editor +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/dynamic-walppaper-editor.png +[11]: https://copr.fedorainfracloud.org/coprs/atim/dynamic-wallpaper-editor/ +[12]: https://www.theologeek.ch/manuskript/ +[13]: https://fedoramagazine.org/wp-content/uploads/2019/07/manuskript-1024x600.png +[14]: https://copr.fedorainfracloud.org/coprs/notsag/manuskript/ From 2b3bb49d8473545f474d9ff8e2c526bde3a6eec7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 01:14:13 +0800 Subject: [PATCH 304/951] TSL --- .../20171216 Sysadmin 101- Troubleshooting.md | 125 ---------------- .../20171216 Sysadmin 101- Troubleshooting.md | 136 ++++++++++++++++++ 2 files changed, 136 insertions(+), 125 deletions(-) delete mode 100644 sources/tech/20171216 Sysadmin 101- Troubleshooting.md create mode 100644 translated/tech/20171216 Sysadmin 101- Troubleshooting.md diff --git a/sources/tech/20171216 Sysadmin 101- Troubleshooting.md b/sources/tech/20171216 Sysadmin 101- Troubleshooting.md deleted file mode 100644 index cdb3a369c4..0000000000 --- a/sources/tech/20171216 Sysadmin 101- Troubleshooting.md +++ /dev/null @@ -1,125 +0,0 @@ -wxy applied - -Sysadmin 101: Troubleshooting -====== -I typically keep this blog strictly technical, keeping observations, opinions and the like to a minimum. But this, and the next few posts will be about basics and fundamentals for starting out in system administration/SRE/system engineer/sysops/devops-ops (whatever you want to call yourself) roles more generally. -Bear with me! - -"My web site is slow" - -I just picked the type of issue for this article at random, this can be applied to pretty much any sysadmin related troubleshooting. It's not about showing off the cleverest oneliners to find the most information. It's also not an exhaustive, step-by-step "flowchart" with the word "profit" in the last box. It's about general approach, by means of a few examples. -The example scenarios are solely for illustrative purposes. They sometimes have a basis in assumptions that doesn't apply to all cases all of the time, and I'm positive many readers will go "oh, but I think you will find…" at some point. -But that would be missing the point. - -Having worked in support, or within a support organization for over a decade, there is one thing that strikes me time and time again and that made me write this; -**The instinctive reaction many techs have when facing a problem, is to start throwing potential solutions at it.** - -"My website is slow" - - * I'm going to try upping `MaxClients/MaxRequestWorkers/worker_connections` - * I'm going to try to increase `innodb_buffer_pool_size/effective_cache_size` - * I'm going to try to enable `mod_gzip` (true story, sadly) - - - -"I saw this issue once, and then it was because X. So I'm going to try to fix X again, it might work". - -This wastes a lot of time, and leads you down a wild goose chase. In the dark. Wearing greased mittens. -InnoDB's buffer pool may well be at 100% utilization, but that's just because there are remnants of a large one-off report someone ran a while back in there. If there are no evictions, you've just wasted time. - -### Quick side-bar before we start - -At this point, I should mention that while it's equally applicable to many roles, I'm writing this from a general support system adminstrator's point of view. In a mature, in-house organization or when working with larger, fully managed or "enterprise" customers, you'll typically have everything instrumented, measured, graphed, thresheld (not even word) and alerted on. Then your approach will often be rather different. We're going in blind here. - -If you don't have that sort of thing at your disposal; - -### Clarify and First look - -Establish what the issue actually is. "Slow" can take many forms. Is it time to first byte? That's a whole different class of problem from poor Javascript loading and pulling down 15 MB of static assets on each page load. Is it slow, or just slower than it usually is? Two very different plans of attack! - -Make sure you know what the issue reported/experienced actually is before you go off and do something. Finding the source of the problem is often difficult enough, without also having to find the problem itself. -That is the sysadmin equivalent of bringing a knife to a gunfight. - -### Low hanging fruit / gimmies - -You are allowed to look for a few usual suspects when you first log in to a suspect server. In fact, you should! I tend to fire off a smattering of commands whenever I log in to a server to just very quickly check a few things; Are we swapping (`free/vmstat`), are the disks busy (`top/iostat/iotop`), are we dropping packets (`netstat/proc/net/dev`), is there an undue amount of connections in an undue state (`netstat`), is something hogging the CPUs (`top`), is someone else on this server (`w/who`), any eye-catching messages in syslog and `dmesg`? - -There's little point to carrying on if you have 2000 messages from your RAID controller about how unhappy it is with its write-through cache. - -This doesn't have to take more than half a minute. If nothing catches your eye - continue. - -### Reproduce - -If there indeed is a problem somewhere, and there's no low hanging fruit to be found; - -Take all steps you can to try and reproduce the problem. When you can reproduce, you can observe. **When you can observe, you can solve.** Ask the person reporting the issue what exact steps to take to reproduce the issue if it isn 't already obvious or covered by the first section. - -Now, for issues caused by solar flares and clients running exclusively on OS/2, it's not always feasible to reproduce. But your first port of call should be to at least try! In the very beginning, all you know is "X thinks their website is slow". For all you know at that point, they could be tethered to their GPRS mobile phone and applying Windows updates. Delving any deeper than we already have at that point is, again, a waste of time. - -Attempt to reproduce! - -### Check the log! - -It saddens me that I felt the need to include this. But I've seen escalations that ended mere minutes after someone ran `tail /var/log/..` Most *NIX tools these days are pretty good at logging. Anything blatantly wrong will manifest itself quite prominently in most application logs. Check it. - -### Narrow down - -If there are no obvious issues, but you can reproduce the reported problem, great. So, you know the website is slow. Now you've narrowed things down to: Browser rendering/bug, application code, DNS infrastructure, router, firewall, NICs (all eight+ involved), ethernet cables, load balancer, database, caching layer, session storage, web server software, application server, RAM, CPU, RAID card, disks. -Add a smattering of other potential culprits depending on the set-up. It could be the SAN, too. And don't forget about the hardware WAF! And.. you get my point. - -If the issue is time-to-first-byte you'll of course start applying known fixes to the webserver, that's the one responding slowly and what you know the most about, right? Wrong! -You go back to trying to reproduce the issue. Only this time, you try to eliminate as many potential sources of issues as possible. - -You can eliminate the vast majority of potential culprits very easily: Can you reproduce the issue locally from the server(s)? Congratulations, you've just saved yourself having to try your fixes for BGP routing. -If you can't, try from another machine on the same network. If you can - at least you can move the firewall down your list of suspects, (but do keep a suspicious eye on that switch!) - -Are all connections slow? Just because the server is a web server, doesn't mean you shouldn't try to reproduce with another type of service. [netcat][1] is very useful in these scenarios (but chances are your SSH connection would have been lagging this whole time, as a clue)! If that's also slow, you at least know you've most likely got a networking problem and can disregard the entire web stack and all its components. Start from the top again with this knowledge (do not collect $200). Work your way from the inside-out! - -Even if you can reproduce locally - there's still a whole lot of "stuff" left. Let's remove a few more variables. Can you reproduce it with a flat-file? If `i_am_a_1kb_file.html` is slow, you know it's not your DB, caching layer or anything beyond the OS and the webserver itself. -Can you reproduce with an interpreted/executed `hello_world.(py|php|js|rb..)` file? If you can, you've narrowed things down considerably, and you can focus on just a handful of things. If `hello_world` is served instantly, you've still learned a lot! You know there aren't any blatant resource constraints, any full queues or stuck IPC calls anywhere. So it's something the application is doing or something it's communicating with. - -Are all pages slow? Or just the ones loading the "Live scores feed" from a third party? - -**What this boils down to is; What 's the smallest amount of "stuff" that you can involve, and still reproduce the issue?** - -Our example is a slow web site, but this is equally applicable to almost any issue. Mail delivery? Can you deliver locally? To yourself? To ? Test with small, plaintext messages. Work your way up to the 2MB campaign blast. STARTTLS and no STARTTLS. Work your way from the inside-out. - -Each one of these steps takes mere seconds each, far quicker than implementing most "potential" fixes. - -### Observe / isolate - -By now, you may already have stumbled across the problem by virtue of being unable to reproduce when you removed a particular component. - -But if you haven't, or you still don't know **why** ; Once you've found a way to reproduce the issue with the smallest amount of "stuff" (technical term) between you and the issue, it's time to start isolating and observing. - -Bear in mind that many services can be ran in the foreground, and/or have debugging enabled. For certain classes of issues, it is often hugely helpful to do this. - -Here's also where your traditional armory comes into play. `strace`, `lsof`, `netstat`, `GDB`, `iotop`, `valgrind`, language profilers (cProfile, xdebug, ruby-prof…). Those types of tools. - -Once you've come this far, you rarely end up having to break out profilers or debugers though. - -[`strace`][2] is often a very good place to start. -You might notice that the application is stuck on a particular `read()` call on a socket file descriptor connected to port 3306 somewhere. You'll know what to do. -Move on to MySQL and start from the top again. Low hanging fruit: "Waiting_for comic core.md Dict.md lctt2014.md lctt2016.md LCTT翻译规范.md LICENSE Makefile published README.md sign.md sources translated 选题模板.txt 中文排版指北.md lock", deadlocks, max_connections.. Move on to: All queries? Only writes? Only certain tables? Only certain storage engines?… - -You might notice that there's a `connect()` to an external API resource that takes five seconds to complete, or even times out. You'll know what to do. - -You might notice that there are 1000 calls to `fstat()` and `open()` on the same couple of files as part of a circular dependency somewhere. You'll know what to do. - -It might not be any of those particular things, but I promise you, you'll notice something. - -If you're only going to take one thing from this section, let it be; learn to use `strace`! **Really** learn it, read the whole man page. Don 't even skip the HISTORY section. `man` each syscall you don't already know what it does. 98% of troubleshooting sessions ends with strace. - --------------------------------------------------------------------------------- - -via: http://northernmost.org/blog/troubleshooting-101/index.html - -作者:[Erik Ljungstrom][a] -译者:[lujun9972](https://github.com/lujun9972) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://northernmost.org -[1]:http://nc110.sourceforge.net/ -[2]:https://linux.die.net/man/1/strace diff --git a/translated/tech/20171216 Sysadmin 101- Troubleshooting.md b/translated/tech/20171216 Sysadmin 101- Troubleshooting.md new file mode 100644 index 0000000000..519f3ed9b0 --- /dev/null +++ b/translated/tech/20171216 Sysadmin 101- Troubleshooting.md @@ -0,0 +1,136 @@ +系统管理员 101:故障排除 +====== + +我通常会严格保持此博客的技术性,将观察、意见等内容保持在最低限度。但是,这篇和接下来的几篇文章将介绍刚进入系统管理/SRE/系统工程师/sysops/devops-ops(无论你想称自己是什么)角色的常见的基础知识。 + +稍安勿躁! + +“我的网站很慢!” + +我只是随机选择了本文的问题类型,这可以应用于任何与系统管理员相关的故障排除。这并不是要炫耀那些可以找到最多的信息的最聪明的“金句”。它也不是一个详尽的、分步显示的“流程图”,并在最后一个方框中包含“利润”一词。 + +这是通过一些例子展示的一般性方法。 + +示例场景仅用于说明本文目的。它们有时会做一些不适用于所有情况的假设,而且我很肯定会有很多读者在某些时候说“哦,但我觉得你会发现……”。 + +但那可能会错失重点。 + +十多年来,我一直在从事于支持工作,或在支持组织工作,有一件事让我一次又一次地感到震惊,这让我写下了这篇文章。 + +**有许多技术人员在遇到问题时的本能反应,就是不管三七二十一去尝试潜在解决方案。** + +*“我的网站很慢”,* + +* 我将尝试增加 `MaxClients`/`MaxRequestWorkers`/`worker_connections` +* 我将尝试增加 `innodb_buffer_pool_size`/`effective_cache_size` +* 我打算尝试启用 `mod_gzip`(遗憾的是,这是真实的故事) + +*“我曾经看过这个问题,它是因为某种原因 —— 所以我要再次尝试修复它,它可能会起作用”。* + +这浪费了很多时间,并会让你在黑暗中盲目乱撞,胡乱鼓捣。 + +你的 InnoDB 的缓冲池可能处于 100% 的利用率,但这只是因为有人运行了一段时间的一次性大型报告导致的。如果没有排除这种情况,那你就是在浪费时间。 + +### 在开始之前的附注 + +在这一点上,我应该说明一下,虽然这些建议同样适用于许多角色,但我是从一般的支持系统管理员的角度来编写的。在一个成熟的内部组织中,或与规模较大的、完全管理或“企业级”客户合作时,你通常会一切进行检测、测量、绘制、整理(甚至不是文字),并发出警报。那么你的方法往往会有所不同。我们在这里忽视这种情况。 + +如果你没有这种东西那可以随意使用。 + +### 澄清和第一眼 + +确定实际上是什么问题。“慢”可以体现为多种形式。是收到第一个字节的时间吗?从糟糕的 Javascript 加载和每页加载拉取 15 MB 的静态内容,这是一个完全不同类别的问题。是慢,还是比通常慢?这是两个非常不同的解决方案! + +在你着手做某事之前,确保你知道实际报告/经历的问题。找到问题的根源通常很困难,即便找不到也必须找到问题本身。 + +这相当于系统管理员带着一把刀去参加枪战。 + +### 唾手可得 + +首次登录可疑服务器时,你可以查找一些常见的嫌疑对象。事实上,你应该这样做!每当我登录到服务器时,我都会发出一些命令来快速检查一些事情;我们是否发生页交换(`free` / `vmstat`),磁盘是否繁忙(`top` / `iostat` / `iotop`),是否有丢包(`netstat` / `proc` / `net` / `dev`),是否存在连接数过多的状态(`netstat`),有什么东西占用了 CPU(`top`),谁在这个服务器上(`w` / `who`),syslog 和 `dmesg` 中是否有引人注目的消息? + +如果你从 RAID 控制器得到 2000 条其直写式缓存没有生效消息,那么继续进行是没有意义的。 + +这用不了半分钟。如果什么都没有引起你的注意 —— 那么继续。 + +### 重现 + +如果某处确实存在问题,并且找不到唾手可得的信息。 + +采取所有步骤尝试重现问题。当你可以重现该问题时,你可以观察它。**当你能观察到时,你就可以解决。**如果在第一步中尚未显现或涵盖问题,询问报告问题的人需要采取哪些确切步骤来重现问题。 + +现在,对于由太阳耀斑和专门运行在 OS/2 上的客户端引起的问题,重现并不总是可行的。但你的第一个停靠港应该是至少尝试一下!在一开始,你所知道的是“某人认为他们的网站很慢”。对于那些人,他们可能还在用他们的 GPRS 手机,也可能正在安装 Windows 更新。你在这里挖掘得再深也是浪费时间。 + +尝试重现! + +### 检查日志! + +我对于我认为有必要包括这一点感到很难过。但是我曾经看到有人在运行 `tail /var/log/...` 之后几分钟就不看了。现在大多数 *NIX 工具都特别喜欢记录日志。任何明显的错误都会在大多数应用程序日志中显得非常突出。检查一下。 + +### 缩小范围 + +如果没有明显的问题,但你可以重现报告的问题,那也很棒。所以,你现在知道网站是慢的。现在你已经把范围缩小到:浏览器的渲染/错误、应用程序代码、DNS 基础设施、路由器、防火墙、NIC(涉及了所有的八个以上的)、以太网电缆、负载均衡器、数据库、缓存层、会话存储、Web 服务器软件、应用程序服务器、RAM、CPU、RAID 卡、磁盘等等。 + +根据设置添加一些其他潜在的罪魁祸首。它们也可能是 SAN,也不要忘记硬件 WAF!以及……你明白我的意思。 + +如果问题是接收到第一个字节的时间,你当然会开始对 Web 服务器应用已知的修复程序,那就是响应缓慢的那个环节,也是你最了解的那个了,对吧?错了! + +你要回去尝试重现这个问题。只是这一次,你要试图消除尽可能多的潜在问题来源。 + +你可以非常轻松地消除绝大多数潜在的罪魁祸首:你能从服务器本地重现问题吗?恭喜,你刚刚节省了自己必须尝试修复 BGP 路由的时间。 + +如果不能,请尝试使用同一网络上的其他计算机。如果可以的话,至少你可以将防火墙移到你的嫌疑人名单上,(但是要注意一下那个交换机!) + +是所有连接都很慢吗?虽然服务器是 Web 服务器,但并不意味着你不应该尝试使用其他类型的服务进行重现问题。[netcat][1] 在这些场景中非常有用(但是你的 SSH 连接可能会一直有延迟,这可以作为线索)! 如果这也很慢,你至少知道你很可能遇到网络问题,可以忽略整个 Web 软件及其所有组件。用这个知识(不收 200 美元)再次从顶部开始,按你的方式由内到外地进行! + +即使你可以在本地复现 —— 仍然有很多“东西”留下。让我们排除一些变量。你能用普通文件重现它吗? 如果 `i_am_a_1kb_file.html` 很慢,你就知道它不是数据库、缓存层或 OS 以外的任何东西和网络服务器本身的问题。 + +你能用一个解释/执行的 `hello_world.(py|php|js|rb..)` 文件重现吗?如果可以的话,你已经大大缩小了范围,你可以专注于少数事情。如果 `hello_world` 可以马上工作,你仍然学到了很多东西! 你知道没有任何明显的资源限制、任何满的队列或在任何地方卡住的 IPC 调用。所以这是应用程序正在做的事情或它正在与之通信的事情。 + +所有页面都慢吗?或者只是从第三方加载“实时分数数据”的页面? + +**这归结为:你可以涉及的最少量的“东西”是什么,并且仍然可以重现这个问题?** + +我们的示例是一个缓慢的网站,但这同样适用于几乎所有问题。邮件投递?你能在本地投递吗?能发给自己吗?能发给<常见的服务提供者>吗?使用小的、纯文本的消息进行测试。尝试直到遇到 2MB 崩溃时。 使用 STARTTLS 和不使用 STARTTLS,按你的方式由内到外地进行! + +这些步骤中的每一步都只需要几秒钟,远远快于实施大多数“潜在”修复方案。 + +### 观察/隔离 + +到目前为止,当你删除特定组件时无法重现问题是,你可能已经偶然发现了问题所在。 + +但如果你还没有,或者你仍然不知道**为什么**;一旦你找到了一种方法来重现问题,你和问题之间的“东西”(技术术语)最少,那么就该开始隔离和观察了。 + +请记住,许多服务可以在前台运行和/或启用调试。对于某些类别的问题,执行此操作通常非常有帮助。 + +这也是你的传统武器库发挥作用的地方。`strace`、`lsof`、`netstat`、`GDB`、`iotop`、`valgrind`、语言分析器(cProfile、xdebug、ruby-prof ……)那些类型的工具。 + +一旦你走到这一步,你就很少能摆脱剖析器或调试器了。 + +[strace][2] 通常是一个非常好的起点。 + +你可能会注意到应用程序停留在某个连接到端口 3306 的套接字文件描述符上的特定 `read()` 调用上。你会知道该怎么做。 + +转到 MySQL 并再次从顶部开始。显而易见:“Waiting_for * lock”、死锁、`max_connections` ……进而:所有查询?只写请求?只有某些表?只有某些存储引擎?等等…… + +你可能会注意到外部 API 资源的 `connect()` 需要五秒钟才能完成,甚至超时。你会知道该怎么做。 + +你可能会注意到,在同一对文件中有 1000 个调用 `fstat()` 和 `open()` 作为循环依赖的一部分。你会知道该怎么做。 + +它可能不是那些特别的东西,但我保证,你会发现一些东西。 + +如果你只是从这一部分学到一点,那也可以;学习使用 `strace` 吧!**真的**学习它,阅读整个手册页。甚至不要跳过历史部分。`man` 每个你还不知道它做了什么的系统调用。98% 的故障排除会话以 `strace` 而终结。 + +-------------------------------------------------------------------------------- + +via: http://northernmost.org/blog/troubleshooting-101/index.html + +作者:[Erik Ljungstrom][a] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://northernmost.org +[1]:http://nc110.sourceforge.net/ +[2]:https://linux.die.net/man/1/strace From c38e84b8df5f7e31a18f6c7ed85f55528f494ead Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Aug 2019 01:25:48 +0800 Subject: [PATCH 305/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=20Linux?= =?UTF-8?q?=20Mint=2019.2=20=E2=80=9CTina=E2=80=9D=20Released:=20Here?= =?UTF-8?q?=E2=80=99s=20What=E2=80=99s=20New=20and=20How=20to=20Get=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md --- ...ed- Here-s What-s New and How to Get it.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md diff --git a/sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md b/sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md new file mode 100644 index 0000000000..8f9371e787 --- /dev/null +++ b/sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md @@ -0,0 +1,156 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Mint 19.2 “Tina” Released: Here’s What’s New and How to Get it) +[#]: via: (https://itsfoss.com/linux-mint-19-2-release/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Linux Mint 19.2 “Tina” Released: Here’s What’s New and How to Get it +====== + +_**Linux Mint 19.2 “Tina” has been released. See what’s new in it and learn how to upgrade to Linux Mint 19.2.**_ + +Recently, the Linux Mint team [announced][1] the release of Linux Mint 19 Cinnamon with significant improvements and feature additions. I’ll show you some of the main features of the new release and how to upgrade to it. + +### Linux Mint 19.2: What’s new? + +What matters the most is that Linux Mint 19.2 is also a Long Term Support release which will be supported till 2023. The new version includes updated software and lot of improvements along with added features. + +What are the key highlights among the added features? Let us take a look. + +#### Enhanced Update Manager + +![][2] + +Now, you can easily manage kernel updates from the update manager like never before. You get to know how long the kernels are supported. It is also possible to install/remove multiple kernels in a single queue. + +Linux Mint 19.2 also supports multiple kernel flavors, so you can switch between them when you want. + +![][3] + +In addition to all this, you can choose to automate the removal of kernels which are no longer needed and blacklist specific update packages (without blacklisting the future updates for that). + +#### Revamped ‘System Tools’ + +![][4] + +A new tab was added to the System Tools window – “**System Information**” – which will come in handy for users to easily copy/paste their configuration onto a forum to seek support. And, the layout has been improved. + +#### Other Improvements + +With Linux 19.2, the performance has greatly improved due to optimizations done in the window manager. Their aim was to reduce the input lag and make it feel smoother. + +You can now configure the scrollbar to how you want it to be. Sharing files on Linux Mint 19.2 is has improved as well with Cinnamon 4.2. + +Linux Mint 19.2 uses Noto fonts now instead of the Ubuntu fonts. + +With these, there are numerous other improvements under the hood (and some customization ability) – you can check the full details in the [blog post][5] of their official website. + +### Linux Mint 19 vs 19.1 vs 19.2: What’s the difference? + +You probably already know that Linux Mint releases are based on Ubuntu long term support releases. Linux Mint 19 series is based on Ubuntu 18.04 LTS. + +[][6] + +Suggested read  Five Tiny Features of Linux Mint Cinnamon I’ve Come to Love + +Ubuntu LTS releases get ‘point releases’ on the interval of a few months. Point release basically consists of bug fixes and security updates that have been pushed since the last release of the LTS version. This is similar to the Service Pack concept in Windows XP, if you remember it. + +If you are going to download Ubuntu 18.04 which was released in April, 2018 in 2019, you’ll get Ubuntu 18.04.2. The ISO image of 18.04.2 will consists of 18.04 and the bug fixes and security updates applied till 18.04.2. Imagine if there was no point releases, then right after [installing Ubuntu 18.04][7], you’ll have to install a few gigabytes of system updates. Not very convenient, right? + +But Linux Mint has it slightly different. Linux Mint has a major release based on Ubuntu LTS release and then it has three minor releases based on Ubuntu LTS point releases. + +Mint 19 was based on Ubuntu 18.04, 19.1 was based on 18.04.1 and Mint 19.2 is based on Ubuntu 18.04.2. There should be 19.3 in the Mint 19 series before the release of Mint 20 based on Ubuntu 20.04 LTS. All Mint 19.x releases are long term support releases and will get security updates till 2023. + +Now, if you are using Ubuntu 18.04 and keep your system updated, you’ll automatically get updated to 18.04.1, 18.04.2 etc. That’s not the case in Linux Mint. + +Linux Mint minor releases also consists of _feature changes_ along with bug fixes and security updates and this is the reason why updating Linux Mint 19 won’t automatically put you on 19.1. + +Linux Mint gives you the option if you want the new features or not. For example, Mint 19.2 has Cinnamon 4.2 and several other visual changes. If you are happy with the existing features, you can stay on Mint 19. You’ll still get the necessary security and maintenance updates on Mint 19 till 2023. + +Now that you understand the concept of minor releases and want the latest minor release, let’s see how to upgrade to Mint 19.2. + +### Linux Mint 19.2: How to Upgrade? + +No matter whether you have Linux Mint 19.1 or 19, you can follow these steps to [upgrade Linux Mint version][8]. + +[][9] + +Suggested read  Fedora 24 released! + +**Note**: _You should consider making a system snapshot (just in case) for backup. In addition, the Linux Mint team advises you to disable the screensaver and upgrade Cinnamon spices (if installed) from the System settings._ + +![][10] + + 1. Launch the Update Manager. + 2. Now, refresh it to load up the latest available updates (or you can change the mirror if you want). + 3. Once done, simply click on the Edit button to find “**Upgrade to Linux Mint 19.2 Tina**” button. + 4. Finally, just follow the on-screen instructions to easily update it. + + + +Based on your internet connection, it should take anything between a couple of minutes to 30 minutes. + +#### Don’t see Mint 19.2 update yet? Here’s what you can do + +If you don’t see the option to upgrade to Linux Mint 19.2 Tina, don’t lose hope. Here are a couple of things you can do. + +**Step 1: Make sure to use mint-upgrade-info version 1.1.3** + +Make sure that mint-upgrade-info is updated to version 1.1.3. You can try the install command that will update it to a newer version (if there is any). + +``` +sudo apt install mint-upgrade-info +``` + +**Step 2: Switch to default software sources** + +Chances are that you are using a mirror closer to you to get faster software downloads. But this could cause a problem as the mirrors might not have the new upgrade info yet. + +Go to Software Source and change the sources to default. Now run the update manager again and see if Mint 19.2 upgrade is available. + +**Wrapping Up** + +Linux Mint 19.2 is a solid upgrade. The new feature additions are very useful and it’s always good to see them working on the performance (so that it consumes less RAM) and appears to be smoother. + +What do you think about the latest release – Linux Mint 19.2 “Tina”? Have you upgraded yet? If yes, how is your experience so far? Feel free to let us know in the comments below. + +![][11] + +### Ankush Das + +co-author + +![][12] + +### Abhishek Prakash + +co-author + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/linux-mint-19-2-release/ + +作者:[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://blog.linuxmint.com/?p=3786 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-mint-tina-kernel.png?resize=800%2C523&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-mint-tina-update.png?resize=800%2C515&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-mint-tina.jpg?ssl=1 +[5]: https://www.linuxmint.com/rel_tina_cinnamon_whatsnew.php +[6]: https://itsfoss.com/tiny-features-linux-mint-cinnamon/ +[7]: https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/ +[8]: https://itsfoss.com/upgrade-linux-mint-version/ +[9]: https://itsfoss.com/fedora-24-released/ +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/mintupgrade.png?ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/ankush_das.jpg?ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2016/11/14883680_10154845158472952_6433939564474062315_o.jpg?ssl=1 From addf645b3b219a617c0e207ac4ca3687bab9c21f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Aug 2019 01:31:35 +0800 Subject: [PATCH 306/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20Naviga?= =?UTF-8?q?ting=20the=20filesystem=20with=20relative=20paths=20at=20the=20?= =?UTF-8?q?command=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md --- ...with relative paths at the command line.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md diff --git a/sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md b/sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md new file mode 100644 index 0000000000..f532ad8571 --- /dev/null +++ b/sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Navigating the filesystem with relative paths at the command line) +[#]: via: (https://opensource.com/article/19/8/navigating-filesystem-relative-paths) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/greg-p) + +Navigating the filesystem with relative paths at the command line +====== +Learn the difference between absolute and relative paths and how to use +them, and save yourself a lot of time and potential trouble. +![Blue folders flying in the clouds above a city skyline][1] + +If you’re on your way to work, but you stop by a deli for breakfast first, you don’t go back home after breakfast so you can restart your journey. Instead, you continue from where you are because you understand where your office is located relative to your current location. Navigating your computer is the same way. If you change your working directory in a terminal to a subdirectory, such as **Pictures**, you don’t necessarily have to go home again just to make your way into **Documents**. Instead, you use a _relative_ path. + +Conversely, absolute paths always begin from the start of your hard drive. You know that you’ve reached the start by a lone forward slash (**/**) with nothing to its left, because your drive’s root level is the biggest container, holding all your folders and files within it. For that reason, the path **/home/seth** (and its shorthand version **~**, although that’s less clear, because it lacks the leftmost slash) is considered an absolute path. It represents your hard drive’s base level, which contains the **home** directory, which in turn contains **seth** (my username). + +Anything starting with a forward slash is an absolute path, which is the digital equivalent of you going 12 blocks back home just to reach a location that’s two blocks away from where you are now. That fact doesn’t mean absolute paths are bad, though. There are many valid reasons to use absolute paths, not the least of which is their clarity. If you can navigate your drive from absolute paths, then use that as a wayfinder. With auto-completion, typing a full path can be as quick as using a relative path, [especially with autocompletion][2]. + +That said, relative paths can be convenient, and in some cases vital. For instance, you can never be sure of a web server’s absolute path. If a web designer knows they keep [web fonts in a local directory][3] and they link to those fonts on their development laptop using the absolute path **/home/webdev/Public/[www.example.com/fonts][4]**, then all of their links break when the code is pushed to **/var/www/example.com/fonts** on the server. + +Besides that, sometimes it really is quicker and easier to type **cd ../Documents** instead of **cd /home/seth/Documents**. + +Relative paths use two control sequences: the single (**.**) and the double (**..**) dot. A single dot means _don’t move_. The double dot means _take one step back_. These dots work best when you’re somewhat familiar with what’s on your drive, and provided that you can visualize the corresponding paths. + +It may help to visualize each directory as a room in a house. For instance, knowing that you have a home directory that contains both a **Pictures** and a **Documents** folder, you can visualize each subdirectory as a step forward from home: + +![Stepping into a directory.][5] + +To get from one room to the other, you must go back to the common area using the _step back_ control sequence, and then step forward into the other. You can get your current location at any time with the **pwd** (print working directory) command: + + +``` +$ pwd +/home/seth/Pictures +$ cd ../Documents +$ pwd +/home/seth/Documents +``` + +Remember that a single dot means _don’t move_, and it does exactly that: + + +``` +$ pwd +/home/seth +$ cd . +$ pwd +/home/seth +``` + +It might seem odd to have a special command representing a state of no change, but it’s a usefully explicit directive. For instance, were you to create a custom application to [list a directory’s contents][6] and save it in your home directory, foolishly naming the application **reboot**, then any time you used that custom application you would want to be careful that your computer knew _exactly_ which **reboot** command to execute. + +One way you can specify which version is to provide an explicit path to your custom and poorly named application. The single dot reinforces your desire not to stray from your intended path when you’re already in the directory: + + +``` +$ pwd +/home/seth +$ ./reboot +Documents/     Downloads/ +Music/         Pictures/ +Public/        Spheniscidae/ +Videos/        Yugolothae/ +``` + +Sometimes the single dot can be useful as a filler character in paths that you expect to contain a number of levels. For instance, take a web developer who used several links to a **font** directory that was once three steps back. Recently, though, this developer moved the **font** directory into the same directory as their HTML. If the developer doesn’t replace all instances of **../../../fonts** with **./././fonts**, their site will break. + +**Note:** In the case of this example, changing **../../../fonts** to **./fonts** would work, but assume for the sake of this example that doing so would break a script that expects to see three levels before the **fonts** directory. + +Relative paths can be confusing at first, so stick to absolute paths when navigating your computer until you’re comfortable with the concept of relativity. Many people find them useful, while others do not use them. It’s all relative. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/navigating-filesystem-relative-paths + +作者:[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/sethhttps://opensource.com/users/greg-p +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_cloud21x_cc.png?itok=5UwC92dO (Blue folders flying in the clouds above a city skyline) +[2]: https://opensource.com/article/19/7/understanding-file-paths-and-how-use-them#autocomplete +[3]: https://opensource.com/article/19/3/webfonts +[4]: http://www.example.com/fonts +[5]: https://opensource.com/sites/default/files/uploads/path-layout.jpg (Stepping into a directory.) +[6]: https://opensource.com/article/19/7/master-ls-command From b21159b089ee22950832638d17c4ae1ef8beba54 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Aug 2019 01:32:38 +0800 Subject: [PATCH 307/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20What's?= =?UTF-8?q?=20your=20favorite=20open=20source=20BI=20software=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190805 What-s your favorite open source BI software.md --- ...s your favorite open source BI software.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sources/tech/20190805 What-s your favorite open source BI software.md diff --git a/sources/tech/20190805 What-s your favorite open source BI software.md b/sources/tech/20190805 What-s your favorite open source BI software.md new file mode 100644 index 0000000000..b7ea3e1046 --- /dev/null +++ b/sources/tech/20190805 What-s your favorite open source BI software.md @@ -0,0 +1,56 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What's your favorite open source BI software?) +[#]: via: (https://opensource.com/article/19/8/favorite-open-source-bi-software) +[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeohttps://opensource.com/users/seth) + +What's your favorite open source BI software? +====== +What business intelligence applications are you using to gather and +share insights from your data? Please let us know in our poll. +![Open for business][1] + +Open source software has come a long way since the [Open Source Initiative][2] was founded in February 1998. Back then, the thought of releasing source code anyone could change scared many commercial software vendors. Now, according to Red Hat's 2019 [State of Enterprise Open Source survey][3], 99% of IT leaders say open source software plays at least a "somewhat important" role in their enterprise IT strategy. + +Open source principles play an equally key role in business intelligence (BI). [Gartner's Magic Quadrant for Data Science and Machine Learning][4] said the market is in the midst of a "big bang" that's redefining the "who" and "how" of data science and ML. In this report (available for clients), the authors cite open source software as one reason for the growth of [citizen data scientists][5]—"'power users' who can perform both simple and moderately sophisticated analytical tasks that would previously have required more expertise." + +### What is open source BI software? + +Open source business intelligence (BI) software helps users upload, visualize, and make decisions based on data that is pulled from several sources. Like all open source software, its source code is public. That's because the copyright holder allows anyone to review, revise, and run the software at any time, for any reason. These benefits extend to users and non-users alike. + +BI involves [turning data into insights][6] that help your business make better decisions. This type of software allows users to pull data from a range of sources, then share it with colleagues and clients. + +[Dashboards and reports][7] are two standard features you should look for. Advanced BI tools like [Kibana][8] also offer data visualizations, while others (like [Sisense][9]) pride themselves on the ability to be set up in-house. + +One big benefit of open source software is having so many developers fixing code at once. Likewise, open source BI software democratizes data. With countless people working on—and within—the same tool, open source BI software gives teams the power to share data with more colleagues from one centralized resource. + +The quality of the data used to make decisions is a top concern for small business leaders GetApp [surveyed][10] in Spring 2019. So, before choosing which open source BI tool to adopt, it's worth weighing the pros and cons of each tool against your business needs. + +_Which open source BI software does your team use? What's your main goal for using it? (Boost collaboration, visualize data, use a wider range of data, etc.?) Which challenges (if any) have you encountered bringing BI software into your business? Keep this conversation going in the comments!_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/favorite-open-source-bi-software + +作者:[Lauren Maffeo][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/lmaffeohttps://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_openseries.png?itok=rCtTDz5G (Open for business) +[2]: https://opensource.org/ +[3]: https://www.redhat.com/en/enterprise-open-source-report/2019 +[4]: https://www.gartner.com/en/documents/3899464/magic-quadrant-for-data-science-and-machine-learning-pla +[5]: https://blogs.gartner.com/carlie-idoine/2018/05/13/citizen-data-scientists-and-why-they-matter/ +[6]: https://www.getapp.com/business-intelligence-analytics-software/business-intelligence/#guide +[7]: https://www.getapp.com/business-intelligence-analytics-software/business-intelligence/#features-to-watch-for +[8]: https://www.elastic.co/products/kibana +[9]: https://www.getapp.com/business-intelligence-analytics-software/a/sisense-prism/ +[10]: https://lab.getapp.com/data-driven-decision-making/ From 097f7f16c564e04363625005d608fb67b8ae7715 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Aug 2019 01:33:36 +0800 Subject: [PATCH 308/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190805=20Is=20y?= =?UTF-8?q?our=20enterprise=20software=20committing=20security=20malpracti?= =?UTF-8?q?ce=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190805 Is your enterprise software committing security malpractice.md --- ...oftware committing security malpractice.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/talk/20190805 Is your enterprise software committing security malpractice.md diff --git a/sources/talk/20190805 Is your enterprise software committing security malpractice.md b/sources/talk/20190805 Is your enterprise software committing security malpractice.md new file mode 100644 index 0000000000..7170e5a486 --- /dev/null +++ b/sources/talk/20190805 Is your enterprise software committing security malpractice.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Is your enterprise software committing security malpractice?) +[#]: via: (https://www.networkworld.com/article/3429559/is-your-enterprise-software-committing-security-malpractice.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Is your enterprise software committing security malpractice? +====== +ExtraHop discovered enterprise security and analytic software are "phoning home" and quietly uploading information to servers outside of customers' networks. +![Getty Images][1] + +Back when this blog was dedicated to all things Microsoft I routinely railed against the spying aspects of Windows 10. Well, apparently that’s nothing compared to what enterprise security, analytics, and hardware management tools are doing. + +An analytics firm called ExtraHop examined the networks of its customers and found that their security and analytic software was quietly uploading information to servers outside of the customer's network. The company issued a [report and warning][2] last week. + +ExtraHop deliberately chose not to name names in its four examples of enterprise security tools that were sending out data without warning the customer or user. A spokesperson for the company told me via email, “ExtraHop wants the focus of the report to be the trend, which we have observed on multiple occasions and find alarming. Focusing on a specific group would detract from the broader point that this important issue requires more attention from enterprises.” + +**[ For more on IoT security, read [tips to securing IoT on your network][3] and [10 best practices to minimize IoT security vulnerabilities][4]. | Get regularly scheduled insights by [signing up for Network World newsletters][5]. ]** + +### Products committing security malpractice and secretly transmitting data offsite + +[ExtraHop's report][6] found a pretty broad range of products secretly phoning home, including endpoint security software, device management software for a hospital, surveillance cameras, and security analytics software used by a financial institution. It also noted the applications may run afoul of Europe’s [General Data Privacy Regulation (GDPR)][7]. + +In every case, ExtraHop provided evidence that the software was transmitting data offsite. In one case, a company noticed that approximately every 30 minutes, a network-connected device was sending UDP traffic out to a known bad IP address. The device in question was a Chinese-made security camera that was phoning home to a known ​malicious IP address​ with ties to China. + +And the camera was likely set up independently by an employee at their office for personal security purposes, showing the downside to shadow IT. + +In the cases of the hospital's device management tool and the financial firm's analytics tool, those were violations of data security laws and could expose the company to legal risks even though it was happening without their knowledge. + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][8] ]** + +The hospital’s medical device management product was supposed to use the hospital’s Wi-Fi network to only ensure patient data privacy and HIPAA compliance. ExtraHop noticed traffic from the workstation that was managing initial device rollout was opening encrypted SSL:443 connections to vendor-owned cloud storage, a major HIPAA violation. + +ExtraHop notes that while there may not be any malicious activity in these examples, it is still in violation of the law, and administrators need to keep an eye on their networks to monitor traffic for unusual activity. + +"To be clear, we don’t know why these vendors are phoning home data. The companies are all respected security and IT vendors, and in all likelihood, their phoning home of data was either for a legitimate purpose given their architecture design or the result of a misconfiguration," the report says. + +### How to mitigate phoning-home security risks + +To address this security malpractice problem, ExtraHop suggests companies do these five things: + + * Monitor for vendor activity: Watch for unexpected vendor activity on your network, whether they are an active vendor, a former vendor or even a vendor post-evaluation. + * Monitor egress traffic: Be aware of egress traffic, especially from sensitive assets such as domain controllers. When egress traffic is detected, always match it to approved applications and services. + * Track deployment: While under evaluation, track deployments of software agents. + * Understand regulatory considerations: Be informed about the regulatory and compliance considerations of data crossing political and geographic boundaries. + * Understand contract agreements: Track whether data is used in compliance with vendor contract agreements. + + + +**[ Now read this: [Network World's corporate guide to addressing IoT security][9] ]** + +Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3429559/is-your-enterprise-software-committing-security-malpractice.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://images.idgesg.net/images/article/2018/03/cybersecurity_eye-with-binary_face-recognition_abstract-eye-100751589-large.jpg +[2]: https://www.extrahop.com/company/press-releases/2019/extrahop-issues-warning-about-phoning-home/ +[3]: https://www.networkworld.com/article/3254185/internet-of-things/tips-for-securing-iot-on-your-network.html#nww-fsb +[4]: https://www.networkworld.com/article/3269184/10-best-practices-to-minimize-iot-security-vulnerabilities#nww-fsb +[5]: https://www.networkworld.com/newsletters/signup.html#nww-fsb +[6]: https://www.extrahop.com/resources/whitepapers/eh-security-advisory-calling-home-success/ +[7]: https://www.csoonline.com/article/3202771/general-data-protection-regulation-gdpr-requirements-deadlines-and-facts.html +[8]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[9]: https://www.networkworld.com/article/3269165/internet-of-things/a-corporate-guide-to-addressing-iot-security-concerns.html +[10]: https://www.facebook.com/NetworkWorld/ +[11]: https://www.linkedin.com/company/network-world From 2cd1cdc1bf04c04cc0764aec8984f5b93b657d03 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 6 Aug 2019 08:41:17 +0800 Subject: [PATCH 309/951] translated --- ...801 5 Free Partition Managers for Linux.md | 133 ------------------ ...801 5 Free Partition Managers for Linux.md | 124 ++++++++++++++++ 2 files changed, 124 insertions(+), 133 deletions(-) delete mode 100644 sources/tech/20190801 5 Free Partition Managers for Linux.md create mode 100644 translated/tech/20190801 5 Free Partition Managers for Linux.md diff --git a/sources/tech/20190801 5 Free Partition Managers for Linux.md b/sources/tech/20190801 5 Free Partition Managers for Linux.md deleted file mode 100644 index 134e41a819..0000000000 --- a/sources/tech/20190801 5 Free Partition Managers for Linux.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 Free Partition Managers for Linux) -[#]: via: (https://itsfoss.com/partition-managers-linux/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -5 Free Partition Managers for Linux -====== - -_**Here’s our recommended list of partitioning tools for Linux distributions. These tools let you delete, add, tweak or resize the disk partitioning on your Linux system.**_ - -Usually, you decide the disk partitions while installing the OS. But, what if you need to modify the partitions sometime after the installation. You just can’t go back to the setup screen in any way. So, that is where partition managers (or accurately disk partition managers) come in handy. - -In most of the cases, you do not need to separately install the partition manager because it comes pre-installed. Also, it is worth noting that you can either opt for a command-line based partition manager or something with a GUI. - -Attention! - -Playing with disk partitioning is a risky task. Don’t do it unless it’s absolutely necessary. -If you are using a command line based partitioning tool, you need to learn the commands to get the job done. Or else, you might just end up wiping the entire disk. - -### 5 Tools To Manage Disk Partitions in Linux - -![][1] - -The list below is in no particular order of ranking. Most of these partitioning tools should be available in your Linux distribution’s repository. - -#### GParted - -![GParted][2] - -This could perhaps be the most popular GUI-based partition manager available for Linux distributions. You might have it pre-installed in some distributions. If you don’t, simply search for it in the software center to get it installed. - -It directly prompts you to authenticate as the root user when you launch it. So, you don’t have to utilize the terminal here – at all. After authentication, it analyzes the devices and then lets you tweak the disk partitions. You will also find an option to “Attempt Data Rescue” in case of data loss or accidental deletion of files. - -[GParted][3] - -#### GNOME Disks - -![Gnome Disks][4] - -A GUI-based partition manager that comes baked in with Ubuntu or any Ubuntu-based distros like Zorin OS. - -[][5] - -Suggested read  7 Best Linux Tools For Digital Artists - -It lets you delete, add, resize and tweak the partition. It even helps you in [formatting the USB in Ubuntu][6] if there is any problem. - -You can even attempt to repair a partition with the help of this tool. The options also include editing filesystem, creating a partition image, restoring the image, and benchmarking the partition. - -[GNOME Disks][7] - -#### KDE Partition Manager - -![Kde Partition Manager][8] - -KDE Partition Manager should probably come pre-installed on KDE-based Linux distros. But, if it isn’t there – you can search for it on the software center to easily get it installed. - -If you didn’t have it pre-installed, you might get the notice that you do not have administrative privileges when you try launching it. Without admin privileges, you cannot do anything. So, in that case, type in the following command to get started: - -``` -sudo partitionmanager -``` - -It will scan your devices and then you will be able to create, move, copy, delete, and resize partitions. You can also import/export partition tables along with a lot of other options available to tweak. - -[KDE Partition Manager][9] - -#### Fdisk [Command Line] - -![Fdisk][10] - -[Fdisk][11] is a command line utility that comes baked in with every unix-like OS. Fret not, even though it requires you to launch a terminal and enter commands – it isn’t very difficult. However, if you are too confused while using a text-based utility, you should stick to the GUI applications mentioned above. They all do the same thing. - -To launch fdisk, you will have to be the root user and specify the device to manage partitions. Here’s an example for the command to start with: - -``` -sudo fdisk /dev/sdc -``` - -You can refer to [The Linux Documentation Project’s wiki page][12] for the list of commands and more details on how it works. - -#### GNU Parted [Command Line] - -![Gnu Parted][13] - -Yet another command-line utility that you can find pre-installed on your Linux distro. You just need to enter the following command to get started: - -``` -sudo parted -``` - -**Wrapping Up** - -[][14] - -Suggested read  Best Games On Steam You Can Play On Linux and Windows - -I wouldn’t forget to mention [QtParted][15] as one of the alternatives to the list of partition managers. However, it has not been maintained for years now – so I do not recommend using it. - -What do you think about the partition managers mentioned here? Did I miss any of your favorites? Let me know and I’ll update this list of partition manager for Linux with your suggestion. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/partition-managers-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://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/disk-partitioning-tools-linux.jpg?resize=800%2C450&ssl=1 -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/g-parted.png?ssl=1 -[3]: https://gparted.org/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnome-disks.png?ssl=1 -[5]: https://itsfoss.com/best-linux-graphic-design-software/ -[6]: https://itsfoss.com/format-usb-drive-sd-card-ubuntu/ -[7]: https://wiki.gnome.org/Apps/Disks -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/kde-partition-manager.jpg?resize=800%2C404&ssl=1 -[9]: https://kde.org/applications/system/org.kde.partitionmanager -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/fdisk.jpg?fit=800%2C496&ssl=1 -[11]: https://en.wikipedia.org/wiki/Fdisk -[12]: https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnu-parted.png?fit=800%2C559&ssl=1 -[14]: https://itsfoss.com/best-linux-games-steam/ -[15]: http://qtparted.sourceforge.net/ diff --git a/translated/tech/20190801 5 Free Partition Managers for Linux.md b/translated/tech/20190801 5 Free Partition Managers for Linux.md new file mode 100644 index 0000000000..d85a0f21f9 --- /dev/null +++ b/translated/tech/20190801 5 Free Partition Managers for Linux.md @@ -0,0 +1,124 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 Free Partition Managers for Linux) +[#]: via: (https://itsfoss.com/partition-managers-linux/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +5 个免费的 Linux 分区管理器 +====== + +_ **以下是我们推荐的 Linux 分区工具。它们能让你删除、添加、微调 Linux 系统上的磁盘分区或分区大小。** _ + +通常,你在安装操作系统时决定磁盘分区。但是,如果你需要在安装后的某个时间修改分区,该怎么办?你无法会到系统安装页面。因此,这就需要分区管理器(或准确地说是磁盘分区管理器)上场了。 + +在大多数情况下,你无需单独安装分区管理器,因为它已预先安装。此外,值得注意的是,你可以选择基于命令行或有 GUI 的分区管理器。 + +注意! + +磁盘分区是一项有风险的任务。除非绝对必要,否则不要这样做。 +如果你使用的是基于命令行的分区工具,那么需要学习完成任务的命令。否则,你可能最终会擦除整个磁盘。 + +### Linux 中的 5 个管理磁盘分区的工具 + +![][1] + +下面的列表没有特定的排名顺序。大多数分区工具应该存在于 Linux 发行版的仓库中。 + +#### GParted + +![GParted][2] + +这可能是 Linux 发行版中最流行的基于 GUI 的分区管理器。你可能已在某些发行版中预装它。如果还没有,只需在软件中心搜索它即可完成安装。 + +它会在启动时直接提示你以 root 用户进行身份验证。所以,你根本不需要在这里使用终端。身份验证后,它会分析设备,然后让你调整磁盘分区。如果发生数据丢失或意外删除文件,你还可以找到“尝试数据救援”的选项。 + +[GParted][3] + +#### GNOME Disks + +![Gnome Disks][4] + +一个基于 GUI 的分区管理器,随 Ubuntu 或任何基于 Ubuntu 的发行版(如 Zorin OS)一起出现。 + +它能让你删除、添加、调整大小和微调分区。如果还有疑问,它甚至可以帮助你[在 Ubuntu 中格式化 USB][6]。 + +你甚至可以借助此工具尝试修复分区。它的选项还包括编辑文件系统、创建分区镜像、还原镜像以及对分区进行基准测试。 + +[GNOME Disks][7] + +#### KDE Partition Manager + +![Kde Partition Manager][8] + +KDE Partition Manager 应该预装在基于 KDE 的 Linux 发行版上。但是,如果没有,你可以在软件中心搜索并轻松安装它。 + + +如果你没有预装它,那么可能会在尝试启动时通知你没有管理权限。没有管理员权限,你无法做任何事情。因此,在这种情况下,请输入以下命令: + +``` +sudo partitionmanager +``` + +它将扫描你的设备,然后你就可以创建、移动、复制、删除和调整分区大小。你还可以导入/导出分区表及使用其他许多调整选项。 + +[KDE Partition Manager][9] + +#### Fdisk (命令行) + +![Fdisk][10] + +[fdisk][11] 是一个命令行程序,它在每个类 Unix 的系统中都有。不要担心,即使它需要你启动终端并输入命令,但这并不是很困难。但是,如果你在使用基于文本的程序时感到困惑,那么你应该继续使用上面提到的 GUI 程序。它们都做同样的事情。 + +要启动 fdisk,你必须是 root 用户并指定管理分区的设备。以下是该命令的示例: + +``` +sudo fdisk /dev/sdc +``` + +你可以参考 [Linux 文档项目的维基页面][12]以获取命令列表以及有关其工作原理的更多详细信息。 + +#### GNU Parted (命令行) + +![Gnu Parted][13] + +这是另一个在你 Linux 发行版上预安装的命令行程序。你需要输入下面的命令启动: + +``` +sudo parted +``` + +**总结** + +我不会忘了说 [QtParted][15] 是分区管理器的替代品之一。但它已经几年没有维护,因此我不建议使用它。 + +你如何看待这里提到的分区管理器?我有错过你最喜欢的吗?让我知道,我将根据你的建议更新这个 Linux 分区管理器列表。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/partition-managers-linux/ + +作者:[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/2019/07/disk-partitioning-tools-linux.jpg?resize=800%2C450&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/g-parted.png?ssl=1 +[3]: https://gparted.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnome-disks.png?ssl=1 +[6]: https://itsfoss.com/format-usb-drive-sd-card-ubuntu/ +[7]: https://wiki.gnome.org/Apps/Disks +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/kde-partition-manager.jpg?resize=800%2C404&ssl=1 +[9]: https://kde.org/applications/system/org.kde.partitionmanager +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/fdisk.jpg?fit=800%2C496&ssl=1 +[11]: https://en.wikipedia.org/wiki/Fdisk +[12]: https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/gnu-parted.png?fit=800%2C559&ssl=1 +[15]: http://qtparted.sourceforge.net/ From bd557854f4d6e507d5f8da9cf1390e6bc1ad7ca1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 6 Aug 2019 08:46:45 +0800 Subject: [PATCH 310/951] translating --- ... GameMode - A Tool To Improve Gaming Performance On Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md b/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md index 797b147aef..abaea75707 100644 --- a/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md +++ b/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 0fbf23196ba3c9e60f3a7fa1b92ec193a63ce010 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 10:04:22 +0800 Subject: [PATCH 311/951] APL @wxy --- .../20171216 Sysadmin 101- Troubleshooting.md | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/translated/tech/20171216 Sysadmin 101- Troubleshooting.md b/translated/tech/20171216 Sysadmin 101- Troubleshooting.md index 519f3ed9b0..560f07c3b4 100644 --- a/translated/tech/20171216 Sysadmin 101- Troubleshooting.md +++ b/translated/tech/20171216 Sysadmin 101- Troubleshooting.md @@ -1,105 +1,105 @@ -系统管理员 101:故障排除 +系统管理员入门:排除故障 ====== 我通常会严格保持此博客的技术性,将观察、意见等内容保持在最低限度。但是,这篇和接下来的几篇文章将介绍刚进入系统管理/SRE/系统工程师/sysops/devops-ops(无论你想称自己是什么)角色的常见的基础知识。 -稍安勿躁! +请跟我来! -“我的网站很慢!” +> “我的网站很慢!” -我只是随机选择了本文的问题类型,这可以应用于任何与系统管理员相关的故障排除。这并不是要炫耀那些可以找到最多的信息的最聪明的“金句”。它也不是一个详尽的、分步显示的“流程图”,并在最后一个方框中包含“利润”一词。 +我只是随机选择了本文的问题类型,这也可以应用于任何与系统管理员相关的故障排除。我并不是要炫耀那些可以发现最多的信息的最聪明的“金句”。它也不是一个详尽的、一步步指导的、并在最后一个方框中导向“利润”一词的“流程图”。 -这是通过一些例子展示的一般性方法。 +我会通过一些例子展示常规的方法。 -示例场景仅用于说明本文目的。它们有时会做一些不适用于所有情况的假设,而且我很肯定会有很多读者在某些时候说“哦,但我觉得你会发现……”。 +示例场景仅用于说明本文目的。它们有时会做一些不适用于所有情况的假设,而且肯定会有很多读者在某些时候说“哦,但我觉得你会发现……”。 -但那可能会错失重点。 +但那可能会让我们错失重点。 -十多年来,我一直在从事于支持工作,或在支持组织工作,有一件事让我一次又一次地感到震惊,这让我写下了这篇文章。 +十多年来,我一直在从事于支持工作,或在支持机构工作,有一件事让我一次又一次地感到震惊,这促使我写下了这篇文章。 -**有许多技术人员在遇到问题时的本能反应,就是不管三七二十一去尝试潜在解决方案。** +**有许多技术人员在遇到问题时的本能反应,就是不管三七二十一去尝试可能的解决方案。** -*“我的网站很慢”,* +*“我的网站很慢,所以”,* -* 我将尝试增加 `MaxClients`/`MaxRequestWorkers`/`worker_connections` -* 我将尝试增加 `innodb_buffer_pool_size`/`effective_cache_size` +* 我将尝试增大 `MaxClients`/`MaxRequestWorkers`/`worker_connections` +* 我将尝试提升 `innodb_buffer_pool_size`/`effective_cache_size` * 我打算尝试启用 `mod_gzip`(遗憾的是,这是真实的故事) -*“我曾经看过这个问题,它是因为某种原因 —— 所以我要再次尝试修复它,它可能会起作用”。* +*“我曾经看过这个问题,它是因为某种原因造成的 —— 所以我估计还是这个原因,它应该能解决这个问题。”* 这浪费了很多时间,并会让你在黑暗中盲目乱撞,胡乱鼓捣。 -你的 InnoDB 的缓冲池可能处于 100% 的利用率,但这只是因为有人运行了一段时间的一次性大型报告导致的。如果没有排除这种情况,那你就是在浪费时间。 +你的 InnoDB 的缓冲池也许达到 100% 的利用率,但这可能只是因为有人运行了一段时间的一次性大型报告导致的。如果没有排除这种情况,那你就是在浪费时间。 -### 在开始之前的附注 +### 开始之前 -在这一点上,我应该说明一下,虽然这些建议同样适用于许多角色,但我是从一般的支持系统管理员的角度来编写的。在一个成熟的内部组织中,或与规模较大的、完全管理或“企业级”客户合作时,你通常会一切进行检测、测量、绘制、整理(甚至不是文字),并发出警报。那么你的方法往往会有所不同。我们在这里忽视这种情况。 +在这里,我应该说明一下,虽然这些建议同样适用于许多角色,但我是从一般的支持系统管理员的角度来撰写的。在一个成熟的内部组织中,或与规模较大的、规范管理的或“企业级”客户合作时,你通常会对一切都进行检测、测量、绘制、整理(甚至不是文字),并发出警报。那么你的方法也往往会有所不同。让我们在这里先忽略这种情况。 -如果你没有这种东西那可以随意使用。 +如果你没有这种东西,那就随意了。 -### 澄清和第一眼 +### 澄清问题 -确定实际上是什么问题。“慢”可以体现为多种形式。是收到第一个字节的时间吗?从糟糕的 Javascript 加载和每页加载拉取 15 MB 的静态内容,这是一个完全不同类别的问题。是慢,还是比通常慢?这是两个非常不同的解决方案! +首先确定实际上是什么问题。“慢”可以是多种形式的。是收到第一个字节的时间吗?从糟糕的 Javascript 加载和每页加载要拉取 15 MB 的静态内容,这是一个完全不同类型的问题。是慢,还是比通常慢?这是两个非常不同的解决方案! -在你着手做某事之前,确保你知道实际报告/经历的问题。找到问题的根源通常很困难,即便找不到也必须找到问题本身。 +在你着手做某事之前,确保你知道实际报告和遇到的问题。找到问题的根源通常很困难,但即便找不到也必须找到问题本身。 -这相当于系统管理员带着一把刀去参加枪战。 +否则,这相当于系统管理员带着一把刀去参加枪战。 ### 唾手可得 -首次登录可疑服务器时,你可以查找一些常见的嫌疑对象。事实上,你应该这样做!每当我登录到服务器时,我都会发出一些命令来快速检查一些事情;我们是否发生页交换(`free` / `vmstat`),磁盘是否繁忙(`top` / `iostat` / `iotop`),是否有丢包(`netstat` / `proc` / `net` / `dev`),是否存在连接数过多的状态(`netstat`),有什么东西占用了 CPU(`top`),谁在这个服务器上(`w` / `who`),syslog 和 `dmesg` 中是否有引人注目的消息? +首次登录可疑服务器时,你可以查找一些常见的嫌疑对象。事实上,你应该这样做!每当我登录到服务器时,我都会发出一些命令来快速检查一些事情:我们是否发生了页交换(`free` / `vmstat`),磁盘是否繁忙(`top` / `iostat` / `iotop`),是否有丢包(`netstat` / `proc` / `net` / `dev`),是否处于连接数过多的状态(`netstat`),有什么东西占用了 CPU(`top`),谁在这个服务器上(`w` / `who`),syslog 和 `dmesg` 中是否有引人注目的消息? -如果你从 RAID 控制器得到 2000 条其直写式缓存没有生效消息,那么继续进行是没有意义的。 +如果你从 RAID 控制器得到 2000 条抱怨直写式缓存没有生效的消息,那么继续进行是没有意义的。 这用不了半分钟。如果什么都没有引起你的注意 —— 那么继续。 -### 重现 +### 重现问题 如果某处确实存在问题,并且找不到唾手可得的信息。 -采取所有步骤尝试重现问题。当你可以重现该问题时,你可以观察它。**当你能观察到时,你就可以解决。**如果在第一步中尚未显现或涵盖问题,询问报告问题的人需要采取哪些确切步骤来重现问题。 +那么采取所有步骤来尝试重现问题。当你可以重现该问题时,你就可以观察它。**当你能观察到时,你就可以解决。**如果在第一步中尚未显现出或覆盖了问题所在,询问报告问题的人需要采取哪些确切步骤来重现问题。 -现在,对于由太阳耀斑和专门运行在 OS/2 上的客户端引起的问题,重现并不总是可行的。但你的第一个停靠港应该是至少尝试一下!在一开始,你所知道的是“某人认为他们的网站很慢”。对于那些人,他们可能还在用他们的 GPRS 手机,也可能正在安装 Windows 更新。你在这里挖掘得再深也是浪费时间。 +对于由太阳耀斑或只能运行在 OS/2 上的客户端引起的问题,重现并不总是可行的。但你的第一个停靠港应该是至少尝试一下!在一开始,你所知道的是“某人认为他们的网站很慢”。对于那些人,他们可能还在用他们的 GPRS 手机,也可能正在安装 Windows 更新。你在这里挖掘得再深也是浪费时间。 尝试重现! -### 检查日志! +### 检查日志 -我对于我认为有必要包括这一点感到很难过。但是我曾经看到有人在运行 `tail /var/log/...` 之后几分钟就不看了。现在大多数 *NIX 工具都特别喜欢记录日志。任何明显的错误都会在大多数应用程序日志中显得非常突出。检查一下。 +我对于有必要包括这一点感到很难过。但是我曾经看到有人在运行 `tail /var/log/...` 之后几分钟就不看了。大多数 *NIX 工具都特别喜欢记录日志。任何明显的错误都会在大多数应用程序日志中显得非常突出。检查一下。 ### 缩小范围 -如果没有明显的问题,但你可以重现报告的问题,那也很棒。所以,你现在知道网站是慢的。现在你已经把范围缩小到:浏览器的渲染/错误、应用程序代码、DNS 基础设施、路由器、防火墙、NIC(涉及了所有的八个以上的)、以太网电缆、负载均衡器、数据库、缓存层、会话存储、Web 服务器软件、应用程序服务器、RAM、CPU、RAID 卡、磁盘等等。 +如果没有明显的问题,但你可以重现所报告的问题,那也很棒。所以,你现在知道网站是慢的。现在你已经把范围缩小到:浏览器的渲染/错误、应用程序代码、DNS 基础设施、路由器、防火墙、网卡(所有的)、以太网电缆、负载均衡器、数据库、缓存层、会话存储、Web 服务器软件、应用程序服务器、内存、CPU、RAID 卡、磁盘等等。 -根据设置添加一些其他潜在的罪魁祸首。它们也可能是 SAN,也不要忘记硬件 WAF!以及……你明白我的意思。 +根据设置添加一些其他可能的罪魁祸首。它们也可能是 SAN,也不要忘记硬件 WAF!以及…… 你明白我的意思。 -如果问题是接收到第一个字节的时间,你当然会开始对 Web 服务器应用已知的修复程序,那就是响应缓慢的那个环节,也是你最了解的那个了,对吧?错了! +如果问题是接收到第一个字节的时间,你当然会开始对 Web 服务器去应用上已知的修复程序,就是它响应缓慢,你也觉得几乎就是它,对吧?但是你错了! 你要回去尝试重现这个问题。只是这一次,你要试图消除尽可能多的潜在问题来源。 -你可以非常轻松地消除绝大多数潜在的罪魁祸首:你能从服务器本地重现问题吗?恭喜,你刚刚节省了自己必须尝试修复 BGP 路由的时间。 +你可以非常轻松地消除绝大多数可能的罪魁祸首:你能从服务器本地重现问题吗?恭喜,你刚刚节省了自己必须尝试修复 BGP 路由的时间。 如果不能,请尝试使用同一网络上的其他计算机。如果可以的话,至少你可以将防火墙移到你的嫌疑人名单上,(但是要注意一下那个交换机!) -是所有连接都很慢吗?虽然服务器是 Web 服务器,但并不意味着你不应该尝试使用其他类型的服务进行重现问题。[netcat][1] 在这些场景中非常有用(但是你的 SSH 连接可能会一直有延迟,这可以作为线索)! 如果这也很慢,你至少知道你很可能遇到网络问题,可以忽略整个 Web 软件及其所有组件。用这个知识(不收 200 美元)再次从顶部开始,按你的方式由内到外地进行! +是所有的连接都很慢吗?虽然服务器是 Web 服务器,但并不意味着你不应该尝试使用其他类型的服务进行重现问题。[netcat][1] 在这些场景中非常有用(但是你的 SSH 连接可能会一直有延迟,这可以作为线索)! 如果这也很慢,你至少知道你很可能遇到了网络问题,可以忽略掉整个 Web 软件及其所有组件的问题。用这个知识(我不收 200 美元)再次从顶部开始,按你的方式由内到外地进行! -即使你可以在本地复现 —— 仍然有很多“东西”留下。让我们排除一些变量。你能用普通文件重现它吗? 如果 `i_am_a_1kb_file.html` 很慢,你就知道它不是数据库、缓存层或 OS 以外的任何东西和网络服务器本身的问题。 +即使你可以在本地复现 —— 仍然有很多“因素”留下。让我们排除一些变量。你能用普通文件重现它吗? 如果 `i_am_a_1kb_file.html` 很慢,你就知道它不是数据库、缓存层或 OS 以外的任何东西和 Web 服务器本身的问题。 -你能用一个解释/执行的 `hello_world.(py|php|js|rb..)` 文件重现吗?如果可以的话,你已经大大缩小了范围,你可以专注于少数事情。如果 `hello_world` 可以马上工作,你仍然学到了很多东西! 你知道没有任何明显的资源限制、任何满的队列或在任何地方卡住的 IPC 调用。所以这是应用程序正在做的事情或它正在与之通信的事情。 +你能用一个需要解释或执行的 `hello_world.(py|php|js|rb..)` 文件重现问题吗?如果可以的话,你已经大大缩小了范围,你可以专注于少数事情。如果 `hello_world` 可以马上工作,你仍然学到了很多东西!你知道了没有任何明显的资源限制、任何满的队列或在任何地方卡住的 IPC 调用,所以这是应用程序正在做的事情或它正在与之通信的事情。 -所有页面都慢吗?或者只是从第三方加载“实时分数数据”的页面? +所有页面都慢吗?或者只是从第三方加载“实时分数数据”的页面慢? -**这归结为:你可以涉及的最少量的“东西”是什么,并且仍然可以重现这个问题?** +**这可以归结为:你仍然可以重现这个问题所涉及的最少量的“因素”是什么?** -我们的示例是一个缓慢的网站,但这同样适用于几乎所有问题。邮件投递?你能在本地投递吗?能发给自己吗?能发给<常见的服务提供者>吗?使用小的、纯文本的消息进行测试。尝试直到遇到 2MB 崩溃时。 使用 STARTTLS 和不使用 STARTTLS,按你的方式由内到外地进行! +我们的示例是一个缓慢的网站,但这同样适用于几乎所有问题。邮件投递?你能在本地投递吗?能发给自己吗?能发给<常见的服务提供者>吗?使用小的、纯文本的消息进行测试。尝试直到遇到 2MB 拥堵时。使用 STARTTLS 和不使用 STARTTLS 呢?按你的方式由内到外地进行! -这些步骤中的每一步都只需要几秒钟,远远快于实施大多数“潜在”修复方案。 +这些步骤中的每一步都只需要几秒钟,远远快于实施大多数“可能的”修复方案。 -### 观察/隔离 +### 隔离观察 -到目前为止,当你删除特定组件时无法重现问题是,你可能已经偶然发现了问题所在。 +到目前为止,当你去除特定组件时无法重现问题时,你可能已经偶然发现了问题所在。 -但如果你还没有,或者你仍然不知道**为什么**;一旦你找到了一种方法来重现问题,你和问题之间的“东西”(技术术语)最少,那么就该开始隔离和观察了。 +但如果你还没有,或者你仍然不知道**为什么**:一旦你找到了一种方法来重现问题,你和问题之间的“东西”(某个技术术语)最少,那么就该开始隔离和观察了。 请记住,许多服务可以在前台运行和/或启用调试。对于某些类别的问题,执行此操作通常非常有帮助。 @@ -111,23 +111,23 @@ 你可能会注意到应用程序停留在某个连接到端口 3306 的套接字文件描述符上的特定 `read()` 调用上。你会知道该怎么做。 -转到 MySQL 并再次从顶部开始。显而易见:“Waiting_for * lock”、死锁、`max_connections` ……进而:所有查询?只写请求?只有某些表?只有某些存储引擎?等等…… +转到 MySQL 并再次从顶部开始。显而易见:“等待某某锁”、死锁、`max_connections` ……进而:是所有查询?还是只写请求?只有某些表?还是只有某些存储引擎?等等…… -你可能会注意到外部 API 资源的 `connect()` 需要五秒钟才能完成,甚至超时。你会知道该怎么做。 +你可能会注意到调用外部 API 资源的 `connect()` 需要五秒钟才能完成,甚至超时。你会知道该怎么做。 你可能会注意到,在同一对文件中有 1000 个调用 `fstat()` 和 `open()` 作为循环依赖的一部分。你会知道该怎么做。 它可能不是那些特别的东西,但我保证,你会发现一些东西。 -如果你只是从这一部分学到一点,那也可以;学习使用 `strace` 吧!**真的**学习它,阅读整个手册页。甚至不要跳过历史部分。`man` 每个你还不知道它做了什么的系统调用。98% 的故障排除会话以 `strace` 而终结。 +如果你只是从这一部分学到一点,那也不错;学习使用 `strace` 吧!**真的**学习它,阅读整个手册页。甚至不要跳过历史部分。`man` 每个你还不知道它做了什么的系统调用。98% 的故障排除会话以 `strace` 而终结。 --------------------------------------------------------------------------------- +--------------------------------------------------------------------- via: http://northernmost.org/blog/troubleshooting-101/index.html 作者:[Erik Ljungstrom][a] 译者:[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 9815fc3459a646f4272839002ba142dae0729e12 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 10:07:56 +0800 Subject: [PATCH 312/951] PUB @wxy https://linux.cn/article-11191-1.html --- .../20171216 Sysadmin 101- Troubleshooting.md | 2 ++ 1 file changed, 2 insertions(+) rename {translated/tech => published}/20171216 Sysadmin 101- Troubleshooting.md (99%) diff --git a/translated/tech/20171216 Sysadmin 101- Troubleshooting.md b/published/20171216 Sysadmin 101- Troubleshooting.md similarity index 99% rename from translated/tech/20171216 Sysadmin 101- Troubleshooting.md rename to published/20171216 Sysadmin 101- Troubleshooting.md index 560f07c3b4..0beb6eeb67 100644 --- a/translated/tech/20171216 Sysadmin 101- Troubleshooting.md +++ b/published/20171216 Sysadmin 101- Troubleshooting.md @@ -1,6 +1,8 @@ 系统管理员入门:排除故障 ====== +![](https://img.linux.net.cn/data/attachment/album/201908/06/100659pox8xkkr8zek888r.jpg) + 我通常会严格保持此博客的技术性,将观察、意见等内容保持在最低限度。但是,这篇和接下来的几篇文章将介绍刚进入系统管理/SRE/系统工程师/sysops/devops-ops(无论你想称自己是什么)角色的常见的基础知识。 请跟我来! From f9117da5e7405cbb5969c68bfb406032092e55e6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 10:48:12 +0800 Subject: [PATCH 313/951] PRF @geekpi --- ...nHMD- Open Source Project for VR Development.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md b/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md index f114e57a14..2264d65b3a 100644 --- a/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md +++ b/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (OpenHMD: Open Source Project for VR Development) @@ -10,7 +10,9 @@ OpenHMD:用于 VR 开发的开源项目 ====== -在这个时代,有一些开源替代品可满足你的所有计算需求。甚至还有一个 VR 眼镜之类的开源平台。让我们快速看一下 OpenHMD 这个项目。 +> 在这个时代,有一些开源替代品可满足你的所有计算需求。甚至还有一个 VR 眼镜之类的开源平台。让我们快速看一下 OpenHMD 这个项目。 + +![][5] ### 什么是 OpenHMD? @@ -24,8 +26,6 @@ OpenHMD 项目是在 [Boost 许可证][4]下发布的。 ### 新版本中的更多功能和改进功能 -![][5] - 最近,OpenHMD 项目[发布版本 0.3.0][6],代号为 Djungelvral([Djungelvral][7] 是来自瑞典的盐渍甘草)。它带来了不少变化。 这次更新添加了对以下设备的支持: @@ -38,8 +38,6 @@ OpenHMD 项目是在 [Boost 许可证][4]下发布的。 * Deepoon E2 * GearVR Gen1 - - OpenHMD 增加了一个通用扭曲着色器。这一新增功能“可以方便地在驱动程序中设置一些变量,为着色器提供有关镜头尺寸、色差、位置和 Quirks 的信息。” 他们还宣布计划改变构建系统。OpenHMD 增加了对 Meson 的支持,并将在下一个 (0.4) 版本中将删除对 Autotools 的支持。 @@ -56,8 +54,6 @@ OpenHMD 背后的团队还不得不删除一些功能,因为他们希望他们 你曾经使用或看到过 OpenHMD 吗?你有没有使用 VR 进行游戏和其他用途?如果是,你是否用过任何开源硬件或软件?请在下面的评论中告诉我们。 -如果你觉得这篇文章很有趣,请在社交媒体、Hacker News 或 [Reddit][9] 上分享它。 - -------------------------------------------------------------------------------- via: https://itsfoss.com/openhmd/ @@ -65,7 +61,7 @@ via: https://itsfoss.com/openhmd/ 作者:[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 73cd772f9f370d458d30f7ed7fb3f267a3c2c589 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 10:48:56 +0800 Subject: [PATCH 314/951] PUB @geekpi https://linux.cn/article-11193-1.html --- ...0190730 OpenHMD- Open Source Project for VR Development.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190730 OpenHMD- Open Source Project for VR Development.md (98%) diff --git a/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md b/published/20190730 OpenHMD- Open Source Project for VR Development.md similarity index 98% rename from translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md rename to published/20190730 OpenHMD- Open Source Project for VR Development.md index 2264d65b3a..1d4ee0c1aa 100644 --- a/translated/tech/20190730 OpenHMD- Open Source Project for VR Development.md +++ b/published/20190730 OpenHMD- Open Source Project for VR Development.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11193-1.html) [#]: subject: (OpenHMD: Open Source Project for VR Development) [#]: via: (https://itsfoss.com/openhmd/) [#]: author: (John Paul https://itsfoss.com/author/john/) From 4182594a25aa450840f535b9cc951498069378c9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 11:15:50 +0800 Subject: [PATCH 315/951] PRF @wxy --- ...w To Find Hardware Specifications On Linux.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/translated/tech/20190805 How To Find Hardware Specifications On Linux.md b/translated/tech/20190805 How To Find Hardware Specifications On Linux.md index 85e6a78df6..5158857059 100644 --- a/translated/tech/20190805 How To Find Hardware Specifications On Linux.md +++ b/translated/tech/20190805 How To Find Hardware Specifications On Linux.md @@ -1,15 +1,17 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -[#]: subject: (How To Find Hardware Specifications On Linux) +[#]: subject: (How To Find Hardware Specifications On Linux) [#]: via: (https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) 如何在 Linux 上查找硬件规格 ====== +![](https://img.linux.net.cn/data/attachment/album/201908/06/111717t1f77n7v3egxhf18.jpg) + 在 Linux 系统上有许多工具可用于查找硬件规格。在这里,我列出了四种最常用的工具,可以获取 Linux 系统的几乎所有硬件(和软件)细节。好在是这些工具在某些 Linux 发行版上默认预装。我在 Ubuntu 18.04 LTS 桌面上测试了这些工具,但是它们也适用于其他 Linux 发行版。 ### 1、LSHW @@ -44,7 +46,7 @@ $ sudo lshw *使用 lshw 在 Linux 上查找硬件规格* -请注意,如果你没有使用 `sudo` 权限运行 `lshw` 命令,则输出可能不完整或不准确。 +请注意,如果你没有以 `sudo` 权限运行 `lshw` 命令,则输出可能不完整或不准确。 `lshw` 可以将输出显示为 HTML 页面。为此,请使用: @@ -75,7 +77,7 @@ $ sudo lshw -short $ sudo lshw -businfo ``` -默认情况下,`lshw` 显示所有硬件详细信息。你还可以居于 `-class` 选项查看特定硬件详细信息的硬件信息,例如处理器、内存、显示器等。可以使用 `lshw -short` 或 `lshw -businfo` 找到 `-class` 选项。 +默认情况下,`lshw` 显示所有硬件详细信息。你还可以使用类选项查看特定硬件详细信息的硬件信息,例如处理器、内存、显示器等。可以使用 `lshw -short` 或 `lshw -businfo` 找到类选项。 要显示特定硬件详细信息,例如处理器,请执行以下操作: @@ -165,7 +167,7 @@ $ lshw -sanitize $ sudo lshw-gtk ``` -这是 lshw 工具的默认 GUI 界面。 +这是 `lshw` 工具的默认 GUI 界面。 ![][4] @@ -187,7 +189,7 @@ $ man lshw ### 2、Inxi -Inxi 是我查找 Linux 系统上几乎所有内容的另一个最喜欢的工具。它是一个自由开源的功能齐全的命令行系统信息工具。它显示了系统硬件、CPU、驱动程序、Xorg、桌面、内核、GCC 版本、进程、RAM 使用情况以及各种其他有用信息。无论是硬盘还是 CPU、主板还是整个系统的完整细节,inxi 都能在几秒钟内更准确地显示它。由于它是 CLI 工具,你可以在桌面或服务器版本中使用它。有关更多详细信息,请参阅以下指南。 +Inxi 是我查找 Linux 系统上几乎所有内容的另一个最喜欢的工具。它是一个自由开源的、功能齐全的命令行系统信息工具。它显示了系统硬件、CPU、驱动程序、Xorg、桌面、内核、GCC 版本、进程、RAM 使用情况以及各种其他有用信息。无论是硬盘还是 CPU、主板还是整个系统的完整细节,inxi 都能在几秒钟内更准确地显示它。由于它是 CLI 工具,你可以在桌面或服务器版本中使用它。有关更多详细信息,请参阅以下指南。 * [如何使用 inxi 发现系统细节][6] @@ -316,7 +318,7 @@ via: https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux- 作者:[sk][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 6a65b08aa9bb987c15aeace212be08d402fbe4e3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 11:18:09 +0800 Subject: [PATCH 316/951] PUB @wxy https://linux.cn/article-11194-1.html --- .../20190805 How To Find Hardware Specifications On Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190805 How To Find Hardware Specifications On Linux.md (99%) diff --git a/translated/tech/20190805 How To Find Hardware Specifications On Linux.md b/published/20190805 How To Find Hardware Specifications On Linux.md similarity index 99% rename from translated/tech/20190805 How To Find Hardware Specifications On Linux.md rename to published/20190805 How To Find Hardware Specifications On Linux.md index 5158857059..453b19f74c 100644 --- a/translated/tech/20190805 How To Find Hardware Specifications On Linux.md +++ b/published/20190805 How To Find Hardware Specifications On Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11194-1.html) [#]: subject: (How To Find Hardware Specifications On Linux) [#]: via: (https://www.ostechnix.com/getting-hardwaresoftware-specifications-in-linux-mint-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From e345911abfeb1585591e67771c991938ce43812b Mon Sep 17 00:00:00 2001 From: FSSlc Date: Tue, 6 Aug 2019 14:53:11 +0800 Subject: [PATCH 317/951] [Translating] 20190805 How To Verify ISO Images In Linux.md Signed-off-by: FSSlc --- sources/tech/20190805 How To Verify ISO Images In Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190805 How To Verify ISO Images In Linux.md b/sources/tech/20190805 How To Verify ISO Images In Linux.md index 24e6f525f7..8d36124e10 100644 --- a/sources/tech/20190805 How To Verify ISO Images In Linux.md +++ b/sources/tech/20190805 How To Verify ISO Images In Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (FSSlc) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -139,7 +139,7 @@ via: https://www.ostechnix.com/how-to-verify-iso-images-in-linux/ 作者:[sk][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[FSSlc](https://github.com/FSSlc) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 32f1c68b2bd37acef7e9d0366acc5cc79265d98b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 15:58:51 +0800 Subject: [PATCH 318/951] APL --- ...0131 How to test Webhooks when youre developing locally.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20180131 How to test Webhooks when youre developing locally.md b/sources/tech/20180131 How to test Webhooks when youre developing locally.md index 78242caae9..a0bba59d26 100644 --- a/sources/tech/20180131 How to test Webhooks when youre developing locally.md +++ b/sources/tech/20180131 How to test Webhooks when youre developing locally.md @@ -1,3 +1,5 @@ +wxy is applied + How to test Webhooks when you’re developing locally ============================================================ @@ -219,4 +221,4 @@ via: https://medium.freecodecamp.org/testing-webhooks-while-using-vagrant-for-de [19]:https://github.com/wernight/docker-ngrok [20]:https://github.com/stefandoorn [21]:https://twitter.com/stefan_doorn -[22]:https://www.linkedin.com/in/stefandoorn \ No newline at end of file +[22]:https://www.linkedin.com/in/stefandoorn From 337838d2b916f9ed580cee58abce493ecbd03950 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 17:10:36 +0800 Subject: [PATCH 319/951] TSL --- ... Webhooks when youre developing locally.md | 224 ------------------ ... Webhooks when youre developing locally.md | 202 ++++++++++++++++ 2 files changed, 202 insertions(+), 224 deletions(-) delete mode 100644 sources/tech/20180131 How to test Webhooks when youre developing locally.md create mode 100644 translated/tech/20180131 How to test Webhooks when youre developing locally.md diff --git a/sources/tech/20180131 How to test Webhooks when youre developing locally.md b/sources/tech/20180131 How to test Webhooks when youre developing locally.md deleted file mode 100644 index a0bba59d26..0000000000 --- a/sources/tech/20180131 How to test Webhooks when youre developing locally.md +++ /dev/null @@ -1,224 +0,0 @@ -wxy is applied - -How to test Webhooks when you’re developing locally -============================================================ - -![](https://cdn-images-1.medium.com/max/1000/1*0HNQmPw5yXva6powvVwn5Q.jpeg) -Photo by [Fernando Venzano][1] on [Unsplash][2] - -[Webhooks][10] can be used by an external system for notifying your system about a certain event or update. Probably the most well known type is the one where a Payment Service Provider (PSP) informs your system about status updates of payments. - -Often they come in the form where you listen on a predefined URL. For example [http://example.com/webhooks/payment-update][11]. Meanwhile the other system sends a POST request with a certain payload to that URL (for example a payment ID). As soon as the request comes in, you fetch the payment ID, ask the PSP for the latest status via their API, and update your database afterward. - -Other examples can be found in this excellent explanation about Webhooks. [https://sendgrid.com/blog/whats-webhook/][12]. - -Testing these webhooks goes fairly smoothly as long as the system is publicly accessible over the internet. This might be your production environment or a publicly accessible staging environment. It becomes harder when you are developing locally on your laptop or inside a Virtual Machine (VM, for example, a Vagrant box). In those cases, the local URL’s are not publicly accessible by the party sending the webhook. Also, monitoring the requests being sent around is be difficult, which might make development and debugging hard. - -What will this example solve: - -* Testing webhooks from a local development environment, which is not accessible over the internet. It cannot be accessed by the service sending the data to the webhook from their servers. - -* Monitor the requests and data being sent around, but also the response your application generates. This will allow easier debugging, and therefore a shorter development cycle. - -Prerequisites: - -* _Optional_ : in case you are developing using a Virtual Machine (VM), make sure it’s running and make sure the next steps are done in the VM. - -* For this tutorial, we assume you have a vhost defined at `webhook.example.vagrant`. I used a Vagrant VM for this tutorial, but you are free in choosing the name of your vhost. - -* Install `ngrok`by following the [installation instructions][3]. Inside a VM, I find the Node version of it also useful: [https://www.npmjs.com/package/ngrok][4], but feel free to use other methods. - -I assume you don’t have SSL running in your environment, but if you do, feel free to replace port 80 with port 433 and  `_http://_`  with  `_https://_`  in the examples below. - -#### Make the webhook testable - -Let’s assume the following example code. I’ll be using PHP, but read it as pseudo-code as I left some crucial parts out (for example API keys, input validation, etc.) - -The first file:  _payment.php_ . This file creates a payment object and then registers it with the PSP. It then fetches the URL the customer needs to visit in order to pay and redirects the user to the customer in there. - -Note that the `webhook.example.vagrant` in this example is the local vhost we’ve defined for our development set-up. It’s not accessible from the outside world. - -``` - 123, - 'amount' => 25.00, - 'description' => 'Test payment', - 'redirect_url' => 'http://webhook.example.vagrant/redirect.php', - 'webhook_url' => 'http://webhook.example.vagrant/webhook.php', -]; -``` - -``` -$payment = $paymentProvider->createPayment($payment); -header("Location: " . $payment->getPaymentUrl()); -``` - -Second file:  _webhook.php_ . This file waits to be called by the PSP to get notified about updates. - -``` -getPayment($paymentId); -$status = $paymentInfo->getStatus(); -``` - -``` -// Perform actions in here to update your system -if ($status === 'paid') { - .. -} -elseif ($status === 'cancelled') { - .. -} -``` - -Our webhook URL is not accessible over the internet (remember: `webhook.example.vagrant`). Thus, the file  _webhook.php_  will never be called by the PSP. Your system will never get to know about the payment status. This ultimately leads to orders never being shipped to customers. - -Luckily,  _ngrok_  can in solving this problem.  [_ngrok_][13]  describes itself as: - -> ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels. - -Let’s start a basic tunnel for our project. On your environment (either on your system or on the VM) run the following command: - -`ngrok http -host-header=rewrite webhook.example.vagrant:80` - -Read about more configuration options in their documentation: [https://ngrok.com/docs][14]. - -A screen like this will come up: - - -![](https://cdn-images-1.medium.com/max/1000/1*BZZE-CvZwHZ3pxsElJMWbA.png) -ngrok output - -What did we just start? Basically, we instructed `ngrok` to start a tunnel to `[http://webhook.example.vagr][5]ant` at port 80\. This same URL can now be reached via `[http://39741ffc.ngrok.i][6]o` or `[https://39741ffc.ngrok.io][7]`[,][15] They are publicly accessible over the internet by anyone that knows this URL. - -Note that you get both HTTP and HTTPS available out of the box. The documentation gives examples of how to restrict this to HTTPS only: [https://ngrok.com/docs#bind-tls][16]. - -So, how do we make our webhook work now? Update  _payment.php_  to the following code: - -``` - 123, - 'amount' => 25.00, - 'description' => 'Test payment', - 'redirect_url' => 'http://webhook.example.vagrant/redirect.php', - 'webhook_url' => 'https://39741ffc.ngrok.io/webhook.php', -]; -``` - -``` -$payment = $paymentProvider->createPayment($payment); -header("Location: " . $payment->getPaymentUrl()); -``` - -Now, we told the PSP to call the tunnel URL over HTTPS.  _ngrok_  will make sure your internal URL get’s called with an unmodified payload, as soon as the PSP calls the webhook via the tunnel. - -#### How to monitor calls to the webhook? - -The screenshot you’ve seen above gives an overview of the calls being made to the tunnel host. This data is rather limited. Fortunately, `ngrok` offers a very nice dashboard, which allows you to inspect all calls: - - -![](https://cdn-images-1.medium.com/max/1000/1*qZw9GRTnG1sMgEUmsJPz3g.png) - -I won’t go into this very deep because it’s self-explanatory as soon as you have it running. Therefore I will explain how to access it on the Vagrant box as it doesn’t work out of the box. - -The dashboard will allow you to see all the calls, their status codes, the headers and data being sent around. You will also see the response your application generated. - -Another neat feature of the dashboard is that it allows you to replay a certain call. Let’s say your webhook code ran into a fatal error, it would be tedious to start a new payment and wait for the webhook to be called. Replaying the previous call makes your development process way faster. - -The dashboard by default is accessible at [http://localhost:4040.][17] - -#### Dashboard in a VM - -In order to make this work inside a VM, you have to perform some additional steps: - -First, make sure the VM can be accessed on port 4040\. Then, create a file inside the VM holding this configuration: - -`web_addr: 0.0.0.0:4040` - -Now, kill the `ngrok` process that’s still running and start it with this slightly adjusted command: - -`ngrok http -config=/path/to/config/ngrok.conf -host-header=rewrite webhook.example.vagrant:80` - -You will get a screen looking similar to the previous screenshot though the ID’s have changed. The previous URL doesn’t work anymore, but you got a new URL. Also, the `Web Interface` URL got changed: - - -![](https://cdn-images-1.medium.com/max/1000/1*3FZq37TF4dmBqRc1R0FMVg.png) - -Now direct your browser to `[http://webhook.example.vagrant:4040][8]` to access the dashboard. Also, make a call to `[https://e65642b5.ngrok.io/webhook.php][9]`[.][18]This will probably result in an error in your browser, but the dashboard should show the request being made. - -#### Final remarks - -The examples above are pseudo-code. The reason is that every external system uses webhooks in a different way. I tried to give an example based on a fictive PSP implementation, as probably many developers have to deal with payments at some moment. - -Please be aware that your webhook URL can also be used by others with bad intentions. Make sure to validate any input being sent to it. - -Preferably also add a token to the URL which is unique for each payment. This token must only be known by your system and the system sending the webhook. - -Good luck testing and debugging your webhooks! - -Note: I haven’t tested this tutorial on Docker. However, this Docker container looks like a good starting point and includes clear instructions. [https://github.com/wernight/docker-ngrok][19]. - -Stefan Doorn - -[https://github.com/stefandoorn][20] -[https://twitter.com/stefan_doorn][21] -[https://www.linkedin.com/in/stefandoorn][22] - --------------------------------------------------------------------------------- - -作者简介: - -Backend Developer (PHP/Node/Laravel/Symfony/Sylius) - - --------- - -via: https://medium.freecodecamp.org/testing-webhooks-while-using-vagrant-for-development-98b5f3bedb1d - -作者:[Stefan Doorn ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://medium.freecodecamp.org/@stefandoorn -[1]:https://unsplash.com/photos/MYTyXb7fgG0?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[2]:https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[3]:https://ngrok.com/download -[4]:https://www.npmjs.com/package/ngrok -[5]:http://webhook.example.vagrnat/ -[6]:http://39741ffc.ngrok.io/ -[7]:http://39741ffc.ngrok.io/ -[8]:http://webhook.example.vagrant:4040/ -[9]:https://e65642b5.ngrok.io/webhook.php. -[10]:https://sendgrid.com/blog/whats-webhook/ -[11]:http://example.com/webhooks/payment-update%29 -[12]:https://sendgrid.com/blog/whats-webhook/ -[13]:https://ngrok.com/ -[14]:https://ngrok.com/docs -[15]:http://39741ffc.ngrok.io%2C/ -[16]:https://ngrok.com/docs#bind-tls -[17]:http://localhost:4040./ -[18]:https://e65642b5.ngrok.io/webhook.php. -[19]:https://github.com/wernight/docker-ngrok -[20]:https://github.com/stefandoorn -[21]:https://twitter.com/stefan_doorn -[22]:https://www.linkedin.com/in/stefandoorn diff --git a/translated/tech/20180131 How to test Webhooks when youre developing locally.md b/translated/tech/20180131 How to test Webhooks when youre developing locally.md new file mode 100644 index 0000000000..153cacdb9c --- /dev/null +++ b/translated/tech/20180131 How to test Webhooks when youre developing locally.md @@ -0,0 +1,202 @@ +当你在本地开发时如何测试 Webhooks +=================== + +![](https://cdn-images-1.medium.com/max/1000/1*0HNQmPw5yXva6powvVwn5Q.jpeg) + +[Webhooks][10] 可用于外部系统通知你的系统发生了某个事件或更新。可能最知名的 [Webhooks][10] 是支付服务提供商(PSP)通知你的系统支付状态有了更新。 + +它们通常以你在监听预定义 URL 的形式出现,例如 `http://example.com/webhooks/payment-update`。 同时,另一个系统向该 URL 发送具有特定有效载荷的 POST 请求(例如支付 ID)。一旦请求进入,你就会获取支付 ID,可以通过它们的 API 用这个支付 ID 向 PSP 询问最新状态,然后更新你的数据库。 + +其他例子可以在这个对 Webhook 的出色的解释中找到:[https://sendgrid.com/blog/whats-webhook/][12]。 + +只要系统可通过互联网公开访问(这可能是你的生产环境或可公开访问的临时环境),测试这些 webhook 就相当顺利。而当你在笔记本电脑上或虚拟机内部进行本地开发(例如,Vagrant 虚拟机)时,它变得困难了。在这些情况下,发送 webhook 的一方无法公开访问本地 URL。此外,监视发送的请求也很困难,这可能使开发和调试变得困难。 + +因此,这个例子将解决: + +* 测试来自本地开发环境的 webhook,该环境无法通过互联网访问。从服务器向 webhook 发送数据的服务无法访问它。 +* 监控发送的请求和数据,以及应用程序生成的响应。这样可以更轻松地进行调试,从而缩短开发周期。 + +前置需求: + +* *可选*:如果你使用虚拟机(VM)进行开发,请确保它正在运行,并确保在 VM 中完成后续步骤。 +* 对于本教程,我们假设你定义了一个 vhost:`webhook.example.vagrant`。我在本教程中使用了 Vagrant VM,但你可以自由选择 vhost 的名称。 +* 按照[安装说明][3]安装 `ngrok`。 在 VM 中,我发现它的 Node 版本也很有用:[https://www.npmjs.com/package/ngrok][4],但你可以随意使用其他方法。 + +我假设你没有在你的环境中运行 SSL,但如果你这样做了,请将在下面的示例中的端口 80 替换为端口 433,`http://` 替换为 `https://`。 + +### 使 webhook 可测试 + +我们假设以下示例代码。我将使用 PHP,但将其视作伪代码,因为我留下了一些关键部分(例如 API 密钥、输入验证等)没有编写。 + +第一个文件:`payment.php`。此文件创建一个 `$payment` 对象,将其注册到 PSP。然后它获取客户需要访问的 URL,以便支付并将用户重定向到客户那里。 + +请注意,此示例中的 `webhook.example.vagrant` 是我们为开发设置定义的本地虚拟主机。它无法从外部世界进入。 + + +``` + 123, + 'amount' => 25.00, + 'description' => 'Test payment', + 'redirect_url' => 'http://webhook.example.vagrant/redirect.php', + 'webhook_url' => 'http://webhook.example.vagrant/webhook.php', +]; + +$payment = $paymentProvider->createPayment($payment); +header("Location: " . $payment->getPaymentUrl()); +``` + +第二个文件:`webhook.php`。此文件等待 PSP 调用以获得有关更新的通知。 + +``` +getPayment($paymentId); +$status = $paymentInfo->getStatus(); + +// Perform actions in here to update your system +if ($status === 'paid') { + .. +} +elseif ($status === 'cancelled') { + .. +} +``` + +我们的 webhook URL 无法通过互联网访问(请记住它:`webhook.example.vagrant`)。因此,PSP 永远不可能调用文件 `webhook.php`。 你的系统将永远不会知道付款状态。这最终导致订单永远不会被运送给客户。 + +幸运的是,`ngrok` 可以解决这个问题。 [ngrok][13] 将自己描述为: + +> ngrok 通过安全隧道将 NAT 和防火墙后面的本地服务器暴露给公共互联网。 + +让我们为我们的项目启动一个基本的隧道。在你的环境中(在你的系统上或在 VM 上)运行以下命令: + +``` +ngrok http -host-header=rewrite webhook.example.vagrant:80 +``` + +> 阅读其文档可以了解更多配置选项:[https://ngrok.com/docs][14]。 + +会出现这样的屏幕: + +![](https://cdn-images-1.medium.com/max/1000/1*BZZE-CvZwHZ3pxsElJMWbA.png) + +*ngrok 输出* + +我们刚刚做了什么?基本上,我们指示 `ngrok` 在端口 80 建立了一个到 `http://webhook.example.vagrant` 的隧道。同一个 URL 也可以通过 `http://39741ffc.ngrok.io` 或 `https://39741ffc.ngrok.io` 访问。它们能被任何知道此 URL 的人通过互联网公开访问。 + +请注意,你可以同时获得 HTTP 和 HTTPS 两个服务。该文档提供了如何仅将此限制为 HTTPS 的示例:[https://ngrok.com/docs#bind-tls][16]。 + +那么,我们如何让我们的 webhook 现在工作起来?将 `payment.php` 更新为以下代码: + +``` + 123, + 'amount' => 25.00, + 'description' => 'Test payment', + 'redirect_url' => 'http://webhook.example.vagrant/redirect.php', + 'webhook_url' => 'https://39741ffc.ngrok.io/webhook.php', +]; + +$payment = $paymentProvider->createPayment($payment); +header("Location: " . $payment->getPaymentUrl()); +``` + +现在,我们告诉 PSP 通过 HTTPS 调用此隧道 URL。只要 PSP 通过隧道调用 webhook,`ngrok` 将确保使用未修改的有效负载调用内部 URL。 + +### 如何监控对 webhook 的调用? + +你在上面看到的屏幕截图概述了对隧道主机的调用。这些数据相当有限。幸运的是,`ngrok` 提供了一个非常好的仪表板,允许你检查所有调用: + +![](https://cdn-images-1.medium.com/max/1000/1*qZw9GRTnG1sMgEUmsJPz3g.png) + +我不会深入研究这个问题,因为它是不言自明的,你只要运行它就行了。因此,我将解释如何在 Vagrant 虚拟机上访问它,因为它不是开箱即用的。 + +仪表板将允许你查看所有调用、其状态代码、标头和发送的数据。你将看到应用程序生成的响应。 + +仪表板的另一个优点是它允许你重放某个调用。假设你的 webhook 代码遇到了致命的错误,开始新的付款并等待 webhook 被调用将会很繁琐。重放上一个调用可以使你的开发过程更快。 + +默认情况下,仪表板可在 `http://localhost:4040` 访问。 + +### 虚拟机中的仪表盘 + +为了在 VM 中完成此工作,你必须执行一些额外的步骤: + +首先,确保可以在端口 4040 上访问 VM。然后,在 VM 内创建一个文件已存放此配置: + +``` +web_addr: 0.0.0.0:4040 +``` + +现在,杀死仍在运行的 `ngrok` 进程,并使用稍微调整过的命令启动它: + +``` +ngrok http -config=/path/to/config/ngrok.conf -host-header=rewrite webhook.example.vagrant:80 +``` + +尽管 ID 已经更改,但你将看到类似于上一屏幕截图的屏幕。之前的网址不再有效,但你有了一个新网址。 此外,`Web Interface` URL 已更改: + +![](https://cdn-images-1.medium.com/max/1000/1*3FZq37TF4dmBqRc1R0FMVg.png) + +现在将浏览器指向 `http://webhook.example.vagrant:4040` 以访问仪表板。另外,对 `https://e65642b5.ngrok.io/webhook.php` 做个调用。这可能会导致你的浏览器出错,但仪表板应显示正有一个请求。 + +#### 最后的评论 + +上面的例子是伪代码。原因是每个外部系统都以不同的方式使用 webhook。我试图基于一个虚构的 PSP 实现给出一个例子,因为可能很多开发人员在某个时刻肯定会处理付款。 + +请注意,你的 webhook 网址也可能被意图不好的其他人使用。确保验证发送给它的任何输入。 + +更好的的,可以向 URL 添加令牌,该令牌对于每个支付是唯一的。只有你的系统和发送 webhook 的系统才能知道此令牌。 + +祝你测试和调试你的 webhook 顺利! + +注意:我没有在 Docker 上测试过本教程。但是,这个 Docker 容器看起来是一个很好的起点,并包含了明确的说明:[https://github.com/wernight/docker-ngrok][19] 。 + +-------- + +via: https://medium.freecodecamp.org/testing-webhooks-while-using-vagrant-for-development-98b5f3bedb1d + +作者:[Stefan Doorn][a] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://medium.freecodecamp.org/@stefandoorn +[1]:https://unsplash.com/photos/MYTyXb7fgG0?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[2]:https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]:https://ngrok.com/download +[4]:https://www.npmjs.com/package/ngrok +[5]:http://webhook.example.vagrnat/ +[6]:http://39741ffc.ngrok.io/ +[7]:http://39741ffc.ngrok.io/ +[8]:http://webhook.example.vagrant:4040/ +[9]:https://e65642b5.ngrok.io/webhook.php. +[10]:https://sendgrid.com/blog/whats-webhook/ +[11]:http://example.com/webhooks/payment-update%29 +[12]:https://sendgrid.com/blog/whats-webhook/ +[13]:https://ngrok.com/ +[14]:https://ngrok.com/docs +[15]:http://39741ffc.ngrok.io%2C/ +[16]:https://ngrok.com/docs#bind-tls +[17]:http://localhost:4040./ +[18]:https://e65642b5.ngrok.io/webhook.php. +[19]:https://github.com/wernight/docker-ngrok +[20]:https://github.com/stefandoorn +[21]:https://twitter.com/stefan_doorn +[22]:https://www.linkedin.com/in/stefandoorn From 20358e9db0aa2a743e7f8c4647064ccfb828dd94 Mon Sep 17 00:00:00 2001 From: 0x996 <52857718+0x996@users.noreply.github.com> Date: Tue, 6 Aug 2019 21:06:38 +1000 Subject: [PATCH 320/951] APL:20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE --- ...T disaster recovery- Sysadmins vs. natural disasters - HPE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md b/sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md index 048fb508aa..79bab4d116 100644 --- a/sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md +++ b/sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md @@ -1,3 +1,4 @@ +0x996 is translating IT disaster recovery: Sysadmins vs. natural disasters | HPE ====== From 17e3fdeaad53378daab67b06046f6c66e5f9db4f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 22:59:21 +0800 Subject: [PATCH 321/951] APL --- sources/tech/20190510 Check storage performance with dd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190510 Check storage performance with dd.md b/sources/tech/20190510 Check storage performance with dd.md index 8cdea81f69..78d7eab391 100644 --- a/sources/tech/20190510 Check storage performance with dd.md +++ b/sources/tech/20190510 Check storage performance with dd.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From fccb2ff35b0a7dc806d5681616a528c2d81492de Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Aug 2019 23:47:21 +0800 Subject: [PATCH 322/951] TSL --- ...90510 Check storage performance with dd.md | 124 ++++++++---------- 1 file changed, 56 insertions(+), 68 deletions(-) rename {sources => translated}/tech/20190510 Check storage performance with dd.md (55%) diff --git a/sources/tech/20190510 Check storage performance with dd.md b/translated/tech/20190510 Check storage performance with dd.md similarity index 55% rename from sources/tech/20190510 Check storage performance with dd.md rename to translated/tech/20190510 Check storage performance with dd.md index 78d7eab391..d1479023fc 100644 --- a/sources/tech/20190510 Check storage performance with dd.md +++ b/translated/tech/20190510 Check storage performance with dd.md @@ -7,68 +7,60 @@ [#]: via: (https://fedoramagazine.org/check-storage-performance-with-dd/) [#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) -Check storage performance with dd +使用 dd 检查存储性能 ====== ![][1] -This article includes some example commands to show you how to get a _rough_ estimate of hard drive and RAID array performance using the _dd_ command. Accurate measurements would have to take into account things like [write amplification][2] and [system call overhead][3], which this guide does not. For a tool that might give more accurate results, you might want to consider using [hdparm][4]. +本文包含一些示例命令,向你展示如何使用 `dd` 命令*粗略*估计硬盘驱动器和 RAID 阵列的性能。准确的测量必须考虑诸如[写入放大][2]和[系统调用开销][3]之类的事情,本指南不会考虑这些。对于可能提供更准确结果的工具,你可能需要考虑使用 [hdparm][4]。 -To factor out performance issues related to the file system, these examples show how to test the performance of your drives and arrays at the block level by reading and writing directly to/from their block devices. **WARNING** : The _write_ tests will destroy any data on the block devices against which they are run. **Do not run them against any device that contains data you want to keep!** +为了分解与文件系统相关的性能问题,这些示例显示了如何通过直接读取和写入块设备来在块级测试驱动器和阵列的性能。**警告**:*写入*测试将会销毁针用来运行测试的块设备上的所有数据。**不要对包含你想要保留的数据的任何设备运行这些测试!** -### Four tests +### 四个测试 -Below are four example dd commands that can be used to test the performance of a block device: +下面是四个示例 `dd` 命令,可用于测试块设备的性能: - 1. One process reading from $MY_DISK: +1、 从 `$MY_DISK` 读取的一个进程: ``` # dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache ``` - 2. One process writing to $MY_DISK: +2、写入到 `$MY_DISK` 的一个进程: ``` # dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct ``` - 3. Two processes reading concurrently from $MY_DISK: +3、从 `$MY_DISK` 并发读取的两个进程: ``` # (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &) ``` - 4. Two processes writing concurrently to $MY_DISK: +4、 并发写入到 `$MY_DISK` 的两个进程: ``` # (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &) ``` +- 执行读写测试时,相应的 `iflag=nocache` 和 `oflag=direct` 参数非常重要,因为没有它们,`dd` 命令有时会显示从[内存][5]中传输数据的结果速度,而不是从硬盘。 +- `bs` 和 `count` 参数的值有些随意,我选择的值应足够大,以便在大多数情况下为当前硬件提供合适的平均值。 +- `null` 和 `zero` 设备在读写测试中分别用于目标和源,因为它们足够快,不会成为性能测试中的限制因素。 +- 并发读写测试中第二个 `dd` 命令的 `skip=200` 参数是为了确保 `dd` 的两个副本在硬盘驱动器的不同区域上运行。 +### 16 个示例 +下面是演示,显示针对以下四个块设备中之一运行上述四个测试中的各个结果: -– The _iflag=nocache_ and _oflag=direct_ parameters are important when performing the read and write tests (respectively) because without them the dd command will sometimes show the resulting speed of transferring the data to/from [RAM][5] rather than the hard drive. +1. `MY_DISK=/dev/sda2`(用在示例 1-X 中) +2. `MY_DISK=/dev/sdb2`(用在示例 2-X 中) +3. `MY_DISK=/dev/md/stripped`(用在示例 3-X 中) +4. `MY_DISK=/dev/md/mirrored`(用在示例 4-X 中) -– The values for the _bs_ and _count_ parameters are somewhat arbitrary and what I have chosen should be large enough to provide a decent average in most cases for current hardware. +本指南末尾提供了在 PC 上运行这些测试的视频演示。 -– The _null_ and _zero_ devices are used for the destination and source (respectively) in the read and write tests because they are fast enough that they will not be the limiting factor in the performance tests. - -– The _skip=200_ parameter on the second dd command in the concurrent read and write tests is to ensure that the two copies of dd are operating on different areas of the hard drive. - -### 16 examples - -Below are demonstrations showing the results of running each of the above four tests against each of the following four block devices: - - 1. MY_DISK=/dev/sda2 (used in examples 1-X) - 2. MY_DISK=/dev/sdb2 (used in examples 2-X) - 3. MY_DISK=/dev/md/stripped (used in examples 3-X) - 4. MY_DISK=/dev/md/mirrored (used in examples 4-X) - - - -A video demonstration of the these tests being run on a PC is provided at the end of this guide. - -Begin by putting your computer into _rescue_ mode to reduce the chances that disk I/O from background services might randomly affect your test results. **WARNING** : This will shutdown all non-essential programs and services. Be sure to save your work before running these commands. You will need to know your _root_ password to get into rescue mode. The _passwd_ command, when run as the root user, will prompt you to (re)set your root account password. +首先将计算机置于*救援*模式,以减少后台服务的磁盘 I/O 随机影响测试结果的可能性。**警告**:这将关闭所有非必要的程序和服务。在运行这些命令之前,请务必保存你的工作。你需要知道 `root` 密码才能进入救援模式。`passwd` 命令以 `root` 用户身份运行时,将提示你(重新)设置 `root` 帐户密码。 ``` $ sudo -i @@ -77,14 +69,14 @@ $ sudo -i # systemctl rescue ``` -You might also want to temporarily disable logging to disk: +你可能还想暂时禁止将日志记录到磁盘: ``` # sed -r -i.bak 's/^#?Storage=.*/Storage=none/' /etc/systemd/journald.conf # systemctl restart systemd-journald.service ``` -If you have a swap device, it can be temporarily disabled and used to perform the following tests: +如果你有交换设备,可以暂时禁用它并用于执行以下测试: ``` # swapoff -a @@ -93,7 +85,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th # mdadm --zero-superblock $MY_DEVS ``` -#### Example 1-1 (reading from sda) +#### 示例 1-1 (从 sda 读取) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1) @@ -106,7 +98,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.7003 s, 123 MB/s ``` -#### Example 1-2 (writing to sda) +#### 示例 1-2 (写入到 sda) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1) @@ -119,7 +111,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.67117 s, 125 MB/s ``` -#### Example 1-3 (reading concurrently from sda) +#### 示例 1-3 (从 sda 并发读取) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1) @@ -135,7 +127,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 3.52614 s, 59.5 MB/s ``` -#### Example 1-4 (writing concurrently to sda) +#### 示例 1-4 (并发写入到 sda) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1) @@ -150,7 +142,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 3.60872 s, 58.1 MB/s ``` -#### Example 2-1 (reading from sdb) +#### 示例 2-1 (从 sdb 读取) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2) @@ -163,7 +155,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.67285 s, 125 MB/s ``` -#### Example 2-2 (writing to sdb) +#### 示例 2-2 (写入到 sdb) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2) @@ -176,7 +168,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.67198 s, 125 MB/s ``` -#### Example 2-3 (reading concurrently from sdb) +#### 示例 2-3 (从 sdb 并发读取) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2) @@ -192,7 +184,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 3.57736 s, 58.6 MB/s ``` -#### Example 2-4 (writing concurrently to sdb) +#### 示例 2-4 (并发写入到 sdb) ``` # MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2) @@ -208,7 +200,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 3.81475 s, 55.0 MB/s ``` -#### Example 3-1 (reading from RAID0) +#### 示例 3-1 (从 RAID0 读取) ``` # mdadm --create /dev/md/stripped --homehost=any --metadata=1.0 --level=0 --raid-devices=2 $MY_DEVS @@ -222,7 +214,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 0.837419 s, 250 MB/s ``` -#### Example 3-2 (writing to RAID0) +#### 示例 3-2 (写入到 RAID0) ``` # MY_DISK=/dev/md/stripped @@ -235,7 +227,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 0.823648 s, 255 MB/s ``` -#### Example 3-3 (reading concurrently from RAID0) +#### 示例 3-3 (从 RAID0 并发读取) ``` # MY_DISK=/dev/md/stripped @@ -251,7 +243,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.80016 s, 116 MB/s ``` -#### Example 3-4 (writing concurrently to RAID0) +#### 示例 3-4 (并发写入到 RAID0) ``` # MY_DISK=/dev/md/stripped @@ -267,7 +259,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.81323 s, 116 MB/s ``` -#### Example 4-1 (reading from RAID1) +#### 示例 4-1 (从 RAID1 读取) ``` # mdadm --stop /dev/md/stripped @@ -282,7 +274,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.74963 s, 120 MB/s ``` -#### Example 4-2 (writing to RAID1) +#### 示例 4-2 (写入到 RAID1) ``` # MY_DISK=/dev/md/mirrored @@ -295,7 +287,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.74625 s, 120 MB/s ``` -#### Example 4-3 (reading concurrently from RAID1) +#### 示例 4-3 (从 RAID1 并发读取) ``` # MY_DISK=/dev/md/mirrored @@ -311,7 +303,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 1.67685 s, 125 MB/s ``` -#### Example 4-4 (writing concurrently to RAID1) +#### 示例 4-4 (并发写入到 RAID1) ``` # MY_DISK=/dev/md/mirrored @@ -327,7 +319,7 @@ If you have a swap device, it can be temporarily disabled and used to perform th 209715200 bytes (210 MB, 200 MiB) copied, 4.1067 s, 51.1 MB/s ``` -#### Restore your swap device and journald configuration +#### 恢复交换设备和日志配置 ``` # mdadm --stop /dev/md/stripped /dev/md/mirrored @@ -339,23 +331,23 @@ If you have a swap device, it can be temporarily disabled and used to perform th # reboot ``` -### Interpreting the results +### 结果解读 -Examples 1-1, 1-2, 2-1, and 2-2 show that each of my drives read and write at about 125 MB/s. +示例 1-1、1-2、2-1 和 2-2 表明我的每个驱动器以大约 125 MB/s 的速度读写。 -Examples 1-3, 1-4, 2-3, and 2-4 show that when two reads or two writes are done in parallel on the same drive, each process gets at about half the drive’s bandwidth (60 MB/s). +示例 1-3、1-4、2-3 和 2-4 表明,当在同一驱动器上并行完成两次读取或写入时,每个进程的驱动器带宽大约为一半(60 MB/s)。 -The 3-x examples show the performance benefit of putting the two drives together in a RAID0 (data stripping) array. The numbers, in all cases, show that the RAID0 array performs about twice as fast as either drive is able to perform on its own. The trade-off is that you are twice as likely to lose everything because each drive only contains half the data. A three-drive array would perform three times as fast as a single drive (all drives being equal) but it would be thrice as likely to suffer a [catastrophic failure][6]. +3-X 示例显示了将两个驱动器放在 RAID0(数据条带化)阵列中的性能优势。在所有情况下,这些数字表明 RAID0 阵列的执行速度是任何一个驱动器能够独立提供的速度的两倍。权衡的是,丢失所有内容的可能性也是两倍,因为每个驱动器只包含一半的数据。一个三个驱动器阵列的执行速度是单个驱动器的三倍(所有驱动器规格都相同),但遭受[灾难性故障][6]的可能也是三倍。 -The 4-x examples show that the performance of the RAID1 (data mirroring) array is similar to that of a single disk except for the case where multiple processes are concurrently reading (example 4-3). In the case of multiple processes reading, the performance of the RAID1 array is similar to that of the RAID0 array. This means that you will see a performance benefit with RAID1, but only when processes are reading concurrently. For example, if a process tries to access a large number of files in the background while you are trying to use a web browser or email client in the foreground. The main benefit of RAID1 is that your data is unlikely to be lost [if a drive fails][7]. +4-X 示例显示 RAID1(数据镜像)阵列的性能类似于单个磁盘的性能,除了多个进程同时读取的情况(示例4-3)。在多个进程读取的情况下,RAID1 阵列的性能类似于 RAID0 阵列的性能。这意味着你将看到 RAID1 的性能优势,但仅限于进程同时读取时。例如,当你在前台使用 Web 浏览器或电子邮件客户端时,进程会尝试访问后台中的大量文件。RAID1 的主要好处是,[如果驱动器出现故障][7],你的数据不太可能丢失。 -### Video demo +### 视频演示 -Testing storage throughput using dd +[使用 dd 测试存储吞吐量](https://youtu.be/wbLX239-ysQ) -### Troubleshooting +### 故障排除 -If the above tests aren’t performing as you expect, you might have a bad or failing drive. Most modern hard drives have built-in Self-Monitoring, Analysis and Reporting Technology ([SMART][8]). If your drive supports it, the _smartctl_ command can be used to query your hard drive for its internal statistics: +如果上述测试未按预期执行,则可能是驱动器出现坏块或故障。大多数现代硬盘都内置了自我监控、分析和报告技术([SMART][8])。如果你的驱动器支持它,`smartctl` 命令可用于查询你的硬盘驱动器的内部统计信息: ``` # smartctl --health /dev/sda @@ -363,21 +355,21 @@ If the above tests aren’t performing as you expect, you might have a bad or fa # smartctl -x /dev/sda ``` -Another way that you might be able to tune your PC for better performance is by changing your [I/O scheduler][9]. Linux systems support several I/O schedulers and the current default for Fedora systems is the [multiqueue][10] variant of the [deadline][11] scheduler. The default performs very well overall and scales extremely well for large servers with many processors and large disk arrays. There are, however, a few more specialized schedulers that might perform better under certain conditions. +另一种可以调整 PC 以获得更好性能的方法是更改 [I/O 调度程序][9]。Linux 系统支持多个 I/O 调度程序,Fedora 系统的当前默认值是 [deadline][11] 调度程序的 [multiqueue][10] 变体。默认情况下它的整体性能非常好,并且对于具有许多处理器和大型磁盘阵列的大型服服务器扩展性极为出色。但是,有一些更专业的调度程序在某些条件下可能表现更好。 -To view which I/O scheduler your drives are using, issue the following command: +要查看驱动器正在使用的 I/O 调度程序,请运行以下命令: ``` $ for i in /sys/block/sd?/queue/scheduler; do echo "$i: $(<$i)"; done ``` -You can change the scheduler for a drive by writing the name of the desired scheduler to the /sys/block//queue/scheduler file: +你可以通过将所需调度程序的名称写入 `/sys/block//queue/scheduler` 文件来更改驱动器的调度程序: ``` # echo bfq > /sys/block/sda/queue/scheduler ``` -You can make your changes permanent by creating a [udev rule][12] for your drive. The following example shows how to create a udev rule that will set all [rotational drives][13] to use the [BFQ][14] I/O scheduler: +你可以通过为驱动器创建 [udev 规则][12]来永久更改。以下示例显示如何创建将所有的[旋转式驱动器][13]设置为使用 [BFQ][14] I/O 调度程序的 udev 规则: ``` # cat << END > /etc/udev/rules.d/60-ioscheduler-rotational.rules @@ -385,7 +377,7 @@ ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue END ``` -Here is another example that sets all [solid-state drives][15] to use the [NOOP][16] I/O scheduler: +这是另一个设置所有的[固态驱动器][15]使用 [NOOP][16] I/O 调度程序的示例: ``` # cat << END > /etc/udev/rules.d/60-ioscheduler-solid-state.rules @@ -393,11 +385,7 @@ ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue END ``` -Changing your I/O scheduler won’t affect the raw throughput of your devices, but it might make your PC seem more responsive by prioritizing the bandwidth for the foreground tasks over the background tasks or by eliminating unnecessary block reordering. - -* * * - -_Photo by _[ _James Donovan_][17]_ on _[_Unsplash_][18]_._ +更改 I/O 调度程序不会影响设备的原始吞吐量,但通过优先考虑后台任务的带宽或消除不必要的块重新排序,可能会使你的 PC 看起来响应更快。 -------------------------------------------------------------------------------- @@ -405,7 +393,7 @@ via: https://fedoramagazine.org/check-storage-performance-with-dd/ 作者:[Gregory Bartholomew][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[wxy](https://github.com/wxy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e0f203d2be71249dbafac8b9346e65890c34090f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 06:58:23 +0800 Subject: [PATCH 323/951] PRF @wxy --- ...90510 Check storage performance with dd.md | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/translated/tech/20190510 Check storage performance with dd.md b/translated/tech/20190510 Check storage performance with dd.md index d1479023fc..0e37681dd8 100644 --- a/translated/tech/20190510 Check storage performance with dd.md +++ b/translated/tech/20190510 Check storage performance with dd.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Check storage performance with dd) @@ -14,7 +14,7 @@ 本文包含一些示例命令,向你展示如何使用 `dd` 命令*粗略*估计硬盘驱动器和 RAID 阵列的性能。准确的测量必须考虑诸如[写入放大][2]和[系统调用开销][3]之类的事情,本指南不会考虑这些。对于可能提供更准确结果的工具,你可能需要考虑使用 [hdparm][4]。 -为了分解与文件系统相关的性能问题,这些示例显示了如何通过直接读取和写入块设备来在块级测试驱动器和阵列的性能。**警告**:*写入*测试将会销毁针用来运行测试的块设备上的所有数据。**不要对包含你想要保留的数据的任何设备运行这些测试!** +为了分解与文件系统相关的性能问题,这些示例显示了如何通过直接读取和写入块设备来在块级测试驱动器和阵列的性能。**警告**:*写入*测试将会销毁用来运行测试的块设备上的所有数据。**不要对包含你想要保留的数据的任何设备运行这些测试!** ### 四个测试 @@ -58,8 +58,6 @@ 3. `MY_DISK=/dev/md/stripped`(用在示例 3-X 中) 4. `MY_DISK=/dev/md/mirrored`(用在示例 4-X 中) -本指南末尾提供了在 PC 上运行这些测试的视频演示。 - 首先将计算机置于*救援*模式,以减少后台服务的磁盘 I/O 随机影响测试结果的可能性。**警告**:这将关闭所有非必要的程序和服务。在运行这些命令之前,请务必保存你的工作。你需要知道 `root` 密码才能进入救援模式。`passwd` 命令以 `root` 用户身份运行时,将提示你(重新)设置 `root` 帐户密码。 ``` @@ -76,7 +74,7 @@ $ sudo -i # systemctl restart systemd-journald.service ``` -如果你有交换设备,可以暂时禁用它并用于执行以下测试: +如果你有交换设备,可以暂时禁用它并用于执行后面的测试: ``` # swapoff -a @@ -200,7 +198,7 @@ $ sudo -i 209715200 bytes (210 MB, 200 MiB) copied, 3.81475 s, 55.0 MB/s ``` -#### 示例 3-1 (从 RAID0 读取) +#### 示例 3-1 (从 RAID0 读取) ``` # mdadm --create /dev/md/stripped --homehost=any --metadata=1.0 --level=0 --raid-devices=2 $MY_DEVS @@ -337,17 +335,13 @@ $ sudo -i 示例 1-3、1-4、2-3 和 2-4 表明,当在同一驱动器上并行完成两次读取或写入时,每个进程的驱动器带宽大约为一半(60 MB/s)。 -3-X 示例显示了将两个驱动器放在 RAID0(数据条带化)阵列中的性能优势。在所有情况下,这些数字表明 RAID0 阵列的执行速度是任何一个驱动器能够独立提供的速度的两倍。权衡的是,丢失所有内容的可能性也是两倍,因为每个驱动器只包含一半的数据。一个三个驱动器阵列的执行速度是单个驱动器的三倍(所有驱动器规格都相同),但遭受[灾难性故障][6]的可能也是三倍。 +3-X 示例显示了将两个驱动器放在 RAID0(数据条带化)阵列中的性能优势。在所有情况下,这些数字表明 RAID0 阵列的执行速度是任何一个驱动器能够独立提供的速度的两倍。相应的是,丢失所有内容的可能性也是两倍,因为每个驱动器只包含一半的数据。一个三个驱动器阵列的执行速度是单个驱动器的三倍(所有驱动器规格都相同),但遭受[灾难性故障][6]的可能也是三倍。 4-X 示例显示 RAID1(数据镜像)阵列的性能类似于单个磁盘的性能,除了多个进程同时读取的情况(示例4-3)。在多个进程读取的情况下,RAID1 阵列的性能类似于 RAID0 阵列的性能。这意味着你将看到 RAID1 的性能优势,但仅限于进程同时读取时。例如,当你在前台使用 Web 浏览器或电子邮件客户端时,进程会尝试访问后台中的大量文件。RAID1 的主要好处是,[如果驱动器出现故障][7],你的数据不太可能丢失。 -### 视频演示 - -[使用 dd 测试存储吞吐量](https://youtu.be/wbLX239-ysQ) - ### 故障排除 -如果上述测试未按预期执行,则可能是驱动器出现坏块或故障。大多数现代硬盘都内置了自我监控、分析和报告技术([SMART][8])。如果你的驱动器支持它,`smartctl` 命令可用于查询你的硬盘驱动器的内部统计信息: +如果上述测试未按预期执行,则可能是驱动器坏了或出现故障。大多数现代硬盘都内置了自我监控、分析和报告技术([SMART][8])。如果你的驱动器支持它,`smartctl` 命令可用于查询你的硬盘驱动器的内部统计信息: ``` # smartctl --health /dev/sda @@ -355,7 +349,7 @@ $ sudo -i # smartctl -x /dev/sda ``` -另一种可以调整 PC 以获得更好性能的方法是更改 [I/O 调度程序][9]。Linux 系统支持多个 I/O 调度程序,Fedora 系统的当前默认值是 [deadline][11] 调度程序的 [multiqueue][10] 变体。默认情况下它的整体性能非常好,并且对于具有许多处理器和大型磁盘阵列的大型服服务器扩展性极为出色。但是,有一些更专业的调度程序在某些条件下可能表现更好。 +另一种可以调整 PC 以获得更好性能的方法是更改 [I/O 调度程序][9]。Linux 系统支持多个 I/O 调度程序,Fedora 系统的当前默认值是 [deadline][11] 调度程序的 [multiqueue][10] 变体。默认情况下它的整体性能非常好,并且对于具有许多处理器和大型磁盘阵列的大型服务器,其扩展性极为出色。但是,有一些更专业的调度程序在某些条件下可能表现更好。 要查看驱动器正在使用的 I/O 调度程序,请运行以下命令: @@ -369,7 +363,7 @@ $ for i in /sys/block/sd?/queue/scheduler; do echo "$i: $(<$i)"; done # echo bfq > /sys/block/sda/queue/scheduler ``` -你可以通过为驱动器创建 [udev 规则][12]来永久更改。以下示例显示如何创建将所有的[旋转式驱动器][13]设置为使用 [BFQ][14] I/O 调度程序的 udev 规则: +你可以通过为驱动器创建 [udev 规则][12]来永久更改它。以下示例显示了如何创建将所有的[旋转式驱动器][13]设置为使用 [BFQ][14] I/O 调度程序的 udev 规则: ``` # cat << END > /etc/udev/rules.d/60-ioscheduler-rotational.rules @@ -394,7 +388,7 @@ via: https://fedoramagazine.org/check-storage-performance-with-dd/ 作者:[Gregory Bartholomew][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 abc6b492accad769aa3f76016c4e21f21a169a57 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 06:59:09 +0800 Subject: [PATCH 324/951] PUB @wxy https://linux.cn/article-11195-1.html --- .../20190510 Check storage performance with dd.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190510 Check storage performance with dd.md (99%) diff --git a/translated/tech/20190510 Check storage performance with dd.md b/published/20190510 Check storage performance with dd.md similarity index 99% rename from translated/tech/20190510 Check storage performance with dd.md rename to published/20190510 Check storage performance with dd.md index 0e37681dd8..a8ba54c657 100644 --- a/translated/tech/20190510 Check storage performance with dd.md +++ b/published/20190510 Check storage performance with dd.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11195-1.html) [#]: subject: (Check storage performance with dd) [#]: via: (https://fedoramagazine.org/check-storage-performance-with-dd/) [#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) From 8586b0ae5f2b4d26bbf9f6b957dd81f7444c8aeb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 07:19:38 +0800 Subject: [PATCH 325/951] PRF @geekpi --- ...801 5 Free Partition Managers for Linux.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/translated/tech/20190801 5 Free Partition Managers for Linux.md b/translated/tech/20190801 5 Free Partition Managers for Linux.md index d85a0f21f9..2b4a67b218 100644 --- a/translated/tech/20190801 5 Free Partition Managers for Linux.md +++ b/translated/tech/20190801 5 Free Partition Managers for Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (5 Free Partition Managers for Linux) @@ -10,16 +10,17 @@ 5 个免费的 Linux 分区管理器 ====== -_ **以下是我们推荐的 Linux 分区工具。它们能让你删除、添加、微调 Linux 系统上的磁盘分区或分区大小。** _ +> 以下是我们推荐的 Linux 分区工具。它们能让你删除、添加、调整或缩放 Linux 系统上的磁盘分区。 -通常,你在安装操作系统时决定磁盘分区。但是,如果你需要在安装后的某个时间修改分区,该怎么办?你无法会到系统安装页面。因此,这就需要分区管理器(或准确地说是磁盘分区管理器)上场了。 +通常,你在安装操作系统时决定磁盘分区。但是,如果你需要在安装后的某个时间修改分区,该怎么办?你无法回到系统安装阶段。因此,这就需要分区管理器(或准确地说是磁盘分区管理器)上场了。 在大多数情况下,你无需单独安装分区管理器,因为它已预先安装。此外,值得注意的是,你可以选择基于命令行或有 GUI 的分区管理器。 -注意! +**注意!** -磁盘分区是一项有风险的任务。除非绝对必要,否则不要这样做。 -如果你使用的是基于命令行的分区工具,那么需要学习完成任务的命令。否则,你可能最终会擦除整个磁盘。 +> 磁盘分区是一项有风险的任务。除非绝对必要,否则不要这样做。 +> +> 如果你使用的是基于命令行的分区工具,那么需要学习完成任务的命令。否则,你可能最终会擦除整个磁盘。 ### Linux 中的 5 个管理磁盘分区的工具 @@ -35,7 +36,7 @@ _ **以下是我们推荐的 Linux 分区工具。它们能让你删除、添加 它会在启动时直接提示你以 root 用户进行身份验证。所以,你根本不需要在这里使用终端。身份验证后,它会分析设备,然后让你调整磁盘分区。如果发生数据丢失或意外删除文件,你还可以找到“尝试数据救援”的选项。 -[GParted][3] +- [GParted][3] #### GNOME Disks @@ -43,36 +44,35 @@ _ **以下是我们推荐的 Linux 分区工具。它们能让你删除、添加 一个基于 GUI 的分区管理器,随 Ubuntu 或任何基于 Ubuntu 的发行版(如 Zorin OS)一起出现。 -它能让你删除、添加、调整大小和微调分区。如果还有疑问,它甚至可以帮助你[在 Ubuntu 中格式化 USB][6]。 +它能让你删除、添加、缩放和微调分区。如果你遇到故障,它甚至可以[在 Ubuntu 中格式化 USB][6] 来帮助你救援机器。 你甚至可以借助此工具尝试修复分区。它的选项还包括编辑文件系统、创建分区镜像、还原镜像以及对分区进行基准测试。 -[GNOME Disks][7] +- [GNOME Disks][7] #### KDE Partition Manager ![Kde Partition Manager][8] -KDE Partition Manager 应该预装在基于 KDE 的 Linux 发行版上。但是,如果没有,你可以在软件中心搜索并轻松安装它。 +KDE Partition Manager 应该已经预装在基于 KDE 的 Linux 发行版上了。但是,如果没有,你可以在软件中心搜索并轻松安装它。 - -如果你没有预装它,那么可能会在尝试启动时通知你没有管理权限。没有管理员权限,你无法做任何事情。因此,在这种情况下,请输入以下命令: +如果你不是预装的,那么可能会在尝试启动时通知你没有管理权限。没有管理员权限,你无法做任何事情。因此,在这种情况下,请输入以下命令: ``` sudo partitionmanager ``` -它将扫描你的设备,然后你就可以创建、移动、复制、删除和调整分区大小。你还可以导入/导出分区表及使用其他许多调整选项。 +它将扫描你的设备,然后你就可以创建、移动、复制、删除和缩放分区。你还可以导入/导出分区表及使用其他许多调整选项。 -[KDE Partition Manager][9] +- [KDE Partition Manager][9] -#### Fdisk (命令行) +#### Fdisk(命令行) ![Fdisk][10] [fdisk][11] 是一个命令行程序,它在每个类 Unix 的系统中都有。不要担心,即使它需要你启动终端并输入命令,但这并不是很困难。但是,如果你在使用基于文本的程序时感到困惑,那么你应该继续使用上面提到的 GUI 程序。它们都做同样的事情。 -要启动 fdisk,你必须是 root 用户并指定管理分区的设备。以下是该命令的示例: +要启动 `fdisk`,你必须是 root 用户并指定管理分区的设备。以下是该命令的示例: ``` sudo fdisk /dev/sdc @@ -80,17 +80,17 @@ sudo fdisk /dev/sdc 你可以参考 [Linux 文档项目的维基页面][12]以获取命令列表以及有关其工作原理的更多详细信息。 -#### GNU Parted (命令行) +#### GNU Parted(命令行) ![Gnu Parted][13] -这是另一个在你 Linux 发行版上预安装的命令行程序。你需要输入下面的命令启动: +这是在你 Linux 发行版上预安装的另一个命令行程序。你需要输入下面的命令启动: ``` sudo parted ``` -**总结** +### 总结 我不会忘了说 [QtParted][15] 是分区管理器的替代品之一。但它已经几年没有维护,因此我不建议使用它。 @@ -103,7 +103,7 @@ via: https://itsfoss.com/partition-managers-linux/ 作者:[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 59c357a794eb649d30908e00da615a2ad8d05744 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 07:20:37 +0800 Subject: [PATCH 326/951] PUB @geekpi https://linux.cn/article-11196-1.html --- .../20190801 5 Free Partition Managers for Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190801 5 Free Partition Managers for Linux.md (98%) diff --git a/translated/tech/20190801 5 Free Partition Managers for Linux.md b/published/20190801 5 Free Partition Managers for Linux.md similarity index 98% rename from translated/tech/20190801 5 Free Partition Managers for Linux.md rename to published/20190801 5 Free Partition Managers for Linux.md index 2b4a67b218..09a078fed0 100644 --- a/translated/tech/20190801 5 Free Partition Managers for Linux.md +++ b/published/20190801 5 Free Partition Managers for Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11196-1.html) [#]: subject: (5 Free Partition Managers for Linux) [#]: via: (https://itsfoss.com/partition-managers-linux/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From e75ea45cf656db3941f1c35f5d234755f6f51156 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 7 Aug 2019 08:55:33 +0800 Subject: [PATCH 327/951] translated --- ...a New User Account is Created in System.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {sources => translated}/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md (56%) diff --git a/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md b/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md similarity index 56% rename from sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md rename to translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md index 684a940ac8..a176ca2b08 100644 --- a/sources/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md +++ b/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md @@ -7,34 +7,34 @@ [#]: via: (https://www.2daygeek.com/linux-bash-script-to-monitor-user-creation-send-email/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -Bash Script to Send a Mail When a New User Account is Created in System +在系统创建新用户时发送邮件的 Bash 脚本 ====== -There are many open source monitoring tools are currently available in market to monitor Linux systems performance. +目前市场上有许多开源监测工具可用于监控 Linux 系统的性能。 -It will send an email alert when the system reaches the specified threshold limit. +当系统到达指定的阈值时,它将发送邮件提醒。 -It monitors everything such as CPU utilization, Memory utilization, swap utilization, disk space utilization and much more. +它会监控 CPU 利用率、内存利用率、交换内存利用率、磁盘空间利用率等所有内容。 -But i don’t think they have an option to monitor a new user creation activity and alert when it’s happening. +但我不认为他们可以选择监控新用户创建活动,并发送提醒。 -If not, it doesn’t really matter as we can write our own bash script to achieve this. +如果没有,这并不重要,因为我们可以编写自己的 bash 脚本来实现这一点。 -We had added many useful shell scripts in the past. If you want to check those, navigate to the below link. +我们过去写了许多有用的 shell 脚本。如果要查看它们,请点击以下链接。 - * **[How to automate day to day activities using shell scripts?][1]** + * **[如何使用 shell 脚本自动化执行日常任务?][1]** -What the script does? It monitors **`/var/log/secure`**` ` file and alert admin when a new account is created in system. +脚本做了什么?它监测 **`/var/log/secure`** 文件,并在系统创建新帐户时提醒管理员。 -We can’t run this script frequently since user creation is not happening very often. However, I’m planning to run this script once in a day. +我们不会经常运行此脚本,因为创建用户不经常发生。但是,我打算一天运行一次这个脚本。 -So, that we can get a consolidated report about the user creation. +因此,我们可以获得有关用户创建的综合报告。 -If useradd string was found in “/var/log/secure” file for yesterday’s date, then the script will send an email alert to given email id with new users details. +如果在昨天的 “/var/log/secure” 中找到了 useradd 字符串,那么该脚本将向指定的邮箱发送邮件提醒,其中包含了新用户的详细信息。 -**Note:** You need to change the email id instead of ours. +**注意:**你需要更改邮箱而不是使用我们的邮箱。 ``` # vi /opt/scripts/new-user.sh @@ -77,13 +77,13 @@ rm $MESSAGE fi ``` -Set an executable permission to **`new-user.sh`**` ` file. +给 **`new-user.sh`** 添加可执行权限。 ``` $ chmod +x /opt/scripts/new-user.sh ``` -Finally add a cronjob to automate this. It will run everyday at 7'o clock. +最后添加一个 cron 任务来自动化执行它。它会在每天 7 点运行。 ``` # crontab -e @@ -91,9 +91,9 @@ Finally add a cronjob to automate this. It will run everyday at 7'o clock. 0 7 * * * /bin/bash /opt/scripts/new-user.sh ``` -Note: You will be getting an email alert everyday at 7 o'clock, which is for yesterday's log. +注意:你将在每天 7 点收到一封邮件提醒,但这是昨天的日志。 -**`Output:`**` ` You will be getting an email alert similar to below. +你将会看到类似下面的邮件提醒。 ``` # cat /tmp/logs.txt @@ -113,7 +113,7 @@ via: https://www.2daygeek.com/linux-bash-script-to-monitor-user-creation-send-em 作者:[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 f67aaf3f49881bc96999dd9fc2634b113beedce4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 7 Aug 2019 09:00:29 +0800 Subject: [PATCH 328/951] translating --- ...190805 4 cool new projects to try in COPR for August 2019.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md b/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md index c7a54360b4..7c1d986679 100644 --- a/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md +++ b/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 971129d61244af38dc3c8891fa3aed806b0c5a93 Mon Sep 17 00:00:00 2001 From: 0x996 Date: Wed, 7 Aug 2019 22:07:21 +1000 Subject: [PATCH 329/951] translated: 20171113 IT disaster recovery- Sysadmins vs. natural... --- ...- Sysadmins vs. natural disasters - HPE.md | 178 ------------------ ...- Sysadmins vs. natural disasters - HPE.md | 172 +++++++++++++++++ 2 files changed, 172 insertions(+), 178 deletions(-) delete mode 100644 sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md create mode 100644 translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md diff --git a/sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md b/sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md deleted file mode 100644 index 79bab4d116..0000000000 --- a/sources/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md +++ /dev/null @@ -1,178 +0,0 @@ -0x996 is translating -IT disaster recovery: Sysadmins vs. natural disasters | HPE -====== - -![](https://www.hpe.com/content/dam/hpe/insights/articles/2017/11/it-disaster-recovery-sysadmins-vs-natural-disasters/featuredStory/Sysadmins-vs-natural-disasters-1740.jpg.transform/nxt-1043x496-crop/image.jpeg) - -Businesses need to keep going even when faced with torrential flooding or earthquakes. Sysadmins who lived through Katrina, Sandy, and other disasters share real-world advice for anyone responsible for IT during an emergency. - -In terms of natural disasters, 2017 has been one heck of a year. Hurricanes Harvey, Irma, and Maria brought destruction to Houston, Puerto Rico, Florida, and the Caribbean. On top of that, wildfires burned out homes and businesses in the West. - -It'd be easy to respond with yet another finger-wagging article about [preparing for disasters][1]--and surely it's all good advice--but that doesn't help a network administrator cope with the soggy mess. Most of those well-meant suggestions also assume that the powers that be are cheerfully willing to invest money in implementing them. - -We're a little more interested in the real world. Instead, let's put that bad news to some good use. - -Case in point: One result of a natural disaster is that the boss may suddenly be willing to find budget for disaster recovery planning. As a New York area sysadmin puts it, "The [greatest benefit I found from Hurricane Sandy][2] is our client's interest in investing back into IT, so hopefully you will welcome bigger budgets as well." - -Don't expect that willingness to last long, though. Any sysadmin who'd like to suggest infrastructure improvements is urged to make hay while the sun shines. As another Sandy-survivor IT specialist ruefully remarks, "[Initial interest in IT spending lasted the calendar year for us][3]. By the following year, any plans that hadn't already been put in the works got put on the back burner due to 'budgetary constraints,' and then completely forgotten about by around 6 months later." - -It can help to remind management of the cold hard facts before they forget that bad natural disasters can happen to good companies. According to the Institute for Business & Home Safety, [25 percent of businesses that close after a natural disaster never reopen][4]. FEMA thinks that's optimistic. By its measure, "[40 percent of small businesses never reopen their doors][5] following a disaster." - -If you're a sysadmin, you can help save your business. Here are some of survivors' best ideas based on what they've learned from the past few natural disasters. - -### Have a plan - -When the lights flicker and the wind howls like a locomotive, it's time to put your business continuity and disaster recovery plans into operation. - -Too many sysadmins report that neither were in place when the storms came. That's not surprising. In 2014, the [Disaster Recovery Preparedness Council][6] found that [73 percent of surveyed businesses worldwide didn't have adequate disaster recovery plans][7]. - -"Adequate" is a key word. As a sysadmin on Reddit wrote in 2016, "[Our disaster plan is a disaster.][8] All our data is backed up to a storage area network [SAN] about 30 miles from here. We have no hardware to get it back online or have even our core servers up and running within a few days. We're a $4 billion a year company that won't spend a few $100K for proper equipment. Or even some servers at a data center. Our executive team said, 'Meh what are the odds of anything happening' when the hardware proposal was brought up." - -Another on the same thread put it more succinctly: "Currently my DR plan is to cry in a dark damp corner and hope nobody cared about anything that was lost." - -Get the report from 451 Research - Datacenter Modernization: Trends and Challenges - -[Transform with Hybrid IT][9] - -If you're crying, let's hope you aren't crying alone. Any disaster plan, even one devised by the IT department, has to ascertain that [you can communicate with humans][10], as sysadmin Jim Thompson learned during Katrina: "Make sure you have a plan to communicate with people. During a serious regional disaster, you will not be able to call anyone with a phone in the affected area code." - -One option that may appeal to the technically minded: [ham radio][11]. That [made a difference in Puerto Rico][12]. - -### Make a wish list - -The first step is recognizing the problem. "Many companies are not actually interested in disaster recovery, or they address it reluctantly," says [Joshua Brusse][13], a chief architect at [Micro Focus][14]. "Viewing disaster recovery as an aspect of business continuity is a different perspective. All companies deal with business continuity, so disaster recovery should be considered as part of that." - -Ensuring that there's an adequate disaster recovery and business continuity plan in place requires the IT department to document its needs. That's true even if--or particularly when--you don't get your way. As one sysadmin remarks, "I like to have a 'thought dump' location where any and all plans/ideas/improvements can be just dumped in with no limitations or restrictions. [This] is [especially helpful for when you propose a change][15], it gets shot down, and six months later that situation you warned about came up." Now you have everything prepared and can start the discussion: "As we discussed back in April…" - -So, what can you do when your executive team responds to the business continuity plan with "Meh what are the odds of anything happening?" Shockingly poor judgement as that is, one sysadmin suggests it's also completely normal behavior for the executive layer. In situations this dire, experienced sysadmins say document the events. Be clear that you told the executives what needed to be done and that [they refused to do so][16]. "The general idea is to have a paper trail long enough for them to hang themselves," the sysadmin adds. - -If that doesn't work, the experience of bringing back a flooded data center will serve you well in [a new job search][17]. - -### Protect the physical infrastructure - -"[Our office is an old decrepit building][18]," reported one sysadmin after Harvey hammered Houston. "We went into the building blind and the infrastructure in place was terrible. We literally just finished the last of the drops we needed in that building and now it's all under water." - -Nonetheless, if you want the data center to keep running--or to get back up and working after a storm--you need to ensure the facility can stand up to not only the kind of disasters expected in your area but the unexpected ones as well. One reason Sandy was devastating is that the New York area wasn't prepped for that sort of weather system. A sysadmin in San Francisco knows why it's important to ensure the company's servers are in a building that can withstand a magnitude 7 earthquake. A business in St. Louis knows how to respond to tornadoes. But you should prepare for every eventuality: a tornado in California, an earthquake in Missouri, or [a zombie apocalypse][19] (which also gives you justification for a chainsaw in the IT budget). - -In Houston's case, [most data centers stayed up][20] and running because they were built to withstand storms and floods. [Data Foundry][21]'s chief technology officer, Edward Henigin, says of one of its data centers, "Houston 2 is a purpose-built facility designed to withstand Category 5 hurricane wind speeds. This site has not lost utility power, and we have not had to transition to our backup generators." - -That's the good news. The bad news is, as superstorm Sandy showed in 2012, if your [data center isn't ready to handle flooding][22], you're in for a world of trouble. Customers of one failed data center, [Datagram][23], included high-profile sites Gawker, Gizmodo, and Buzzfeed. - -Of course, sometimes there's nothing you can do. As one San Juan, Puerto Rico, sysadmin sadly wrote when Irma came through, "Generator took a dump. Server room running on batteries but no [air conditioning]. [Bye bye servers][24]." The sysadmin couldn't fail over to disaster recovery because the MPLS (Multiprotocol Label Switching) line was also down: "Fun day." - -To sum up, IT professionals need to know their area, know their risks, and place their servers in data centers that can handle the local conditions. - -### An argument for the cloud - -The best way to avoid an IT data center failure when a storm rolls through is to make sure the backup data center is elsewhere. That requires sensible decision-making in locating them. Your backup data center should not be in a region that can be affected by the same natural disaster; place your resources in more than one availability zone. Think backup and primary along the same fault line in an earthquake or vulnerable to flooding from linked water sources. - -Some sysadmins [use the cloud for redundancy][25]. For example, Microsoft Azure storage is always replicated to ensure durability and high availability. Depending on the options you choose, Azure replication copies your data, either within the same data center or to a second data center. Most public clouds offer similar automatic backup services to help ensure data stays safe no matter what happens to your local data center--unless your cloud provider is in the same storm path. - -Expensive? Yes. As expensive as being down for a day or two? No. - -Don't trust the public cloud? Consider a colocation (colo) service. With colo, you still own your hardware and run your own applications, but the hardware can be miles away from trouble. For instance, during Harvey, one company "virtually" moved all its resources from Houston to its colo in Austin, Texas. But those local data centers and colocation sites need to be ready to handle disasters; it's one of the criteria you should use in choosing them. For example, a Seattle sysadmin looking for colocation space considered, "It was all about their earthquake and drought protection (overbuilt foundations and water trucks to feed the chillers)." - -### When the lights go out - -The most [common cause of declared disaster is power failures][26], as Forrester Research analyst Rachel Dines reported in a survey for [Disaster Recovery Journal][27]. While you can work against those in ordinary circumstances, hurricanes, fires, and floods test the equipment past its limits. - -One sysadmin's tongue-in-cheek plan? "Turn off what you can before the UPS dies, let crash what you can't. Then, [drink until power comes back on][28]." - -A more serious plan driven by IT staff in the wake of 2016's Delta and Southwest outages was for a managed service provider to [deploy uninterruptible power supplies][29] to its clients: "On the critical pieces, we use a combination of SNMP signalling and PowerChute Network Shutdown (PCNS) clients to shut things down in the event of a power failure. Bringing things back up, well... that depends on the client. Some are automatic, and some require manual intervention." - -Another approach is to support the data center with utility power from two substations. For example, the [Seattle Westin Building data cente][30]r has multiple 13.4-kilovolt utility feeds, diverse power substations, and multiple 480-volt three-phase transformer vaults. - -Serious power failure prevention systems are not "one size fits all" units. Sysadmins should requisition a [custom-designed diesel generator for the data center][31]. Besides being tuned for your specific needs, generators must be capable of jumping to full speed in moments and accept full-power loads without impacting the load performance. - -These generators must also be protected. For example, putting your generators on the ground floor in a flood plain is not a smart idea. The data centers on Broad Street in New York had fits during Superstorm Sandy because the backup generators' fuel tanks were in the basement--and they were flooded out. While a ["bucket brigade" relaying 5-gallon buckets of diesel fuel up 17 flights of stairs to the generator][32] kept [Peer 1 Hosting][33] in business, this is not a viable business continuity plan. - -As most data center professionals know, if you have time--say, a hurricane is a day away--make sure your generator is working, fully fueled up, and is ready to kick on when the power lines get cut. Of course, you should have been testing your generator every month anyway. You have been doing that? Right? Right! - -### Testing your confidence in backups - -Ordinary users almost never make backups, and fewer still check to make sure their backups are actually any good. Sysadmins know better. - -Some [IT departments are looking into moving their backups to the cloud][34]. But some sysadmins aren't sold on it yet--for good reason. One recently reported, "After [five solid days of restoring [400 GB of] data from Amazon Glacier][35], I owe Amazon nearly $200 in data transfer fees and [I] still have an inconsistent restore state and [am] missing 100 GB of my files." - -As a result, some sysadmins still prefer tape backup. Tape is certainly not fashionable, but as operating system guru Andrew S. Tanenbaum says, "[Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway][36]." - -These days, tape can handle 10 terabytes per tape; there are experiments underway that take tape up to 200 TB. Technologies such as the [Linear Tape File System][37] enable you to read tape data as if it were just another network drive. - -Yet for many, tape is the [option of absolute last resort][38]. That's fine, because backup should have plenty of options. In this case, says one sysadmin, "we would have to fail with: [Windows] server level VSS [Volume Shadow Storage] snapshots, SAN level volume snapshots, and SAN level offsite archived snapshot copies. But if, hypothetically, something happened that nuked our VM, the SAN, and the backup SAN, we could still get the tapes back and recover the data." - -When trouble is coming your way, use replication tools such as [Veeam][39], which create a virtual machine replica of your servers. If there's a failure, the replicas are automatically spun up. No fuss, no muss, as one sysadmin says in the popular sysadmin post, "[I love you Veeam.][40]" - -### Network? What network? - -Of course, no cloud, no colo, and no remote data center helps you if staff can't reach their services. You don't need a natural disaster to justify redundant Internet connections. All it takes is a backhoe cable cut or severed fiber lines to give you a bad day at work. - -"Ideally," one sysadmin wisely observes, "you should have [two wired Internet connections to two ISPs with separate infrastructures][41]. You do not want to find out both ISPs are dependent on the same fiber cable, for example. Nor do you want to use two local ISPs and find out they are both dependent on Level 3 for their upstream bandwidth." - -Smart sysadmins know their corporate Internet connections [must be business-class connections with a service-level agreement][42] (SLA) that includes a "time to repair" clause. Better still is to get a [dedicated Internet access][43] (DIA) circuit. Technically, they're no different than any other Internet connection. The difference is that a DIA is not a "best effort" connection. Instead, you get a specified amount of bandwidth that is dedicated for your use and comes with a SLA. They're not cheap, but as the saying goes, "Fast. Reliable. Cheap. Pick any two." When it's your business on the line and a storm is coming your way, "reliable" has to be one of your two picks. - -### When the storm skies clear - -You can't prepare for all disasters, but you can plan for many of them. With a well-thought-out and tested disaster recovery and business continuity plan that is followed to the letter, your company can stay afloat while your rivals are drowning. - -### Sysadmins vs. disasters: Lessons for leaders - - * How many times must your IT staff say this: Don't just make backups. Test backups. - * No power? No company. Make certain your servers' emergency power is sufficient for your needs and work. - * If your company survives a natural disaster--or dodges one--wise sysadmins know that this is the time to ask management for the disaster recovery budget they've been postponing. Because next time, you might not be so lucky. - - - --------------------------------------------------------------------------------- - -via: https://www.hpe.com/us/en/insights/articles/it-disaster-recovery-sysadmins-vs-natural-disasters-1711.html - -作者:[Steven-J-Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.hpe.com/us/en/insights/contributors/steven-j-vaughan-nichols.html -[1]:https://www.hpe.com/us/en/insights/articles/what-is-disaster-recovery-really-1704.html -[2]:https://www.reddit.com/r/sysadmin/comments/6wricr/dear_houston_tx_sysadmins/ -[3]:https://www.reddit.com/r/sysadmin/comments/6wricr/dear_houston_tx_sysadmins/dma6gse/ -[4]:https://disastersafety.org/wp-content/uploads/open-for-business-english.pdf -[5]:https://www.fema.gov/protecting-your-businesses -[6]:http://drbenchmark.org/about-us/our-council/ -[7]:https://www.prnewswire.com/news-releases/global-benchmark-study-reveals-73-of-companies-are-unprepared-for-disaster-recovery-248359051.html -[8]:https://www.reddit.com/r/sysadmin/comments/3cob1k/what_does_your_disaster_recovery_plan_look_like/csxh8sn/ -[9]:https://www.hpe.com/us/en/resources/servers/datacenter-trends-challenges.html?jumpid=in_insights~510287587~451research_datacenter~sjvnSysadmin -[10]:http://www.theregister.co.uk/2015/07/12/surviving_hurricane_katrina -[11]:https://theprepared.com/guides/beginners-guide-amateur-ham-radio-preppers/ -[12]:http://www.npr.org/2017/09/29/554600989/amateur-radio-operators-stepped-in-to-help-communications-with-puerto-rico -[13]:http://www8.hp.com/us/en/software/joshua-brusse.html -[14]:https://www.microfocus.com/ -[15]:https://www.reddit.com/r/sysadmin/comments/6wricr/dear_houston_tx_sysadmins/dma87xv/ -[16]:https://www.hpe.com/us/en/insights/articles/my-boss-asked-me-to-do-what-how-to-handle-worrying-work-requests-1710.html -[17]:https://www.hpe.com/us/en/insights/articles/sysadmin-survival-guide-1707.html -[18]:https://www.reddit.com/r/sysadmin/comments/6wk92q/any_houston_admins_executing_their_dr_plans_this/dm8xj0q/ -[19]:https://community.spiceworks.com/how_to/1243-ensure-your-dr-plan-is-ready-for-a-zombie-apocolypse -[20]:http://www.datacenterdynamics.com/content-tracks/security-risk/houston-data-centers-withstand-hurricane-harvey/98867.article -[21]:https://www.datafoundry.com/ -[22]:http://www.datacenterknowledge.com/archives/2012/10/30/major-flooding-nyc-data-centers -[23]:https://datagram.com/ -[24]:https://www.reddit.com/r/sysadmin/comments/6yjb3p/shutting_down_everything_blame_irma/ -[25]:https://www.hpe.com/us/en/insights/articles/everything-you-need-to-know-about-clouds-and-hybrid-it-1701.html -[26]:https://www.drj.com/images/surveys_pdf/forrester/2011Forrester_survey.pdf -[27]:https://www.drj.com -[28]:https://www.reddit.com/r/sysadmin/comments/4x3mmq/datacenter_power_failure_procedures_what_do_yours/d6c71p1/ -[29]:https://www.reddit.com/r/sysadmin/comments/4x3mmq/datacenter_power_failure_procedures_what_do_yours/ -[30]:https://cloudandcolocation.com/datacenters/the-westin-building-seattle-data-center/ -[31]:https://www.techrepublic.com/article/what-to-look-for-in-a-data-center-backup-generator/ -[32]:http://www.datacenterknowledge.com/archives/2012/10/31/peer-1-mobilizes-diesel-bucket-brigade-at-75-broad -[33]:https://www.cogecopeer1.com/ -[34]:https://www.reddit.com/r/sysadmin/comments/7a6m7n/aws_glacier_archival/ -[35]:https://www.reddit.com/r/sysadmin/comments/63mypu/the_dangers_of_cloudberry_and_amazon_glacier_how/ -[36]:https://en.wikiquote.org/wiki/Andrew_S._Tanenbaum -[37]:http://www.snia.org/ltfs -[38]:https://www.reddit.com/r/sysadmin/comments/5visaq/backups_how_many_of_you_still_have_tapes/de2d0qm/ -[39]:https://helpcenter.veeam.com/docs/backup/vsphere/failover.html?ver=95 -[40]:https://www.reddit.com/r/sysadmin/comments/5rttuo/i_love_you_veeam/ -[41]:https://www.reddit.com/r/sysadmin/comments/5rmqfx/ars_surviving_a_cloudbased_disaster_recovery_plan/dd90auv/ -[42]:https://www.hpe.com/us/en/insights/articles/how-do-you-evaluate-cloud-service-agreements-and-slas-very-carefully-1705.html -[43]:http://www.e-vergent.com/what-is-dedicated-internet-access/ diff --git a/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md b/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md new file mode 100644 index 0000000000..b6d44132d4 --- /dev/null +++ b/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md @@ -0,0 +1,172 @@ +IT 灾备:系统管理员对抗自然灾害 | HPE +====== + +![](https://www.hpe.com/content/dam/hpe/insights/articles/2017/11/it-disaster-recovery-sysadmins-vs-natural-disasters/featuredStory/Sysadmins-vs-natural-disasters-1740.jpg.transform/nxt-1043x496-crop/image.jpeg) + +面对倾泻的洪水或地震时业务需要继续运转。在飓风卡特里娜、桑迪和其他灾难中幸存下来的系统管理员向在紧急状况下负责 IT 的人们分享真实世界中的建议。 + +说到自然灾害,2017 年可算是多灾多难。飓风哈维,厄玛和玛莉亚给休斯顿,波多黎各,弗罗里达和加勒比造成了严重破坏。此外,西部的野火将多处住宅和商业建筑付之一炬。 + +再来一篇关于[有备无患][1]的警示文章——当然其中都是好的建议——是很简单的,但这无法帮助网络管理员应对湿漉漉的烂摊子。那些善意的建议中大多数都假定掌权的人乐于投入资金来实施这些建议。 + +我们对真实世界更感兴趣。不如让我们来充分利用这些坏消息。 + +一个很好的例子:自然灾害的一个后果是老板可能突然愿意给灾备计划投入预算。如同一个纽约地区的系统管理员所言,“[我发现飓风桑迪的最大好处][2]是我们的客户对 IT 投资更有兴趣了,但愿你也能得到更多预算。” + +不过别指望这种意愿持续很久。任何想提议改进基础设施的系统管理员最好趁热打铁。如同另一位飓风桑迪中幸存下来的 IT 专员懊悔地提及那样,“[对 IT 开支最初的兴趣持续到当年为止][3]。到了第二年,任何尚未开工的计划都因为‘预算约束’被搁置了,大约 6 个月之后则完全被遗忘。” + +在管理层忘记恶劣的自然灾害也可能降临到好公司头上之前提醒他们这点会有所帮助。根据商业和家庭安全协会Institute for Business & Home Safety的说法,[自然灾害后歇业的公司中 25% 再也没能重新开业][4]。联邦紧急事务管理署FEMA认为这过于乐观。根据他们的统计,“灾后 [40% 的小公司再也没能重新开门营业][5]。” + +如果你是个系统管理员,你能帮忙挽救你的公司。这里有一些幸存者的最好的主意,这些主意是基于他们从过去几次自然灾害中得到的经验。 + +### 制订一个计划 + +当灯光忽明忽暗,狂风象火车机车一样怒号时,就该启动你的业务持续计划和灾备计划了。 + +有太多的系统管理员报告当暴风雨来临时这两个计划中一个也没有。这并不令人惊讶。2014 年[灾备预备状态委员会Disaster Recovery Preparedness Council][6]发现[世界范围内被调查的公司中有 73% 没有足够的灾备计划][7]。 + +“足够”是关键词。正如一个系统管理员2016年在 Reddit 上写的那样,“[我们的灾备计划就是一场灾难。][8]我们所有的数据都备份在离这里大约 30 英里的一个存储区域网络SAN。我们没有将数据重新上线的硬件,甚至好几天过去了都没能让核心服务器启动运行起来。我们是个年营收 40 亿美元的公司,却不愿为适当的设备投入几十万美元,或是在数据中心添置几台服务器。当添置硬件的提案被提出的时候,我们的管理层说,‘嗐,碰到这种事情的机会能有多大呢’。” + +同一个帖子中另一个人说得更简洁:“眼下我的灾备计划只能在黑暗潮湿的角落里哭泣,但愿没人在乎损失的任何东西。” + +如果你在哭泣,但愿你至少不是独自流泪。任何灾备计划,即便是 IT 部门制订的灾备计划,必须确定[你能跟别人通讯][10],如同系统管理员 Jim Thompson 从卡特里娜飓风中得到的教训:“确保你有一个与人们通讯的计划。在一场严重的区域性灾难期间,你将无法给身处灾区的任何人打电话。” + +有一个选择可能会让有技术头脑的人感兴趣:[业余电台ham radio][11]。[它在波多黎各发挥了巨大作用][12]。 + +### 列一个愿望清单 + +第一步是承认问题。“许多公司实际上对灾备计划不感兴趣,或是消极对待”,[Micro Focus][14] 的首席架构师 [Joshua Focus][13] 说。“将灾备看作业务持续性的一个方面是种不同的视角。所有公司都要应对业务持续性,所以灾备应被视为业务持续性的一部分。” + +IT 部门需要将其需求书面化以确保适当的灾备和业务持续性计划。即使是你不知道如何着手,或尤其是这种时候,也是如此。正如一个系统管理员所言,“我喜欢有一个‘想法转储’,让所有计划,点子,改进措施毫无保留地提出来。[这][对一类情况尤其有帮助,即当你提议变更][15],并付诸实施,接着 6 个月之后你警告过的状况就要来临。”现在你做好了一切准备并且可以开始讨论:“如同我们之前在 4 月讨论过的那样……” + +因此,当你的管理层对业务持续性计划回应道“嗐,碰到这种事的机会能有多大呢?”的时候你能做些什么呢?有个系统管理员称这也完全是管理层的正常行为。在这种糟糕的处境下,老练的系统管理员建议用书面形式把这些事情记录下来。记录应清楚表明你告知管理层需要采取的措施,且[他们拒绝采纳建议][16]。“总的来说就是有足够的书面材料能让他们搓成一根绳子上吊,”该系统管理员补充道。 + +如果那也不起作用,恢复一个被洪水淹没的数据中心的相关经验对你[找个新工作][17]是很有帮助的。 + +### 保护有形的基础设施 + +“[我们的办公室是幢摇摇欲坠的建筑][18],”飓风哈维重创休斯顿之后有个系统管理员提到。“我们盲目地进入那幢建筑,现场的基础设施糟透了。正是我们给那幢建筑里带去了最不想要的一滴水,现在基础设施整个都沉在水下了。” + +尽管如此,如果你想让数据中心继续运转——或在暴风雨过后恢复运转——你需要确保该场所不仅能经受住你所在地区那些意料中的灾难,而且能经受住那些意料之外的灾难。一个旧金山的系统管理员知道为什么重要的是确保公司的服务器安置在可以承受里氏 7 级地震的建筑内。一家圣路易斯的公司知道如何应对龙卷风。但你应当为所有可能发生的事情做好准备:加州的龙卷风,密苏里州的地震,或[僵尸末日][19](给你在 IT 预算里增加一把链锯提供了充分理由)。 + +在休斯顿的情况下,[多数数据中心保持运转][20],因为它们是按照抵御暴风雨和洪水的标准建造的。[Data Foundry][21] 的首席技术官 Edward Henigin 说他们公司的数据中心之一,“专门建造的休斯顿 2 号的设计能抵御 5 级飓风的风速。这个场所的公共供电没有中断,我们得以避免切换到后备发电机。” + +那是好消息。坏消息是伴随着超级飓风桑迪于2012年登场,如果[你的数据中心没准备好应对洪水][22],你会陷入一个麻烦不断的世界。一个不能正常运转的数据中心 [Datagram][23] 服务的客户包括 Gawker,Gizmodo 和 Buzzfeed 等知名网站。 + +当然,有时候你什么也做不了。正如某个波多黎各圣胡安的系统管理员在飓风厄玛扫过后悲伤地写到,“发电机没油了。服务器机房靠电池在运转但是没有[空调]。[永别了,服务器][24]。”由于 MPLSMultiprotocol Lable Switching 线路亦中断,该系统管理员没法切换到灾备措施:“多么充实的一天。” + +总而言之,IT 专业人士需要了解他们所处的地区,了解他们面临的风险并将他们的服务器安置在能抵御当地自然灾害的数据中心内。 + +### 关于云的争议 + +当暴风雨席卷一切时避免 IT 数据中心失效的最佳方法就是确保灾备数据中心在其他地方。选择地点时需要审慎的决策。你的灾备数据中心不应在会被同一场自然灾害影响到的地域region;你的资源应安置在多个可用区availability zone内。考虑一下主备数据中心位于一场地震中的同一条断层带上,或是主备数据中心易于受互通河道导致的洪灾影响这类情况。 + +有些系统管理员[利用云作为冗余设施][25]。例如,总是用微软 Azure 云存储服务保存副本以确保持久性和高可用性。根据你的选择,Azure 复制功能将你的数据要么拷贝到同一个数据中心要么拷贝到另一个数据中心。多数公有云提供类似的自动备份服务以确保数据安全,不论你的数据中心发生什么情况——除非你的云服务供应商全部设施都在暴风雨的行进路径上。 + +昂贵么?是的。跟业务中断 1、2 天一样昂贵么?并非如此。 + +信不过公有云?可以考虑 colocolocation 服务。有了 colo,你依旧拥有你的硬件,运行你自己的应用,但这些硬件可以远离麻烦。例如飓风哈维期间,一家公司“虚拟地”将它的资源从休斯顿搬到了其位于德克萨斯奥斯汀的 colo。但是那些本地数据中心和 colo 场所需要准备好应对灾难;这点是你选择场所时要考虑的一个因素。举个例子,一个寻找 colo 场所的西雅图系统管理员考虑的“全都是抗震和旱灾应对措施(加固的地基以及补给冷却系统的运水卡车)。” + +### 周围一片黑暗时 + +正如 Forrester Research 的分析师 Rachel Dines 在一份为[灾备期刊][27]所做的调查中报告的那样,宣布的灾难中[最普遍的原因就是断电][26]。尽管你能应对一般情况下的断电,飓风、火灾和洪水的考验会超越设备的极限。 + +某个系统管理员挖苦式的计划是什么呢?“趁 UPS 完蛋之前把你能关的机器关掉,不能关的就让它崩溃咯。然后,[喝个痛快直到供电恢复][28]。” + +在 2016 年德尔塔和西南航空停电事故之后,IT 员工驱动的一个更加严肃的计划是由一个有管理的服务供应商为其客户[部署不间断电源][29]:“对于至关重要的部分,在供电中断时我们结合使用简单网络管理协议SNMP信令和 PowerChute 网络关机PowerChute Nrework Shutdown客户端来关闭设备。至于重新开机,那取决于客户。有些是自动启动,有些则需要人工干预。” + +另一种做法是用来自两个供电所的供电线路支持数据中心。例如,[西雅图威斯汀大厦数据中心][30]有来自不同供电所的多路 13.4 千伏供电线路,以及多个 480 伏三相变电箱。 + +预防严重断电的系统不是“通用的”设备。系统管理员应当[为数据中心请求一台定制的柴油发电机][31]。除了按你特定的需求调整,发电机必须能迅速跳至全速运转并承载全部电力负荷而不致影响系统负载性能。” + +这些发电机也必须加以保护。例如,将你的发电机安置在泛洪区的一楼就不是个聪明的主意。位于纽约百老街Broad street的数据中心在超级飓风桑迪期间就是类似情形,备用发电机的燃料油桶在地下室——并且被水淹了。尽管一场[“人力接龙”用容量 5 加仑的水桶将柴油输送到 17 段楼梯之上的发电机][32]使 [Peer 1 Hosting][33] 得以继续运营,这不是一个切实可行的业务持续计划。 + +正如多数数据中心专家所知那样,如果你有时间——假设一个飓风离你有一天的距离——确保你的发电机正常工作,加满油,准备好当供电线路被刮断时立即开启,不管怎样你之前应当每月测试你的发电机。你之前是那么做的,是吧?是就好! + +### 测试你对备份的信心 + +普通用户几乎从不备份,检查备份是否实际完好的就更少了。系统管理员对此更加了解。 + +有些 [IT 部门在寻求将他们的备份迁移到云端][34]。但有些系统管理员仍对此不买账——他们有很好的理由。最近有人报告,“在用了整整 5 天[从亚马逊 Glacier 恢复了 [400 GB] 数据][35]之后,我欠了亚马逊将近 200 美元的传输费,并且[我还是]处于未完全恢复状态,还差大约 100 GB 文件。 + +结果是有些系统管理员依然喜欢磁带备份。磁带肯定不够时髦,但正如操作系统专家 Andrew S. Tanenbaum 说的那样,“[永远不要低估一辆装满磁带在高速上飞驰的旅行车的带宽][36]。” + +目前每盘磁带可以存储 10 TB 数据;有的进行中的实验可在磁带上存储高达 200 TB 数据。诸如[线性磁带文件系统Linear Tape File System][37]之类的技术允许你象访问网络硬盘一样读取磁带数据。 + +然而对许多人而言,磁带[绝对是最后选择的手段][38]。没关系,因为备份应该有大量的可选方案。在这种情况下,一个系统管理员说到,“故障时我们会用这些方法(恢复备份):[Windows] 服务器层面的 VSS [Volume Shadow Storage] 快照,存储区域网络SAN层面的卷快照,以及存储区域网络层面的异地归档快照。但是万一有什么事情发生并摧毁了我们的虚拟机,存储区域网络和备份存储区域网络,我们还是可以取回磁带并恢复数据。” + +当麻烦即将到来时,可使用副本工具如 [Veeam][39],它会为你的服务器创建一个虚拟机副本。若出现故障,副本会自动启动。没有麻烦,没有手忙脚乱,正如某个系统管理员在这个流行的系统管理员帖子中所说,“[我爱你 Veeam][40]。” + +### 网络?什么网络? + +当然,如果员工们无法触及他们的服务,没有任何云,colo 和远程数据中心能帮到你。你不需要一场自然灾害来证明冗余互联网连接的正确性。只需要一台挖断线路的挖掘机或断掉的光缆就能让你在工作中渡过糟糕的一天。 + +“理想状态下”,某个系统管理员明智地观察到,“你应该有[两路互联网接入线路连接到有独立基础设施的两个 ISP][41]。例如,你不希望两个 ISP 都依赖于同一根光缆。你也不希望采用两家本地 ISP,并发现他们的上行带宽都依赖于同一家骨干网运营商。” + +聪明的系统管理员知道他们公司的互联网接入线路[必须是商业级别的,带有服务等级协议service-level agreement(SLA)][43],其中包含“修复时间”条款。或者更好的是采用互联网接入专线dedicated Internet access。技术上这与任何其他互联网接入方式没有区别。区别在于互联网接入专线不是一种“尽力而为”的接入方式,而是你会得到明确规定的专供你使用的带宽并附有服务等级协议。这种专线不便宜,但正如一句格言所说的那样,“速度,可靠性,便宜,只能挑两个。”当你的业务跑在这条线路上并且一场暴风雨即将来袭,“可靠性”必须是你挑的两个之一。 + +### 晴空重现之时 + +你没法准备应对所有自然灾害,但你可以为其中很多做好计划。有一个深思熟虑且经过测试的灾备和业务持续计划,并逐字逐句严格执行,当竞争对手溺毙的时候,你的公司可以幸存下来。 + +### 系统管理员对抗自然灾害:给领导者的教训 + + * 你的 IT 员工得说多少次:不要仅仅备份,还得测试备份? + * 没电就没公司。确保你的服务器有足够的应急电源来满足业务需要,并确保它们能正常工作。 + * 如果你的公司在一场自然灾害中幸存下来——或者避开了灾害——明智的系统管理员知道这就是向管理层申请被他们推迟的灾备预算的时候了。因为下次你就未必有这么幸运了。 + + +-------------------------------------------------------------------------------- + +via: https://www.hpe.com/us/en/insights/articles/it-disaster-recovery-sysadmins-vs-natural-disasters-1711.html + +作者:[Steven-J-Vaughan-Nichols][a] +译者:[译者ID](https://github.com/0x996) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.hpe.com/us/en/insights/contributors/steven-j-vaughan-nichols.html +[1]:https://www.hpe.com/us/en/insights/articles/what-is-disaster-recovery-really-1704.html +[2]:https://www.reddit.com/r/sysadmin/comments/6wricr/dear_houston_tx_sysadmins/ +[3]:https://www.reddit.com/r/sysadmin/comments/6wricr/dear_houston_tx_sysadmins/dma6gse/ +[4]:https://disastersafety.org/wp-content/uploads/open-for-business-english.pdf +[5]:https://www.fema.gov/protecting-your-businesses +[6]:http://drbenchmark.org/about-us/our-council/ +[7]:https://www.prnewswire.com/news-releases/global-benchmark-study-reveals-73-of-companies-are-unprepared-for-disaster-recovery-248359051.html +[8]:https://www.reddit.com/r/sysadmin/comments/3cob1k/what_does_your_disaster_recovery_plan_look_like/csxh8sn/ +[9]:https://www.hpe.com/us/en/resources/servers/datacenter-trends-challenges.html?jumpid=in_insights~510287587~451research_datacenter~sjvnSysadmin +[10]:http://www.theregister.co.uk/2015/07/12/surviving_hurricane_katrina +[11]:https://theprepared.com/guides/beginners-guide-amateur-ham-radio-preppers/ +[12]:http://www.npr.org/2017/09/29/554600989/amateur-radio-operators-stepped-in-to-help-communications-with-puerto-rico +[13]:http://www8.hp.com/us/en/software/joshua-brusse.html +[14]:https://www.microfocus.com/ +[15]:https://www.reddit.com/r/sysadmin/comments/6wricr/dear_houston_tx_sysadmins/dma87xv/ +[16]:https://www.hpe.com/us/en/insights/articles/my-boss-asked-me-to-do-what-how-to-handle-worrying-work-requests-1710.html +[17]:https://www.hpe.com/us/en/insights/articles/sysadmin-survival-guide-1707.html +[18]:https://www.reddit.com/r/sysadmin/comments/6wk92q/any_houston_admins_executing_their_dr_plans_this/dm8xj0q/ +[19]:https://community.spiceworks.com/how_to/1243-ensure-your-dr-plan-is-ready-for-a-zombie-apocolypse +[20]:http://www.datacenterdynamics.com/content-tracks/security-risk/houston-data-centers-withstand-hurricane-harvey/98867.article +[21]:https://www.datafoundry.com/ +[22]:http://www.datacenterknowledge.com/archives/2012/10/30/major-flooding-nyc-data-centers +[23]:https://datagram.com/ +[24]:https://www.reddit.com/r/sysadmin/comments/6yjb3p/shutting_down_everything_blame_irma/ +[25]:https://www.hpe.com/us/en/insights/articles/everything-you-need-to-know-about-clouds-and-hybrid-it-1701.html +[26]:https://www.drj.com/images/surveys_pdf/forrester/2011Forrester_survey.pdf +[27]:https://www.drj.com +[28]:https://www.reddit.com/r/sysadmin/comments/4x3mmq/datacenter_power_failure_procedures_what_do_yours/d6c71p1/ +[29]:https://www.reddit.com/r/sysadmin/comments/4x3mmq/datacenter_power_failure_procedures_what_do_yours/ +[30]:https://cloudandcolocation.com/datacenters/the-westin-building-seattle-data-center/ +[31]:https://www.techrepublic.com/article/what-to-look-for-in-a-data-center-backup-generator/ +[32]:http://www.datacenterknowledge.com/archives/2012/10/31/peer-1-mobilizes-diesel-bucket-brigade-at-75-broad +[33]:https://www.cogecopeer1.com/ +[34]:https://www.reddit.com/r/sysadmin/comments/7a6m7n/aws_glacier_archival/ +[35]:https://www.reddit.com/r/sysadmin/comments/63mypu/the_dangers_of_cloudberry_and_amazon_glacier_how/ +[36]:https://en.wikiquote.org/wiki/Andrew_S._Tanenbaum +[37]:http://www.snia.org/ltfs +[38]:https://www.reddit.com/r/sysadmin/comments/5visaq/backups_how_many_of_you_still_have_tapes/de2d0qm/ +[39]:https://helpcenter.veeam.com/docs/backup/vsphere/failover.html?ver=95 +[40]:https://www.reddit.com/r/sysadmin/comments/5rttuo/i_love_you_veeam/ +[41]:https://www.reddit.com/r/sysadmin/comments/5rmqfx/ars_surviving_a_cloudbased_disaster_recovery_plan/dd90auv/ +[42]:https://www.hpe.com/us/en/insights/articles/how-do-you-evaluate-cloud-service-agreements-and-slas-very-carefully-1705.html +[43]:http://www.e-vergent.com/what-is-dedicated-internet-access/ From dcbeff5c0496b70d212e6c58336047116ebb62f7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 21:40:00 +0800 Subject: [PATCH 330/951] APL --- ... Parse And Pretty Print JSON With Linux Commandline Tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md b/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md index 1cc2f14b43..528e3d0d40 100644 --- a/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md +++ b/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md @@ -1,5 +1,5 @@ [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From f48d4c1f5564d91500b1e6c1b25675645ee94384 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 22:53:08 +0800 Subject: [PATCH 331/951] TSL&PRF --- ...Print JSON With Linux Commandline Tools.md | 264 ------------------ ...Print JSON With Linux Commandline Tools.md | 228 +++++++++++++++ 2 files changed, 228 insertions(+), 264 deletions(-) delete mode 100644 sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md create mode 100644 translated/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md diff --git a/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md b/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md deleted file mode 100644 index 528e3d0d40..0000000000 --- a/sources/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md +++ /dev/null @@ -1,264 +0,0 @@ -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "How To Parse And Pretty Print JSON With Linux Commandline Tools" -[#]: via: "https://www.ostechnix.com/how-to-parse-and-pretty-print-json-with-linux-commandline-tools/" -[#]: author: "EDITOR https://www.ostechnix.com/author/editor/" - -How To Parse And Pretty Print JSON With Linux Commandline Tools -====== - -**JSON** is a lightweight and language independent data storage format, easy to integrate with most programming languages and also easy to understand by humans, of course when properly formatted. The word JSON stands for **J** ava **S** cript **O** bject **N** otation, though it starts with JavaScript, and primarily used to exchange data between server and browser, but now being used in many fields including embedded systems. Here we’re going to parse and pretty print JSON with command line tools on Linux. It’s extremely useful for handling large JSON data in a shell scripts, or manipulating JSON data in a shell script. - -### What is pretty printing? - -The JSON data is structured to be somewhat more human readable. However in most cases, JSON data is stored in a single line, even without a line ending character. - -Obviously that’s not very convenient for reading and editing manually. - -That’s when pretty print is useful. The name is quite self explanatory, re-formatting the JSON text to be more legible by humans. This is known as **JSON pretty printing**. - -### Parse And Pretty Print JSON With Linux Commandline Tools - -JSON data could be parsed with command line text processors like **awk** , **sed** and **gerp**. In fact JSON.awk is an awk script to do that. However there are some dedicated tools for the same purpose. - - 1. **jq** or **jshon** , JSON parser for shell, both of them are quite useful. - - 2. Shell scripts like **JSON.sh** or **jsonv.sh** to parse JSON in bash, zsh or dash shell. - - 3. **JSON.awk** , JSON parser awk script. - - 4. Python modules like **json.tool**. - - 5. **underscore-cli** , Node.js and javascript based. - - - - -In this tutorial I’m focusing only on **jq** , which is quite powerful JSON parser for shells with advanced filtering and scripting capability. - -### JSON pretty printing - -JSON data could be in one and nearly illegible for humans, so to make it somewhat readable, JSON pretty printing is here. - -**Example:** A data from **jsonip.com** , to get external IP address in JSON format, use **curl** or **wget** tools like below. - -``` -$ wget -cq http://jsonip.com/ -O - -``` - -The actual data looks like this: - -``` -{"ip":"111.222.333.444","about":"/about","Pro!":"http://getjsonip.com"} -``` - -Now pretty print it with jq: - -``` -$ wget -cq http://jsonip.com/ -O - | jq '.' -``` - -This should look like below, after filtering the result with jq. - -``` -{ - - "ip": "111.222.333.444", - - "about": "/about", - - "Pro!": "http://getjsonip.com" - -} -``` - -The Same thing could be done with python **json.tool** module. Here is an example: - -``` -$ cat anything.json | python -m json.tool -``` - -This Python based solution should be fine for most users, but it’s not that useful where Python is not pre-installed or could not be installed, like on embedded systems. - -However the json.tool python module has a distinct advantage, it’s cross platform. So, you can use it seamlessly on Windows, Linux or mac OS. - - -### How to parse JSON with jq - -First, you need to install jq, it’s already picked up by most GNU/Linux distributions, install it with their respective package installer commands. - -On Arch Linux: - -``` -$ sudo pacman -S jq -``` - -On Debian, Ubuntu, Linux Mint: - -``` -$ sudo apt-get install jq -``` - -On Fedora: - -``` -$ sudo dnf install jq -``` - -On openSUSE: - -``` -$ sudo zypper install jq -``` - -For other OS or platforms, see the [official installation instructions][1]. - -**Basic filters and identifiers of jq** - -jq could read the JSON data either from **stdin** or a **file**. You’ve to use both depending on the situation. - -The single symbol of **.** is the most basic filter. These filters are also called as **object identifier-index**. Using a single **.** along with jq basically pretty prints the input JSON file. - -**Single quotes** – You don’t have to use the single quote always. But if you’re combining several filters in a single line, then you must use them. - -**Double quotes** – You’ve to enclose any special character like **@** , **#** , **$** within two double quotes, like this example, **jq .foo.”@bar”** - -**Raw data print** – For any reason, if you need only the final parsed data, not enclosed within a double quote, use the -r flag with the jq command, like this. **– jq -r .foo.bar**. - -**Parsing specific data** - -To filter out a specific part of JSON, you’ve to look into the pretty printed JSON file’s data hierarchy. - -An example of JSON data, from Wikipedia: - -``` -{ - - "firstName": "John", - - "lastName": "Smith", - - "age": 25, - - "address": { - - "streetAddress": "21 2nd Street", - - "city": "New York", - - "state": "NY", - - "postalCode": "10021" - -}, - - "phoneNumber": [ - -{ - - "type": "home", - - "number": "212 555-1234" - -}, - -{ - - "type": "fax", - - "number": "646 555-4567" - -} - -], - - "gender": { - - "type": "male" - - } - -} -``` - -I’m going to use this JSON data as an example in this tutorial, saved this as **sample.json**. - -Let’s say I want to filter out the address from sample.json file. So the command should be like: - -``` -$ jq .address sample.json -``` - -**Sample output:** - -``` -{ - - "streetAddress": "21 2nd Street", - - "city": "New York", - - "state": "NY", - - "postalCode": "10021" - -} -``` - -Again let’s say I want the postal code, then I’ve to add another **object identifier-index** , i.e. another filter. - -``` -$ cat sample.json | jq .address.postalCode -``` - -Also note that the **filters are case sensitive** and you’ve to use the exact same string to get something meaningful output instead of null. - -**Parsing elements from JSON array** - -Elements of JSON array are enclosed within square brackets, undoubtedly quite versatile to use. - -To parse elements from a array, you’ve to use the **[]identifier** along with other object identifier-index. - -In this sample JSON data, the phone numbers are stored inside an array, to get all the contents from this array, you’ve to use only the brackets, like this example. - -``` -$ jq .phoneNumber[] sample.json -``` - -Let’s say you just want the first element of the array, then use the array object numbers starting for 0, for the first item, use **[0]** , for the next items, it should be incremented by one each step. - -``` -$ jq .phoneNumber[0] sample.json -``` - -**Scripting examples** - -Let’s say I want only the the number for home, not entire JSON array data. Here’s when scripting within jq command comes handy. - -``` -$ cat sample.json | jq -r '.phoneNumber[] | select(.type == "home") | .number' -``` - -Here first I’m piping the results of one filer to another, then using the select attribute to select a particular type of data, again piping the result to another filter. - -Explaining every type of jq filters and scripting is beyond the scope and purpose of this tutorial. It’s highly suggested to read the JQ manual for better understanding given below. - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/how-to-parse-and-pretty-print-json-with-linux-commandline-tools/ - -作者:[EDITOR][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/editor/ -[b]: https://github.com/lujun9972 -[1]: https://stedolan.github.io/jq/download/ diff --git a/translated/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md b/translated/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md new file mode 100644 index 0000000000..b3b99e8ee5 --- /dev/null +++ b/translated/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md @@ -0,0 +1,228 @@ +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " +[#]: subject: "How To Parse And Pretty Print JSON With Linux Commandline Tools" +[#]: via: "https://www.ostechnix.com/how-to-parse-and-pretty-print-json-with-linux-commandline-tools/" +[#]: author: "EDITOR https://www.ostechnix.com/author/editor/" + +如何用 Linux 命令行工具解析和格式化输出 JSON +====== + +![](https://www.ostechnix.com/wp-content/uploads/2019/03/json-720x340.png) + +JSON 是一种轻量级且与语言无关的数据存储格式,易于与大多数编程语言集成,也易于人类理解 —— 当然,如果格式正确的话。JSON 这个词代表 **J**ava **S**cript **O**bject **N**otation,虽然它以 JavaScript 开头,而且主要用于在服务器和浏览器之间交换数据,但现在正在用于许多领域,包括嵌入式系统。在这里,我们将使用 Linux 上的命令行工具解析并格式化打印 JSON。它对于在 shell 脚本中处理大型 JSON 数据或在 shell 脚本中处理 JSON 数据非常有用。 + +### 什么是格式化输出? + +JSON 数据的结构更具人性化。但是在大多数情况下,JSON 数据会存储在一行中,甚至没有行结束字符。 + +显然,这对于手动阅读和编辑不太方便。 + +这是格式化输出pretty print就很有用。这个该名称不言自明:重新格式化 JSON 文本,使人们读起来更清晰。这被称为 **JSON 格式化输出**。 + +### 用 Linux 命令行工具解析和格式化输出 JSON + +可以使用命令行文本处理器解析 JSON 数据,例如 `awk`、`sed` 和 `gerp`。实际上 `JSON.awk` 是一个来做这个的 awk 脚本。但是,也有一些专用工具可用于同一目的。 + +1. `jq` 或 `jshon`,shell 下的 JSON 解析器,它们都非常有用。 +2. Shell 脚本,如 `JSON.sh` 或 `jsonv.sh`,用于在 bash、zsh 或 dash shell 中解析JSON。 +3. `JSON.awk`,JSON 解析器 awk 脚本。 +4. 像 `json.tool` 这样的 Python 模块。 +5. `undercore-cli`,基于 Node.js 和 javascript。 + +在本教程中,我只关注 `jq`,这是一个 shell 下的非常强大的 JSON 解析器,具有高级过滤和脚本编程功能。 + +### JSON 格式化输出 + +JSON 数据可能放在一行上使人难以解读,因此为了使其具有一定的可读性,JSON 格式化输出就可用于此目的的。 + +**示例:**来自 `jsonip.com` 的数据,使用 `curl` 或 `wget` 工具获得 JSON 格式的外部 IP 地址,如下所示。 + +``` +$ wget -cq http://jsonip.com/ -O - +``` + +实际数据看起来类似这样: + +``` +{"ip":"111.222.333.444","about":"/about","Pro!":"http://getjsonip.com"} +``` + +现在使用 `jq` 格式化输出它: + +``` +$ wget -cq http://jsonip.com/ -O - | jq '.' +``` + +通过 `jq` 过滤了该结果之后,它应该看起来类似这样: + +``` +{ + "ip": "111.222.333.444", + "about": "/about", + "Pro!": "http://getjsonip.com" +} +``` + +同样也可以通过 Python `json.tool` 模块做到。示例如下: + +``` +$ cat anything.json | python -m json.tool +``` + +这种基于 Python 的解决方案对于大多数用户来说应该没问题,但是如果没有预安装或无法安装 Python 则不行,比如在嵌入式系统上。 + +然而,`json.tool` Python 模块具有明显的优势,它是跨平台的。因此,你可以在 Windows、Linux 或 Mac OS 上无缝使用它。 + +### 如何用 jq 解析 JSON + +首先,你需要安装 `jq`,它已被大多数 GNU/Linux 发行版选中,并使用各自的软件包安装程序命令进行安装。 + +在 Arch Linux 上: + +``` +$ sudo pacman -S jq +``` + +在 Debian、Ubuntu、Linux Mint 上: + +``` +$ sudo apt-get install jq +``` + +在 Fedora 上: + +``` +$ sudo dnf install jq +``` + +在 openSUSE 上: + +``` +$ sudo zypper install jq +``` + +对于其它操作系统或平台参见[官方的安装指导][1]。 + +#### jq 的基本过滤和标识符功能 + +`jq` 可以从 `STDIN` 或文件中读取 JSON 数据。你可以根据情况使用。 + +单个符号 `.` 是最基本的过滤器。这些过滤器也称为**对象标识符-索引**。`jq` 使用单个 `.` 过滤器基本上相当将输入的 JSON 文件格式化输出。 + +- **单引号**:不必始终使用单引号。但是如果你在一行中组合几个过滤器,那么你必须使用它们。 +- **双引号**:你必须用两个双引号括起任何特殊字符,如 `@`、`#`、`$`,例如 `jq .foo.”@bar”`。 +- **原始数据打印**:不管出于任何原因,如果你只需要最终解析的数据(不包含在双引号内),请使用带有 `-r` 标志的 `jq` 命令,如下所示:`jq -r .foo.bar`。 + +#### 解析特定数据 + +要过滤出 JSON 的特定部分,你需要了解格式化输出的 JSON 文件的数据层次结构。 + +来自维基百科的 JSON 数据示例: + +``` +{ + "firstName": "John", + "lastName": "Smith", + "age": 25, + "address": { + "streetAddress": "21 2nd Street", + "city": "New York", + "state": "NY", + "postalCode": "10021" +}, + "phoneNumber": [ +{ + "type": "home", + "number": "212 555-1234" +}, +{ + "type": "fax", + "number": "646 555-4567" +} +], + "gender": { + "type": "male" + } +} +``` + +我将在本教程中将此 JSON 数据用作示例,将其保存为 `sample.json`。 + +假设我想从 `sample.json` 文件中过滤出地址。所以命令应该是这样的: + +``` +$ jq .address sample.json +``` + +示例输出: + +``` +{ + "streetAddress": "21 2nd Street", + "city": "New York", + "state": "NY", + "postalCode": "10021" +} +``` + +再次,我想要邮政编码,然后我要添加另一个**对象标识符-索引**,即另一个过滤器。 + +``` +$ cat sample.json | jq .address.postalCode +``` + +另请注意,**过滤器区分大小写**,并且你必须使用完全相同的字符串来获取有意义的输出,否则就是 null。 + +#### 从 JSON 数组中解析元素 + +JSON 数组的元素包含在方括号内,这无疑是非常通用的。 + +要解析数组中的元素,你必须使用 `[]` 标识符以及其他对象标识符索引。 + +在此示例 JSON 数据中,电话号码存储在数组中,要从此数组中获取所有内容,你只需使用括号,像这个示例: + +``` +$ jq .phoneNumber[] sample.json +``` + +假设你只想要数组的第一个元素,然后使用从 `0` 开始的数组对象编号,对于第一个项目,使用 `[0]`,对于下一个项目,它应该每步增加 1。 + +``` +$ jq .phoneNumber[0] sample.json +``` + +#### 脚本编程示例 + +假设我只想要家庭电话,而不是整个 JSON 数组数据。这就是用 `jq` 命令脚本编写的方便之处。 + +``` +$ cat sample.json | jq -r '.phoneNumber[] | select(.type == "home") | .number' +``` + +首先,我将一个过滤器的结果传递给另一个,然后使用 `select` 属性选择特定类型的数据,再次将结果传递给另一个过滤器。 + +解释每种类型的 `jq` 过滤器和脚本编程超出了本教程的范围和目的。强烈建议你阅读 `jq` 手册,以便更好地理解下面的内容。 + +资源: + +- https://stedolan.github.io/jq/manual/ +- http://www.compciv.org/recipes/cli/jq-for-parsing-json/ +- https://lzone.de/cheat-sheet/jq + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-parse-and-pretty-print-json-with-linux-commandline-tools/ + +作者:[EDITOR][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://www.ostechnix.com/author/editor/ +[b]: https://github.com/lujun9972 +[1]: https://stedolan.github.io/jq/download/ From 47c2664355ed905e6fe7baa6bc518f63aa7cb125 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 22:56:17 +0800 Subject: [PATCH 332/951] PUB @wxy https://linux.cn/article-11198-1.html --- ...se And Pretty Print JSON With Linux Commandline Tools.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md (98%) diff --git a/translated/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md b/published/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md similarity index 98% rename from translated/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md rename to published/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md index b3b99e8ee5..88ffc6fc24 100644 --- a/translated/tech/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md +++ b/published/20190315 How To Parse And Pretty Print JSON With Linux Commandline Tools.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-11198-1.html" [#]: subject: "How To Parse And Pretty Print JSON With Linux Commandline Tools" [#]: via: "https://www.ostechnix.com/how-to-parse-and-pretty-print-json-with-linux-commandline-tools/" [#]: author: "EDITOR https://www.ostechnix.com/author/editor/" @@ -216,7 +216,7 @@ $ cat sample.json | jq -r '.phoneNumber[] | select(.type == "home") | .number' via: https://www.ostechnix.com/how-to-parse-and-pretty-print-json-with-linux-commandline-tools/ -作者:[EDITOR][a] +作者:[ostechnix][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) 校对:[wxy](https://github.com/wxy) From ccf13c92ce4ebe6d84a6ee3550d7072045ead64a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 23:26:15 +0800 Subject: [PATCH 333/951] PRF @geekpi --- ...a New User Account is Created in System.md | 69 +++++++------------ 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md b/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md index a176ca2b08..cb454728b8 100644 --- a/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md +++ b/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Bash Script to Send a Mail When a New User Account is Created in System) @@ -10,74 +10,53 @@ 在系统创建新用户时发送邮件的 Bash 脚本 ====== -目前市场上有许多开源监测工具可用于监控 Linux 系统的性能。 +目前市场上有许多开源监测工具可用于监控 Linux 系统的性能。当系统到达指定的阈值时,它将发送邮件提醒。 -当系统到达指定的阈值时,它将发送邮件提醒。 - -它会监控 CPU 利用率、内存利用率、交换内存利用率、磁盘空间利用率等所有内容。 - -但我不认为他们可以选择监控新用户创建活动,并发送提醒。 +它会监控 CPU 利用率、内存利用率、交换内存利用率、磁盘空间利用率等所有内容。但我不认为它们可以选择监控新用户创建活动,并发送提醒。 如果没有,这并不重要,因为我们可以编写自己的 bash 脚本来实现这一点。 我们过去写了许多有用的 shell 脚本。如果要查看它们,请点击以下链接。 - * **[如何使用 shell 脚本自动化执行日常任务?][1]** +* [如何使用 shell 脚本自动化执行日常任务?][1] +这个脚本做了什么?它监测 `/var/log/secure` 文件,并在系统创建新帐户时提醒管理员。 +我们不会经常运行此脚本,因为创建用户不经常发生。但是,我打算一天运行一次这个脚本。因此,我们可以获得有关用户创建的综合报告。 -脚本做了什么?它监测 **`/var/log/secure`** 文件,并在系统创建新帐户时提醒管理员。 - -我们不会经常运行此脚本,因为创建用户不经常发生。但是,我打算一天运行一次这个脚本。 - -因此,我们可以获得有关用户创建的综合报告。 - -如果在昨天的 “/var/log/secure” 中找到了 useradd 字符串,那么该脚本将向指定的邮箱发送邮件提醒,其中包含了新用户的详细信息。 +如果在昨天的 `/var/log/secure` 中找到了 “useradd” 字符串,那么该脚本将向指定的邮箱发送邮件提醒,其中包含了新用户的详细信息。 **注意:**你需要更改邮箱而不是使用我们的邮箱。 ``` # vi /opt/scripts/new-user.sh +``` +``` #!/bin/bash #Set the variable which equal to zero prev_count=0 - count=$(grep -i "`date --date='yesterday' '+%b %e'`" /var/log/secure | egrep -wi 'useradd' | wc -l) if [ "$prev_count" -lt "$count" ] ; then - -# Send a mail to given email id when errors found in log - -SUBJECT="ATTENTION: New User Account is created on server : `date --date='yesterday' '+%b %e'`" - -# This is a temp file, which is created to store the email message. - -MESSAGE="/tmp/new-user-logs.txt" - -TO="[email protected]" - -echo "Hostname: `hostname`" >> $MESSAGE - -echo -e "\n" >> $MESSAGE - -echo "The New User Details are below." >> $MESSAGE - -echo "+------------------------------+" >> $MESSAGE - -grep -i "`date --date='yesterday' '+%b %e'`" /var/log/secure | egrep -wi 'useradd' | grep -v 'failed adding'| awk '{print $4,$8}' | uniq | sed 's/,/ /' >> $MESSAGE - -echo "+------------------------------+" >> $MESSAGE - -mail -s "$SUBJECT" "$TO" < $MESSAGE - -rm $MESSAGE - + # Send a mail to given email id when errors found in log + SUBJECT="ATTENTION: New User Account is created on server : `date --date='yesterday' '+%b %e'`" + # This is a temp file, which is created to store the email message. + MESSAGE="/tmp/new-user-logs.txt" + TO="2daygeek@gmail.com" + echo "Hostname: `hostname`" >> $MESSAGE + echo -e "\n" >> $MESSAGE + echo "The New User Details are below." >> $MESSAGE + echo "+------------------------------+" >> $MESSAGE + grep -i "`date --date='yesterday' '+%b %e'`" /var/log/secure | egrep -wi 'useradd' | grep -v 'failed adding'| awk '{print $4,$8}' | uniq | sed 's/,/ /' >> $MESSAGE + echo "+------------------------------+" >> $MESSAGE + mail -s "$SUBJECT" "$TO" < $MESSAGE + rm $MESSAGE fi ``` -给 **`new-user.sh`** 添加可执行权限。 +给 `new-user.sh` 添加可执行权限。 ``` $ chmod +x /opt/scripts/new-user.sh @@ -114,7 +93,7 @@ via: https://www.2daygeek.com/linux-bash-script-to-monitor-user-creation-send-em 作者:[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 8faedced03a70c59c19d4f4e3804152dac4cf48d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 23:26:59 +0800 Subject: [PATCH 334/951] PUB @geekpi https://linux.cn/article-11199-1.html --- ...d a Mail When a New User Account is Created in System.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md (95%) diff --git a/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md b/published/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md similarity index 95% rename from translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md rename to published/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md index cb454728b8..b030243efe 100644 --- a/translated/tech/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md +++ b/published/20190801 Bash Script to Send a Mail When a New User Account is Created in System.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11199-1.html) [#]: subject: (Bash Script to Send a Mail When a New User Account is Created in System) [#]: via: (https://www.2daygeek.com/linux-bash-script-to-monitor-user-creation-send-email/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) @@ -10,6 +10,8 @@ 在系统创建新用户时发送邮件的 Bash 脚本 ====== +![](https://img.linux.net.cn/data/attachment/album/201908/07/232807l7x4j7y77555j1j5.jpg) + 目前市场上有许多开源监测工具可用于监控 Linux 系统的性能。当系统到达指定的阈值时,它将发送邮件提醒。 它会监控 CPU 利用率、内存利用率、交换内存利用率、磁盘空间利用率等所有内容。但我不认为它们可以选择监控新用户创建活动,并发送提醒。 From e6432840cee24136f7bc4ef9f488ec736a8292af Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Aug 2019 23:37:39 +0800 Subject: [PATCH 335/951] APL --- .../20181222 How to detect automatically generated emails.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20181222 How to detect automatically generated emails.md b/sources/tech/20181222 How to detect automatically generated emails.md index 23b509a77b..7cf0836498 100644 --- a/sources/tech/20181222 How to detect automatically generated emails.md +++ b/sources/tech/20181222 How to detect automatically generated emails.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 20ec15543702683ab2d463d6a5d99a8906306eb9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Aug 2019 00:28:32 +0800 Subject: [PATCH 336/951] TSL&PRF --- ...o detect automatically generated emails.md | 144 ------------------ ...o detect automatically generated emails.md | 128 ++++++++++++++++ 2 files changed, 128 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20181222 How to detect automatically generated emails.md create mode 100644 translated/tech/20181222 How to detect automatically generated emails.md diff --git a/sources/tech/20181222 How to detect automatically generated emails.md b/sources/tech/20181222 How to detect automatically generated emails.md deleted file mode 100644 index 7cf0836498..0000000000 --- a/sources/tech/20181222 How to detect automatically generated emails.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to detect automatically generated emails) -[#]: via: (https://arp242.net/weblog/autoreply.html) -[#]: author: (Martin Tournoij https://arp242.net/) - -How to detect automatically generated emails -====== - -### How to detect automatically generated emails - - -When you send out an auto-reply from an email system you want to take care to not send replies to automatically generated emails. At best, you will get a useless delivery failure. At words, you will get an infinite email loop and a world of chaos. - -Turns out that reliably detecting automatically generated emails is not always easy. Here are my observations based on writing a detector for this and scanning about 100,000 emails with it (extensive personal archive and company archive). - -### Auto-submitted header - -Defined in [RFC 3834][1]. - -This is the ‘official’ standard way to indicate your message is an auto-reply. You should **not** send a reply if `Auto-Submitted` is present and has a value other than `no`. - -### X-Auto-Response-Suppress header - -Defined [by Microsoft][2] - -This header is used by Microsoft Exchange, Outlook, and perhaps some other products. Many newsletters and such also set this. You should **not** send a reply if `X-Auto-Response-Suppress` contains `DR` (“Suppress delivery reports”), `AutoReply` (“Suppress auto-reply messages other than OOF notifications”), or `All`. - -### List-Id and List-Unsubscribe headers - -Defined in [RFC 2919][3] - -You usually don’t want to send auto-replies to mailing lists or news letters. Pretty much all mail lists and most newsletters set at least one of these headers. You should **not** send a reply if either of these headers is present. The value is unimportant. - -### Feedback-ID header - -Defined [by Google][4]. - -Gmail uses this header to identify mail newsletters, and uses it to generate statistics/reports for owners of those newsletters. You should **not** send a reply if this headers is present; the value is unimportant. - -### Non-standard ways - -The above methods are well-defined and clear (even though some are non-standard). Unfortunately some email systems do not use any of them :-( Here are some additional measures. - -#### Precedence header - -Not really defined anywhere, mentioned in [RFC 2076][5] where its use is discouraged (but this header is commonly encountered). - -Note that checking for the existence of this field is not recommended, as some ails use `normal` and some other (obscure) values (this is not very common though). - -My recommendation is to **not** send a reply if the value case-insensitively matches `bulk`, `auto_reply`, or `list`. - -#### Other obscure headers - -A collection of other (somewhat obscure) headers I’ve encountered. I would recommend **not** sending an auto-reply if one of these is set. Most mails also set one of the above headers, but some don’t (but it’s not very common). - - * `X-MSFBL`; can’t really find a definition (Microsoft header?), but I only have auto-generated mails with this header. - - * `X-Loop`; not really defined anywhere, and somewhat rare, but sometimes it’s set. It’s most often set to the address that should not get emails, but `X-Loop: yes` is also encountered. - - * `X-Autoreply`; fairly rare, and always seems to have a value of `yes`. - - - - -#### Email address - -Check if the `From` or `Reply-To` headers contains `noreply`, `no-reply`, or `no_reply` (regex: `^no.?reply@`). - -#### HTML only - -If an email only has a HTML part, but no text part it’s a good indication this is an auto-generated mail or newsletter. Pretty much all mail clients also set a text part. - -#### Delivery failures - -Many delivery failure messages don’t really indicate that they’re failures. Some ways to check this: - - * `From` contains `mailer-daemon` or `Mail Delivery Subsystem` - - - -Many mail libraries leave some sort of footprint, and most regular mail clients override this with their own data. Checking for this seems to work fairly well. - - * `X-Mailer: Microsoft CDO for Windows 2000` – Set by some MS software; I can only find it on autogenerated mails. Yes, it’s still used in 2015. - - * `Message-ID` header contains `.JavaMail.` – I’ve found a few (5 on 50k) regular messages with this, but not many; the vast majority (thousends) of messages are news-letters, order confirmations, etc. - - * `^X-Mailer` starts with `PHP`. This should catch both `X-Mailer: PHP/5.5.0` and `X-Mailer: PHPmailer blah blah`. The same as `JavaMail` applies. - - * `X-Library` presence; only [Indy][6] seems to set this. - - * `X-Mailer` starts with `wdcollect`. Set by some Plesk mails. - - * `X-Mailer` starts with `MIME-tools`. - - - - -### Final precaution: limit the number of replies - -Even when following all of the above advice, you may still encounter an email program that will slip through. This can very dangerous, as email systems that simply `IF email THEN send_email` have the potential to cause infinite email loops. - -For this reason, I recommend keeping track of which emails you’ve sent an autoreply to and rate limiting this to at most n emails in n minutes. This will break the back-and-forth chain. - -We use one email per five minutes, but something less strict will probably also work well. - -### What you need to set on your auto-response - -The specifics for this will vary depending on what sort of mails you’re sending. This is what we use for auto-reply mails: - -``` -Auto-Submitted: auto-replied -X-Auto-Response-Suppress: All -Precedence: auto_reply -``` - -### Feedback - -You can mail me at [martin@arp242.net][7] or [create a GitHub issue][8] for feedback, questions, etc. - --------------------------------------------------------------------------------- - -via: https://arp242.net/weblog/autoreply.html - -作者:[Martin Tournoij][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://arp242.net/ -[b]: https://github.com/lujun9972 -[1]: http://tools.ietf.org/html/rfc3834 -[2]: https://msdn.microsoft.com/en-us/library/ee219609(v=EXCHG.80).aspx -[3]: https://tools.ietf.org/html/rfc2919) -[4]: https://support.google.com/mail/answer/6254652?hl=en -[5]: http://www.faqs.org/rfcs/rfc2076.html -[6]: http://www.indyproject.org/index.en.aspx -[7]: mailto:martin@arp242.net -[8]: https://github.com/Carpetsmoker/arp242.net/issues/new diff --git a/translated/tech/20181222 How to detect automatically generated emails.md b/translated/tech/20181222 How to detect automatically generated emails.md new file mode 100644 index 0000000000..feaa38bc55 --- /dev/null +++ b/translated/tech/20181222 How to detect automatically generated emails.md @@ -0,0 +1,128 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to detect automatically generated emails) +[#]: via: (https://arp242.net/weblog/autoreply.html) +[#]: author: (Martin Tournoij https://arp242.net/) + +如何检测自动生成的电子邮件 +====== + +当你用电子邮件系统发送自动回复时,你需要注意不要向自动生成的电子邮件发送回复。最好的情况下,你将获得无用的投递失败消息。更可能的是,你会得到一个无限的电子邮件循环和一个混乱的世界。 + +事实证明,可靠地检测自动生成的电子邮件并不总是那么容易。以下是基于为此编写的检测器并使用它扫描大约 100,000 封电子邮件(大量的个人存档和公司存档)的观察结果。 + +### Auto-submitted 信头 + +由 [RFC 3834][1] 定义。 + +这是表示你的邮件是自动回复的“官方”标准。如果存在 `Auto-Submitted` 信头,并且其值不是 `no`,你应该**不**发送回复。 + +### X-Auto-Response-Suppress 信头 + +[由微软][2]定义。 + +此信头由微软 Exchange、Outlook 和其他一些产品使用。许多新闻订阅等都设定了这个。如果 `X-Auto-Response-Suppress` 包含 `DR`(“抑制投递报告”)、`AutoReply`(“禁止 OOF 通知以外的自动回复消息”)或 `All`,你应该**不**发送回复。 + +### List-Id 和 List-Unsubscribe 信头 + +由 [RFC 2919][3] 定义。 + +你通常不希望给邮件列表或新闻订阅发送自动回复。几乎所有的邮件列表和大多数新闻订阅都至少设置了其中一个信头。如果存在这些信头中的任何一个,你应该**不**发送回复。这个信头的值不重要。 + +### Feedback-ID 信头 + +[由谷歌][4]定义。 + +Gmail 使用此信头识别邮件是否是新闻订阅,并使用它为这些新闻订阅的所有者生成统计信息或报告。如果此信头存在,你应该**不**发送回复。这个信头的值不重要。 + +### 非标准方式 + +上述方法定义明确(即使有些是非标准的)。不幸的是,有些电子邮件系统不使用它们中的任何一个 :-( 这里有一些额外的措施。 + +#### Precedence 信头 + +在 [RFC 2076][5] 中没有真正定义,不鼓励使用它(但通常会遇到此信头)。 + +请注意,不建议检查是否存在此信头,因为某些邮件使用 `normal` 和其他一些(少见的)值(尽管这不常见)。 + +我的建议是如果其值不区分大小写地匹配 `bulk`、`auto_reply` 或 `list`,则**不**发送回复。 + +#### 其他不常见的信头 + +这是我遇到的另外的一些(不常见的)信头。如果设置了其中一个,我建议**不**发送自动回复。大多数邮件也设置了上述信头之一,但有些没有(这并不常见)。 + +* `X-MSFBL`:无法真正找到定义(Microsoft 信头?),但我只有自动生成的邮件带有此信头。 +* `X-Loop`:在任何地方都没有真正定义过,有点罕见,但有时有。它通常设置为不应该收到电子邮件的地址,但也会遇到 `X-Loop: yes`。 +* `X-Autoreply`:相当罕见,并且似乎总是具有 `yes` 的值。 + +#### Email 地址 + +检查 `From` 或 `Reply-To` 信头是否包含 `noreply`、`no-reply` 或 `no_reply`(正则表达式:`^no.?reply@`)。 + +#### 只有 HTML 部分 + +如果电子邮件只有 HTML 部分,而没有文本部分,则表明这是一个自动生成的邮件或新闻订阅。几乎所有邮件客户端都设置了文本部分。 + +#### 投递失败消息 + +许多传递失败消息并不能真正表明它们是失败的。一些检查方法: + +* `From` 包含 `mailer-daemon` 或 `Mail Delivery Subsystem` + +#### 特定的邮件库特征 + +许多邮件类库留下了某种痕迹,大多数常规邮件客户端使用自己的数据覆盖它。检查这个似乎工作得相当可靠。 + +* `X-Mailer: Microsoft CDO for Windows 2000`:由某些微软软件设置;我只能在自动生成的邮件中找到它。是的,在 2015 年它仍然在使用。 +* `Message-ID` 信头包含 `.JavaMail.`:我发现了一些(5 个 50k 大小的)常规消息,但不是很多;绝大多数(数千封)邮件是新闻订阅、订单确认等。 +* `^X-Mailer` 以 `PHP` 开头。这应该会同时看到 `X-Mailer: PHP/5.5.0` 和 `X-Mailer: PHPmailer XXX XXX`。与 “JavaMail” 相同。 +* 出现了 `X-Library`;似乎只有 [Indy][6] 设定了这个。 +* `X-Mailer` 以 `wdcollect` 开头。由一些 Plesk 邮件设置。 +* `X-Mailer` 以 `MIME-tools` 开头。 + +### 最后的预防措施:限制回复的数量 + +即使遵循上述所有建议,你仍可能会遇到一个避开所有这些检测的电子邮件程序。这可能非常危险,因为电子邮件系统只是“如果有电子邮件那么发送”,就有可能导致无限的电子邮件循环。 + +出于这个原因,我建议你记录你自动发送的电子邮件,并将此速率限制为在几分钟内最多几封电子邮件。这将打破循环链条。 + +我们使用每五分钟一封电子邮件的设置,但没这么严格的设置可能也会运作良好。 + +### 你需要为自动回复设置什么信头 + +具体细节取决于你发送的邮件类型。这是我们用于自动回复邮件的内容: + +``` +Auto-Submitted: auto-replied +X-Auto-Response-Suppress: All +Precedence: auto_reply +``` + +### 反馈 + +你可以发送电子邮件至 [martin@arp242.net][7] 或 [创建 GitHub 议题][8]以提交反馈、问题等。 + +-------------------------------------------------------------------------------- + +via: https://arp242.net/weblog/autoreply.html + +作者:[Martin Tournoij][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://arp242.net/ +[b]: https://github.com/lujun9972 +[1]: http://tools.ietf.org/html/rfc3834 +[2]: https://msdn.microsoft.com/en-us/library/ee219609(v=EXCHG.80).aspx +[3]: https://tools.ietf.org/html/rfc2919) +[4]: https://support.google.com/mail/answer/6254652?hl=en +[5]: http://www.faqs.org/rfcs/rfc2076.html +[6]: http://www.indyproject.org/index.en.aspx +[7]: mailto:martin@arp242.net +[8]: https://github.com/Carpetsmoker/arp242.net/issues/new From dd8521c63d1c7681570fc454c841992a30014e0e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Aug 2019 00:34:12 +0800 Subject: [PATCH 337/951] PUB @wxy https://linux.cn/article-11200-1.html --- ...20181222 How to detect automatically generated emails.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181222 How to detect automatically generated emails.md (97%) diff --git a/translated/tech/20181222 How to detect automatically generated emails.md b/published/20181222 How to detect automatically generated emails.md similarity index 97% rename from translated/tech/20181222 How to detect automatically generated emails.md rename to published/20181222 How to detect automatically generated emails.md index feaa38bc55..1ce4775088 100644 --- a/translated/tech/20181222 How to detect automatically generated emails.md +++ b/published/20181222 How to detect automatically generated emails.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11200-1.html) [#]: subject: (How to detect automatically generated emails) [#]: via: (https://arp242.net/weblog/autoreply.html) [#]: author: (Martin Tournoij https://arp242.net/) @@ -10,6 +10,8 @@ 如何检测自动生成的电子邮件 ====== +![](https://img.linux.net.cn/data/attachment/album/201908/08/003503fw0w0pzx2ue6a6a6.jpg) + 当你用电子邮件系统发送自动回复时,你需要注意不要向自动生成的电子邮件发送回复。最好的情况下,你将获得无用的投递失败消息。更可能的是,你会得到一个无限的电子邮件循环和一个混乱的世界。 事实证明,可靠地检测自动生成的电子邮件并不总是那么容易。以下是基于为此编写的检测器并使用它扫描大约 100,000 封电子邮件(大量的个人存档和公司存档)的观察结果。 From 5e4dc704d82c283469496c96bf6d16a51bcd3124 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 01:36:34 +0800 Subject: [PATCH 338/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190807=20Trace?= =?UTF-8?q?=20code=20in=20Fedora=20with=20bpftrace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190807 Trace code in Fedora with bpftrace.md --- ...0807 Trace code in Fedora with bpftrace.md | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 sources/tech/20190807 Trace code in Fedora with bpftrace.md diff --git a/sources/tech/20190807 Trace code in Fedora with bpftrace.md b/sources/tech/20190807 Trace code in Fedora with bpftrace.md new file mode 100644 index 0000000000..bead04655e --- /dev/null +++ b/sources/tech/20190807 Trace code in Fedora with bpftrace.md @@ -0,0 +1,210 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Trace code in Fedora with bpftrace) +[#]: via: (https://fedoramagazine.org/trace-code-in-fedora-with-bpftrace/) +[#]: author: (Augusto Caringi https://fedoramagazine.org/author/acaringi/) + +Trace code in Fedora with bpftrace +====== + +![][1] + +bpftrace is [a new eBPF-based tracing tool][2] that was first included in Fedora 28. It was developed by Brendan Gregg, Alastair Robertson and Matheus Marchini with the help of a loosely-knit team of hackers across the Net. A tracing tool lets you analyze what a system is doing behind the curtain. It tells you which functions in code are being called, with which arguments, how many times, and so on. + +This article covers some basics about bpftrace, and how it works. Read on for more information and some useful examples. + +### eBPF (extended Berkeley Packet Filter) + +[eBPF][3] is a tiny virtual machine, or a virtual CPU to be more precise, in the Linux Kernel. The eBPF can load and run small programs in a safe and controlled way in kernel space. This makes it safer to use, even in production systems. This virtual machine has its own instruction set architecture ([ISA][4]) resembling a subset of modern processor architectures. The ISA makes it easy to translate those programs to the real hardware. The kernel performs just-in-time translation to native code for main architectures to improve the performance. + +The eBPF virtual machine allows the kernel to be extended programmatically. Nowadays several kernel subsystems take advantage of this new powerful Linux Kernel capability. Examples include networking, seccomp, tracing, and more. The main idea is to attach eBPF programs into specific code points, and thereby extend the original kernel behavior. + +eBPF machine language is very powerful. But writing code directly in it is extremely painful, because it’s a low level language. This is where bpftrace comes in. It provides a high-level language to write eBPF tracing scripts. The tool then translates these scripts to eBPF with the help of clang/LLVM libraries, and then attached to the specified code points. + +## Installation and quick start + +To install bpftrace, run the following command in a terminal [using][5] _[sudo][5]_: + +``` +$ sudo dnf install bpftrace +``` + +Try it out with a “hello world” example: + +``` +$ sudo bpftrace -e 'BEGIN { printf("hello world\n"); }' +``` + +Note that you must run _bpftrace_ as _root_ due to the privileges required. Use the _-e_ option to specify a program, and to construct the so-called “one-liners.” This example only prints _hello world_, and then waits for you to press **Ctrl+C**. + +_BEGIN_ is a special probe name that fires only once at the beginning of execution. Every action inside the curly braces _{ }_ fires whenever the probe is hit — in this case, it’s just a _printf_. + +Let’s jump now to a more useful example: + +``` +$ sudo bpftrace -e 't:syscalls:sys_enter_execve { printf("%s called %s\n", comm, str(args->filename)); }' +``` + +This example prints the parent process name _(comm)_ and the name of every new process being created in the system. _t:syscalls:sys_enter_execve_ is a kernel tracepoint. It’s a shorthand for _tracepoint:syscalls:sys_enter_execve_, but both forms can be used. The next section shows you how to list all available tracepoints. + +_comm_ is a bpftrace builtin that represents the process name. _filename_ is a field of the _t:syscalls:sys_enter_execve_ tracepoint. You can access these fields through the _args_ builtin. + +All available fields of the tracepoint can be listed with this command: + +``` +bpftrace -lv "t:syscalls:sys_enter_execve" +``` + +## Example usage + +### Listing probes + +A central concept for _bpftrace_ are **probe points**. Probe points are instrumentation points in code (kernel or userspace) where eBPF programs can be attached. They fit into the following categories: + + * _kprobe_ – kernel function start + * _kretprobe_ – kernel function return + * _uprobe_ – user-level function start + * _uretprobe_ – user-level function return + * _tracepoint_ – kernel static tracepoints + * _usdt_ – user-level static tracepoints + * _profile_ – timed sampling + * _interval_ – timed output + * _software_ – kernel software events + * _hardware_ – processor-level events + + + +All available _kprobe/kretprobe_, _tracepoints_, _software_ and _hardware_ probes can be listed with this command: + +``` +$ sudo bpftrace -l +``` + +The _uprobe/uretprobe_ and _usdt_ probes are userspace probes specific to a given executable. To use them, use the special syntax shown later in this article. + +The _profile_ and _interval_ probes fire at fixed time intervals. Fixed time intervals are not covered in this article. + +### Counting system calls + +**Maps** are special BPF data types that store counts, statistics, and histograms. You can use maps to summarize how many times each syscall is being called: + +``` +$ sudo bpftrace -e 't:syscalls:sys_enter_* { @[probe] = count(); }' +``` + +Some probe types allow wildcards to match multiple probes. You can also specify multiple attach points for an action block using a comma separated list. In this example, the action block attaches to all tracepoints whose name starts with _t:syscalls:sys_enter__, which means all available syscalls. + +The bpftrace builtin function _count()_ counts the number of times this function is called. _@[]_ represents a map (an associative array). The key of this map is _probe_, which is another bpftrace builtin that represents the full probe name. + +Here, the same action block is attached to every syscall. Then, each time a syscall is called the map will be updated, and the entry is incremented in the map relative to this same syscall. When the program terminates, it automatically prints out all declared maps. + +This example counts the syscalls called globally, it’s also possible to filter for a specific process by _PID_ using the bpftrace filter syntax: + +``` +$ sudo bpftrace -e 't:syscalls:sys_enter_* / pid == 1234 / { @[probe] = count(); }' +``` + +### Write bytes by process + +Using these concepts, let’s analyze how many bytes each process is writing: + +``` +$ sudo bpftrace -e 't:syscalls:sys_exit_write /args->ret > 0/ { @[comm] = sum(args->ret); }' +``` + +_bpftrace_ attaches the action block to the write syscall return probe (_t:syscalls:sys_exit_write_). Then, it uses a filter to discard the negative values, which are error codes _(/args->ret > 0/)_. + +The map key _comm_ represents the process name that called the syscall. The _sum()_ builtin function accumulates the number of bytes written for each map entry or process. _args_ is a bpftrace builtin to access tracepoint’s arguments and return values. Finally, if successful, the _write_ syscall returns the number of written bytes. _args->ret_ provides access to the bytes. + +### Read size distribution by process (histogram): + +_bpftrace_ supports the creation of histograms. Let’s analyze one example that creates a histogram of the _read_ size distribution by process: + +``` +$ sudo bpftrace -e 't:syscalls:sys_exit_read { @[comm] = hist(args->ret); }' +``` + +Histograms are BPF maps, so they must always be attributed to a map (_@_). In this example, the map key is _comm_. + +The example makes _bpftrace_ generate one histogram for every process that calls the _read_ syscall. To generate just one global histogram, attribute the _hist()_ function just to _‘@’_ (without any key). + +bpftrace automatically prints out declared histograms when the program terminates. The value used as base for the histogram creation is the number of read bytes, found through _args->ret_. + +### Tracing userspace programs + +You can also trace userspace programs with _uprobes/uretprobes_ and _USDT_ (User-level Statically Defined Tracing). The next example uses a _uretprobe_, which probes to the end of a user-level function. It gets the command lines issued in every _bash_ running in the system: + +``` +$ sudo bpftrace -e 'uretprobe:/bin/bash:readline { printf("readline: \"%s\"\n", str(retval)); }' +``` + +To list all available _uprobes/uretprobes_ of the _bash_ executable, run this command: + +``` +$ sudo bpftrace -l "uprobe:/bin/bash" +``` + +_uprobe_ instruments the beginning of a user-level function’s execution, and _uretprobe_ instruments the end (its return). _readline()_ is a function of _/bin/bash_, and it returns the typed command line. _retval_ is the return value for the instrumented function, and can only be accessed on _uretprobe_. + +When using _uprobes_, you can access arguments with _arg0..argN_. A _str()_ call is necessary to turn the _char *_ pointer to a _string_. + +## Shipped Scripts + +There are many useful scripts shipped with bpftrace package. You can find them in the _/usr/share/bpftrace/tools/_ directory. + +Among them, you can find: + + * _killsnoop.bt_ – Trace signals issued by the kill() syscall. + * _tcpconnect.bt_ – Trace all TCP network connections. + * _pidpersec.bt_ – Count new procesess (via fork) per second. + * _opensnoop.bt_ – Trace open() syscalls. + * _vfsstat.bt_ – Count some VFS calls, with per-second summaries. + + + +You can directly use the scripts. For example: + +``` +$ sudo /usr/share/bpftrace/tools/killsnoop.bt +``` + +You can also study these scripts as you create new tools. + +## Links + + * bpftrace reference guide – + * bpftrace (DTrace 2.0) for Linux 2018 – + * BPF: the universal in-kernel virtual machine – + * Linux Extended BPF (eBPF) Tracing Tools – + * Dive into BPF: a list of reading material – [https://qmonnet.github.io/whirl-offload/2016/09/01/dive-into-bpf][6] + + + +* * * + +_Photo by _[_Roman Romashov_][7]_ on _[_Unsplash_][8]_._ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/trace-code-in-fedora-with-bpftrace/ + +作者:[Augusto Caringi][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/acaringi/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/08/bpftrace-816x345.jpg +[2]: https://github.com/iovisor/bpftrace +[3]: https://lwn.net/Articles/740157/ +[4]: https://github.com/iovisor/bpf-docs/blob/master/eBPF.md +[5]: https://fedoramagazine.org/howto-use-sudo/ +[6]: https://qmonnet.github.io/whirl-offload/2016/09/01/dive-into-bpf/ +[7]: https://unsplash.com/@wehavemegapixels?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[8]: https://unsplash.com/search/photos/trace?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText From 4ff7eded0837d230fa358ea11c62acead86015f5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:01:24 +0800 Subject: [PATCH 339/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190808=20Find?= =?UTF-8?q?=20Out=20How=20Long=20Does=20it=20Take=20To=20Boot=20Your=20Lin?= =?UTF-8?q?ux=20System?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md --- ... Does it Take To Boot Your Linux System.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md diff --git a/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md b/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md new file mode 100644 index 0000000000..26d5e394a6 --- /dev/null +++ b/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md @@ -0,0 +1,118 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Find Out How Long Does it Take To Boot Your Linux System) +[#]: via: (https://itsfoss.com/check-boot-time-linux/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Find Out How Long Does it Take To Boot Your Linux System +====== + +When you power on your system, you wait for the manufacturer’s logo to come up, a few messages on the screen perhaps (booting in insecure mode), [Grub][1] screen, operating system loading screen and finally the login screen. + +Did you check how long did it take? Perhaps not. Unless you really need to know, you won’t bother with the boot time details. + +But what if you are curious to know long long your Linux system takes to boot? Running a stopwatch is one way to find that but in Linux, you have better and easier ways to find out your system’s start up time. + +### Checking boot time in Linux with systemd-analyze + +![][2] + +Like it or not, [systemd][3] is running on most of the popular Linux distributions. The systemd has a number of utilities to manage your Linux system. One of those utilities is systemd-analyze. + +The systemd-analyze command gives you a detail of how many services ran at the last start up and how long they took. + +If you run the following command in the terminal: + +``` +systemd-analyze +``` + +You’ll get the total boot time along with the time taken by firmware, boot loader, kernel and the userspace: + +``` +Startup finished in 7.275s (firmware) + 13.136s (loader) + 2.803s (kernel) + 12.488s (userspace) = 35.704s + +graphical.target reached after 12.408s in userspace +``` + +As you can see in the output above, it took about 35 seconds for my system to reach the screen where I could enter my password. I am using Dell XPS Ubuntu edition. It uses SSD storage and despite of that it takes this much time to start. + +Not that impressive, is it? Why don’t you share your system’s boot time? Let’s compare. + +You can further breakdown the boot time into each unit with the following command: + +``` +systemd-analyze blame +``` + +This will produce a huge output with all the services listed in the descending order of the time taken. + +``` +7.347s plymouth-quit-wait.service +6.198s NetworkManager-wait-online.service +3.602s plymouth-start.service +3.271s plymouth-read-write.service +2.120s apparmor.service +1.503s [email protected] +1.213s motd-news.service + 908ms snapd.service + 861ms keyboard-setup.service + 739ms fwupd.service + 702ms bolt.service + 672ms dev-nvme0n1p3.device + 608ms [email protected]:intel_backlight.service + 539ms snap-core-7270.mount + 504ms snap-midori-451.mount + 463ms snap-screencloud-1.mount + 446ms snapd.seeded.service + 440ms snap-gtk\x2dcommon\x2dthemes-1313.mount + 420ms snap-core18-1066.mount + 416ms snap-scrcpy-133.mount + 412ms snap-gnome\x2dcharacters-296.mount +``` + +#### Bonus Tip: Improving boot time + +If you look at this output, you can see that both network manager and [plymouth][4] take a huge bunch of boot time. + +[][5] + +Suggested read  How To Fix: No Unity, No Launcher, No Dash In Ubuntu Linux + +Plymouth is responsible for that boot splash screen you see before the login screen in Ubuntu and other distributions. Network manager is responsible for the internet connection and may be turned off to speed up boot time. Don’t worry, once you log in, you’ll have wifi working normally. + +``` +sudo systemctl disable NetworkManager-wait-online.service +``` + +If you want to revert the change, you can use this command: + +``` +sudo systemctl enable NetworkManager-wait-online.service +``` + +Now, please don’t go disabling various services on your own without knowing what it is used for. It may have dangerous consequences. + +_**Now that you know how to check the boot time of your Linux system, why not share your system’s boot time in the comment section?**_ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/check-boot-time-linux/ + +作者:[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.gnu.org/software/grub/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-boot-time.jpg?resize=800%2C450&ssl=1 +[3]: https://en.wikipedia.org/wiki/Systemd +[4]: https://wiki.archlinux.org/index.php/Plymouth +[5]: https://itsfoss.com/how-to-fix-no-unity-no-launcher-no-dash-in-ubuntu-12-10-quick-tip/ From 049718f77c11480c3a3ed4f6f191f6c295a0ab49 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:06:12 +0800 Subject: [PATCH 340/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190807=20Naviga?= =?UTF-8?q?ting=20the=20Bash=20shell=20with=20pushd=20and=20popd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190807 Navigating the Bash shell with pushd and popd.md --- ...ting the Bash shell with pushd and popd.md | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 sources/tech/20190807 Navigating the Bash shell with pushd and popd.md diff --git a/sources/tech/20190807 Navigating the Bash shell with pushd and popd.md b/sources/tech/20190807 Navigating the Bash shell with pushd and popd.md new file mode 100644 index 0000000000..333f313bcd --- /dev/null +++ b/sources/tech/20190807 Navigating the Bash shell with pushd and popd.md @@ -0,0 +1,203 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Navigating the Bash shell with pushd and popd) +[#]: via: (https://opensource.com/article/19/8/navigating-bash-shell-pushd-popd) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/dnearyhttps://opensource.com/users/greg-phttps://opensource.com/users/shishz) + +Navigating the Bash shell with pushd and popd +====== +Pushd and popd are the fastest navigational commands you've never heard +of. +![bash logo on green background][1] + +The **pushd** and **popd** commands are built-in features of the Bash shell to help you "bookmark" directories for quick navigation between locations on your hard drive. You might already feel that the terminal is an impossibly fast way to navigate your computer; in just a few key presses, you can go anywhere on your hard drive, attached storage, or network share. But that speed can break down when you find yourself going back and forth between directories, or when you get "lost" within your filesystem. Those are precisely the problems **pushd** and **popd** can help you solve. + +### pushd + +At its most basic, **pushd** is a lot like **cd**. It takes you from one directory to another. Assume you have a directory called **one**, which contains a subdirectory called **two**, which contains a subdirectory called **three**, and so on. If your current working directory is **one**, then you can move to **two** or **three** or anywhere with the **cd** command: + + +``` +$ pwd +one +$ cd two/three +$ pwd +three +``` + +You can do the same with **pushd**: + + +``` +$ pwd +one +$ pushd two/three +~/one/two/three ~/one +$ pwd +three +``` + +The end result of **pushd** is the same as **cd**, but there's an additional intermediate result: **pushd** echos your destination directory and your point of origin. This is your _directory stack_, and it is what makes **pushd** unique. + +### Stacks + +A stack, in computer terminology, refers to a collection of elements. In the context of this command, the elements are directories you have recently visited by using the **pushd** command. You can think of it as a history or a breadcrumb trail. + +You can move all over your filesystem with **pushd**; each time, your previous and new locations are added to the stack: + + +``` +$ pushd four +~/one/two/three/four ~/one/two/three ~/one +$ pushd five +~/one/two/three/four/five ~/one/two/three/four ~/one/two/three ~/one +``` + +### Navigating the stack + +Once you've built up a stack, you can use it as a collection of bookmarks or fast-travel waypoints. For instance, assume that during a session you're doing a lot of work within the **~/one/two/three/four/five** directory structure of this example. You know you've been to **one** recently, but you can't remember where it's located in your **pushd** stack. You can view your stack with the **+0** (that's a plus sign followed by a zero) argument, which tells **pushd** not to change to any directory in your stack, but also prompts **pushd** to echo your current stack: + + +``` +$ pushd +0 +~/one/two/three/four ~/one/two/three ~/one ~/one/two/three/four/five +``` + +The first entry in your stack is your current location. You can confirm that with **pwd** as usual: + + +``` +$ pwd +~/one/two/three/four +``` + +Starting at 0 (your current location and the first entry of your stack), the _second_ element in your stack is **~/one**, which is your desired destination. You can move forward in your stack using the **+2** option: + + +``` +$ pushd +2 +~/one ~/one/two/three/four/five ~/one/two/three/four ~/one/two/three +$ pwd +~/one +``` + +This changes your working directory to **~/one** and also has shifted the stack so that your new location is at the front. + +You can also move backward in your stack. For instance, to quickly get to **~/one/two/three** given the example output, you can move back by one, keeping in mind that **pushd** starts with 0: + + +``` +$ pushd -0 +~/one/two/three ~/one ~/one/two/three/four/five ~/one/two/three/four +``` + +### Adding to the stack + +You can continue to navigate your stack in this way, and it will remain a static listing of your recently visited directories. If you want to add a directory, just provide the directory's path. If a directory is new to the stack, it's added to the list just as you'd expect: + + +``` +$ pushd /tmp +/tmp ~/one/two/three ~/one ~/one/two/three/four/five ~/one/two/three/four +``` + +But if it already exists in the stack, it's added a second time: + + +``` +$ pushd ~/one +~/one /tmp ~/one/two/three ~/one ~/one/two/three/four/five ~/one/two/three/four +``` + +While the stack is often used as a list of directories you want quick access to, it is really a true history of where you've been. If you don't want a directory added redundantly to the stack, you must use the **+N** and **-N** notation. + +### Removing directories from the stack + +Your stack is, obviously, not immutable. You can add to it with **pushd** or remove items from it with **popd**. + +For instance, assume you have just used **pushd** to add **~/one** to your stack, making **~/one** your current working directory. To remove the first (or "zeroeth," if you prefer) element: + + +``` +$ pwd +~/one +$ popd +0 +/tmp ~/one/two/three ~/one ~/one/two/three/four/five ~/one/two/three/four +$ pwd +~/one +``` + +Of course, you can remove any element, starting your count at 0: + + +``` +$ pwd ~/one +$ popd +2 +/tmp ~/one/two/three ~/one/two/three/four/five ~/one/two/three/four +$ pwd ~/one +``` + +You can also use **popd** from the back of your stack, again starting with 0. For example, to remove the final directory from your stack: + + +``` +$ popd -0 +/tmp ~/one/two/three ~/one/two/three/four/five +``` + +When used like this, **popd** does not change your working directory. It only manipulates your stack. + +### Navigating with popd + +The default behavior of **popd**, given no arguments, is to remove the first (zeroeth) item from your stack and make the next item your current working directory. + +This is most useful as a quick-change command, when you are, for instance, working in two different directories and just need to duck away for a moment to some other location. You don't have to think about your directory stack if you don't need an elaborate history: + + +``` +$ pwd +~/one +$ pushd ~/one/two/three/four/five +$ popd +$ pwd +~/one +``` + +You're also not required to use **pushd** and **popd** in rapid succession. If you use **pushd** to visit a different location, then get distracted for three hours chasing down a bug or doing research, you'll find your directory stack patiently waiting (unless you've ended your terminal session): + + +``` +$ pwd ~/one +$ pushd /tmp +$ cd {/etc,/var,/usr}; sleep 2001 +[...] +$ popd +$ pwd +~/one +``` + +### Pushd and popd in the real world + +The **pushd** and **popd** commands are surprisingly useful. Once you learn them, you'll find excuses to put them to good use, and you'll get familiar with the concept of the directory stack. Getting comfortable with **pushd** was what helped me understand **git stash**, which is entirely unrelated to **pushd** but similar in conceptual intangibility. + +Using **pushd** and **popd** in shell scripts can be tempting, but generally, it's probably best to avoid them. They aren't portable outside of Bash and Zsh, and they can be obtuse when you're re-reading a script (**pushd +3** is less clear than **cd $HOME/$DIR/$TMP** or similar). + +Aside from these warnings, if you're a regular Bash or Zsh user, then you can and should try **pushd** and **popd**. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/navigating-bash-shell-pushd-popd + +作者:[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/sethhttps://opensource.com/users/dnearyhttps://opensource.com/users/greg-phttps://opensource.com/users/shishz +[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) From 5bc53f87f7b44c23fe917e6517c3d550433c3f9f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:06:42 +0800 Subject: [PATCH 341/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190807=20Intro?= =?UTF-8?q?=20to=20Corteza,=20an=20open=20source=20alternative=20to=20Sale?= =?UTF-8?q?sforce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md --- ...n open source alternative to Salesforce.md | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md diff --git a/sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md b/sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md new file mode 100644 index 0000000000..9cce428246 --- /dev/null +++ b/sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md @@ -0,0 +1,249 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Intro to Corteza, an open source alternative to Salesforce) +[#]: via: (https://opensource.com/article/19/8/corteza-open-source-alternative-salesforce) +[#]: author: (Denis Arh https://opensource.com/users/darhhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/jason-bakerhttps://opensource.com/users/jason-baker) + +Intro to Corteza, an open source alternative to Salesforce +====== +Learn how to use and get Corteza up and running. +![Team communication, chat][1] + +[Corteza][2] is an open source, self-hosted digital work platform for growing an organization's productivity, enabling its relationships, and protecting its work and the privacy of those involved. The project was developed entirely in the public domain by [Crust Technology][3]. It has four core features: customer relationship management, a low-code development platform, messaging, and a unified workspace. This article will also explain how to get started with Corteza on the command line. + +### Customer relationship management + +[Corteza CRM][4] is a feature-rich open source CRM platform that gives organizations a 360-degree overview of leads and accounts. It's flexible, can easily be tailored to any organization, and includes a powerful automation module to automate processes. + +![Corteza CRM screenshot][5] + +### Low-code development platform + +[Corteza Low Code][6] is an open source [low-code development platform][7] and alternative to Salesforce Lightning. It has an intuitive drag-and-drop builder and allows users to create and deploy record-based business applications with ease. Corteza CRM is built on Corteza Low Code. + +![Corteza Low Code screenshot][8] + +### Messaging + +[Corteza Messaging][9] is an alternative to Salesforce Chatter and Slack. It is a secure, high-performance collaboration platform that allows teams to collaborate more efficiently and communicate safely with other organizations or customers. It integrates tightly with Corteza CRM and Corteza Low Code. + +![Corteza Messaging screenshot][10] + +### Unified workspace + +[Corteza One][11] is a unified workspace to access and run third-party web and Corteza applications. Centralized access management from a single console enables administrative control over who can see or access applications. + +![Corteza One screenshot][12] + +## Set up Corteza + +You can set up and run the Corteza platform with a set of simple command-line commands. + +### Set up Docker + +If Docker is already set up on the machine where you want to use Corteza, you can skip this section. (If you are using a Docker version below 18.0, I strongly encourage you to update.) + +If you're not sure whether you have Docker, open your console or terminal and enter: + + +``` +`$> docker -v` +``` + +If the response is "command not found," download and install a Docker community edition for [desktop][13] or [server or cloud][14] that fits your environment. + +### Configure Corteza locally + +By using Docker's command-line interface (CLI) utility **docker-compose** (which simplifies work with containers), Corteza's setup is as effortless as possible. + +The following script provides the absolute minimum configuration to set up a local version of Corteza. If you prefer, you can [open this file on GitHub][15]. Note that this setup does not use persistent storage; you will need to set up container volumes for that. + + +``` +version: '2.0' + +services: +  db: +    image: percona:8.0 +    environment: +      MYSQL_DATABASE:      corteza +      MYSQL_USER:          corteza +      MYSQL_PASSWORD:      oscom-tutorial +      MYSQL_ROOT_PASSWORD: supertopsecret + +  server: +    image: cortezaproject/corteza-server:latest + +    # Map internal 80 port (where Corteza API is listening) +    # to external port 10080. If you change this, make sure you change API_BASEURL setting below +    ports: [ "10080:80" ] + +    environment: +      # Tell corteza-server where can it be reached from the outside +      VIRTUAL_HOST: localhost:10080 + +      # Serving the app from the localhost port 20080 is not very usual setup, +      # this will override settings auto-discovery procedure (provision) and +      # use custom values for frontend URL base +      PROVISION_SETTINGS_AUTH_FRONTEND_URL_BASE: + +      # Database connection, make sure username, password, and database matches values in the db service +      DB_DSN: corteza:oscom-tutorial@tcp(db:3306)/corteza?collation=utf8mb4_general_ci + +  webapp: +    image: cortezaproject/corteza-webapp:latest + +    # Map internal 80 port (where we serve the web application) +    # to external port 20080. +    ports: [ "20080:80" ] + +    environment: +      # Where API can be found +      API_BASEURL: localhost:10080 + +      # We're using one service for the API +      MONOLITH_API: 1 +``` + +Run the services by entering: + + +``` +`docker-compose up` +``` + +You'll see a stream of log lines announcing the database container initialization. Meanwhile, Corteza server will try (and retry) to connect to the database. If you change the database configuration (i.e., username, database, password), you'll get some errors. + +When Corteza server connects, it initializes "store" (for uploaded files), and the settings-discovery process will try to auto-discover as much as possible. (You can help by setting the **VIRTUAL_HOST** and **PROVISION_SETTINGS_AUTH_FRONTEND_URL_BASE** variables just right for your environment.) + +When you see "Starting HTTP server with REST API," Corteza server is ready for use. + +#### Troubleshooting + +If you misconfigure **VIRTUAL_HOST**, **API_BASEURL**, or **PROVISION_SETTINGS_AUTH_FRONTEND_URL_BASE**, your setup will most likely be unusable. The easiest fix is bringing all services down (**docker-compose down**) and back up (**docker-compose up**) again, but this will delete all data. See "Splitting services" below if you want to make it work without this purge-and-restart approach. + +### Log in and explore + +Open in your browser, and give Corteza a try. + +First, you'll see the login screen. Follow the sign-up link and register. Corteza auto-promotes the first user to the administrator role. You can explore the administration area and the messaging and low-code tools with the support of the [user][16] and [administrator][17] guides. + +### Run in the background + +If you're not familiar with **docker-compose**, you can bring up the services with the **-d** flag and run them in the background. You can still access service logs with the **docker-container logs** command if you want. + +## Expose Corteza to your internal network and the world + +If you want to use Corteza in production and with other users, take a look at Corteza's [simple][18] and [advanced][19] deployment setup examples. + +### Establish data persistency + +If you use one of the simple or advanced examples, you can persist your data by uncommenting one of the volume line pairs. + +If you want to store data on your local filesystem, you might need to pay special attention to file permissions. Review the logs when starting up the services if there are any related errors. + +### Proxy requests to containers + +Both server and web-app containers listen on port 80 by default. If you want to expose them to the outside world, you need to use a different outside port. Unfortunately, this makes it not very user-friendly. We do not want to have to tell users to access Corteza on (for example) **corteza.example.org:31337** but directly on **corteza.example.org** with an API served from **api.corteza.example.org**. + +The easiest way to do this is with another Docker image: **[jwilder/nginx-proxy][20]**. You can find a [configuration example][21] in Corteza's docs. When you spin-up an **nginx-proxy** container, it listens for Docker events (e.g., when a container starts or stops), reads values from the container's **VIRTUAL_HOST** variable, and creates an [Nginx][22] configuration that proxies requests directed to the domain configured with **VIRTUAL_HOST** to the container using the domain. + +### Secure HTTP + +Corteza server speaks only plain HTTP (and HTTP 2.0). It does not do any SSL termination, so you must set up the (reverse) proxy that handles HTTPS traffic and redirects it to internal HTTP ports. + +If you use **jwilder/nginx-proxy** as your front end, you can use another image—**[jrcs/letsencrypt-nginx-proxy-companion][23]**—to take care of SSL certificates from Let's Encrypt. It listens for Docker events (in a similar way as **nginx-proxy**) and reads the **LETSENCRYPT_HOST** variable. + +### Configuration + +Another ENV file holds configuration values. See the [docs][24] for details. There are two levels of configuration, with ENV variables and settings stored in the database. + +### Authentication + +Along with its internal authentication capabilities (with usernames and encrypted passwords stored in the database), Corteza supports registration and authentication with GitHub, Google, Facebook, Linkedin, or any other [OpenID Connect][25] (OIDC)-compatible identity provider. + +You can add any [external OIDC provider][26] using auto-discovery or by explicitly setting your key and secret. (Note that GitHub, Google, Facebook, and Linkedin require you to register an application and provide a redirection link.) + +### Splitting services + +If you expect more load or want to separate services to fine-tune your containers, follow the [advanced deployment][19] example, which has more of a microservice-type architecture. It still uses a single database, but it can split into three parts. + +### Other types of setup + +In the future, Corteza will be available for different distributions, appliances, container types, and more + +If you have special requirements, you can always build Corteza as a backend service and the web applications [from source][27]. + +## Using Corteza + +Once you have Corteza up and running, you can start using all its features. Here is a list of recommended actions. + +### Log in + +Enter Corteza at, for example, your **corteza.example.org** link. You'll see the login screen. + +![Corteza Login screenshot][28] + +As mentioned above, Corteza auto-promotes the first user to the administrator role. If you haven't yet, explore the administration area, messaging, and low-code tools. + +### Other tasks to get started + +Here are some other tasks you'll want to do when you're setting up Corteza for your organization. + + * Share the login link with others who will work in your Corteza instance so that they can sign up. + * Create roles, if needed, and assign users to the right roles. By default, only admins can do this. + * Corteza CRM has a complete list of modules. You can enter the CRM admin page to fine-tune the CRM to your needs or just start using it with the defaults. + * Enter Corteza Low Code and create a new low-code app from scratch. + * Create public and private channels in Corteza Messaging for your team. (For example a public "General" or a private "Sales" channel.) + + + +## For more information + +If you or your users have any questions—or would like to contribute—please join the [Corteza Community][29]. After you log in, please introduce yourself in the #Welcome channel. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/corteza-open-source-alternative-salesforce + +作者:[Denis Arh][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/darhhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/jason-bakerhttps://opensource.com/users/jason-baker +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_team_mobile_desktop.png?itok=d7sRtKfQ (Team communication, chat) +[2]: https://www.cortezaproject.org/ +[3]: https://www.crust.tech/ +[4]: https://cortezaproject.org/technology/core/corteza-crm/ +[5]: https://opensource.com/sites/default/files/uploads/screenshot-corteza-crm-1.png (Corteza CRM screenshot) +[6]: https://cortezaproject.org/technology/core/corteza-low-code/ +[7]: https://en.wikipedia.org/wiki/Low-code_development_platform +[8]: https://opensource.com/sites/default/files/uploads/screenshot-corteza-low-code-2.png (Corteza Low Code screenshot) +[9]: https://cortezaproject.org/technology/core/corteza-messaging/ +[10]: https://opensource.com/sites/default/files/uploads/screenshot-corteza-messaging-1.png (Corteza Messaging screenshot) +[11]: https://cortezaproject.org/technology/core/corteza-one/ +[12]: https://opensource.com/sites/default/files/uploads/screenshot-cortezaone-unifiedworkspace.png (Corteza One screenshot) +[13]: https://www.docker.com/products/docker-desktop +[14]: https://hub.docker.com/search?offering=community&type=edition +[15]: https://github.com/cortezaproject/corteza-docs/blob/master/deploy/docker-compose/example-2019-07-os.com/docker-compose.yml +[16]: https://cortezaproject.org/documentation/user-guides/ +[17]: https://cortezaproject.org/documentation/administrator-guides/ +[18]: https://github.com/cortezaproject/corteza-docs/blob/master/deploy/docker-compose/simple.md +[19]: https://github.com/cortezaproject/corteza-docs/blob/master/deploy/docker-compose/advanced.md +[20]: https://github.com/jwilder/nginx-proxy +[21]: https://github.com/cortezaproject/corteza-docs/blob/master/deploy/docker-compose/nginx-proxy/docker-compose.yml +[22]: http://nginx.org/ +[23]: https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion +[24]: https://github.com/cortezaproject/corteza-docs/tree/master/config +[25]: https://en.wikipedia.org/wiki/OpenID_Connect +[26]: https://github.com/cortezaproject/corteza-docs/blob/master/config/ExternalAuth.md +[27]: https://github.com/cortezaproject +[28]: https://opensource.com/sites/default/files/uploads/screenshot-corteza-login.png (Corteza Login screenshot) +[29]: https://latest.cortezaproject.org/ From 376e8132fddbb804846ed950024715132c3f8608 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:07:13 +0800 Subject: [PATCH 342/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190807=20Why=20?= =?UTF-8?q?fear=20of=20failure=20is=20a=20silent=20DevOps=20virus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190807 Why fear of failure is a silent DevOps virus.md --- ...ear of failure is a silent DevOps virus.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sources/tech/20190807 Why fear of failure is a silent DevOps virus.md diff --git a/sources/tech/20190807 Why fear of failure is a silent DevOps virus.md b/sources/tech/20190807 Why fear of failure is a silent DevOps virus.md new file mode 100644 index 0000000000..f47e3e2cb4 --- /dev/null +++ b/sources/tech/20190807 Why fear of failure is a silent DevOps virus.md @@ -0,0 +1,91 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Why fear of failure is a silent DevOps virus) +[#]: via: (https://opensource.com/article/19/8/why-fear-failure-silent-devops-virus) +[#]: author: (Willy-Peter SchaubJustin Kearns https://opensource.com/users/wpschaubhttps://opensource.com/users/bclasterhttps://opensource.com/users/juliegundhttps://opensource.com/users/kearnsjdhttps://opensource.com/users/ophirhttps://opensource.com/users/willkelly) + +Why fear of failure is a silent DevOps virus +====== +In the context of software development, fail fast is innocuous to +DevOps. +![gears and lightbulb to represent innovation][1] + +Do you recognize the following scenario? I do, because a manager once stifled my passion and innovation to the point I was anxious to make decisions, take risks, and focus on what's important: "_uncovering better ways of developing software by doing it and helping others do it_" ([Agile Manifesto, 2001][2]). + +> **Developer:** "_The UX hypothesis failed. Users did not respond well to the new navigation experience, resulting in 80% of users switching back to the classic navigation._" +> +> **Manager: **"_This is really bad! How is this possible? We need to fix this because I'm not sure that our stakeholders want to hear about your failure._" + +Here is a different, more powerful response. + +> **Leader:** "What are the probable causes for our hypothesis failing and how can we improve the user experience? Let us analyze and share our remediation plan with our stakeholders." + +It is all about the tone that centers on a constructive and blameless mindset. + +There are various types of fear that paralyze people, who then infect their team. Fearful that nothing is ever enough, pushing themselves to do more and more, viewing feedback as unfavorable, and often burning themselves out. They work hard, not smart—delivering volume, not value. + +Others fear being judged, compare themselves with others, and shy away from accountability. They seldom share their knowledge, passion, or work; instead of vibrant collaboration, they find themselves wandering through a ghost ship filled with skeletons and foul fish. + +> _"The only thing we have to fear is fear itself."_ – Franklin D. Roosevelt + +_Fear of failure_ is rife in many organizations, especially those that have embarked on a digital transformation journey. It's caused by the undesirability of failure, knowledge of repercussions, and lack of appetite for validated learning. + +This is a strange phenomenon because when we look at the Manifesto for Agile Software Development, we notice references to "customer collaboration" and "responding to change." Lean thinking promotes principles such as "optimize the whole," "eliminate waste," "create knowledge," "build quality in," and "respect people." Also, two of the [Kanban principles][3] mention "visualize work" and "continuous improvement." + +I have a hypothesis: + +> "_I believe an organization will embrace failure if we elaborate the benefit of failure in the context of software engineering to all stakeholders._" + +Let's look at a traditional software development lifecycle that strives for quality, is based on strict processes, and is sensitive to failure. We design, develop, and test all features in sequence. The solution is released to the customer when QA and security give us the "thumbs up," followed by a happy user (success) or unhappy user (failure). + +![Traditional software development lifecycle][4] + +With the traditional model, we have one opportunity to fail or succeed. This is probably an effective model if we are building a sensitive product such as a multimillion-dollar rocket or aircraft. Context is important! + +Now let's look at a more modern software development lifecycle that strives for quality and _embraces failure_. We design, build, and test and release a limited release to our users for preview. We get feedback. If the user is happy (success), we move to the next feature. If the user is unhappy (failure), we either improve or scrap the feature based on validated feedback. + +![Modern software development lifecycle][5] + +Note that we have a minimum of one opportunity to fail per feature, giving us a minimum of 10 opportunities to improve our product, based on validated user feedback, before we release the same product. Essentially, this modern approach is a repetition of the traditional approach, but it's broken down into smaller release cycles. We cannot reduce the effort to design, develop, and test our features, but we can learn and improve the process. You can take this software engineering process a few steps further. + + * **Continuous delivery** (CD) aims to deliver software in short cycles and releases features reliably, one at a time, at a click of a button by the business or user. + * **Test-driven development** (TDD) is a software engineering approach that creates many debates among stakeholders in business, development, and quality assurance. It relies on short and repetitive development cycles, each one crafting test cases based on requirements, failing, and developing software to pass the test cases. + * [**Hypothesis-driven development**][6] (HDD) is based on a series of experiments to validate or disprove a hypothesis in a complex problem domain where we have unknown unknowns. When the hypothesis fails, we pivot. When it passes, we focus on the next experiment. Like TDD, it is based on very short repetitions to explore and react on validated learning. + + + +Yes, I am confident that failure is not bad. In fact, it is an enabler for innovation and continuous learning. It is important to emphasize that we need to embrace failure in the form of _fail fast_, which means that we slice our product into small units of work that can be developed and delivered as value, quickly and reliably. When we fail, the waste and impact must be minimized, and the validated learning maximized. + +To avoid the fear of failure among engineers, all stakeholders in an organization need to trust the engineering process and embrace failure. The best antidote is leaders who are supportive and inspiring, along with having a collective blameless mindset to plan, prioritize, build, release, and support. We should not be reckless or oblivious of the impact of failure, especially when it impacts investors or livelihoods. + +We cannot be afraid of failure when we're developing software. Otherwise, we will stifle innovation and evolution, which in turn suffocates the union of people, process, and continuous delivery of value, key ingredients of DevOps as defined by [Donovan Brown][7]: + +> _"DevOps is the union of people, process, and products to enable continuous delivery of value to our end users."_ + +* * * + +_Special thanks to Anton Teterine and Alex Bunardzic for sharing their perspectives on fear._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/why-fear-failure-silent-devops-virus + +作者:[Willy-Peter SchaubJustin Kearns][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/wpschaubhttps://opensource.com/users/bclasterhttps://opensource.com/users/juliegundhttps://opensource.com/users/kearnsjdhttps://opensource.com/users/ophirhttps://opensource.com/users/willkelly +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation) +[2]: https://agilemanifesto.org/ +[3]: https://www.agilealliance.org/glossary/kanban +[4]: https://opensource.com/sites/default/files/uploads/waterfall.png (Traditional software development lifecycle) +[5]: https://opensource.com/sites/default/files/uploads/agile_1.png (Modern software development lifecycle) +[6]: https://opensource.com/article/19/6/why-hypothesis-driven-development-devops +[7]: http://donovanbrown.com/post/what-is-devops From 06fe920ff7c678517671d1a6e16ffc4eb638cd45 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:07:49 +0800 Subject: [PATCH 343/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=20Unboxi?= =?UTF-8?q?ng=20the=20Raspberry=20Pi=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190806 Unboxing the Raspberry Pi 4.md --- .../20190806 Unboxing the Raspberry Pi 4.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20190806 Unboxing the Raspberry Pi 4.md diff --git a/sources/tech/20190806 Unboxing the Raspberry Pi 4.md b/sources/tech/20190806 Unboxing the Raspberry Pi 4.md new file mode 100644 index 0000000000..83239f5505 --- /dev/null +++ b/sources/tech/20190806 Unboxing the Raspberry Pi 4.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Unboxing the Raspberry Pi 4) +[#]: via: (https://opensource.com/article/19/8/unboxing-raspberry-pi-4) +[#]: author: (Anderson Silva https://opensource.com/users/ansilvahttps://opensource.com/users/bennuttall) + +Unboxing the Raspberry Pi 4 +====== +The Raspberry Pi 4 delivers impressive performance gains over its +predecessors, and the Starter Kit makes it easy to get it up and running +quickly. +![Raspberry Pi 4 board, posterized filter][1] + +When the Raspberry Pi 4 was [announced at the end of June][2], I wasted no time. I ordered two Raspberry Pi 4 Starter Kits the same day from [CanaKit][3]. The 1GB RAM version was available right away, but the 4GB version wouldn't ship until July 19th. Since I wanted to try both, I ordered them to be shipped together. + +![CanaKit's Raspberry Pi 4 Starter Kit and official accessories][4] + +Here's what I found when I unboxed my Raspberry Pi 4. + +### Power supply + +The Raspberry Pi 4 uses a USB-C connector for its power supply. Even though USB-C cables are very common now, your Pi 4 [may not like your USB-C cable][5] (at least with these first editions of the Raspberry Pi 4). So, unless you know exactly what you are doing, I recommend ordering the Starter Kit, which comes with an official Raspberry Pi charger. In case you would rather try whatever you have on hand, the device's input reads 100-240V ~ 50/60Hz 0.5A, and the output says 5.1V --- 3.0A. + +![Raspberry Pi USB-C charger][6] + +### Keyboard and mouse + +The official keyboard and mouse are [sold separately][7] from the Starter Kit, and at $25 total, they aren't really cheap, given you're paying only $35 to $55 for a proper computer. But the Raspberry Pi logo is printed on this keyboard (instead of the Windows logo), and there is something compelling about having an appropriate appearance. The keyboard is also a USB hub, so it allows you to plug in even more devices. I plugged in my [YubiKey][8] security key, and it works very nicely. I would classify the keyboard and mouse as a "nice to have" versus a "must-have." Your regular keyboard and mouse should work fine. + +![Official Raspberry Pi keyboard \(with YubiKey plugged in\) and mouse.][9] + +![Raspberry Pi logo on the keyboard][10] + +### Micro-HDMI cable + +Something that may have caught some folks by surprise is that, unlike the Raspberry Pi Zero that comes with a Mini-HDMI port, the Raspberry Pi 4 comes with a Micro-HDMI. They are not the same thing! So, even though you may have a suitable USB-C cable/power adaptor, mouse, and keyboard on hand, there is a pretty good chance you will need a Micro-HDMI-to-HDMI cable (or an adapter) to plug your new Raspberry Pi into a display. + +### The case + +Cases for the Raspberry Pi have been around for years and are probably one of the very first "official" peripherals the Raspberry Pi Foundation sold. Some people like them; others don't. I think putting a Pi in a case makes it easier to carry it around and avoid static electricity and bent pins. + +On the other hand, keeping your Pi covered can overheat the board. This CanaKit Starter Kit also comes with heatsink for the processor, which might help, as the newer Pis are already [known for running pretty hot][11]. + +![Raspberry Pi 4 case][12] + +### Raspbian and NOOBS + +The other item that comes with the Starter Kit is a microSD card with the correct version of the [NOOBS][13] operating system for the Raspberry Pi 4 pre-installed. (I got version 3.1.1, released June 24, 2019). If you're using a Raspberry Pi for the first time and are not sure where to start, this could save you a lot of time. The microSD card in the Starter Kit is 32GB. + +After you insert the microSD card and connect all the cables, just start up the Pi, boot into NOOBS, pick the Raspbian distribution, and wait while it installs. + +![Raspberry Pi 4 with 4GB of RAM][14] + +I noticed a couple of improvements while installing the latest Raspbian. (Forgive me if they've been around for a while—I haven't done a fresh install on a Pi since the 3 came out.) One is that Raspbian will ask you to set up a password for your account at first boot after installation, and the other is that it will run a software update (assuming you have network connectivity). These are great improvements to help keep your Raspberry Pi a little more secure. I would love to see the option to encrypt the microSD card at installation … maybe someday? + +![Running Raspbian updates at first boot][15] + +![Raspberry Pi 4 setup][16] + +It runs very smoothly! + +### Wrapping up + +Although CanaKit isn't the only authorized Raspberry Pi retailer in the US, I found its Starter Kit to provide great value for the price. + +So far, I am very impressed with the performance gains in the Raspberry Pi 4. I'm planning to try spending an entire workday using it as my only computer, and I'll write a follow-up article soon about how far I can go. Stay tuned! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/unboxing-raspberry-pi-4 + +作者:[Anderson Silva][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/ansilvahttps://opensource.com/users/bennuttall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/raspberrypi4_board_hardware.jpg?itok=KnFU7NvR (Raspberry Pi 4 board, posterized filter) +[2]: https://opensource.com/article/19/6/raspberry-pi-4 +[3]: https://www.canakit.com/raspberry-pi-4-starter-kit.html +[4]: https://opensource.com/sites/default/files/uploads/raspberrypi4_canakit.jpg (CanaKit's Raspberry Pi 4 Starter Kit and official accessories) +[5]: https://www.techrepublic.com/article/your-new-raspberry-pi-4-wont-power-on-usb-c-cable-problem-now-officially-confirmed/ +[6]: https://opensource.com/sites/default/files/uploads/raspberrypi_usb-c_charger.jpg (Raspberry Pi USB-C charger) +[7]: https://www.canakit.com/official-raspberry-pi-keyboard-mouse.html?defpid=4476 +[8]: https://www.yubico.com/products/yubikey-hardware/ +[9]: https://opensource.com/sites/default/files/uploads/raspberrypi_keyboardmouse.jpg (Official Raspberry Pi keyboard (with YubiKey plugged in) and mouse.) +[10]: https://opensource.com/sites/default/files/uploads/raspberrypi_keyboardlogo.jpg (Raspberry Pi logo on the keyboard) +[11]: https://www.theregister.co.uk/2019/07/22/raspberry_pi_4_too_hot_to_handle/ +[12]: https://opensource.com/sites/default/files/uploads/raspberrypi4_case.jpg (Raspberry Pi 4 case) +[13]: https://www.raspberrypi.org/downloads/noobs/ +[14]: https://opensource.com/sites/default/files/uploads/raspberrypi4_ram.jpg (Raspberry Pi 4 with 4GB of RAM) +[15]: https://opensource.com/sites/default/files/uploads/raspberrypi4_rasbpianupdate.jpg (Running Raspbian updates at first boot) +[16]: https://opensource.com/sites/default/files/uploads/raspberrypi_setup.jpg (Raspberry Pi 4 setup) From 10802edac765b0e146b1edb2cd66a2c7239f4ece Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:08:45 +0800 Subject: [PATCH 344/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=20Is=20P?= =?UTF-8?q?erl=20going=20extinct=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190806 Is Perl going extinct.md --- .../tech/20190806 Is Perl going extinct.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/tech/20190806 Is Perl going extinct.md diff --git a/sources/tech/20190806 Is Perl going extinct.md b/sources/tech/20190806 Is Perl going extinct.md new file mode 100644 index 0000000000..bd25fc1f44 --- /dev/null +++ b/sources/tech/20190806 Is Perl going extinct.md @@ -0,0 +1,62 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Is Perl going extinct?) +[#]: via: (https://opensource.com/article/19/8/command-line-heroes-perl) +[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/shawnhcoreyhttps://opensource.com/users/sethhttps://opensource.com/users/roger78) + +Is Perl going extinct? +====== +Command Line Heroes explores the meteoric rise of Perl, its fall from +the spotlight, and what's next in the programming language's lifecycle. +![Listen to the Command Line Heroes Podcast][1] + +Is there an [endangered species][2] list for programming languages? If there is, [Command Line Heroes][3] suggests that Perl is somewhere between vulnerable and critically endangered. The dominant language of the 1990s is the focus of this week's podcast (Season 3, Episode 4) and explores its highs and lows since it was introduced over 30 years ago. + +### The timeline + +1991 was the year that changed everything. Tim Berners-Lee released the World Wide Web. The internet had been connecting computers for 20 years, but the web connected people in brand new ways. An entire new frontier of web-based development opened. + +Last week's episode explored [how JavaScript was born][4] and launched the browser wars. Before that language dominated the web, Perl was incredibly popular. It was open source, general purpose, and ran on nearly every Unix-like platform. Perl allowed a familiar set of practices any sysadmin would appreciate running. + +### What happened? + +So, if Perl was doing so well in the '90s, why did it start to sink? The dot-com bubble burst in 2000, and the first heady rush of web development was about to give way to a slicker, faster, different generation. Python became a favorite for first-time developers, much like Perl used to be an attractive first language that stole newbies away from FORTRAN or C. + +Perl was regarded highly because it allowed developers to solve a problem in many ways, but that feature later became known as a bug. [Python's push toward a single right answer][5] ended up being where many people wanted to go. Conor Myhrvold wrote in _Fast Company_ how Python became more attractive and [what Perl might have done to keep up][6]. For these reasons and myriad others, like the delay of Perl 6, it lost momentum. + +### Lifecycle management + +Overall, I'm comfortable with the idea that some languages don't make it. [BASIC][7] isn't exactly on the software bootcamp hit list these days. But maybe Perl isn't on the same trajectory and could be best-in-class for a more specific type of problem around glue code for system challenges. + +I love how Command Line Heroes host [Saron Yitbarek][8] summarizes it at the end of the podcast episode: + +> "Languages have lifecycles. When new languages emerge, exquisitely adapted to new realities, an option like Perl might occupy a smaller, more niche area. But that's not a bad thing. Our languages should expand and shrink their communities as our needs change. Perl was a crucial player in the early history of web development—and it stays with us in all kinds of ways that become obvious with a little history and a look at the big picture." + +Learning about Perl's rise and search for a new niche makes me wonder which of the new languages we're developing today will still be around in 30 years. + +Command Line Heroes will cover programming languages for all of season 3. [Subscribe so you don't miss a single one][3]. I would love to hear your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/command-line-heroes-perl + +作者:[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/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/shawnhcoreyhttps://opensource.com/users/sethhttps://opensource.com/users/roger78 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command-line-heroes-520x292.png?itok=s_F6YEoS (Listen to the Command Line Heroes Podcast) +[2]: https://www.nationalgeographic.org/media/endangered/ +[3]: https://www.redhat.com/en/command-line-heroes +[4]: https://opensource.com/article/19/7/command-line-heroes-javascript +[5]: https://opensource.com/article/19/6/command-line-heroes-python +[6]: https://www.fastcompany.com/3026446/the-fall-of-perl-the-webs-most-promising-language +[7]: https://opensource.com/19/7/command-line-heroes-ruby-basic +[8]: https://twitter.com/saronyitbarek From 614b394e3cd6853c6e5d5e251f2733c5a3a486b3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:09:08 +0800 Subject: [PATCH 345/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=203=20to?= =?UTF-8?q?ols=20for=20doing=20presentations=20from=20the=20command=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190806 3 tools for doing presentations from the command line.md --- ...ing presentations from the command line.md | 207 ++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 sources/tech/20190806 3 tools for doing presentations from the command line.md diff --git a/sources/tech/20190806 3 tools for doing presentations from the command line.md b/sources/tech/20190806 3 tools for doing presentations from the command line.md new file mode 100644 index 0000000000..d77d756611 --- /dev/null +++ b/sources/tech/20190806 3 tools for doing presentations from the command line.md @@ -0,0 +1,207 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (3 tools for doing presentations from the command line) +[#]: via: (https://opensource.com/article/19/8/command-line-presentation-tools) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitthttps://opensource.com/users/murphhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/scottnesbitt) + +3 tools for doing presentations from the command line +====== +mdp, tpp, and sent may not win you any design awards, but they'll give +you basic slides that you can run from a terminal. +![Files in a folder][1] + +Tired of creating and displaying presentation slides using [LibreOffice Impress][2] or various slightly geeky [tools][3] and [frameworks][4]? Instead, consider running the slides for your next talk from a terminal window. + +Using the terminal to present slides sounds strange, but it isn't. Maybe you want to embrace your inner geek a bit more. Perhaps you want your audience to focus on your ideas rather than your slides. Maybe you're a devotee of the [Takahashi method][5]. Whatever your reasons for turning to the terminal, there's a (presentation) tool for you. + +Let's take a look at three of them. + +### mdp + +Seeing as how I'm something of a Markdown person, I took [mdp][6] for a spin the moment I heard about it. + +You create your slides in a text editor, prettying the text up with Markdown. mpd recognizes most Markdown formatting—from headings and lists to code blocks to character formatting and URLs. + +You can also add a [Pandoc metadata block][7], which can contain your name, the title of your presentation, and the date you're giving your talk. That adds the title to the top of every slide and your name and the date to the bottom. + +Your slides are in a single text file. To let mdp know where a slide starts, add a line of dashes after each slide. + +Here's a very simple example: + + +``` +%title: Presentation Title +%author: Your Name +%date: YYYY-MM-DD + +-> # Slide 1 <- + +Intro slide + +\-------------------------------------------------- +-> # Slide 2 <- +============== + +* Item 1 +* Item 2 +* Item 3 + +\------------------------------------------------- +-> # Slide 3  <- + +This one with a numbered list + +1\. Item 1 +2\. Item 2 +3\. Item 3 + +\------------------------------------------------- + +-> # Conclusion  <- + +mdp supports *other* **formatting**, too. Give it a try! +``` + +See the **->** and **<-** surrounding the titles of each slide? Any text between those characters is centered in a terminal window. + +Run your slideshow by typing **mdp slides.md** (or whatever you named your file) in a terminal window. Here's what the example slides I cobbled together look like: + +![Example mdp slide][8] + +Cycle through them by pressing the arrow keys or the spacebar on your keyboard. + +### tpp + +[tpp][9] is another simple, text-based presentation tool. It eschews Markdown for its own formatting. While the formatting is simple, it's very concise and offers a couple of interesting—and useful—surprises. + +You use dashes to indicate most of the formatting. You can add a metadata block at the top of your slide file to create the title slide for your presentation. Denote headings by typing **\--heading** followed by the heading's text. Center text on a slide by typing **\--center** and then the text. + +To create a new slide, type: + + +``` +\--- +\--newpage +``` + +Here's an example of some basic slides: + + +``` +\--title Presentation Title +\--date YYYY-MM-DD +\--author Your Name + +\--- +\--newpage + +\--heading Slide 1 + +  * Item 1 + +\--- +\--newpage + +\--heading Slide 2 +  * Item 1 +  * Item 2 + +\--- +\--newpage + +\--heading Slide 3 + +  * Item 1 +  * Item 2 +  * Item 3 +``` + +Here's what they look like in a terminal window: + +![tpp slide example][10] + +Move through your slides by pressing the arrow keys on your keyboard. + +What about those interesting and useful surprises I mentioned earlier? You can add a splash of color to the text on a slide by typing **\--color** and then the name of the color you want to use—for example, **red**. Below that, add the text whose color you want to change, like this: + + +``` +\--color red +Some text +``` + +If you have a terminal command that you want to include on a slide, wrap it between **\--beginoutput** and **\--endoutput**. Taking that a step further, you can simulate typing the command by putting it between **\--beginshelloutput** and **\--endshelloutput**. Here's an example: + +![Typing a command on a slide with tpp][11] + +### Sent + +[Sent][12] isn't strictly a command-line presentation tool. You run it from the command line, but it opens an X11 window containing your slides. + +Sent is built around the Takahashi method for presenting that I mentioned at the beginning of this article. The core idea behind the Takahashi method is to have one or two keywords in large type on a slide. The keywords distill the idea you're trying to get across at that point in your presentation. + +As with mpd and tpp, you craft your slides in [plain text][13] in a text editor. Sent doesn't use markup, and there are no special characters to indicate where a new slide begins. Sent assumes each new paragraph is a slide. + +You're not limited to using text. Sent also supports images. To add an image to a slide, type **@** followed by the name of the image—for example, **@mySummerVacation.jpg**. + +Here's an excerpt from a slide file: + + +``` +On Writing Evergreen Articles + +Evergreen? + +8 Keys to Good Evergreen Articles + +@images/typewriter.jpg + +Be Passionate + +Get Your Hands Dirty + +Focus +``` + +Fire up your slides by typing **sent filename** in a terminal window. The X11 window that opens goes into full-screen mode and displays text in as large a font as possible. Any images in your slides are centered in the window. + +![Example Sent slide][14] + +### Drawbacks of these tools + +You're not going to win any design awards for the slides you create with mdp, tpp, or sent. They're plain. They're utilitarian. But, as I pointed out at the beginning of this article, the slides you create and present with those tools can help your audience focus on what you're saying rather than your visuals. + +If you use mdp or tpp, you need to do some fiddling with your terminal emulator's settings to get the fonts and sizes right. Out of the box, the fonts might be too small—as you see in the screen captures above. If your terminal emulator supports profiles, create one for presentations with the font you want to use at the size you want. Then go full-screen. + +Neither mdp, tpp, nor sent will appeal to everyone. That's fine. There's no one presentation tool to rule them all, no matter what some people say. But if you need, or just want, to go back to basics, these three tools are good options. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/command-line-presentation-tools + +作者:[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/scottnesbitthttps://opensource.com/users/murphhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/scottnesbitt +[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://www.libreoffice.org/discover/impress/ +[3]: https://opensource.com/article/18/5/markdown-slide-generators +[4]: https://opensource.com/article/18/2/how-create-slides-emacs-org-mode-and-revealjs +[5]: https://presentationzen.blogs.com/presentationzen/2005/09/living_large_ta.html +[6]: https://github.com/visit1985/mdp +[7]: https://pandoc.org/MANUAL.html#metadata-blocks +[8]: https://opensource.com/sites/default/files/uploads/mdp-slides.png (Example mdp slide) +[9]: https://synflood.at/tpp.html +[10]: https://opensource.com/sites/default/files/uploads/tpp-example.png (tpp slide example) +[11]: https://opensource.com/sites/default/files/uploads/tpp-code_1.gif (Typing a command on a slide with tpp) +[12]: https://tools.suckless.org/sent/ +[13]: https://plaintextproject.online +[14]: https://opensource.com/sites/default/files/uploads/sent-example.png (Example Sent slide) From 95f13704fdb4ac8fcff82fb2db499718ee2a81a3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:09:46 +0800 Subject: [PATCH 346/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=20Avoidi?= =?UTF-8?q?ng=20burnout:=204=20considerations=20for=20a=20more=20energetic?= =?UTF-8?q?=20organization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190806 Avoiding burnout- 4 considerations for a more energetic organization.md --- ...tions for a more energetic organization.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20190806 Avoiding burnout- 4 considerations for a more energetic organization.md diff --git a/sources/tech/20190806 Avoiding burnout- 4 considerations for a more energetic organization.md b/sources/tech/20190806 Avoiding burnout- 4 considerations for a more energetic organization.md new file mode 100644 index 0000000000..4dc46b8845 --- /dev/null +++ b/sources/tech/20190806 Avoiding burnout- 4 considerations for a more energetic organization.md @@ -0,0 +1,104 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Avoiding burnout: 4 considerations for a more energetic organization) +[#]: via: (https://opensource.com/open-organization/19/8/energy-fatigue-burnout) +[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarlandhttps://opensource.com/users/jonobaconhttps://opensource.com/users/marcobravohttps://opensource.com/users/ron-mcfarland) + +Avoiding burnout: 4 considerations for a more energetic organization +====== +Being open requires a certain kind of energy—and if you don't take time +to replenish that energy, your organization will suffer. +![Light bulb][1] + +In both personal and organizational life, energy levels are important. This is no less true of open organizations. Consider this: When you're tired, you'll have trouble _adapting_ when challenges arise. When your energy is low, you'll have trouble _collaborating_ with others. When you're feeling fatigued, building and energizing an open organization _community_ is difficult. + +At a time when [the World Health Organization (WHO) has recently formalized its definition for burnout][2], this issue seems more important than ever. In this article, I'll address the important issue of managing daily energy—both at the personal and organizational levels. + +### Energy management + +Having spent most of my career in overseas sales and sales training, I've learned that both individual and company energy levels are very important. In the early part of the career, I was traveling approximately every two months. Most trips were two to four weeks long. When teaching during those trips, I'd find myself standing six hours every day as I presented selling techniques to salespeople. It was exhausting. + +But I loved the work, and I knew I had to do something to keep my energy up. At a physical level, I knew I had to strengthen my legs and my heart, as well as change my diet to be able to sleep deeper at odd times of the day. Interestingly, I was not alone, as I heard many jet lag and exhaustion complaints in airport business lounges regularly. But I had to think about energy at an emotional level, too. I knew that the outside retail sales people I was training had to take rejection every day; they had to be able to control their levels of emotion and energy to be productive. + +Whether for companies or individuals, exhaustion is counter-productive, resulting in errors, frustration, and poor performance. This could be even more true in open organizations, as many participants are contributing for a wide range of reasons outside of basic monetary rewards. Many organizations emphasize time-management, stress-management, crisis-management, and resource-management—but I've never heard of a company that has adopted and introduced an "energy management" program. + +Why not? + +In my case, in order to keep both myself and the sales people I was training energized and productive, I had to address the issue of energy. So I started studying and reading about the subject. Eventually I found the book [_The Way We're Working Isn't Working_][3] by Tony Schwartz, and still consider it the most helpful. Schwartz went on to develop [The Energy Project][4],"a consulting firm that helps individuals and organizations grow and transform so together they can prosper, add more value in the world, and do less harm." It addresses this issue of fatigue head on. + +Schwartz distinguishes four separate and distinct categories of energy: physical, emotional, mental, and spiritual. Let me explain each and add some comments along the way. + +### Four categories of energy + +#### Physical health + +First, to have adequate energy every day, you've got to take care of your physical health. That means you _must_ address issues like nutrition, posture, sleep, and exercise (I found the book _Farewell to Fatigue_ by Donald Norfolk especially helpful for learning how to get over jet lag quickly.) To use an automotive term: You should always have a good "power to weight ratio." In other words, you must increase the driveline power/efficiency or reduce the overall weight of the vehicle to improve performance. + +I decided to work on both, keeping my legs strong and my weight down. I started jogging four to five times per week and improved my diet, which really helped me get a lot more out of my days and reduce fatigue. + +#### Emotional well-being + +Our energy grows when we feel appreciated by others. When the environment is exciting, we are motivated—which also leads to added energy. Conversely, when we don't feel that others appreciate us—or we find ourselves in a dull, even toxic environment—our energy levels suffer. In [_Every Word Has Power_][5], author Yvonne Oswald writes that the words we use and hear can make a big difference to our energy levels and well-being. She writes that simply reframing our everyday speech can help us boost energy levels. Instead of speaking excessively with the word "not" ("Don't strike out," "Don't double-fault,"), we should form sentences that paint a positive (energy-creating) image or picture in our minds. ("Hit a home run," "Serve an ace"). The former statements _consume_ our energy; the latter _enhance_ it. + +Regarding energy generation in a working environment, the book [_The Progress Principle_ by Teresa Amabile][6] taught me an important insight. Amabile's research shows that generating a feeling of upward progress is the most powerful way to increase energy in an organization. A feeling of progress, learning, developing, and moving upward is extremely important. The opposite is true for declining organizations. I've consulted a lot of companies over the years, and when I'm seeking to get a feeling for an organization's energy level, all I have to do is ask one question: "What is your company's project or product development program and its future prospects?" If I can't get a clear, detailed answer to that question throughout the organization, I know that people are just biding their time and aren't energized. + +#### Mental clarity + +Our minds consume more energy than any other part of our body, just like computers that consume a lot of electricity. That is why we're so tired after studying for many hours or taking long tests. We didn't move around much, but we're tired just the same because we consumed energy through concentration and mental activity. When our mental energy is low, our ability to focus intensely, prioritize, and think creatively suffer. We therefore must know when to relax and re-energize our brains. + +Whether for companies or individuals, exhaustion is counter-productive, resulting in errors, frustration, and poor performance. This could be even more true in open organizations, as many participants are contributing for a wide range of reasons outside of basic monetary rewards. + +Additionally, consider mental energy and the concept of "multi-tasking." Some people proudly report that they're good at multi-tasking—but they shouldn't be, as it wastes mental energy. I am not saying we shouldn't listen to music while driving the car, but when it comes to cognitive mental processing, we can only do one thing at a time. The concept of "multi-tasking" is actually a misnomer in the context of deep thinking. Human brains process information sequentially (one issue at a time). We simply _cannot_ conduct two thinking tasks at the same time. Instead, what we're _really_ doing is task "switching," a back-and-forth movement between tasks that has a significant mental energy cost for the value gained. First and foremost, it is less efficient. Also, it consumes a great deal of energy. Best is to start a task and completely finish it before moving on to the next task, reducing shut-down and recall waste. + +Just like overworking a muscle, mental clarity, strength, and energy can be used up. Therefore, mental recovery is important. Many people have found “power naps” or meditating extremely helpful. Going into a relax mode for only 20 minutes can be very helpful. It is just enough time to build your mental energy, but not long enough to make you groggy. + +#### Spiritual significance + +Spiritual significance creates energy, and it comes from the feeling of serving a mission beyond financial rewards. Put simply, it is doing something we consider important (an internal desire or goal). In the case of my sales training career, for example, I had a purpose of building the _careers_ of salespeople who had very little formal education. Teaching in countless developing countries really offered an inspiring purpose for me. At that time, this dimension of my work provided "spiritual significance". It generated a great deal of energy in me. As I grow older, I'm finding this spiritual significance becoming extremely important while financial rewards start to weaken. I'm sure this is true for many people that are contributing to open organizations. This contribution is where their energy comes from. + +Not just for me, not just for open organization, but for _people in general_, I've found these four types of energy very important—so much so that I've prepared and delivered [presentations][7] on them. + +### Energy across four zones + +In _[The Way We're Working Isn't Working][3],_ Tony Schwartz mentions four zones that people operate in, which I've diagrammed in Figure 1. + +![][8] + +Here we see four quadrants useful in evaluating a working environment. From left to right we see an assessment of the environment, with a negative environment (energy-consuming) on the left and a positive environment (energizing) on the right. From top to bottom, then, is an assessment of the organization's (or individual's) energy level. Obviously, you want to be in the upper-right zone as much as possible and out of the bottom-left zone as much as possible. + +To move from the Survival Zone (left) to the Performance Zone (right), Schwartz suggests you can manage your attitude by looking through three "lenses": + + * **Reflection lens.** Ask two very simple questions: 1. What are the facts? and 2. What assumptions am I making? Stand back, observe the environment, and give yourself a chance to consider other, more positive ways of thinking about the situation. + * **Reverse lens.** How do you think other people (particularly the person creating the negative environment) feel about the situation? Try to find ways to see or feel that person's perspective. + * **Long lens.** Even after learning and confirming the facts and considering other people's perspectives, if you still feel like you're in the Survival Zone or Burnout Zone, consider the future. Imagine how you can make the best of a bad situation and move above it. No matter how badly you feel right now, how can you learn from this experience and excel in the future? Try to see value in the experience. + + + +Do yourself a favor when you wake up in the morning. Evaluate yourself on the four energy types I mentioned in this article. Rate yourself from 1 to 10 on your current "morning physical health energy level." Then, do the same thing for your "emotional well-being energy level," "mental clarity energy level" and "spiritual significance energy level." That will give you some idea of what you'll have to work on to get the most out of both your day and life. + +Jono Bacon shares some quite ridiculous life choices from his early years that illustrate important... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/19/8/energy-fatigue-burnout + +作者:[Ron McFarland][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/ron-mcfarlandhttps://opensource.com/users/jonobaconhttps://opensource.com/users/marcobravohttps://opensource.com/users/ron-mcfarland +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bulb-light-energy-power-idea.png?itok=zTEEmTZB (Light bulb) +[2]: https://icd.who.int/browse11/l-m/en#/http://id.who.int/icd/entity/129180281 +[3]: https://www.simonandschuster.com/books/The-Way-Were-Working-Isnt-Working/Tony-Schwartz/9781451610260 +[4]: https://theenergyproject.com/team/tony-schwartz/ +[5]: https://www.simonandschuster.com/books/Every-Word-Has-Power/Yvonne-Oswald/9781582701813 +[6]: http://progressprinciple.com/books/single/the_progress_principle +[7]: https://www.slideshare.net/RonMcFarland1/increasing-company-energy?qid=e3c251fc-be71-4185-b216-3c7e5b48f7b1&v=&b=&from_search=2 +[8]: https://opensource.com/sites/default/files/images/open-org/energy_zones.png From 4d71f3c5a7dd854ce5ab5391393c8c2d31d92fc1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:10:30 +0800 Subject: [PATCH 347/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=20Micros?= =?UTF-8?q?oft=20finds=20Russia-backed=20attacks=20that=20exploit=20IoT=20?= =?UTF-8?q?devices?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md --- ...backed attacks that exploit IoT devices.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md diff --git a/sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md b/sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md new file mode 100644 index 0000000000..b8009d3923 --- /dev/null +++ b/sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Microsoft finds Russia-backed attacks that exploit IoT devices) +[#]: via: (https://www.networkworld.com/article/3430356/microsoft-finds-russia-backed-attacks-that-exploit-iot-devices.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +Microsoft finds Russia-backed attacks that exploit IoT devices +====== +Microsoft says default passwords, unpatched devices, poor inventory of IoT gear led to exploits against companies by Russia's STRONTIUM hacking group. +![Zmeel / Getty Images][1] + +The STRONTIUM hacking group, which has been strongly linked by security researchers to Russia’s GRU military intelligence agency, was responsible for an [IoT][2]-based attack on unnamed Microsoft customers, according to the company. a blog post from the company’s security response center issued Monday. + +Microsoft [said in a blog][3] that the attack, which it discovered in April, targeted three specific IoT devices – a VoIP phone, a video decoder and a printer (the company declined to specify the brands) – and used them to gain access to unspecified corporate networks. Two of the devices were compromised because nobody had changed the manufacturer’s default password, and the other one hadn’t had the latest security patch applied. + +**More on IoT:** + + * [][4] [Most powerful Internet of Things companies][5] + * [10 Hot IoT startups to watch][6] + * [The 6 ways to make money in IoT][7] + * [What is digital twin technology? [and why it matters]][8] + * [Blockchain, service-centric networking key to IoT success][9] + * [Getting grounded in IoT networking and security][10] + * [Building IoT-ready networks must become a priority][11] + * [What is the Industrial IoT? [And why the stakes are so high]][12] + + + +Devices compromised in this way acted as back doors to secured networks, allowing the attackers to freely scan those networks for further vulnerabilities, access additional systems, and gain more and more information. The attackers were also seen investigating administrative groups on compromised networks, in an attempt to gain still more access, as well as analyzing local subnet traffic for additional data. + +STRONTIUM, which has also been referred to as Fancy Bear, Pawn Storm, Sofacy and APT28, is thought to be behind a host of malicious cyber-activity undertaken on behalf of the Russian government, including the 2016 hack of the Democratic National Committee, attacks on the World Anti-Doping Agency, the targeting of journalists investigating the shoot-down of Malaysia Airlines Flight 17 over Ukraine, sending death threats to the wives of U.S. military personnel under a false flag and much more. + +According to an indictment released in July 2018 by the office of Special Counsel Robert Mueller, the architects of the STRONTIUM attacks are a group of Russian military officers, all of whom are wanted by the FBI in connection with those crimes. + +Microsoft notifies customers that it discovers are attacked by nation-states and has delivered about 1,400 such notifications related to STRONTIUM over the past 12 months. Most of those – four in five – went to organizations in the government, military, defense, IT, medicine, education and engineering sectors, and the remainder were for NGOs, think-tanks and other “politically affiliated organizations,” Microsoft said. + +The heart of the vulnerability, according to the Microsoft team, was a lack of full awareness by institutions of all the devices running on their networks. They recommended, among other things, cataloguing all IoT devices running in a corporate environment, implementing custom security policies for each device, walling off IoT devices on their own separate networks wherever practical, and performing regular patch and configuration audits on IoT gadgets. + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][13] ]** + +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/3430356/microsoft-finds-russia-backed-attacks-that-exploit-iot-devices.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://images.idgesg.net/images/article/2019/07/cso_russian_hammer_and_sickle_binary_code_by_zmeel_gettyimages-927363118_2400x1600-100801412-large.jpg +[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html +[3]: https://msrc-blog.microsoft.com/2019/08/05/corporate-iot-a-path-to-intrusion/ +[4]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html +[5]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html +[6]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html +[7]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html +[8]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html +[9]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html +[10]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html +[11]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html +[12]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[13]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[14]: https://www.facebook.com/NetworkWorld/ +[15]: https://www.linkedin.com/company/network-world From 7f6644c0e1b4b70bc9f1921a701047709a2aa530 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Aug 2019 02:11:14 +0800 Subject: [PATCH 348/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190806=20Intel?= =?UTF-8?q?=20pulls=20the=20plug=20on=20Omni-Path=20networking=20fabric=20?= =?UTF-8?q?architecture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190806 Intel pulls the plug on Omni-Path networking fabric architecture.md --- ...mni-Path networking fabric architecture.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/talk/20190806 Intel pulls the plug on Omni-Path networking fabric architecture.md diff --git a/sources/talk/20190806 Intel pulls the plug on Omni-Path networking fabric architecture.md b/sources/talk/20190806 Intel pulls the plug on Omni-Path networking fabric architecture.md new file mode 100644 index 0000000000..3607fb952f --- /dev/null +++ b/sources/talk/20190806 Intel pulls the plug on Omni-Path networking fabric architecture.md @@ -0,0 +1,62 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Intel pulls the plug on Omni-Path networking fabric architecture) +[#]: via: (https://www.networkworld.com/article/3429614/intel-pulls-the-plug-on-omni-path-networking-fabric-architecture.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Intel pulls the plug on Omni-Path networking fabric architecture +====== +Omni-Path Architecture, which Intel had high hopes for in the high-performance computing (HPC) space, has been scrapped after one generation. +![Gerd Altmann \(CC0\)][1] + +Intel’s battle to gain ground in the high-performance computing (HPC) market isn’t going so well. The Omni-Path Architecture it had pinned its hopes on has been scrapped after one generation. + +An Intel spokesman confirmed to me that the company will no longer offer Intel OmniPath Architecture 200 (OPA200) products to customers, but it will continue to encourage customers, OEMs, and partners to use OPA100 in new designs.  + +“We are continuing to sell, maintain, and support OPA100. We actually announced some new features for OPA100 back at International Supercomputing in June,” the spokesperson said via email. + +**[ Learn [who's developing quantum computers][2]. ]** + +Intel said it continues to invest in connectivity solutions for its customers and that the recent [acquisition of Barefoot Networks][3] is an example of Intel’s strategy of supporting end-to-end cloud networking and infrastructure. It would not say if Barefoot’s technology would be the replacement for OPA. + +While Intel owns the supercomputing market, it has not been so lucky with the HPC fabric, a network that connects CPUs and memory for faster data sharing. Market leader Mellanox with its Enhanced Data Rate (HDR) InfiniBand framework rules the roost, and now [Mellanox is about to be acquired][4] by Intel’s biggest nemesis, Nvidia. + +Technically, Intel was a bit behind Mellanox. OPA100 is 100 Gbits, and OPA200 was intended to be 200 Gbits, but Mellanox was already at 200 Gbits and is set to introduce 400-Gbit products later this year. + +Analyst Jim McGregor isn’t surprised. “They have a history where if they don’t get high uptick on something and don’t think it’s of value, they’ll kill it. A lot of times when they go through management changes, they look at how to optimize. Paul [Otellini] did this extensively. I would expect Bob [Swan, the newly minted CEO] to do that and say these things aren’t worth our investment,” he said. + +The recent [sale of the 5G unit to Apple][5] is another example of Swan cleaning house. McGregor notes Apple was hounding them to invest more in 5G and at the same time tried to hire people away. + +The writing was on the wall for OPA as far back as March when Intel introduced Compute Express Link (CXL), a cache coherent accelerator interconnect that basically does what OPA does. At the time, people were wondering where this left OPA. Now they know. + +The problem once again is that Intel is swimming upstream. CXL competes with Cache Coherent Interconnect for Accelerators (CCIX) and OpenCAPI, the former championed by basically all of its competition and the latter promoted by IBM. + +All are built on PCI Express (PCIe) and bring features such as cache coherence to PCIe, which it does not have natively. Both CXL and CCIX can run on top of PCIe and co-exist with it. The trick is that the host and the accelerator must have matching support. A host with CCIX can only work with a CCIX device; there is no mixing them. + +As I said, CCIX support is basically everybody but Intel: ARM, AMD, IBM, Marvell, Qualcomm, and Xilinx are just a few of its backers. CXL includes Intel, Hewlett Packard Enterprise, and Dell EMC. The sane thing to do would be merge the two standards, take the best of both and make one standard. But anyone who remembers the HD-DVD/Blu-ray battle of last decade knows how likely that is. + +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/3429614/intel-pulls-the-plug-on-omni-path-networking-fabric-architecture.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://images.idgesg.net/images/article/2018/07/digital_transformation_finger_tap_causes_waves_of_interconnected_digital_ripples_by_gerd_altmann_cc0_via_pixabay_1200x800-100765086-large.jpg +[2]: https://www.networkworld.com/article/3275385/who-s-developing-quantum-computers.html +[3]: https://www.idgconnect.com/news/1502086/intel-delves-deeper-network-barefoot-networks +[4]: https://www.networkworld.com/article/3356444/nvidia-grabs-mellanox-out-from-under-intels-nose.html +[5]: https://www.computerworld.com/article/3411922/what-you-need-to-know-about-apples-1b-intel-5g-modem-investment.html +[6]: https://www.facebook.com/NetworkWorld/ +[7]: https://www.linkedin.com/company/network-world From 2ab031b7f55d125a87afb50973ee14ac27be12f2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 8 Aug 2019 08:44:57 +0800 Subject: [PATCH 349/951] translating --- ... To Improve Gaming Performance On Linux.md | 117 ------------------ ... To Improve Gaming Performance On Linux.md | 117 ++++++++++++++++++ 2 files changed, 117 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md create mode 100644 translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md diff --git a/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md b/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md deleted file mode 100644 index abaea75707..0000000000 --- a/sources/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (GameMode – A Tool To Improve Gaming Performance On Linux) -[#]: via: (https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -GameMode – A Tool To Improve Gaming Performance On Linux -====== - -![Gamemmode improve gaming performance on Linux][1] - -Ask some Linux users why they still sticks with Windows dual boot, probably the answer would be – “Games!”. It was true! Luckily, open source gaming platforms like [**Lutris**][2] and Proprietary gaming platform **Steam** have brought many games to Linux platforms and improved the Linux gaming experience significantly over the years. Today, I stumbled upon yet another Linux gaming-related, open source tool named **GameMode** , which allows the users to improve gaming performance on Linux. - -GameMode is basically a daemon/lib combo that lets the games optimise Linux system performance on demand. I thought GameMode is a kind of tool that would kill some resource-hungry tools running in the background. But it is different. What it does actually is just instruct the CPU to **automatically run in Performance mode when playing games** and helps the Linux users to get best possible performance out of their games. - -GameMode improves the gaming performance significantly by requesting a set of optimisations be temporarily applied to the host OS while playing the games. Currently, It includes support for optimisations including the following: - - * CPU governor, - * I/O priority, - * Process niceness, - * Kernel scheduler (SCHED_ISO), - * Screensaver inhibiting, - * GPU performance mode (NVIDIA and AMD), GPU overclocking (NVIDIA), - * Custom scripts. - - - -GameMode is free and open source system tool developed by [**Feral Interactive**][3], a world-leading publisher of games. - -### Install GameMode - -GameMode is available for many Linux distributions. - -On Arch Linux and its variants, you can install it from [**AUR**][4] using any AUR helper programs, for example [**Yay**][5]. - -``` -$ yay -S gamemode -``` - -On Debian, Ubuntu, Linux Mint and other Deb-based systems: - -``` -$ sudo apt install gamemode -``` - -If GameMode is not available for your system, you can manually compile and install it from source as described in its Github page under Development section. - -### Activate GameMode support to improve Gaming Performance on Linux - -Here are the list of games with GameMode integration, so we need not to do any additional configuration to activate GameMode support. - - * Rise of the Tomb Raider - * Total War Saga: Thrones of Britannia - * Total War: WARHAMMER II - * DiRT 4 - * Total War: Three Kingdoms - - - -Simply run these games and GameMode support will be enabled automatically. - -There is also an [**extension**][6] is available to integrate GameMode support with GNOME shell. It indicates when GameMode is active in the top panel. - -For other games, you may need to manually request GameMode support like below. - -``` -gamemoderun ./game -``` - -I am not fond of games and I haven’t played any games for years. So, I can’t share any actual benchmarks. - -However, I’ve found a short video tutorial on Youtube to enable GameMode support for Lutris games. It is a good start point for those who wants to try GameMode for the first time. - - - -By looking at the comments in the video, I can say that that GameMode has indeed improved gaming performance on Linux. - -For more details, refer the [**GameMode GitHub repository**][7]. - -* * * - -**Related read:** - - * [**GameHub – An Unified Library To Put All Games Under One Roof**][8] - * [**How To Run MS-DOS Games And Programs In Linux**][9] - - - -* * * - -Have you used GameMode tool? Did it really improve the Gaming performance on your Linux box? Share you thoughts in the comment section below. - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Gamemode-720x340.png -[2]: https://www.ostechnix.com/manage-games-using-lutris-linux/ -[3]: http://www.feralinteractive.com/en/ -[4]: https://aur.archlinux.org/packages/gamemode/ -[5]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/ -[6]: https://github.com/gicmo/gamemode-extension -[7]: https://github.com/FeralInteractive/gamemode -[8]: https://www.ostechnix.com/gamehub-an-unified-library-to-put-all-games-under-one-roof/ -[9]: https://www.ostechnix.com/how-to-run-ms-dos-games-and-programs-in-linux/ diff --git a/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md b/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md new file mode 100644 index 0000000000..96bc025a28 --- /dev/null +++ b/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md @@ -0,0 +1,117 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GameMode – A Tool To Improve Gaming Performance On Linux) +[#]: via: (https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +GameMode - 提高 Linux 游戏性能的工具 +====== + +![Gamemmode improve gaming performance on Linux][1] + +去问一些 Linux 用户为什么他们仍然坚持 Windows 双启动,他们的答案可能是 - “游戏!”。这是真的!幸运的是,开源游戏平台如 [**Lutris**][2] 和专有游戏平台 **Steam** 已经为 Linux 平台带来了许多游戏,并且近几年来显著改善了 Linux 的游戏体验。今天,我偶然发现了另一款名为 **GameMode** 的 Linux 游戏相关开源工具,它能让用户提高 Linux 上的游戏性能。 + +GameMode 基本上是一组守护进程/lib,它可以按需优化 Linux 系统的游戏性能。我以为 GameMode 是一个杀死在后台运行的对资源消耗大进程的工具。但它并不是。它实际上只是让 CPU **自动运行在高性能模式下**并帮助 Linux 用户从游戏中获得最佳性能。 + +在玩游戏时,GameMode 通过请求一组优化临时应用于宿主机来显著提升游戏性能。目前,它支持下面这些优化: + + * CPU 调控器, +  * I/O 优先级, +  * 进程 nice 值 +  * 内核调度器(SCHED_ISO), +  * 进制屏幕保护, +  * GPU 高性能模式(NVIDIA 和 AMD),GPU 超频(NVIDIA), +  * 自定义脚本。 + + + +GameMode 是由世界领先的游戏发行商 [**Feral Interactive**][3] 开发的免费开源系统工具。 + +### 安装 GameMode + +GameMode 适用于许多 Linux 发行版。 + +在 Arch Linux 及其变体上,你可以使用任何 AUR 助手程序,如 [**Yay**][5] 从 [**AUR**][4] 安装它。 + +``` +$ yay -S gamemode +``` + +在 Debian、Ubuntu、Linux Mint 和其他基于 Deb 的系统上: + +``` +$ sudo apt install gamemode +``` + +如果 GameMode 不适用于你的系统,你可以按照它的 Github 页面中开发章节下的描述从源码手动编译和安装它。 + +### 激活 GameMode 支持以改善 Linux 上的游戏性能 + +以下是 GameMode 集成支持的游戏列表,因此我们无需进行任何其他配置即可激活 GameMode 支持。 + + * 古墓丽影:崛起 + * 全面战争传奇:不列颠尼亚王座 + * 全面战争:战锤 2 + * 尘埃 4 + * 全面战争:三国 + + + +只需运行这些游戏,就会自动启用 GameMode 支持。 + +这里还有将 GameMode 与 GNOME shell 集成的的[扩展][6]。它会在顶部指示 GameMode 何时处于活跃。 + +对于其他游戏,你可能需要手动请求 GameMode 支持,如下所示。 + +``` +gamemoderun ./game +``` + +我不喜欢游戏,并且我已经很多年没玩游戏了。所以,我无法分享一些实际的基准测试。 + +但是,我在 Youtube 上找到了一个简短的视频教程,以便为 Lutris 游戏启用 GameMode 支持。对于那些想要第一次尝试 GameMode 的人来说,这是个不错的开始。 + + + +通过浏览视频中的评论,我可以说 GameMode 确实提高了 Linux 上的游戏性能。 + +对于更多细节,请参阅 [**GameMode 的 GitHub 仓库**][7]。 + +* * * + +**相关阅读:** + + * [**GameHub – 将所有游戏集合在一起的仓库**][8] + * [**如何在 Linux 中运行 MS-DOS 游戏和程序**][9] + + + +* * * + +你用过 GameMode 吗?它真的有改善 Linux 上的游戏性能吗?请在下面的评论栏分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Gamemode-720x340.png +[2]: https://www.ostechnix.com/manage-games-using-lutris-linux/ +[3]: http://www.feralinteractive.com/en/ +[4]: https://aur.archlinux.org/packages/gamemode/ +[5]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/ +[6]: https://github.com/gicmo/gamemode-extension +[7]: https://github.com/FeralInteractive/gamemode +[8]: https://www.ostechnix.com/gamehub-an-unified-library-to-put-all-games-under-one-roof/ +[9]: https://www.ostechnix.com/how-to-run-ms-dos-games-and-programs-in-linux/ From 245ee135bb67495a35e7ae7defdec997f7a862d7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 8 Aug 2019 08:58:04 +0800 Subject: [PATCH 350/951] translating --- .../20190805 How To Set Up Time Synchronization On Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md b/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md index 861cdb6bfc..38527f87dd 100644 --- a/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md +++ b/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7d2043913ab801974698479651dd83da7080f8e1 Mon Sep 17 00:00:00 2001 From: zyk Date: Thu, 8 Aug 2019 09:02:21 +0800 Subject: [PATCH 351/951] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91zyk?= =?UTF-8?q?2290?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... uses for the cp command Bash shortcuts.md | 154 ------------------ ... uses for the cp command Bash shortcuts.md | 150 +++++++++++++++++ 2 files changed, 150 insertions(+), 154 deletions(-) delete mode 100644 sources/tech/20180119 Two great uses for the cp command Bash shortcuts.md create mode 100644 translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md diff --git a/sources/tech/20180119 Two great uses for the cp command Bash shortcuts.md b/sources/tech/20180119 Two great uses for the cp command Bash shortcuts.md deleted file mode 100644 index 6974ded497..0000000000 --- a/sources/tech/20180119 Two great uses for the cp command Bash shortcuts.md +++ /dev/null @@ -1,154 +0,0 @@ -translating by zyk2290 - -Two great uses for the cp command: Bash shortcuts -============================================================ - -### Here's how to streamline the backup and synchronize functions of the cp command. - -![Two great uses for the cp command: Bash shortcuts ](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC) - ->Image by : [Internet Archive Book Images][6]. Modified by Opensource.com. CC BY-SA 4.0 - -Last July, I wrote about [two great uses for the cp command][7]: making a backup of a file, and synchronizing a secondary copy of a folder. - -Having discovered these great utilities, I find that they are more verbose than necessary, so I created shortcuts to them in my Bash shell startup script. I thought I’d share these shortcuts in case they are useful to others or could offer inspiration to Bash users who haven’t quite taken on aliases or shell functions. - -### Updating a second copy of a folder – Bash alias - -The general pattern for updating a second copy of a folder with cp is: - -``` -cp -r -u -v SOURCE-FOLDER DESTINATION-DIRECTORY -``` - -I can easily remember the -r option because I use it often when copying folders around. I can probably, with some more effort, remember -v, and with even more effort, -u (is it “update” or “synchronize” or…). - -Or I can just use the [alias capability in Bash][8] to convert the cp command and options to something more memorable, like this: - -``` -alias sync='cp -r -u -v' -``` - -``` -sync Pictures /media/me/4388-E5FE -``` - -Not sure if you already have a sync alias defined? You can list all your currently defined aliases by typing the word alias at the command prompt in your terminal window. - -Like this so much you just want to start using it right away? Open a terminal window and type: - -``` -echo "alias sync='cp -r -u -v'" >> ~/.bash_aliases -``` - -``` -me@mymachine~$ alias - -alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' - -alias egrep='egrep --color=auto' - -alias fgrep='fgrep --color=auto' - -alias grep='grep --color=auto' - -alias gvm='sdk' - -alias l='ls -CF' - -alias la='ls -A' - -alias ll='ls -alF' - -alias ls='ls --color=auto' - -alias sync='cp -r -u -v' - -me@mymachine:~$ -``` - -### Making versioned backups – Bash function - -The general pattern for making a backup of a file with cp is: - -``` -cp --force --backup=numbered WORKING-FILE BACKED-UP-FILE -``` - -Besides remembering the options to the cp command, we also need to remember to repeat the WORKING-FILE name a second time. But why repeat ourselves when [a Bash function][9] can take care of that overhead for us, like this: - -Again, you can save this to your .bash_aliases file in your home directory. - -``` -function backup { - -    if [ $# -ne 1 ]; then - -        echo "Usage: $0 filename" - -    elif [ -f $1 ] ; then - -        echo "cp --force --backup=numbered $1 $1" - -        cp --force --backup=numbered $1 $1 - -    else - -        echo "$0: $1 is not a file" - -    fi - -} -``` - -The first if statement checks to make sure that only one argument is provided to the function, otherwise printing the correct usage with the echo command. - -The elif statement checks to make sure the argument provided is a file, and if so, it (verbosely) uses the second echo to print the cp command to be used and then executes it. - -If the single argument is not a file, the third echo prints an error message to that effect. - -In my home directory, if I execute the backup command so defined on the file checkCounts.sql, I see that backup creates a file called checkCounts.sql.~1~. If I execute it once more, I see a new file checkCounts.sql.~2~. - -Success! As planned, I can go on editing checkCounts.sql, but if I take a snapshot of it every so often with backup, I can return to the most recent snapshot should I run into trouble. - -At some point, it’s better to start using git for version control, but backup as defined above is a nice cheap tool when you need to create snapshots but you’re not ready for git. - -### Conclusion - -In my last article, I promised you that repetitive tasks can often be easily streamlined through the use of shell scripts, shell functions, and shell aliases. - -Here I’ve shown concrete examples of the use of shell aliases and shell functions to streamline the synchronize and backup functionality of the cp command. If you’d like to learn more about this, check out the two articles cited above: [How to save keystrokes at the command line with alias][10] and [Shell scripting: An introduction to the shift method and custom functions][11], written by my colleagues Greg and Seth, respectively. - - -### About the author - - [![](https://opensource.com/sites/default/files/styles/profile_pictures/public/clh_portrait2.jpg?itok=V1V-YAtY)][13] Chris Hermansen  - - - Engaged in computing since graduating from the University of British Columbia in 1978, I have been a full-time Linux user since 2005 and a full-time Solaris, SunOS and UNIX System V user before that. On the technical side of things, I have spent a great deal of my career doing data analysis; especially spatial data analysis. I have a substantial amount of programming experience in relation to data analysis, using awk, Python, PostgreSQL, PostGIS and lately Groovy. I have also built a few... [more about Chris Hermansen][14] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/1/two-great-uses-cp-command-update - -作者:[Chris Hermansen][a] -译者:[译者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/clhermansen -[1]:https://opensource.com/users/clhermansen -[2]:https://opensource.com/users/clhermansen -[3]:https://opensource.com/user/37806/feed -[4]:https://opensource.com/article/18/1/two-great-uses-cp-command-update?rate=J_7R7wSPbukG9y8jrqZt3EqANfYtVAwZzzpopYiH3C8 -[5]:https://opensource.com/article/18/1/two-great-uses-cp-command-update#comments -[6]:https://www.flickr.com/photos/internetarchivebookimages/14803082483/in/photolist-oy6EG4-pZR3NZ-i6r3NW-e1tJSX-boBtf7-oeYc7U-o6jFKK-9jNtc3-idt2G9-i7NG1m-ouKjXe-owqviF-92xFBg-ow9e4s-gVVXJN-i1K8Pw-4jybMo-i1rsBr-ouo58Y-ouPRzz-8cGJHK-85Evdk-cru4Ly-rcDWiP-gnaC5B-pAFsuf-hRFPcZ-odvBMz-hRCE7b-mZN3Kt-odHU5a-73dpPp-hUaaAi-owvUMK-otbp7Q-ouySkB-hYAgmJ-owo4UZ-giHgqu-giHpNc-idd9uQ-osAhcf-7vxk63-7vwN65-fQejmk-pTcLgA-otZcmj-fj1aSX-hRzHQk-oyeZfR -[7]:https://opensource.com/article/17/7/two-great-uses-cp-command -[8]:https://opensource.com/article/17/5/introduction-alias-command-line-tool -[9]:https://opensource.com/article/17/1/shell-scripting-shift-method-custom-functions -[10]:https://opensource.com/article/17/5/introduction-alias-command-line-tool -[11]:https://opensource.com/article/17/1/shell-scripting-shift-method-custom-functions -[12]:https://opensource.com/tags/linux -[13]:https://opensource.com/users/clhermansen -[14]:https://opensource.com/users/clhermansen diff --git a/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md b/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md new file mode 100644 index 0000000000..f7734f1718 --- /dev/null +++ b/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md @@ -0,0 +1,150 @@ +两种cp 命令的绝佳用法:Bash 捷径 +============================================================ + +### 这篇文章是关于如何在使用cp 命令进行备份以及同步时提高效率 + +![Two great uses for the cp command: Bash shortcuts ](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC) + +>图片来自: [Internet Archive Book Images][6]. 由Opensource.com 修改. CC BY-SA 4.0 + +去年七月,我写了一篇[关于cp 命令的两种绝佳用法][7]的文章:备份一个文件,同步一个文件夹的备份 + +虽然这些工具确实很好用,但同时,输入这些命令太过于累赘了。为了解决这个问题,我创建了一些Bash 的捷径在我的Bash 启动文件里。现在,我想把这些捷径分享给你们,以便于你们需要的时候可以拿来用,或者是给那些还不知道怎么使用Bash 的别名以及函数功能的用户提供一些思路。 + +### 使用Bash 别名来更新一个文件夹的副本 + +如果要使用cp 来更新一个文件夹的副本,通常会使用到的命令是: + +``` +cp -r -u -v SOURCE-FOLDER DESTINATION-DIRECTORY +``` + +因为我经常使用cp 命令来复制文件夹,我会很自然地想起使用-r 选项。也许再想地更深入一些,我还可以想起用-v 选项,如果再想得再深一层,我会想起用选项-u (不知道这个选项是代表“更新”还是“同步”还是一些什么其它的)。 + +或者,还可以使用[Bash 的别名功能][8]来将cp 命令以及其后的选项转换成一个更容易记忆的单词,就像这样: + +``` +alias sync='cp -r -u -v' +``` + +``` +sync Pictures /media/me/4388-E5FE +``` + +不清楚sync 是否已经被使用了?你可以在终端里输入alias 这个单词来列出所有正在使用的命令别名。 + +喜欢吗?想要现在就立即使用吗?那就现在打开终端,输入: + +``` +echo "alias sync='cp -r -u -v'" >> ~/.bash_aliases +``` + +``` +me@mymachine~$ alias + +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +alias egrep='egrep --color=auto' + +alias fgrep='fgrep --color=auto' + +alias grep='grep --color=auto' + +alias gvm='sdk' + +alias l='ls -CF' + +alias la='ls -A' + +alias ll='ls -alF' + +alias ls='ls --color=auto' + +alias sync='cp -r -u -v' + +me@mymachine:~$ +``` + +### 使用Bash 的函数功能来为备份编号 + +若要使用cp 来备份一个文件,通常使用的命令是: + +``` +cp --force --backup=numbered WORKING-FILE BACKED-UP-FILE +``` + +我们不仅需要记得所有cp 的选项,我们还需要记得去重复输入 WORKING-FILE 的名字。但为什么我们还要不断地重复这个过程当[Bash 的函数功能][9]已经可以帮我们做这一切了呢?就像这样: + +再一次提醒,你可将下列内容保存入你在家目录下的.bash_aliases 文件里 + +``` +function backup { + +    if [ $# -ne 1 ]; then + +        echo "Usage: $0 filename" + +    elif [ -f $1 ] ; then + +        echo "cp --force --backup=numbered $1 $1" + +        cp --force --backup=numbered $1 $1 + +    else + +        echo "$0: $1 is not a file" + +    fi + +} +``` + +第一个if 语句是用于检查是否提供有且只有一个参数,否则,它会用echo 命令来打印出正确的用法。 + +elif 语句是用于检查提供的参数所指向的是一个文件,如果是的话,它会用第二个echo 命令来打印所需的cp 的命令(所有的选项都是用全称来表示)并且执行它。 + +如果所提供的参数不是一个文件,文件中的第三个echo 用于打印错误信息。 + +在我的家目录下,如果我执行backup 这个命令,我可以发现目录下多了一个文件名为checkCounts.sql.~1~ 的文件,如果我再执行一次,便又多了另一个名为checkCounts.sql.~2~ 的文件。 + +成功了!就像所想的一样,我可以继续编辑checkCounts.sql ,但如果我可以经常地用这个命令来为文件制作快照的话,我可以在我遇到问题的时候回退到最近的版本。 + +也许在未来的某个时间,使用git 作为版本控制系统会是一个好主意。但像上文所介绍的backup 这个简单而又好用的工具,是你在需要使用快照的功能时却还未准备好使用git 的最好工具。 + +### 结论 + +在我未来的文章里,我保证我会通过使用脚本,shell 里的函数功能以及别名功能来简化一些机械性的动作来提高生产效率。 + +在这篇文章里,我已经展示了如何在使用cp 命令同步或者备份文件时运用shell 的函数以及别名功能来简化操作。如果你想要了解更多,可以读一下这两篇文章:[怎样通过使用命令别名功能来减少敲击键盘的次数][10] 以及由我的同事Greg 和Seth 写的[Shell 编程:shift 方法和自定义函数介绍][11] + +### 关于作者 + + [![](https://opensource.com/sites/default/files/styles/profile_pictures/public/clh_portrait2.jpg?itok=V1V-YAtY)][13] Chris Hermansen  + +从1978年于不列颠哥伦比亚大学毕业后,一直从事计算机方面的工作。自从2005 年开始,就一直是一名完全只使用Linux 的用户,在之前还是一名Solaris,SunOS 以及 UNIX System V 的用户。技术方面,在我的职业生涯中,我花费了大量的时间进行数据分析,特别是空间数据分析(LCTT译注:原文为 spatial data analysis)。同时,我也在使用编程语言像awk, Python, PostgreSQL, PostGIS 和最近的 Groovy 来进行数据分析有着丰富的经验。我还创建了一些其它的东西。[关于Chris Hermansen的更多信息][14]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/1/two-great-uses-cp-command-update + +作者:[Chris Hermansen][a] +译者:[zyk2290](https://github.com/zyk2290) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/clhermansen +[1]:https://opensource.com/users/clhermansen +[2]:https://opensource.com/users/clhermansen +[3]:https://opensource.com/user/37806/feed +[4]:https://opensource.com/article/18/1/two-great-uses-cp-command-update?rate=J_7R7wSPbukG9y8jrqZt3EqANfYtVAwZzzpopYiH3C8 +[5]:https://opensource.com/article/18/1/two-great-uses-cp-command-update#comments +[6]:https://www.flickr.com/photos/internetarchivebookimages/14803082483/in/photolist-oy6EG4-pZR3NZ-i6r3NW-e1tJSX-boBtf7-oeYc7U-o6jFKK-9jNtc3-idt2G9-i7NG1m-ouKjXe-owqviF-92xFBg-ow9e4s-gVVXJN-i1K8Pw-4jybMo-i1rsBr-ouo58Y-ouPRzz-8cGJHK-85Evdk-cru4Ly-rcDWiP-gnaC5B-pAFsuf-hRFPcZ-odvBMz-hRCE7b-mZN3Kt-odHU5a-73dpPp-hUaaAi-owvUMK-otbp7Q-ouySkB-hYAgmJ-owo4UZ-giHgqu-giHpNc-idd9uQ-osAhcf-7vxk63-7vwN65-fQejmk-pTcLgA-otZcmj-fj1aSX-hRzHQk-oyeZfR +[7]:https://opensource.com/article/17/7/two-great-uses-cp-command +[8]:https://opensource.com/article/17/5/introduction-alias-command-line-tool +[9]:https://opensource.com/article/17/1/shell-scripting-shift-method-custom-functions +[10]:https://opensource.com/article/17/5/introduction-alias-command-line-tool +[11]:https://opensource.com/article/17/1/shell-scripting-shift-method-custom-functions +[12]:https://opensource.com/tags/linux +[13]:https://opensource.com/users/clhermansen +[14]:https://opensource.com/users/clhermansen From b0c3da036d813d2100f584ff3cf2d913694fd822 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 8 Aug 2019 11:47:59 +0800 Subject: [PATCH 352/951] Rename sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md to sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md --- ...rosoft finds Russia-backed attacks that exploit IoT devices.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{talk => news}/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md (100%) diff --git a/sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md b/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md similarity index 100% rename from sources/talk/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md rename to sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md From e40c5ca9a4f4e828fe18cbd17af26030b2d7751c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 8 Aug 2019 17:41:51 +0800 Subject: [PATCH 353/951] Rename sources/tech/20190806 Is Perl going extinct.md to sources/talk/20190806 Is Perl going extinct.md --- sources/{tech => talk}/20190806 Is Perl going extinct.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190806 Is Perl going extinct.md (100%) diff --git a/sources/tech/20190806 Is Perl going extinct.md b/sources/talk/20190806 Is Perl going extinct.md similarity index 100% rename from sources/tech/20190806 Is Perl going extinct.md rename to sources/talk/20190806 Is Perl going extinct.md From 0b3e70b1ccb54d344437a5fdc99dc5e4fa1a1080 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 8 Aug 2019 17:46:40 +0800 Subject: [PATCH 354/951] Rename sources/tech/20190807 Why fear of failure is a silent DevOps virus.md to sources/talk/20190807 Why fear of failure is a silent DevOps virus.md --- .../20190807 Why fear of failure is a silent DevOps virus.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190807 Why fear of failure is a silent DevOps virus.md (100%) diff --git a/sources/tech/20190807 Why fear of failure is a silent DevOps virus.md b/sources/talk/20190807 Why fear of failure is a silent DevOps virus.md similarity index 100% rename from sources/tech/20190807 Why fear of failure is a silent DevOps virus.md rename to sources/talk/20190807 Why fear of failure is a silent DevOps virus.md From c40ca23a6305f42233db84cf70c61bd128e4eb22 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 8 Aug 2019 17:54:35 +0800 Subject: [PATCH 355/951] Rename sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md to sources/talk/20190807 Intro to Corteza, an open source alternative to Salesforce.md --- ... Intro to Corteza, an open source alternative to Salesforce.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190807 Intro to Corteza, an open source alternative to Salesforce.md (100%) diff --git a/sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md b/sources/talk/20190807 Intro to Corteza, an open source alternative to Salesforce.md similarity index 100% rename from sources/tech/20190807 Intro to Corteza, an open source alternative to Salesforce.md rename to sources/talk/20190807 Intro to Corteza, an open source alternative to Salesforce.md From 43206ce3ded68baa582a8254a5977cb36cd717db Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Aug 2019 18:41:07 +0800 Subject: [PATCH 356/951] PRF @wxy --- .../tech/20190711 What is a golden image.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/tech/20190711 What is a golden image.md b/translated/tech/20190711 What is a golden image.md index fee6d53874..03c7c97c25 100644 --- a/translated/tech/20190711 What is a golden image.md +++ b/translated/tech/20190711 What is a golden image.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What is a golden image?) @@ -12,27 +12,27 @@ > 正在开发一个将广泛分发的项目吗?了解一下黄金镜像吧,以便在出现问题时轻松恢复到“完美”状态。 -![Gold star][1] +![](https://img.linux.net.cn/data/attachment/album/201908/08/184231ivv745lukchbrhul.jpg) -如果你正在进行质量保证、系统管理或媒体制作(没想到吧),你可能听说过正式版gold master黄金镜像golden image母片master image等等这一术语的某些变体。这个术语已经进入了每个参与创建一个**完美**模具的人的集体意识,然后从该模具中产生许多复制品。母片或黄金镜像就是:一种虚拟模具,你可以从中打造可分发的模型。 +如果你正在从事于质量保证、系统管理或媒体制作(没想到吧),你可能听说过正式版gold master这一术语的某些变体,如黄金镜像golden image母片master image等等。这个术语已经进入了每个参与创建**完美**模具的人的集体意识,然后从该模具中产生许多复制品。母片或黄金镜像就是:一种虚拟模具,你可以从中打造可分发的模型。 -在媒体制作中,这就是全体人员努力开发母片的过程。这个最终产品是独一无二的。它看起来和听起来像是能够看和听的最好的电影或专辑(或其他任何东西)。可以制作和压缩该母片的副本并发送给急切的公众。 +在媒体制作中,这就是所有人努力开发母片的过程。这个最终产品是独一无二的。它看起来和听起来像是可以看和听的最好的电影或专辑(或其他任何东西)。可以制作和压缩该母片的副本并发送给急切的公众。 -在软件中,与该术语相关联的也是类似的思路。一旦软件经过编译和一再测试,完美的构建就会被声明为**黄金版本**。不允许对它进一步更改,并且所有可分发的副本都是从此母片生成的(当软件是用 CD 或 DVD 分发时,这实际上意味着母盘)。 +在软件中,与该术语相关联的也是类似的意思。一旦软件经过编译和一再测试,完美的构建成果就会被声明为**黄金版本**,不允许对它进一步更改,并且所有可分发的副本都是从此母片生成的(当软件是用 CD 或 DVD 分发时,这实际上就是母盘)。 -在系统管理中,你可能会遇到你的机构所选的操作系统的黄金镜像,其中的重要设置已经就绪,如安装好的虚拟专用网络(VPN)证书、设置好的电子邮件收件服务器的邮件客户端,等等。同样,你可能也会在虚拟机(VM)的世界中听到这个术语,其中精心配置的虚拟驱动器的黄金镜像是所有克隆的新虚拟机的源头。 +在系统管理中,你可能会遇到你的机构所选的操作系统的黄金镜像,其中的重要设置已经就绪,如安装好的虚拟专用网络(VPN)证书、设置好的电子邮件收件服务器的邮件客户端等等。同样,你可能也会在虚拟机(VM)的世界中听到这个术语,其中精心配置了虚拟驱动器的黄金镜像是所有克隆的新虚拟机的源头。 ### GNOME Boxes 正式版的概念很简单,但往往忽视将其付诸实践。有时,你的团队很高兴能够达成他们的目标,但没有人停下来考虑将这些成就指定为权威版本。在其他时候,没有简单的机制来做到这一点。 -黄金镜像等同于部分历史保存和提前备份计划。一旦你制作了一个完美的模型,无论你正在努力做什么,你都应该为自己保留这项工作,因为它不仅标志着你的进步,而且如果你继续工作时遇到问题,它就会成为一个后备。 +黄金镜像等同于部分历史的保存和提前备份计划。一旦你制作了一个完美的模型,无论你正在努力做什么,你都应该为自己保留这项工作,因为它不仅标志着你的进步,而且如果你继续工作时遇到问题,它就会成为一个后备。 -[GNOME Boxes][2],是随 GNOME 桌面一起提供的虚拟化平台,可以提供简单的演示。如果你从未使用过GNOME Boxes,你可以在 Alan Formy-Duval 的文章 [GNOME Boxes 入门][3]中学习它的基础知识。 +[GNOME Boxes][2],是随 GNOME 桌面一起提供的虚拟化平台,可以用作简单的演示用途。如果你从未使用过 GNOME Boxes,你可以在 Alan Formy-Duval 的文章 [GNOME Boxes 入门][3]中学习它的基础知识。 -想象一下,你使用 GNOME Boxes 创建虚拟机,然后将操作系统安装到该 VM 中。现在,你想要制作一个黄金镜像。GNOME Boxes 已经率先摄取了你的安装快照,可以作为库存的操作系统安装的黄金镜像。 +想象一下,你使用 GNOME Boxes 创建虚拟机,然后将操作系统安装到该 VM 中。现在,你想要制作一个黄金镜像。GNOME Boxes 已经率先摄取了你的安装快照,可以作为更多的操作系统安装的黄金镜像。 -打开 GNOME Boxes 并在仪表板视图中,右键单击任何虚拟机,然后选择**属性**。 在**属性**窗口中,选择**快照**选项卡。由 GNOME Boxes 自动创建的第一个快照是“Just Installed”。顾名思义,这是你最初安装到虚拟机上的操作系统。 +打开 GNOME Boxes 并在仪表板视图中,右键单击任何虚拟机,然后选择**属性**。在**属性**窗口中,选择**快照**选项卡。由 GNOME Boxes 自动创建的第一个快照是“Just Installed”。顾名思义,这是你最初安装到虚拟机上的操作系统。 ![The Just Installed snapshot, or initial golden image, in GNOME Boxes.][4] @@ -52,7 +52,7 @@ ### 黄金镜像 -很少有学科无法从黄金镜像中受益。无论你是在 [Git][8] 中标记版本、在 Boxes 中拍摄快照、出版原型黑胶唱片、打印书籍以进行审核、设计用于批量生产的丝网印刷、还是制作文字模具,到处都是各种原型。这只是现代技术让我们人类更聪明而不是更努力的另一种方式,因此为你的项目制作一个黄金镜像,并根据需要随时生成克隆。 +很少有学科无法从黄金镜像中受益。无论你是在 [Git][8] 中标记版本、在 Boxes 中拍摄快照、出版原型黑胶唱片、打印书籍以进行审核、设计用于批量生产的丝网印刷、还是制作文字模具,到处都是各种原型。这只是现代技术让我们人类更聪明而不是更努力的另一种方式,因此为你的项目制作一个黄金镜像,并根据需要随时生成克隆吧。 -------------------------------------------------------------------------------- @@ -61,7 +61,7 @@ via: https://opensource.com/article/19/7/what-golden-image 作者:[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 1acb0670e7009903f65a0bcba74db457b38b1add Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Aug 2019 18:41:33 +0800 Subject: [PATCH 357/951] PUB @wxy https://linux.cn/article-11202-1.html --- .../tech => published}/20190711 What is a golden image.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190711 What is a golden image.md (98%) diff --git a/translated/tech/20190711 What is a golden image.md b/published/20190711 What is a golden image.md similarity index 98% rename from translated/tech/20190711 What is a golden image.md rename to published/20190711 What is a golden image.md index 03c7c97c25..df526a9b36 100644 --- a/translated/tech/20190711 What is a golden image.md +++ b/published/20190711 What is a golden image.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11202-1.html) [#]: subject: (What is a golden image?) [#]: via: (https://opensource.com/article/19/7/what-golden-image) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 43a22d6e4024e77de49033f42df92e4dc0476e6f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Aug 2019 23:37:53 +0800 Subject: [PATCH 358/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zyk2290 这篇由于当时选题工具的错误,导致代码段下会丢失一段文字, --- ... uses for the cp command Bash shortcuts.md | 109 ++++++++---------- 1 file changed, 48 insertions(+), 61 deletions(-) diff --git a/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md b/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md index f7734f1718..1428f65555 100644 --- a/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md +++ b/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md @@ -1,37 +1,41 @@ -两种cp 命令的绝佳用法:Bash 捷径 -============================================================ +两种 cp 命令的绝佳用法的快捷方式 +=================== -### 这篇文章是关于如何在使用cp 命令进行备份以及同步时提高效率 +> 这篇文章是关于如何在使用 cp 命令进行备份以及同步时提高效率。 ![Two great uses for the cp command: Bash shortcuts ](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC) ->图片来自: [Internet Archive Book Images][6]. 由Opensource.com 修改. CC BY-SA 4.0 +去年七月,我写了一篇[关于 cp 命令的两种绝佳用法][7]的文章:备份一个文件,以及同步一个文件夹的备份。 -去年七月,我写了一篇[关于cp 命令的两种绝佳用法][7]的文章:备份一个文件,同步一个文件夹的备份 +虽然这些工具确实很好用,但同时,输入这些命令太过于累赘了。为了解决这个问题,我在我的 Bash 启动文件里创建了一些 Bash 快捷方式。现在,我想把这些捷径分享给你们,以便于你们在需要的时候可以拿来用,或者是给那些还不知道怎么使用 Bash 的别名以及函数的用户提供一些思路。 -虽然这些工具确实很好用,但同时,输入这些命令太过于累赘了。为了解决这个问题,我创建了一些Bash 的捷径在我的Bash 启动文件里。现在,我想把这些捷径分享给你们,以便于你们需要的时候可以拿来用,或者是给那些还不知道怎么使用Bash 的别名以及函数功能的用户提供一些思路。 +### 使用 Bash 别名来更新一个文件夹的副本 -### 使用Bash 别名来更新一个文件夹的副本 - -如果要使用cp 来更新一个文件夹的副本,通常会使用到的命令是: +如果要使用 `cp` 来更新一个文件夹的副本,通常会使用到的命令是: ``` cp -r -u -v SOURCE-FOLDER DESTINATION-DIRECTORY ``` -因为我经常使用cp 命令来复制文件夹,我会很自然地想起使用-r 选项。也许再想地更深入一些,我还可以想起用-v 选项,如果再想得再深一层,我会想起用选项-u (不知道这个选项是代表“更新”还是“同步”还是一些什么其它的)。 +其中 `-r` 代表“向下递归访问文件夹中的所有文件”,`-u` 代表“更新目标”,`-v` 代表“详细模式”,`SOURCE-FOLDER` 是包含最新文件的文件夹的名称,`DESTINATION-DIRECTORY` 是包含必须同步的`SOURCE-FOLDER` 副本的目录。 -或者,还可以使用[Bash 的别名功能][8]来将cp 命令以及其后的选项转换成一个更容易记忆的单词,就像这样: +因为我经常使用 `cp` 命令来复制文件夹,我会很自然地想起使用 `-r` 选项。也许再想地更深入一些,我还可以想起用 `-v` 选项,如果再想得再深一层,我会想起用选项 `-u`(不知道这个选项是代表“更新”还是“同步”还是一些什么其它的)。 + +或者,还可以使用[Bash 的别名功能][8]来将 `cp` 命令以及其后的选项转换成一个更容易记忆的单词,就像这样: ``` alias sync='cp -r -u -v' ``` +如果我将其保存在我的主目录中的 `.bash_aliases` 文件中,然后启动一个新的终端会话,我可以使用该别名了,例如: + ``` sync Pictures /media/me/4388-E5FE ``` -不清楚sync 是否已经被使用了?你可以在终端里输入alias 这个单词来列出所有正在使用的命令别名。 +可以将我的主目录中的图片文件夹与我的 USB 驱动器中的相同版本同步。 + +不清楚 `sync` 是否已经定义了?你可以在终端里输入 `alias` 这个单词来列出所有正在使用的命令别名。 喜欢吗?想要现在就立即使用吗?那就现在打开终端,输入: @@ -39,89 +43,72 @@ sync Pictures /media/me/4388-E5FE echo "alias sync='cp -r -u -v'" >> ~/.bash_aliases ``` +然后启动一个新的终端窗口并在命令提示符下键入 `alias`。你应该看到这样的东西: + ``` -me@mymachine~$ alias - -alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' - -alias egrep='egrep --color=auto' - -alias fgrep='fgrep --color=auto' - -alias grep='grep --color=auto' - -alias gvm='sdk' - -alias l='ls -CF' - -alias la='ls -A' - -alias ll='ls -alF' - -alias ls='ls --color=auto' - -alias sync='cp -r -u -v' +me@mymachine~$ alias +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias grep='grep --color=auto' +alias gvm='sdk' +alias l='ls -CF' +alias la='ls -A' +alias ll='ls -alF' +alias ls='ls --color=auto' +alias sync='cp -r -u -v' me@mymachine:~$ ``` -### 使用Bash 的函数功能来为备份编号 +这里你能看到 `sync` 已经定义了。 -若要使用cp 来备份一个文件,通常使用的命令是: +### 使用 Bash 函数来为备份编号 + +若要使用 `cp` 来备份一个文件,通常使用的命令是: ``` cp --force --backup=numbered WORKING-FILE BACKED-UP-FILE ``` -我们不仅需要记得所有cp 的选项,我们还需要记得去重复输入 WORKING-FILE 的名字。但为什么我们还要不断地重复这个过程当[Bash 的函数功能][9]已经可以帮我们做这一切了呢?就像这样: +其中 `--force` 代表“强制制作副本”,`--backup= numbered` 代表“使用数字表示备份的生成”,`WORKING-FILE` 是我们希望保留的当前文件,`BACKED-UP-FILE` 与 `WORKING-FILE` 的名称相同,并附加生成信息。 -再一次提醒,你可将下列内容保存入你在家目录下的.bash_aliases 文件里 +我们不仅需要记得所有 `cp` 的选项,我们还需要记得去重复输入 `WORKING-FILE` 的名字。但当[Bash 的函数功能][9]已经可以帮我们做这一切,为什么我们还要不断地重复这个过程呢?就像这样: + +再一次提醒,你可将下列内容保存入你在家目录下的 `.bash_aliases` 文件里: ``` function backup { -     if [ $# -ne 1 ]; then -         echo "Usage: $0 filename" -     elif [ -f $1 ] ; then -         echo "cp --force --backup=numbered $1 $1" -         cp --force --backup=numbered $1 $1 -     else -         echo "$0: $1 is not a file" -     fi - } ``` -第一个if 语句是用于检查是否提供有且只有一个参数,否则,它会用echo 命令来打印出正确的用法。 +我将此函数称之为 `backup`,因为我的系统上没有任何其他名为 `backup` 的命令,但你可以选择适合的任何名称。 -elif 语句是用于检查提供的参数所指向的是一个文件,如果是的话,它会用第二个echo 命令来打印所需的cp 的命令(所有的选项都是用全称来表示)并且执行它。 +第一个 `if` 语句是用于检查是否提供有且只有一个参数,否则,它会用 `echo` 命令来打印出正确的用法。 -如果所提供的参数不是一个文件,文件中的第三个echo 用于打印错误信息。 +`elif` 语句是用于检查提供的参数所指向的是一个文件,如果是的话,它会用第二个 `echo` 命令来打印所需的 `cp` 的命令(所有的选项都是用全称来表示)并且执行它。 -在我的家目录下,如果我执行backup 这个命令,我可以发现目录下多了一个文件名为checkCounts.sql.~1~ 的文件,如果我再执行一次,便又多了另一个名为checkCounts.sql.~2~ 的文件。 +如果所提供的参数不是一个文件,文件中的第三个 `echo` 用于打印错误信息。 -成功了!就像所想的一样,我可以继续编辑checkCounts.sql ,但如果我可以经常地用这个命令来为文件制作快照的话,我可以在我遇到问题的时候回退到最近的版本。 +在我的家目录下,如果我执行 `backup` 这个命令,我可以发现目录下多了一个文件名为`checkCounts.sql.~1~` 的文件,如果我再执行一次,便又多了另一个名为 `checkCounts.sql.~2~` 的文件。 -也许在未来的某个时间,使用git 作为版本控制系统会是一个好主意。但像上文所介绍的backup 这个简单而又好用的工具,是你在需要使用快照的功能时却还未准备好使用git 的最好工具。 +成功了!就像所想的一样,我可以继续编辑 `checkCounts.sql`,但如果我可以经常地用这个命令来为文件制作快照的话,我可以在我遇到问题的时候回退到最近的版本。 + +也许在未来的某个时间,使用 `git` 作为版本控制系统会是一个好主意。但像上文所介绍的 `backup` 这个简单而又好用的工具,是你在需要使用快照的功能时却还未准备好使用 `git` 的最好工具。 ### 结论 -在我未来的文章里,我保证我会通过使用脚本,shell 里的函数功能以及别名功能来简化一些机械性的动作来提高生产效率。 +在我的上一篇文章里,我保证我会通过使用脚本,shell 里的函数以及别名功能来简化一些机械性的动作来提高生产效率。 -在这篇文章里,我已经展示了如何在使用cp 命令同步或者备份文件时运用shell 的函数以及别名功能来简化操作。如果你想要了解更多,可以读一下这两篇文章:[怎样通过使用命令别名功能来减少敲击键盘的次数][10] 以及由我的同事Greg 和Seth 写的[Shell 编程:shift 方法和自定义函数介绍][11] - -### 关于作者 - - [![](https://opensource.com/sites/default/files/styles/profile_pictures/public/clh_portrait2.jpg?itok=V1V-YAtY)][13] Chris Hermansen  - -从1978年于不列颠哥伦比亚大学毕业后,一直从事计算机方面的工作。自从2005 年开始,就一直是一名完全只使用Linux 的用户,在之前还是一名Solaris,SunOS 以及 UNIX System V 的用户。技术方面,在我的职业生涯中,我花费了大量的时间进行数据分析,特别是空间数据分析(LCTT译注:原文为 spatial data analysis)。同时,我也在使用编程语言像awk, Python, PostgreSQL, PostGIS 和最近的 Groovy 来进行数据分析有着丰富的经验。我还创建了一些其它的东西。[关于Chris Hermansen的更多信息][14]。 +在这篇文章里,我已经展示了如何在使用 `cp` 命令同步或者备份文件时运用 shell 函数以及别名功能来简化操作。如果你想要了解更多,可以读一下这两篇文章:[怎样通过使用命令别名功能来减少敲击键盘的次数][10] 以及由我的同事 Greg 和 Seth 写的 [Shell 编程:shift 方法和自定义函数介绍][11]。 -------------------------------------------------------------------------------- @@ -129,7 +116,7 @@ via: https://opensource.com/article/18/1/two-great-uses-cp-command-update 作者:[Chris Hermansen][a] 译者:[zyk2290](https://github.com/zyk2290) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ca09014e81ec110219e8c0939b435604e08f9735 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Aug 2019 23:38:14 +0800 Subject: [PATCH 359/951] PUB @zyk2290 https://linux.cn/article-11204-1.html --- .../20180119 Two great uses for the cp command Bash shortcuts.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180119 Two great uses for the cp command Bash shortcuts.md (100%) diff --git a/translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md b/published/20180119 Two great uses for the cp command Bash shortcuts.md similarity index 100% rename from translated/tech/20180119 Two great uses for the cp command Bash shortcuts.md rename to published/20180119 Two great uses for the cp command Bash shortcuts.md From 756a468e732a863d70786479b2c3c220ba3b3e7d Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Thu, 8 Aug 2019 17:00:36 +0000 Subject: [PATCH 360/951] =?UTF-8?q?Revert=20"=E7=BF=BB=E8=AF=91=E7=94=B3?= =?UTF-8?q?=E9=A2=86"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 20b26cbc0e4d676e0a0d3d749873c040f3928d74. --- ...190709 How to install Elasticsearch and Kibana on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md b/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md index 25e8997f3c..53f302cff7 100644 --- a/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md +++ b/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (runningwater) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -168,7 +168,7 @@ via: https://opensource.com/article/19/7/install-elasticsearch-and-kibana-linux 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[runningwater](https://github.com/runningwater) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2302da4ecbcdef72ee4b2badcb96473494a75142 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 9 Aug 2019 01:49:40 +0800 Subject: [PATCH 361/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190808=20Sendin?= =?UTF-8?q?g=20custom=20emails=20with=20Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190808 Sending custom emails with Python.md --- ...90808 Sending custom emails with Python.md | 257 ++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 sources/tech/20190808 Sending custom emails with Python.md diff --git a/sources/tech/20190808 Sending custom emails with Python.md b/sources/tech/20190808 Sending custom emails with Python.md new file mode 100644 index 0000000000..fb8e0d3938 --- /dev/null +++ b/sources/tech/20190808 Sending custom emails with Python.md @@ -0,0 +1,257 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Sending custom emails with Python) +[#]: via: (https://opensource.com/article/19/8/sending-custom-emails-python) +[#]: author: (Brian "bex" Exelbierd https://opensource.com/users/bexelbie) + +Sending custom emails with Python +====== +Customize your group emails with Mailmerge, a command-line program that +can handle simple and complex emails. +![Chat via email][1] + +Email remains a fact of life. Despite all its warts, it's still the best way to send information to most people, especially in automated ways that allow messages to queue for recipients. + +One of the highlights of my work as the [Fedora Community Action and Impact Coordinator][2] is giving people good news about travel funding. I often send this information over email. Here, I'll show you how I send custom messages to groups of people using [Mailmerge][3], a command-line Python program that can handle simple and complex emails. + +### Install Mailmerge + +Mailmerge is packaged and available in Fedora, and you can install it from the command line with **sudo dnf install python3-mailmerge**. You can also install it from PyPI using **pip**, as the project's [README explains][4]. + +### Configure your Mailmerge files + +Three files control how Mailmerge works. If you run **mailmerge --sample**, it will create template files for you. The files are: + + * **mailmerge_server.conf:** This contains the configuration details for your SMTP host to send emails. Your password is _not_ stored in this file. + * **mailmerge_database.csv:** This holds the custom data for each email, including the recipients' email addresses. + * **mailmerge_template.txt:** This is your email's text with placeholder fields that will be replaced using the data from **mailmerge_database.csv**. + + + +#### Server.conf + +The sample **mailmerge_server.conf** file includes several examples that should be familiar. If you've ever added email to your phone or set up a desktop email client, you've seen this data before. The big thing to remember is to update your username in the file, especially if you are using one of the example configurations. + +#### Database.csv + +The **mailmerge_database.csv** file is a bit more complicated. It must contain (at minimum) the recipients' email addresses and any other custom details necessary to replace the fields in your email. It is a good idea to write the **mailmerge_template.txt** file at the same time you create the fields list for this file. I find it helpful to use a spreadsheet to capture this data and export it as a CSV file when I am done. This sample file: + + +``` +email,name,number +[myself@mydomain.com][5],"Myself",17 +[bob@bobdomain.com][6],"Bob",42 +``` + +allows you to send emails to two people, using their first name and telling them a number. This file, while not terribly interesting, illustrates an important habit: Always make yourself the first recipient in the file. This enables you to send yourself a test email to verify everything works as expected before you email the entire list. + +If any of your values contain commas, you _**must**_ enclose the entire value in double-quotes (**"**). If you need to include a double-quote in a double-quoted field, use two double-quotes in a row. Quoting rules are fun, so read about [CSVs in Python 3][7] for specifics. + +#### Template.txt + +As part of my work, I get to share news about travel-funding decisions for our Fedora contributor conference, [Flock][8]. A simple email tells people they've been selected for travel funding and their specific funding details. One user-specific detail is how much money we can allocate for their airfare. Here is an abbreviated version of my template file (I've snipped out a lot of the text for brevity): + + +``` +$ cat mailmerge_template.txt +TO: {{Email}} +SUBJECT: Flock 2019 Funding Offer +FROM: Brian Exelbierd <[bexelbie@redhat.com][9]> + +Hi {{Name}}, + +I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding: + +Travel Budget: {{Travel_Budget}} + +<<snip>> +``` + +The top of the template specifies the recipient, sender, and subject. After the blank line, there's the body of the email. This email needs the recipients' **Email**, **Name**, and **Travel_Budget** from the **database.csv** file. Notice that those fields are surrounded by double curly braces (**{{** and **}}**). The corresponding **mailmerge_database.csv** looks like this: + + +``` +$ cat mailmerge_database.csv +Name,Email,Travel_Budget +Brian,[bexelbie@redhat.com][9],1000 +PersonA,[persona@fedoraproject.org][10],1500 +PèrsonB,[personb@fedoraproject.org][11],500 +``` + +Notice that I listed myself first (for testing) and there are two other people in the file. The second person, PèrsonB, has an accented character in their name; Mailmerge will automatically encode it. + +That's the whole template concept: Write your email and put placeholders in double curly braces. Then create a database that provides those values. Now let's test the email. + +### Test and send simple email merges + +#### Do a dry-run + +Start by doing a dry-run that prints the emails, with the placeholder fields completed, to the screen. By default, if you run the command **mailmerge**, it will do a dry-run of the first email: + + +``` +$ mailmerge +>>> encoding ascii +>>> message 0 +TO: [bexelbie@redhat.com][9] +SUBJECT: Flock 2019 Funding Offer +FROM: Brian Exelbierd <[bexelbie@redhat.com][9]> +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Date: Sat, 20 Jul 2019 18:17:15 -0000 + +Hi Brian, + +I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding: + +Travel Budget: 1000 + +<<snip>> + +>>> sent message 0 DRY RUN +>>> No attachments were sent with the emails. +>>> Limit was 1 messages.  To remove the limit, use the --no-limit option. +>>> This was a dry run.  To send messages, use the --no-dry-run option. +``` + +Reviewing the first email (**message 0**, as counting starts from zero, like many things in computer science), you can see my name and travel budget are correct. If you want to review every email, enter **mailmerge --no-limit** to tell Mailmerge not to limit itself to the first email. Here's the dry-run of the third email, which shows the special character encoding: + + +``` +>>> message 2 +TO: [personb@fedoraproject.org][11] +SUBJECT: Flock 2019 Funding Offer +FROM: Brian Exelbierd <[bexelbie@redhat.com][9]> +MIME-Version: 1.0 +Content-Type: text/plain; charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable +Date: Sat, 20 Jul 2019 18:22:48 -0000 + +Hi P=E8rsonB, +``` + +That's not an error; **P=E8rsonB** is the encoded form of **PèrsonB**. + +#### Send a test message + +Now, send a test email with the command **mailmerge --no-dry-run**, which tells Mailmerge to send a message to the first email on the list: + + +``` +$ mailmerge --no-dry-run +>>> encoding ascii +>>> message 0 +TO: [bexelbie@redhat.com][9] +SUBJECT: Flock 2019 Funding Offer +FROM: Brian Exelbierd <[bexelbie@redhat.com][9]> +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Date: Sat, 20 Jul 2019 18:25:45 -0000 + +Hi Brian, + +I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding: + +Travel Budget: 1000 + +<<snip>> + +>>> Read SMTP server configuration from mailmerge_server.conf +>>>   host = smtp.gmail.com +>>>   port = 587 +>>>   username = [bexelbie@redhat.com][9] +>>>   security = STARTTLS +>>> password for [bexelbie@redhat.com][9] on smtp.gmail.com: +>>> sent message 0 +>>> No attachments were sent with the emails. +>>> Limit was 1 messages.  To remove the limit, use the --no-limit option. +``` + +On the fourth to last line, you can see it prompts you for your password. If you're using two-factor authentication or domain-managed logins, you will need to create an application password that bypasses these controls. If you're using Gmail and similar systems, you can do it directly from the interface; otherwise, contact your email system administrator. This will not compromise the security of your email system, but you should still keep the password complex and secret. + +When I checked my email account, I received a beautifully formatted test email. If your test email looks ready, send all the emails by entering **mailmerge --no-dry-run --no-limit**. + +### Send complex emails + +You can really see the power of Mailmerge when you take advantage of [Jinja2 templating][12]. I've found it useful for including conditional text and sending attachments. Here is a complex template and the corresponding database: + + +``` +$ cat mailmerge_template.txt +TO: {{Email}} +SUBJECT: Flock 2019 Funding Offer +FROM: Brian Exelbierd <[bexelbie@redhat.com][9]> +ATTACHMENT: attachments/{{File}} + +Hi {{Name}}, + +I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding: + +Travel Budget: {{Travel_Budget}} +{% if Hotel == "Yes" -%} +Lodging: Lodging in the hotel Wednesday-Sunday (4 nights) +{%- endif %} + +<<snip>> + +$ cat mailmerge_database.csv +Name,Email,Travel_Budget,Hotel,File +Brian,[bexelbie@redhat.com][9],1000,Yes,visa_bex.pdf +PersonA,[persona@fedoraproject.org][10],1500,No,visa_person_a.pdf +PèrsonB,[personb@fedoraproject.org][11],500,Yes,visa_person_b.pdf +``` + +There are two new things in this email. First, there's an attachment. I have to send visa invitation letters to international travelers to help them come to Flock, and the **ATTACHMENT** part of the header specifies which file to attach. To keep my directory clean, I put all of them in my Attachments subdirectory. Second, it includes conditional information about a hotel, because some people receive funding for their hotel stay, and I need to include those details for those who do. This is done with the **if** construction: + + +``` +{% if Hotel == "Yes" -%} +Lodging: Lodging in the hotel Wednesday-Sunday (4 nights) +{%- endif %} +``` + +This works just like an **if** in most programming languages. Jinja2 is very expressive and can do multi-level conditions. Experiment with making your life easier by including database elements that control the contents of the email. Using whitespace is important for email readability. The minus (**-**) symbols in **if** and **endif** are part of how Jinja2 controls [whitespace][13]. There are lots of options, so experiment to see what looks best for you. + +Also note that I extended the database with two fields, **Hotel** and **File**. These are the values that control the inclusion of the hotel text and provide the name of the attachment. In my example, PèrsonB and I got hotel funding, while PersonA didn't. + +Doing a dry-run and sending the emails is the same whether you're using a simple or a complex template. Give it a try! + +You can also experiment with using conditionals (**if** … **endif**) in the header. You can, for example, have an attachment only if one is in the database, or maybe you need to change the sender's name for some emails but not others. + +### Mailmerge's advantages + +The Mailmerge program provides a powerful but simple method of sending lots of customized emails. Everyone gets only the information they need, and extraneous steps and details are omitted. + +Even for simple group emails, I have found this method much more effective than sending one email to a bunch of people using CC or BCC. A lot of people filter their email and delay reading anything not sent directly to them. Using Mailmerge ensures that every person gets their own email. Messages will filter properly for the recipient and no one can accidentally "reply all" to the entire group. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/sending-custom-emails-python + +作者:[Brian "bex" Exelbierd][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/bexelbie +[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://docs.fedoraproject.org/en-US/council/fcaic/ +[3]: https://github.com/awdeorio/mailmerge +[4]: https://github.com/awdeorio/mailmerge#install +[5]: mailto:myself@mydomain.com +[6]: mailto:bob@bobdomain.com +[7]: https://docs.python.org/3/library/csv.html +[8]: https://flocktofedora.org/ +[9]: mailto:bexelbie@redhat.com +[10]: mailto:persona@fedoraproject.org +[11]: mailto:personb@fedoraproject.org +[12]: http://jinja.pocoo.org/docs/latest/templates/ +[13]: http://jinja.pocoo.org/docs/2.10/templates/#whitespace-control From 5243edae87297adccdb8b3f4bb6f1fea1fd0d70c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 9 Aug 2019 01:53:42 +0800 Subject: [PATCH 362/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190808=20Scrum?= =?UTF-8?q?=20vs.=20kanban:=20Which=20agile=20methodology=20is=20better=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md --- ...nban- Which agile methodology is better.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md diff --git a/sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md b/sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md new file mode 100644 index 0000000000..8b2b38ef3c --- /dev/null +++ b/sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md @@ -0,0 +1,95 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Scrum vs. kanban: Which agile methodology is better?) +[#]: via: (https://opensource.com/article/19/8/scrum-vs-kanban) +[#]: author: (Taz Brown https://opensource.com/users/heronthecli) + +Scrum vs. kanban: Which agile methodology is better? +====== +Learn the differences between scrum and kanban and which may be best for +your team. +![Team checklist and to dos][1] + +Because scrum and kanban both fall under the agile methodology umbrella, many people confuse them or think they're the same thing. There are differences, however. For one, scrum is more specific to software development teams, while kanban is used by many kinds of teams and focuses on providing a visual representation of an agile team's workflow. Some argue that kanban is about getting things done, and scrum is about talking about getting things done. + +### A history lesson + +Before we get too deep into scrum and kanban, let's talk a little history. Before scrum, kanban, and agile, there was the waterfall model. It was popular in the '80s and '90s, especially in civil and mechanical engineering where changes were rare and design often stayed the same. It was adopted for software development, but it didn't translate well into that arena, with results rarely as anyone expected or desired. + +In 2001, the [Agile Manifesto][2] emerged as an alternative to overcome the problems with waterfall. The Manifesto outlined agile principles and beliefs including shorter lead times, open communication, lighter processes, continuous training, and adaptation to change. These principles took on a life of their own when it came to software development practices and teams. In cases of irregularities, bugs, or dissatisfied customers, agile enabled development teams to make changes quickly, and software was released faster with much higher quality. + +### What is agile? + +An agile framework (or just agile) is an umbrella term for several iterative and incremental software development approaches such as kanban and scrum. Kanban and scrum are also considered to be agile frameworks on their own. As [Mendix explains][3]: + +> "While each agile methodology type has its own unique qualities, they all incorporate elements of iterative development and continuous feedback when creating an application. Any agile development project involves continuous planning, continuous testing, continuous integration, and other forms of continuous development of both the project and the application resulting from the agile framework." + +### What is kanban? + +[Kanban][4] is the Japanese word for "visual signal." It is also an agile framework or work management system and is considered to be a powerful project management tool. + +A kanban board (such as [Wekan][5], an open source kanban application) is a visual method for managing the creation of products through a series of fixed steps. It emphasizes continuous flow and is designed as a list of stages displayed in columns on a board. There is a waiting or backlog stage at the start of the kanban board, and there may be some progress stages, such as testing, development, completed, or abandoned. + +![Wekan kanban board][6] + +Each task or part of a project is represented on a card, and the cards are moved across this board as they progress across the stages. A card's current stage must be completed before it can be moved to the next stage. + +Other features of kanban include color-coding (to identify different stages or types of tasks visually) and Work in Progress ([WIP][7]) limits (to restrict the maximum number of work items allowed in the different stages of the workflow). + +Wekan is [similar to Trello][8] (a proprietary kanban application). It's one of [a variety][9] of digital kanban tools. Teams can also use the traditional kanban approach: a wall, a board, or a large piece of paper with different colored sticky notes for various tasks. Whatever method you use, the idea is to apply agile effectively, efficiently, and continuously. + +Overall, kanban and Wekan offer a simple, graphical way of monitoring progress, sharing responsibility, and mitigating bottlenecks. It is a team effort to ensure that the final product is created with high quality and to the customers' satisfaction. + +### What is scrum? + +[Scrum][10] typically involves daily standups and sprints with sprint planning, sprint reviews, and retrospectives. It establishes specific release days and where cards can move across the board. There are daily scrums and two- to four-week sprints (putting code into production) with the goal to create a shippable product after every sprint. + +![team_meeting_at_board.png][11] + +Daily stand-up meetings allow team members to share progress. (Photo credit: Andrea Truong) + +  + +Scrum teams are usually comprised of a scrum master, a product owner, and the development team. All must operate in synchronicity to produce high-quality software products in a fast, efficient, cost-effective way that pleases the customer. + +### Which is better: scrum or kanban? + +With all that as background, the important question we are left with is: Which agile methodology is superior, kanban, or scrum? Well, it depends. It is certainly not a straightforward or easy choice, and neither method is inherently superior. The type of team and the project's scope or requirements influence which is likely to be the better choice. + +Software development teams typically use scrum because it has been found to be highly useful in the software lifecycle process. + +Kanban can be used by all kinds of teams—IT, marketing, HR, transformation, manufacturing, healthcare, finance, etc. Its core values are continuous workflow, continuous feedback, continuous change, and stir vigorously until you achieve the desired quality and consistency or create a shippable product. The team works from the backlog until all tasks are completed. Usually, members will pick tasks based on their specialized knowledge or area of expertise, but the team must be careful not to reduce its effectiveness with too much specialization. + +### Conclusion + +There is a place for both scrum and kanban agile frameworks, and their utility is determined by the makeup of the team, the product or service to be delivered, the requirements or scope of the project, and the organizational culture. There will be trial and error, especially for new teams. + +Scrum and kanban are both iterative work systems that rely on process flows and aim to reduce waste. No matter which framework your team chooses, you will be a winner. Both methodologies are valuable now and likely will be for some time to come. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/scrum-vs-kanban + +作者:[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/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos) +[2]: https://www.scrumalliance.org/resources/agile-manifesto +[3]: https://www.mendix.com/agile-framework/ +[4]: https://en.wikipedia.org/wiki/Kanban +[5]: https://wekan.github.io/ +[6]: https://opensource.com/sites/default/files/uploads/wekan-board.png (Wekan kanban board) +[7]: https://www.atlassian.com/agile/kanban/wip-limits +[8]: https://opensource.com/article/19/1/productivity-tool-wekan +[9]: https://opensource.com/alternatives/trello +[10]: https://en.wikipedia.org/wiki/Scrum_(software_development) +[11]: https://opensource.com/sites/default/files/uploads/team_meeting_at_board.png (team_meeting_at_board.png) From a228d798347f6c155b321b40c02f603ec6c1e723 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 9 Aug 2019 01:55:38 +0800 Subject: [PATCH 363/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190808=20A=20da?= =?UTF-8?q?ta=20transmission=20revolution=20is=20underway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190808 A data transmission revolution is underway.md --- ...ata transmission revolution is underway.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/talk/20190808 A data transmission revolution is underway.md diff --git a/sources/talk/20190808 A data transmission revolution is underway.md b/sources/talk/20190808 A data transmission revolution is underway.md new file mode 100644 index 0000000000..4c8e8ae57f --- /dev/null +++ b/sources/talk/20190808 A data transmission revolution is underway.md @@ -0,0 +1,67 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A data transmission revolution is underway) +[#]: via: (https://www.networkworld.com/article/3429610/a-data-transmission-revolution-is-underway.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +A data transmission revolution is underway +====== +Two radical data transmission ideas are being developed. One uses trions instead of electrons to transmit information, and the other replaces the silicon in semiconductors with other compounds. +![Getty Images][1] + +Radical data communications technologies are in development in a slew of academic scientific labs around the world. While we’ve already seen, and gotten used, to a shift from data sent being over copper wire to light-based, fiber-optic channels (and the resulting capacity and speed increases), much of the thrust by engineers today is in the area of semiconductor improvements, in part to augment those pipes. + +The work includes [a potential overall shift to photons and light, not wires on chips][2], and even more revolutionary ideas such as the abandonment of not only silicon, but also the traditional electron. + +**[ Also read: [Who's developing quantum computers?][3] ]** + +### Electrons aren’t capacious enough + +“Most electronics today use individual electrons to conduct electricity and transmit information,” writes Iqbal Pittalwala [on the University of California at Riverside news website][4]. Trions, though, are better than electrons for data transmission, the physicists at that university claim. + +Why? Electrons, the incumbents, are subatomic particles that are charged and have a surrounding electrical field. They carry electricity and information. However, gate-tunable trions from the quantum family are a spinning, charged combination of two electrons and one hole, or two holes and one electron, depending on polarity, they explain. More, in other words, and enough to carry greater amounts of information than a single electron. + +A trion contains three interacting particles, allowing it to carry much more information than a single electron, the researchers say. + +“Just like increasing your Wi-Fi bandwidth at home, trion transmission allows more information to come through than individual electrons,” says Erfu Liu in the article. Liu is the first author of the [research paper][5] about the work being done. + +The researchers plan to test dark trions (harder to do than light trions, but with more capacity) to transport quantum information. It could revolutionize information transmission, the group says. + +### Dump silicon + +Separately, scientists at Cardiff University’s Institute for Compound Semiconductors are adopting an alternative approach to speed up and gain capacity at the semiconductor level. They aim to replace silicon with other variants of atom combinations, the team explains in a press release. + +The compound semiconductors they’re working on are like silicon, but they come from elements on either side of silicon on the periodic table, the institute explains in a video presentation of its work. The properties on the wafer are different and thus allow new technologies. Some compound semiconductors are already used in smartphone and other newer technology, but the group says much more can be done in this area. + +“Extremely low excess noise and high-sensitivity avalanche photodiodes [have] the potential to yield a new class of high-performance receivers,” says Diana Huffaker, a professor at Cardiff University’s Institute for Compound Semiconductors, [on the school’s website][6]. That technology is geared towards applications in fast networking and sensing environments. + +The avalanche photodiodes (APDs) that the institute is building create less noise than silicon. APDs are semiconductors that convert light into electricity. Autonomous vehicles’ LIDAR (Light Detection and Ranging) is one use. LIDAR is a way for the vehicle to sense where it is, and it needs very fast communications. “The innovation lies in the advanced materials development to ‘grow’ the compound semiconductor crystal in an atom-by-atom regime,” Huffaker says in the article. Special reactors are needed to do it. + +Players are noticing. Huffaker says Airbus may implement the APD technology in a “future free space optics communication system.” Airbus is behind the design and build-out of OneWeb’s planned internet backbone in space. Space laser systems, coming in due course, will have the advantage of performing a capacious data-send without hinderance of interfering air or other earthly environmental limitations—such as digging trenches, making NIMBY-prone planning applications, or implementing latency-increasing repeaters. + +Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3429610/a-data-transmission-revolution-is-underway.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://images.idgesg.net/images/article/2018/11/3_industrial-iot_solar-power-panels_energy_network_internet-100779353-large.jpg +[2]: https://www.networkworld.com/article/3338081/light-based-computers-to-be-5000-times-faster.html +[3]: https://www.networkworld.com/article/3275385/who-s-developing-quantum-computers.html +[4]: https://news.ucr.edu/articles/2019/07/09/physicists-finding-could-revolutionize-information-transmission +[5]: https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.123.027401 +[6]: https://www.cardiff.ac.uk/news/view/1527841-cardiff-in-world-beating-cs-breakthrough +[7]: https://www.facebook.com/NetworkWorld/ +[8]: https://www.linkedin.com/company/network-world From 005dda77aae609140cc49cfd1b55a5d27f329d99 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 9 Aug 2019 01:57:32 +0800 Subject: [PATCH 364/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190808=20How=20?= =?UTF-8?q?to=20manipulate=20PDFs=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190808 How to manipulate PDFs on Linux.md --- ...0190808 How to manipulate PDFs on Linux.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20190808 How to manipulate PDFs on Linux.md diff --git a/sources/tech/20190808 How to manipulate PDFs on Linux.md b/sources/tech/20190808 How to manipulate PDFs on Linux.md new file mode 100644 index 0000000000..d4229386fa --- /dev/null +++ b/sources/tech/20190808 How to manipulate PDFs on Linux.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to manipulate PDFs on Linux) +[#]: via: (https://www.networkworld.com/article/3430781/how-to-manipulate-pdfs-on-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +How to manipulate PDFs on Linux +====== +The pdftk command provides many options for working with PDFs, including merging pages, encrypting files, applying watermarks, compressing files, and even repairing PDFs -- easily and on the command line. +![Toshiyuki IMAI \(CC BY-SA 2.0\)][1] + +While PDFs are generally regarded as fairly stable files, there’s a lot you can do with them on both Linux and other systems. This includes merging, splitting, rotating, breaking into single pages, encrypting and decrypting, applying watermarks, compressing and uncompressing, and even repairing. The **pdftk** command does all this and more. + +The name “pdftk” stands for “PDF tool kit,” and the command is surprisingly easy to use and does a good job of manipulating PDFs. For example, to pull separate files into a single PDF file, you would use a command like this: + +``` +$ pdftk pg1.pdf pg2.pdf pg3.pdf pg4.pdf pg5.pdf cat output OneDoc.pdf +``` + +That OneDoc.pdf file will contain all five of the documents shown and the command will run in a matter of seconds. Note that the **cat** option directs the files to be joined together and the **output** option specifies the name of the new file. + +**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** + +You can also pull select pages from a PDF to create a separate PDF file. For example, if you wanted to create a new PDF with only pages 1, 2, 3, and 5 of the document created above, you could do this: + +``` +$ pdftk OneDoc.pdf cat 1-3 5 output 4pgs.pdf +``` + +If, on the other hand, you wanted pages 1, 3, 4, and 5, we might use this syntax instead: + +``` +$ pdftk OneDoc.pdf cat 1 3-end output 4pgs.pdf +``` + +You have the option of specifying all individual pages or using page ranges as shown in the examples above. + +This next command will create a collated document from one that contains the odd pages (1, 3, etc.) and one that contains the even pages (2, 4, etc.): + +``` +$ pdftk A=odd.pdf B=even.pdf shuffle A B output collated.pdf +``` + +Notice that the **shuffle** option make this collation possible and dictates the order in which the documents are used. Note also: While the odd/even pages example might suggest otherwise, you are not restricted to using only two input files. + +If you want to create an encrypted PDF that can only be opened by a recipient who knows the password, you could use a command like this one: + +``` +$ pdftk prep.pdf output report.pdf user_pw AsK4n0thingGeTn0thing +``` + +The options provide for 40 (**encrypt_40bit**) and 128 (**encrypt_128bit**) bit encryption. The 128 bit encryption is used by default. + +You can also break a PDF file into individual pages using the **burst** option: + +``` +$ pdftk allpgs.pdf burst +$ ls -ltr *.pdf | tail -5 +-rw-rw-r-- 1 shs shs 22933 Aug 8 08:18 pg_0001.pdf +-rw-rw-r-- 1 shs shs 23773 Aug 8 08:18 pg_0002.pdf +-rw-rw-r-- 1 shs shs 23260 Aug 8 08:18 pg_0003.pdf +-rw-rw-r-- 1 shs shs 23435 Aug 8 08:18 pg_0004.pdf +-rw-rw-r-- 1 shs shs 23136 Aug 8 08:18 pg_0005.pdf +``` + +The **pdftk** command makes pulling together, tearing apart, rebuilding and encrypting PDF files surprisingly easy. To learn more about its many options, I check out the examples page from [PDF Labs][3]. + +**[ Also see: [Invaluable tips and tricks for troubleshooting Linux][4] ]** + +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/3430781/how-to-manipulate-pdfs-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://images.idgesg.net/images/article/2019/08/book-pages-100807709-large.jpg +[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua +[3]: https://www.pdflabs.com/docs/pdftk-cli-examples/ +[4]: https://www.networkworld.com/article/3242170/linux/invaluable-tips-and-tricks-for-troubleshooting-linux.html +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 4208dc7c5cc1c3a7a98977f71872523fe92d249b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 9 Aug 2019 08:43:54 +0800 Subject: [PATCH 365/951] translated --- ...projects to try in COPR for August 2019.md | 105 ------------------ ...projects to try in COPR for August 2019.md | 105 ++++++++++++++++++ 2 files changed, 105 insertions(+), 105 deletions(-) delete mode 100644 sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md create mode 100644 translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md diff --git a/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md b/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md deleted file mode 100644 index 7c1d986679..0000000000 --- a/sources/tech/20190805 4 cool new projects to try in COPR for August 2019.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 cool new projects to try in COPR for August 2019) -[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/) -[#]: author: (Dominik Turecek https://fedoramagazine.org/author/dturecek/) - -4 cool new projects to try in COPR for August 2019 -====== - -![][1] - -COPR is a [collection][2] of personal repositories for software that isn’t carried in Fedora. Some software doesn’t conform to standards that allow easy packaging. Or it may not meet other Fedora standards, despite being free and open source. COPR can offer these projects outside the Fedora set of packages. Software in COPR isn’t supported by Fedora infrastructure or signed by the project. However, it can be a neat way to try new or experimental software. - -Here’s a set of new and interesting projects in COPR. - -### Duc - -[Duc][3] is a collection of tools for disk usage inspection and visualization. Duc uses an indexed database to store sizes of files on your system. Once the indexing is done, you can then quickly overview your disk usage either by its command-line interface or the GUI. - -![][4] - -#### Installation instructions - -The [repo][5] currently provides duc for EPEL 7, Fedora 29 and 30. To install duc, use these commands: - -``` -sudo dnf copr enable terrywang/duc -sudo dnf install duc -``` - -### MuseScore - -[MuseScore][6] is a software for working with music notation. With MuseScore, you can create sheet music either by using a mouse, virtual keyboard or a MIDI controller. MuseScore can then play the created music or export it as a PDF, MIDI or MusicXML. Additionally, there’s an extensive database of sheet music created by Musescore users. - -![][7] - -#### Installation instructions - -The [repo][8] currently provides MuseScore for Fedora 29 and 30. To install MuseScore, use these commands: - -``` -sudo dnf copr enable jjames/MuseScore -sudo dnf install musescore -``` - -### Dynamic Wallpaper Editor - -[Dynamic Wallpaper Editor][9] is a tool for creating and editing a collection of wallpapers in GNOME that change in time. This can be done using XML files, however, Dynamic Wallpaper Editor makes this easy with its graphical interface, where you can simply add pictures, arrange them and set the duration of each picture and transitions between them. - -![][10] - -#### Installation instructions - -The [repo][11] currently provides dynamic-wallpaper-editor for Fedora 30 and Rawhide. To install dynamic-wallpaper-editor, use these commands: - -``` -sudo dnf copr enable atim/dynamic-wallpaper-editor -sudo dnf install dynamic-wallpaper-editor -``` - -### Manuskript - -[Manuskript][12] is a tool for writers and is aimed to make creating large writing projects easier. It serves as an editor for writing the text itself, as well as a tool for organizing notes about the story itself, characters of the story and individual plots. - -![][13] - -#### Installation instructions - -The [repo][14] currently provides Manuskript for Fedora 29, 30 and Rawhide. To install Manuskript, use these commands: - -``` -sudo dnf copr enable notsag/manuskript -sudo dnf install manuskript -``` - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/ - -作者:[Dominik Turecek][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/dturecek/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg -[2]: https://copr.fedorainfracloud.org/ -[3]: https://duc.zevv.nl/ -[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/duc.png -[5]: https://copr.fedorainfracloud.org/coprs/terrywang/duc/ -[6]: https://musescore.org/ -[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/musescore-1024x512.png -[8]: https://copr.fedorainfracloud.org/coprs/jjames/MuseScore/ -[9]: https://github.com/maoschanz/dynamic-wallpaper-editor -[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/dynamic-walppaper-editor.png -[11]: https://copr.fedorainfracloud.org/coprs/atim/dynamic-wallpaper-editor/ -[12]: https://www.theologeek.ch/manuskript/ -[13]: https://fedoramagazine.org/wp-content/uploads/2019/07/manuskript-1024x600.png -[14]: https://copr.fedorainfracloud.org/coprs/notsag/manuskript/ diff --git a/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md b/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md new file mode 100644 index 0000000000..68c060d610 --- /dev/null +++ b/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md @@ -0,0 +1,105 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 cool new projects to try in COPR for August 2019) +[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/) +[#]: author: (Dominik Turecek https://fedoramagazine.org/author/dturecek/) + +COPR 仓库中 4 个很酷的新项目(2019.8) +====== + +![][1] + +COPR 是个人软件仓库[集合][2],它不在 Fedora 中。这是因为某些软件不符合轻松打包的标准。或者它可能不符合其他 Fedora 标准,尽管它是自由而开源的。COPR 可以在 Fedora 套件之外提供这些项目。COPR 中的软件不受 Fedora 基础设施的支持,或者是由项目自己背书的。但是,这是一种尝试新的或实验性的软件的一种巧妙的方式。 + +这是 COPR 中一组新的有趣项目。 + +### Duc + +[Duc][3] 是磁盘使用率检查和可视化工具的集合。Duc 使用索引数据库来保存系统上文件的大小。索引完成后,你可以通过命令行界面或 GUI 快速查看磁盘使用情况。 + +![][4] + +#### 安装说明 + +[仓库][5] 目前为 EPEL 7、Fedora 29 和 30 提供 duc。要安装 duc,请使用以下命令: + +``` +sudo dnf copr enable terrywang/duc +sudo dnf install duc +``` + +### MuseScore + +[MuseScore][6] 是一个处理音乐符号的软件。使用 MuseScore,你可以使用鼠标,虚拟键盘或 MIDI 控制器创建乐谱。然后,MuseScore 可以播放创建的音乐或将其导出为 PDF,MIDI 或 MusicXML。此外,它还有一个由 Musescore 用户创建的含有大量乐谱的数据库。 + +![][7] + +#### 安装说明 + +[仓库][5] 目前为 Fedora 29 和 30 提供 MuseScore。要安装 MuseScore,请使用以下命令: + +``` +sudo dnf copr enable jjames/MuseScore +sudo dnf install musescore +``` + +### Dynamic Wallpaper Editor + +[Dynamic Wallpaper Editor][9] 是一个可在 GNOME 中创建和编辑随时间变化的壁纸集合的工具。这可以使用 XML 文件来完成,但是,Dynamic Wallpaper Editor 通过其图形界面使其变得简单,你可以在其中简单地添加图片、排列图片并设置每张图片的持续时间以及它们之间的过渡。 + +![][10] + +#### 安装说明 + +[仓库][11] 目前为 Fedora 30 和 Rawhide 提供 Dynamic Wallpaper Editor。要安装 Dynamic Wallpaper Editor,请使用以下命令: + +``` +sudo dnf copr enable atim/dynamic-wallpaper-editor +sudo dnf install dynamic-wallpaper-editor +``` + +### Manuskript + +[Manuskript][12] 是一个给作者的工具,旨在让创建大型写作项目更容易。它既可以作为编写文本的编辑器,也可以作为组织故事本身、故事人物和单个情节的注释的工具。 + +![][13] + +#### 安装说明 + +[仓库][14] 目前为 Fedora 29、30 和 Rawhide 提供 Manuskript。要安装 Manuskript,请使用以下命令: + +``` +sudo dnf copr enable notsag/manuskript +sudo dnf install manuskript +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/ + +作者:[Dominik Turecek][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://fedoramagazine.org/author/dturecek/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg +[2]: https://copr.fedorainfracloud.org/ +[3]: https://duc.zevv.nl/ +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/duc.png +[5]: https://copr.fedorainfracloud.org/coprs/terrywang/duc/ +[6]: https://musescore.org/ +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/musescore-1024x512.png +[8]: https://copr.fedorainfracloud.org/coprs/jjames/MuseScore/ +[9]: https://github.com/maoschanz/dynamic-wallpaper-editor +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/dynamic-walppaper-editor.png +[11]: https://copr.fedorainfracloud.org/coprs/atim/dynamic-wallpaper-editor/ +[12]: https://www.theologeek.ch/manuskript/ +[13]: https://fedoramagazine.org/wp-content/uploads/2019/07/manuskript-1024x600.png +[14]: https://copr.fedorainfracloud.org/coprs/notsag/manuskript/ From dc89f6c4ea3782f518c52f494978da3c92f398f3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 9 Aug 2019 08:50:32 +0800 Subject: [PATCH 366/951] translating --- ...20190709 How to install Elasticsearch and Kibana on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md b/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md index 53f302cff7..efdd33d6fb 100644 --- a/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md +++ b/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From a5565ee41076cf867b60cf32291fd41b0c97851c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 9 Aug 2019 21:09:10 +0800 Subject: [PATCH 367/951] Rename sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md to sources/talk/20190808 Scrum vs. kanban- Which agile methodology is better.md --- ...0190808 Scrum vs. kanban- Which agile methodology is better.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190808 Scrum vs. kanban- Which agile methodology is better.md (100%) diff --git a/sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md b/sources/talk/20190808 Scrum vs. kanban- Which agile methodology is better.md similarity index 100% rename from sources/tech/20190808 Scrum vs. kanban- Which agile methodology is better.md rename to sources/talk/20190808 Scrum vs. kanban- Which agile methodology is better.md From 91e46bc4921144c4cebbddaa916be1eeb8a8ae48 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 9 Aug 2019 21:20:04 +0800 Subject: [PATCH 368/951] PRF @geekpi --- ...projects to try in COPR for August 2019.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md b/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md index 68c060d610..379c65690a 100644 --- a/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md +++ b/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (4 cool new projects to try in COPR for August 2019) @@ -12,19 +12,19 @@ COPR 仓库中 4 个很酷的新项目(2019.8) ![][1] -COPR 是个人软件仓库[集合][2],它不在 Fedora 中。这是因为某些软件不符合轻松打包的标准。或者它可能不符合其他 Fedora 标准,尽管它是自由而开源的。COPR 可以在 Fedora 套件之外提供这些项目。COPR 中的软件不受 Fedora 基础设施的支持,或者是由项目自己背书的。但是,这是一种尝试新的或实验性的软件的一种巧妙的方式。 +COPR 是个人软件仓库[集合][2],它不在 Fedora 中。这是因为某些软件不符合轻松打包的标准;或者它可能不符合其他 Fedora 标准,尽管它是自由而开源的。COPR 可以在 Fedora 套件之外提供这些项目。COPR 中的软件不受 Fedora 基础设施的支持,或者是由项目自己背书的。但是,这是一种尝试新的或实验性的软件的一种巧妙的方式。 这是 COPR 中一组新的有趣项目。 ### Duc -[Duc][3] 是磁盘使用率检查和可视化工具的集合。Duc 使用索引数据库来保存系统上文件的大小。索引完成后,你可以通过命令行界面或 GUI 快速查看磁盘使用情况。 +[duc][3] 是磁盘使用率检查和可视化工具的集合。Duc 使用索引数据库来保存系统上文件的大小。索引完成后,你可以通过命令行界面或 GUI 快速查看磁盘使用情况。 ![][4] #### 安装说明 -[仓库][5] 目前为 EPEL 7、Fedora 29 和 30 提供 duc。要安装 duc,请使用以下命令: +该[仓库][5]目前为 EPEL 7、Fedora 29 和 30 提供 duc。要安装 duc,请使用以下命令: ``` sudo dnf copr enable terrywang/duc @@ -33,28 +33,28 @@ sudo dnf install duc ### MuseScore -[MuseScore][6] 是一个处理音乐符号的软件。使用 MuseScore,你可以使用鼠标,虚拟键盘或 MIDI 控制器创建乐谱。然后,MuseScore 可以播放创建的音乐或将其导出为 PDF,MIDI 或 MusicXML。此外,它还有一个由 Musescore 用户创建的含有大量乐谱的数据库。 +[MuseScore][6] 是一个处理音乐符号的软件。使用 MuseScore,你可以使用鼠标、虚拟键盘或 MIDI 控制器创建乐谱。然后,MuseScore 可以播放创建的音乐或将其导出为 PDF、MIDI 或 MusicXML。此外,它还有一个由 MuseScore 用户创建的含有大量乐谱的数据库。 ![][7] #### 安装说明 -[仓库][5] 目前为 Fedora 29 和 30 提供 MuseScore。要安装 MuseScore,请使用以下命令: +该[仓库][5]目前为 Fedora 29 和 30 提供 MuseScore。要安装 MuseScore,请使用以下命令: ``` sudo dnf copr enable jjames/MuseScore sudo dnf install musescore ``` -### Dynamic Wallpaper Editor +### 动态墙纸编辑器 -[Dynamic Wallpaper Editor][9] 是一个可在 GNOME 中创建和编辑随时间变化的壁纸集合的工具。这可以使用 XML 文件来完成,但是,Dynamic Wallpaper Editor 通过其图形界面使其变得简单,你可以在其中简单地添加图片、排列图片并设置每张图片的持续时间以及它们之间的过渡。 +[动态墙纸编辑器][9] 是一个可在 GNOME 中创建和编辑随时间变化的壁纸集合的工具。这可以使用 XML 文件来完成,但是,动态墙纸编辑器通过其图形界面使其变得简单,你可以在其中简单地添加图片、排列图片并设置每张图片的持续时间以及它们之间的过渡。 ![][10] #### 安装说明 -[仓库][11] 目前为 Fedora 30 和 Rawhide 提供 Dynamic Wallpaper Editor。要安装 Dynamic Wallpaper Editor,请使用以下命令: +该[仓库][11]目前为 Fedora 30 和 Rawhide 提供动态墙纸编辑器。要安装它,请使用以下命令: ``` sudo dnf copr enable atim/dynamic-wallpaper-editor @@ -69,7 +69,7 @@ sudo dnf install dynamic-wallpaper-editor #### 安装说明 -[仓库][14] 目前为 Fedora 29、30 和 Rawhide 提供 Manuskript。要安装 Manuskript,请使用以下命令: +该[仓库][14]目前为 Fedora 29、30 和 Rawhide 提供 Manuskript。要安装 Manuskript,请使用以下命令: ``` sudo dnf copr enable notsag/manuskript @@ -83,7 +83,7 @@ via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-20 作者:[Dominik Turecek][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 1405e8aabd6ac6de267bfac012e1ea5d2aeecbe5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 9 Aug 2019 21:20:38 +0800 Subject: [PATCH 369/951] PUB @geekpi https://linux.cn/article-11206-1.html --- ...0805 4 cool new projects to try in COPR for August 2019.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190805 4 cool new projects to try in COPR for August 2019.md (98%) diff --git a/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md b/published/20190805 4 cool new projects to try in COPR for August 2019.md similarity index 98% rename from translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md rename to published/20190805 4 cool new projects to try in COPR for August 2019.md index 379c65690a..741d098f5c 100644 --- a/translated/tech/20190805 4 cool new projects to try in COPR for August 2019.md +++ b/published/20190805 4 cool new projects to try in COPR for August 2019.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11206-1.html) [#]: subject: (4 cool new projects to try in COPR for August 2019) [#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-august-2019/) [#]: author: (Dominik Turecek https://fedoramagazine.org/author/dturecek/) From c36213d910d518b012d212b68e6859953a222691 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 9 Aug 2019 22:01:39 +0800 Subject: [PATCH 370/951] APL --- ...soft finds Russia-backed attacks that exploit IoT devices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md b/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md index b8009d3923..69a16590de 100644 --- a/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md +++ b/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e2a18aea6ba2fa647a0d26e954c54c96fe6651f8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 9 Aug 2019 23:45:01 +0800 Subject: [PATCH 371/951] TSL&PRF --- ...backed attacks that exploit IoT devices.md | 73 ------------------- ...backed attacks that exploit IoT devices.md | 58 +++++++++++++++ 2 files changed, 58 insertions(+), 73 deletions(-) delete mode 100644 sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md create mode 100644 translated/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md diff --git a/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md b/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md deleted file mode 100644 index 69a16590de..0000000000 --- a/sources/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Microsoft finds Russia-backed attacks that exploit IoT devices) -[#]: via: (https://www.networkworld.com/article/3430356/microsoft-finds-russia-backed-attacks-that-exploit-iot-devices.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Microsoft finds Russia-backed attacks that exploit IoT devices -====== -Microsoft says default passwords, unpatched devices, poor inventory of IoT gear led to exploits against companies by Russia's STRONTIUM hacking group. -![Zmeel / Getty Images][1] - -The STRONTIUM hacking group, which has been strongly linked by security researchers to Russia’s GRU military intelligence agency, was responsible for an [IoT][2]-based attack on unnamed Microsoft customers, according to the company. a blog post from the company’s security response center issued Monday. - -Microsoft [said in a blog][3] that the attack, which it discovered in April, targeted three specific IoT devices – a VoIP phone, a video decoder and a printer (the company declined to specify the brands) – and used them to gain access to unspecified corporate networks. Two of the devices were compromised because nobody had changed the manufacturer’s default password, and the other one hadn’t had the latest security patch applied. - -**More on IoT:** - - * [][4] [Most powerful Internet of Things companies][5] - * [10 Hot IoT startups to watch][6] - * [The 6 ways to make money in IoT][7] - * [What is digital twin technology? [and why it matters]][8] - * [Blockchain, service-centric networking key to IoT success][9] - * [Getting grounded in IoT networking and security][10] - * [Building IoT-ready networks must become a priority][11] - * [What is the Industrial IoT? [And why the stakes are so high]][12] - - - -Devices compromised in this way acted as back doors to secured networks, allowing the attackers to freely scan those networks for further vulnerabilities, access additional systems, and gain more and more information. The attackers were also seen investigating administrative groups on compromised networks, in an attempt to gain still more access, as well as analyzing local subnet traffic for additional data. - -STRONTIUM, which has also been referred to as Fancy Bear, Pawn Storm, Sofacy and APT28, is thought to be behind a host of malicious cyber-activity undertaken on behalf of the Russian government, including the 2016 hack of the Democratic National Committee, attacks on the World Anti-Doping Agency, the targeting of journalists investigating the shoot-down of Malaysia Airlines Flight 17 over Ukraine, sending death threats to the wives of U.S. military personnel under a false flag and much more. - -According to an indictment released in July 2018 by the office of Special Counsel Robert Mueller, the architects of the STRONTIUM attacks are a group of Russian military officers, all of whom are wanted by the FBI in connection with those crimes. - -Microsoft notifies customers that it discovers are attacked by nation-states and has delivered about 1,400 such notifications related to STRONTIUM over the past 12 months. Most of those – four in five – went to organizations in the government, military, defense, IT, medicine, education and engineering sectors, and the remainder were for NGOs, think-tanks and other “politically affiliated organizations,” Microsoft said. - -The heart of the vulnerability, according to the Microsoft team, was a lack of full awareness by institutions of all the devices running on their networks. They recommended, among other things, cataloguing all IoT devices running in a corporate environment, implementing custom security policies for each device, walling off IoT devices on their own separate networks wherever practical, and performing regular patch and configuration audits on IoT gadgets. - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][13] ]** - -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/3430356/microsoft-finds-russia-backed-attacks-that-exploit-iot-devices.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://images.idgesg.net/images/article/2019/07/cso_russian_hammer_and_sickle_binary_code_by_zmeel_gettyimages-927363118_2400x1600-100801412-large.jpg -[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[3]: https://msrc-blog.microsoft.com/2019/08/05/corporate-iot-a-path-to-intrusion/ -[4]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[5]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[6]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[7]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[8]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[9]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[10]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[11]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[12]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[13]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[14]: https://www.facebook.com/NetworkWorld/ -[15]: https://www.linkedin.com/company/network-world diff --git a/translated/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md b/translated/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md new file mode 100644 index 0000000000..ae10275347 --- /dev/null +++ b/translated/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md @@ -0,0 +1,58 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Microsoft finds Russia-backed attacks that exploit IoT devices) +[#]: via: (https://www.networkworld.com/article/3430356/microsoft-finds-russia-backed-attacks-that-exploit-iot-devices.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +微软发现由俄罗斯背后支持的利用物联网设备进行的攻击 +====== + +> 微软表示,默认密码、未打补丁的设备,物联网设备库存不足是导致俄罗斯的 STRONTIUM 黑客组织发起针对公司的攻击的原因。 + +![Zmeel / Getty Images][1] + +在微软安全响应中心周一发布的博客文章中,该公司称,STRONTIUM 黑客组织对未披露名字的微软客户进行了基于 [IoT][2] 的攻击,安全研究人员相信 STRONTIUM 黑客组织和俄罗斯 GRU 军事情报机构有密切的关系。 + +微软[在博客中说][3],它在 4 月份发现的攻击针对三种特定的物联网设备:一部 VoIP 电话、一部视频解码器和一台打印机(该公司拒绝说明品牌),并将它们用于获得对不特定的公司网络的访问权限。其中两个设备遭到入侵是因为没有更改过制造商的默认密码,而另一个设备则是因为没有应用最新的安全补丁。 + +以这种方式受到攻击的设备成为了安全的网络的后门,允许攻击者自由扫描这些网络以获得进一步的漏洞,并访问其他系统获取更多的信息。攻击者也被发现其在调查受攻击网络上的管理组,试图获得更多访问权限,以及分析本地子网流量以获取其他数据。 + +STRONTIUM,也被称为 Fancy Bear、Pawn Storm、Sofacy 和 APT28,被认为是代表俄罗斯政府进行的一系列恶意网络活动的幕后黑手,其中包括 2016 年对民主党全国委员会的攻击,对世界反兴奋剂机构的攻击,针对记者调查马来西亚航空公司 17 号航班在乌克兰上空被击落的情况,向美国军人的妻子发送捏造的死亡威胁等等。 + +根据 2018 年 7 月特别顾问罗伯特·穆勒办公室发布的起诉书,STRONTIUM 袭击的指挥者是一群俄罗斯军官,所有这些人都被 FBI 通缉与这些罪行有关。 + +微软通知客户发现其遭到了民族国家的攻击,并在过去 12 个月内发送了大约 1,400 条与 STRONTIUM 相关的通知。微软表示,其中大多数(五分之四)是对政府、军队、国防、IT、医药、教育和工程领域的组织的攻击,其余的则是非政府组织、智囊团和其他“政治附属组织”。 + +根据微软团队的说法,漏洞的核心是机构缺乏对其网络上运行的所有设备的充分认识。另外,他们建议对在企业环境中运行的所有 IoT 设备进行编目,为每个设备实施自定义安全策略,在可行的情况下在各自独立的网络上屏蔽物联网设备,并对物联网组件执行定期补丁和配置审核。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3430356/microsoft-finds-russia-backed-attacks-that-exploit-iot-devices.html + +作者:[Jon Gold][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://www.networkworld.com/author/Jon-Gold/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/07/cso_russian_hammer_and_sickle_binary_code_by_zmeel_gettyimages-927363118_2400x1600-100801412-large.jpg +[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html +[3]: https://msrc-blog.microsoft.com/2019/08/05/corporate-iot-a-path-to-intrusion/ +[4]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html +[5]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html +[6]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html +[7]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html +[8]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html +[9]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html +[10]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html +[11]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html +[12]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[13]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[14]: https://www.facebook.com/NetworkWorld/ +[15]: https://www.linkedin.com/company/network-world From 7b1ea798bb5182a4589c169a29846d2b27e738e8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 9 Aug 2019 23:49:06 +0800 Subject: [PATCH 372/951] PUB @wxy https://linux.cn/article-11207-1.html --- ...ft finds Russia-backed attacks that exploit IoT devices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md (98%) diff --git a/translated/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md b/published/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md similarity index 98% rename from translated/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md rename to published/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md index ae10275347..22eeb954f7 100644 --- a/translated/news/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md +++ b/published/20190806 Microsoft finds Russia-backed attacks that exploit IoT devices.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11207-1.html) [#]: subject: (Microsoft finds Russia-backed attacks that exploit IoT devices) [#]: via: (https://www.networkworld.com/article/3430356/microsoft-finds-russia-backed-attacks-that-exploit-iot-devices.html) [#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) From 1e68023fb105c51540310f996b7539b7fc3d97d4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Aug 2019 01:16:10 +0800 Subject: [PATCH 373/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190810=20How=20?= =?UTF-8?q?to=20Upgrade=20Linux=20Mint=2019.1=20(Tessa)=20to=20Linux=20Min?= =?UTF-8?q?t=2019.2=20(Tina)=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md --- ... 19.1 (Tessa) to Linux Mint 19.2 (Tina).md | 245 ++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md diff --git a/sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md b/sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md new file mode 100644 index 0000000000..d37a9fb301 --- /dev/null +++ b/sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md @@ -0,0 +1,245 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina)?) +[#]: via: (https://www.2daygeek.com/upgrade-linux-mint-19-1-tessa-to-linux-mint-19-2-tina/) +[#]: author: (2daygeek http://www.2daygeek.com/author/2daygeek/) + +How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina)? +====== + +Linux Mint 19.2 “Tina” was released on Aug 02nd 2019, it is a long term support release, which is based on Ubuntu 18.04 LTS (Bionic Beaver). + +It will be supported until 2023. It comes with updated software and brings refinements and many new features to make your desktop even more comfortable to use. + +Linux Mint 19.2 features with Cinnamon 4.2, Linux kernel 4.15, and Ubuntu 18.04 package base. + +**`Note:`**` ` Don’t forget to take backup of your important data. If something goes wrong you can restore the data from the backup after fresh installation. + +Backup can be done either rsnapshot or timeshift. + +Linux Mint 19.2 “Tina” Release notes can be found in the following link. + + * **[Linux Mint 19.2 (Tina) Release Notes][1]** + + + +There are three ways that we can upgrade to Linux Mint 19.2 “Tina”. + + * Upgrade Linux Mint 19.2 (Tina) Using Native Method + * Upgrade Linux Mint 19.2 (Tina) Using Mintupgrade Utility + * Upgrade Linux Mint 19.2 (Tina) Using GUI + + + +### How to Perform The Upgrade from Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina)? + +Upgrading the Linux Mint system is an easy and painless task. It can be done three ways. + +### Method-1: Upgrade Linux Mint 19.2 (Tina) Using Native Method + +This is one of the native and standard method to perform the upgrade for Linux Mint system. + +To do so, follow the below procedures. + +Make sure that your current Linux Mint system is up-to-date. + +Update your existing software to latest available version using the following commands. + +### Step-1: + +Refresh the repositories index by running the following command. + +``` +$ sudo apt update +``` + +Run the following command to install the available updates on system. + +``` +$ sudo apt upgrade +``` + +Run the following command to perform the available minor upgrade with in version. + +``` +$ sudo apt full-upgrade +``` + +By default, it will remove obsolete packages by running the above command. However, i advise you to run the below commands. + +``` +$ sudo apt autoremove + +$ sudo apt clean +``` + +You may need to reboot the system, if a new kernel is installed. If so, run the following command. + +``` +$ sudo shutdown -r now +``` + +Finally check the currently installed version. + +``` +$ lsb_release -a + +No LSB modules are available. +Distributor ID: Linux Mint +Description: Linux Mint 19.1 (Tessa) +Release: 19.1 +Codename: Tessa +``` + +### Step-2: Update/Modify the /etc/apt/sources.list file + +After reboot, modify the sources.list file and point from Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina). + +First backup the below config files using the cp command. + +``` +$ sudo cp /etc/apt/sources.list /root +$ sudo cp -r /etc/apt/sources.list.d/ /root +``` + +Modify the “sources.list” file and point to Linux Mint 19.1 (Tina). + +``` +$ sudo sed -i 's/tessa/tina/g' /etc/apt/sources.list +$ sudo sed -i 's/tessa/tina/g' /etc/apt/sources.list.d/* +``` + +Refresh the repositories index by running the following command. + +``` +$ sudo apt update +``` + +Run the following command to install the available updates on system. During the upgrade you may need to confirm for service restart and config file replace so, just follow on-screen instructions. + +The upgrade may take some time depending on the number of updates and your Internet speed. + +``` +$ sudo apt upgrade +``` + +Run the following command to perform a complete upgrade of the system. + +``` +$ sudo apt full-upgrade +``` + +By default, the above command will remove obsolete packages. However, i advise you to run the below commands once again. + +``` +$ sudo apt autoremove + +$ sudo apt clean +``` + +Finally reboot the system to boot with Linux Mint 19.2 (Tina). + +``` +$ sudo shutdown -r now +``` + +The upgraded Linux Mint version can be verified by running the following command. + +``` +$ lsb_release -a + +No LSB modules are available. +Distributor ID: Linux Mint +Description: Linux Mint 19.2 (Tina) +Release: 19.2 +Codename: Tina +``` + +### Method-2: Upgrade Linux Mint 19.2 (Tina) Using Mintupgrade Utility + +This is Mint official utility that allow us to perform the smooth upgrade for Linux Mint system. + +Use the below command to install mintupgrade package. + +``` +$ sudo apt install mintupgrade +``` + +Make sure you have installed the latest version of mintupgrade package. + +``` +$ apt version mintupgrade +``` + +Run the below command as a normal user to simulate an upgrade and follow on-screen instructions. + +``` +$ mintupgrade check +``` + +Use the below command to download the packages necessary to upgrade to Linux Mint 19.2 (Tina) and follow on screen instructions. + +``` +$ mintupgrade download +``` + +Run the following command to apply the upgrades and follow on-screen instructions. + +``` +$ mintupgrade upgrade +``` + +Once upgrade done successfully, Reboot the system and check the upgraded version. + +``` +$ lsb_release -a + +No LSB modules are available. +Distributor ID: Linux Mint +Description: Linux Mint 19.2 (Tina) +Release: 19.2 +Codename: Tina +``` + +### Method-3: Upgrade Linux Mint 19.2 (Tina) Using GUI + +Alternatively, we can perform the upgrade through GUI. + +### Step-1: + +Create a system snapshot through Timeshift. If anything goes wrong, you can easily restore your operating system to its previous state. + +### Step-2: + +Open the Update Manager, click on the Refresh button to check for any new version of mintupdate and mint-upgrade-info. If there are updates for these packages, apply them. + +Launch the System Upgrade by clicking on “Edit->Upgrade to Linux Mint 19.2 Tina”. +[![][2]![][2]][3] + +Follow the instructions on the screen. If asked whether to keep or replace configuration files, choose to replace them. +[![][2]![][2]][4] + +### Step-3: + +Once the upgrade is finished, reboot your computer. + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/upgrade-linux-mint-19-1-tessa-to-linux-mint-19-2-tina/ + +作者:[2daygeek][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.2daygeek.com/author/2daygeek/ +[b]: https://github.com/lujun9972 +[1]: https://www.linuxtechnews.com/linux-mint-19-2-tina-released-check-what-is-new-feature/ +[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[3]: https://www.2daygeek.com/wp-content/uploads/2019/08/linux-mint-19-2-tina-mintupgrade.png +[4]: https://www.2daygeek.com/wp-content/uploads/2019/08/linux-mint-19-2-tina-mintupgrade-1.png From 30edb6819780e042cf0d12ba26cd6a883ca9273b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Aug 2019 01:17:19 +0800 Subject: [PATCH 374/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190809=20Use=20?= =?UTF-8?q?a=20drop-down=20terminal=20for=20fast=20commands=20in=20Fedora?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md --- ...wn terminal for fast commands in Fedora.md | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md diff --git a/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md b/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md new file mode 100644 index 0000000000..8a26e90cfe --- /dev/null +++ b/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md @@ -0,0 +1,193 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use a drop-down terminal for fast commands in Fedora) +[#]: via: (https://fedoramagazine.org/use-a-drop-down-terminal-for-fast-commands-in-fedora/) +[#]: author: (Guilherme Schelp https://fedoramagazine.org/author/schelp/) + +Use a drop-down terminal for fast commands in Fedora +====== + +![][1] + +A **drop-down terminal** lets you tap a key and quickly enter any command on your desktop. Often it creates a terminal in a smooth way, sometimes with effects. This article demonstrates how it helps to improve and speed up daily tasks, using drop-down terminals like Yakuake, Tilda, Guake and a GNOME extension. + +### Yakuake + +[Yakuake][2] is a drop-down terminal emulator based on KDE Konsole techonology. It is distributed under the terms of the GNU GPL Version 2. It includes features such as: + + * Smoothly rolls down from the top of your screen + * Tabbed interface + * Configurable dimensions and animation speed + * Skinnable + * Sophisticated D-Bus interface + + + +To install Yakuake, use the following command: + +``` +$ sudo dnf install -y yakuake +``` + +#### Startup and configuration + +If you’re runnign KDE, open the System Settings and go to _Startup and Shutdown_. Add _yakuake_ to the list of programs under _Autostart_, like this: + +![][3] + +It’s easy to configure Yakuake while running the app. To begin, launch the program at the command line: + +``` +$ yakuake & +``` + +The following welcome dialog appears. You can set a new keyboard shortcut if the standard one conflicts with another keystroke you already use: + +![][4] + +Now click the menu button, and the following help menu appears. Next, select _Configure Yakuake…_ to access the configuration options. + +![][5] + +You can customize the options for appearance, such as opacity; behavior, such as focusing terminals when the mouse pointer is moved over them; and window, such as size and animation. In the window options you’ll find one of the most useful options is you use two or more monitors: _Open on screen: At mouse location_. + +#### Using Yakuake + +The main shortcuts are: + + * **F12** = Open/Retract Yakuake + * **Ctrl+F11** = Full Screen Mode + * **Ctrl+)** = Split Top/Bottom + * **Ctrl+(** = Split Left/Right + * **Ctrl+Shift+T** = New Session + * **Shift+Right** = Next Session + * **Shift+Left** = Previous Session + * **Ctrl+Alt+S** = Rename Session + + + +Below is an example of Yakuake being used to split the session like a [terminal multiplexer][6]. Using this feature, you can run several shells in one session. + +![][7] + +### Tilda + +[Tilda][8] is a drop-down terminal that compares with other popular terminal emulators such as GNOME Terminal, KDE’s Konsole, xterm, and many others. + +It features a highly configurable interface. You can even change options such as the terminal size and animation speed. Tilda also lets you enable hotkeys you can bind to commands and operations. + +To install Tilda, run this command: + +``` +$ sudo dnf install -y tilda +``` + +#### Startup and configuration + +Most users prefer to have a drop-down terminal available behind the scenes when they login. To set this option, first go to the app launcher in your desktop, search for Tilda, and open it. + +Next, open up the Tilda Config window. Select _Start Tilda hidden_, which means it will not display a terminal immediately when started. + +![][9] + +Next, you’ll set your desktop to start Tilda automatically. If you’re using KDE, go to _System Settings_ > _Startup and Shutdown_ > _Autostart_ and use _Add a Program_. + +![][10] + +If you’re using GNOME, you can run this command in a terminal: + +``` +$ ln -s /usr/share/applications/tilda.desktop ~/.config/autostart/ +``` + +When you run for the first time, a wizard shows up to set your preferences. If you need to change something, right click and go to _Preferences_ in the menu. + +![][11] + +You can also create multiple configuration files, and bind other keys to open new terminals at different places on the screen. To do that, run this command: + +``` +$ tilda -C +``` + +Every time you use the above command, Tilda creates a new config file located in the _~/.config/tilda/_ folder called _config_0_, _config_1_, and so on. You can then map a key combination to open a new Tilda terminal with a specific set of options. + +#### Using Tilda + +The main shortcuts are: + + * **F1** = Pull Down Terminal Tilda (Note: If you have more than one config file, the shortcuts are the same, with a diferent _open/retract_ shortcut like F1, F2, F3, and so on) + * **F11** = Full Screen Mode + * **F12** = Toggle Transparency + * **Ctrl+Shift+T** = Add Tab + * **Ctrl+Page Up** = Go to Next Tab + * **Ctrl+Page Down** = Go to Previous Tab + + + +### GNOME Extension + +The Drop-down Terminal [GNOME Extension][12] lets you use this useful tool in your GNOME Shell. It is easy to install and configure, and gives you fast access to a terminal session. + +#### Installation + +Open a browser and go to the [site for this GNOME extension][12]. Enable the extension setting to _On_, as shown here: + +![][13] + +Then select _Install_ to install the extension on your system. + +![][14] + +Once you do this, there’s no reason to set any autostart options. The extension will automatically run whenever you login to GNOME! + +#### Configuration + +After install, the Drop Down Terminal configuration window opens to set your preferences. For example, you can set the size of the terminal, animation, transparency, and scrollbar use. + +![][15] + +If you need change some preferences in the future, run the _gnome-shell-extension-prefs_ command and choose _Drop Down Terminal_. + +#### Using the extension + +The shortcuts are simple: + + * **`** (usually the key above **Tab**) = Open/Retract Terminal + * **F12** (customize as you prefer) = Open/Retract Terminal + + + +* * * + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/use-a-drop-down-terminal-for-fast-commands-in-fedora/ + +作者:[Guilherme Schelp][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/schelp/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/dropdown-terminals-816x345.jpg +[2]: https://kde.org/applications/system/org.kde.yakuake +[3]: https://fedoramagazine.org/wp-content/uploads/2019/07/auto_start-1024x723.png +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_config-1024x419.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_config_01.png +[6]: https://fedoramagazine.org/4-cool-terminal-multiplexers/ +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_usage.gif +[8]: https://github.com/lanoxx/tilda +[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_startup.png +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_startup_alt.png +[11]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_config.png +[12]: https://extensions.gnome.org/extension/442/drop-down-terminal/ +[13]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_2-1024x455.png +[14]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_3.png +[15]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_4.png From 8e61411ca271300d6900265bd5c2f4c043dcf319 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Aug 2019 01:36:38 +0800 Subject: [PATCH 375/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190810=20Endeav?= =?UTF-8?q?ourOS=20Aims=20to=20Fill=20the=20Void=20Left=20by=20Antergos=20?= =?UTF-8?q?in=20Arch=20Linux=20World?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190810 EndeavourOS Aims to Fill the Void Left by Antergos in Arch Linux World.md --- ...id Left by Antergos in Arch Linux World.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sources/tech/20190810 EndeavourOS Aims to Fill the Void Left by Antergos in Arch Linux World.md diff --git a/sources/tech/20190810 EndeavourOS Aims to Fill the Void Left by Antergos in Arch Linux World.md b/sources/tech/20190810 EndeavourOS Aims to Fill the Void Left by Antergos in Arch Linux World.md new file mode 100644 index 0000000000..b993c4d1dc --- /dev/null +++ b/sources/tech/20190810 EndeavourOS Aims to Fill the Void Left by Antergos in Arch Linux World.md @@ -0,0 +1,106 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (EndeavourOS Aims to Fill the Void Left by Antergos in Arch Linux World) +[#]: via: (https://itsfoss.com/endeavouros/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +EndeavourOS Aims to Fill the Void Left by Antergos in Arch Linux World +====== + +![][1] + +I’m sure that most of our readers are aware of the [end of the Antergos project][2]. In the wake of the announcement, the members of the Antergos community created several successors. Today, we will be looking at one of the ‘spiritual successors’ of Antergos: [EndeavourOS][3]. + +### EndeavourOS is not a fork of Antergos + +Before we start, I would like to make it very clear that EndeavourOS is not a fork of Antergos. The developers used Antergos as their inspiration to create a light Arch-based distro. + +![Endeavouros First Boot][4] + +According to the [project’s site][5], EndeavourOS came into existence because people in the Antergos community wanted to keep the spirit of Antergos alive. Their goal was simply to “have Arch installed with an easy to use installer and a friendly, helpful community to fall back on during the journey to master the system”. + +Unlike many Arch-based distros, EndeavourOS is intending to work [like vanilla Arch][5], “so no one-click solutions to install your favorite app or a bunch of preinstalled apps you’ll eventually don’t need”. For most people, especially those new to Linux and Arch, there will be a learning curve, but EndeavourOS aims to have a large friendly community where people are encouraged to ask questions and learn about their systems. + +![Endeavouros Installing][6] + +### A Work in Progress + +EndeavourOS was [first released on July 15th][7] of this year after the project was first announced on [May 23rd][8]. Unfortunately, this means that the developers were unable to incorporate all of the features that they have planned. + +For example, they want to have an online install similar to the one used by Antergos but ran into [issues with the current options][9]. “Cnchi has caused serious problems to be working outside the Antergos eco system and it needs a complete rewrite to work. The Fenix installer by RebornOS is getting more into shape, but needs more time to properly function.” For now, EndeavourOS will ship with the [Calamares installer][10]. + +[][11] + +Suggested read  Velt/OS: A Material Design-Themed Desktop Environment + +EndeavourOS will also offer [less stuff than Antergos][9]: It’s repo is smaller than Antergos though they ship with some AUR packages. Their goal is to deliver a system that’s close to Arch an not vanilla Arch. + +![Endeavouros Updating With Kalu][12] + +The developers [stated further][13]: + +> “Linux and specifically Arch are all about freedom of choice, we provide a basic install that lets you explore those choices with a small layer of convenience. We will never judge you by installing GUI apps like Pamac or even work with sandbox solutions like Flatpak or Snaps. It’s up to you what you are installing to make EndeavourOS work in your circumstances, that’s the main difference we have with Antergos or Manjaro, but like Antergos we will try to help you if you run into a problem with one of your installed packages.” + +### Experiencing EndeavourOS + +I installed EndeavourOS in [VirtualBox][14] and took a look around. When I first booted from the image, I was greeted by a little box with links to the EndeavourOS site about installing. It also has a button to install and one to manually partition the drive. The Calamares installer worked very smoothly for me. + +After I rebooted into a fresh install of EndeavourOS, I was greeted by a colorful themed XFCE desktop. I was also treated to a bunch of notification balloons. Most Arch-based distros I’ve used come with a GUI tool like [pamac][15] or [octopi][16] to keep the system up-to-date. EndeavourOS comes with [kalu][17]. (kalu stands for “Keeping Arch Linux Up-to-date”.) It checks for updated packages, Arch Linux News, updated AUR packages and more. Once it sees an update for any of those areas, it will create a notification balloon. + +I took a look through the menu to see what was installed by default. The answer is not much, not even an office suite. If they intend for EndeavourOS to be a blank canvas for anyone to create the system they want. they are headed in the right direction. + +![Endeavouros Desktop][18] + +### Final Thoughts + +EndeavourOS is still very young. The first stable release was issued only 3 weeks ago. It is missing some stuff, most importantly an online installer. That being said, it is possible to gauge where EndeavourOS will be heading. + +[][19] + +Suggested read  An Overview of Intel's Clear Linux, its Features and Installation Procedure + +While it is not an exact clone of Antergos, EndeavourOS wants to replicate the most important part of Antergos the welcoming, friendly community. All to often, the Linux community can seem to be unwelcoming and downright hostile to the beginner. I’ve seen more and more people trying to combat that negativity and bring more people into Linux. With the EndeavourOS team making that their main focus, a great distro can be the only result. + +If you are currently using Antergos, there is a way for you to [switch to EndeavourOS without performing a clean install.][20] + +If you want an exact clone of Antergos, I would recommend checking out [RebornOS][21]. They are currently working on a replacement of the Cnchi installer named Fenix. + +Have you tried EndeavourOS already? How’s your experience with it? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/endeavouros/ + +作者:[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/2019/08/endeavouros-logo.png?ssl=1 +[2]: https://itsfoss.com/antergos-linux-discontinued/ +[3]: https://endeavouros.com/ +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/endeavouros-first-boot.png?resize=800%2C600&ssl=1 +[5]: https://endeavouros.com/info-2/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/endeavouros-installing.png?resize=800%2C600&ssl=1 +[7]: https://endeavouros.com/endeavouros-first-stable-release-has-arrived/ +[8]: https://forum.antergos.com/topic/11780/endeavour-antergos-community-s-next-stage +[9]: https://endeavouros.com/what-to-expect-on-the-first-release/ +[10]: https://calamares.io/ +[11]: https://itsfoss.com/veltos-linux/ +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/endeavouros-updating-with-kalu.png?resize=800%2C600&ssl=1 +[13]: https://endeavouros.com/second-week-after-the-stable-release/ +[14]: https://itsfoss.com/install-virtualbox-ubuntu/ +[15]: https://aur.archlinux.org/packages/pamac-aur/ +[16]: https://octopiproject.wordpress.com/ +[17]: https://github.com/jjk-jacky/kalu +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/endeavouros-desktop.png?resize=800%2C600&ssl=1 +[19]: https://itsfoss.com/clear-linux/ +[20]: https://forum.endeavouros.com/t/how-to-switch-from-antergos-to-endevouros/105/2 +[21]: https://rebornos.org/ From 0f74a0d70a3ae653fd1a235ee39b0ecf619642cc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Aug 2019 02:29:37 +0800 Subject: [PATCH 376/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190809=20Copyin?= =?UTF-8?q?g=20files=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190809 Copying files in Linux.md --- .../tech/20190809 Copying files in Linux.md | 222 ++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 sources/tech/20190809 Copying files in Linux.md diff --git a/sources/tech/20190809 Copying files in Linux.md b/sources/tech/20190809 Copying files in Linux.md new file mode 100644 index 0000000000..04d20e3baa --- /dev/null +++ b/sources/tech/20190809 Copying files in Linux.md @@ -0,0 +1,222 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Copying files in Linux) +[#]: via: (https://opensource.com/article/19/8/copying-files-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-p) + +Copying files in Linux +====== +Learn multiple ways to copy files on Linux, and the advantages of each. +![Filing papers and documents][1] + +Copying documents used to require a dedicated staff member in offices, and then a dedicated machine. Today, copying is a task computer users do without a second thought. Copying data on a computer is so trivial that copies are made without you realizing it, such as when dragging a file to an external drive. + +The concept that digital entities are trivial to reproduce is pervasive, so most modern computerists don’t think about the options available for duplicating their work. And yet, there are several different ways to copy a file on Linux. Each method has nuanced features that might benefit you, depending on what you need to get done. + +Here are a number of ways to copy files on Linux, BSD, and Mac. + +### Copying in the GUI + +As with most operating systems, you can do all of your file management in the GUI, if that's the way you prefer to work. + +Drag and drop + +The most obvious way to copy a file is the way you’re probably used to copying files on computers: drag and drop. On most Linux desktops, dragging and dropping from one local folder to another local folder _moves_ a file by default. You can change this behavior to a copy operation by holding down the **Ctrl** key after you start dragging the file. + +Your cursor may show an indicator, such as a plus sign, to show that you are in copy mode: + +![Copying a file.][2] + +Note that if the file exists on a remote system, whether it’s a web server or another computer on your own network that you access through a file-sharing protocol, the default action is often to copy, not move, the file. + +#### Right-click + +If you find dragging and dropping files around your desktop imprecise or clumsy, or doing so takes your hands away from your keyboard too much, you can usually copy a file using the right-click menu. This possibility depends on the file manager you use, but generally, a right-click produces a contextual menu containing common actions. + +The contextual menu copy action stores the [file path][3] (where the file exists on your system) in your clipboard so you can then _paste_ the file somewhere else: + +![Copying a file from the context menu.][4] + +In this case, you’re not actually copying the file’s contents to your clipboard. Instead, you're copying the [file path][3]. When you paste, your file manager looks at the path in your clipboard and then runs a copy command, copying the file located at that path to the path you are pasting into. + +### Copying on the command line + +While the GUI is a generally familiar way to copy files, copying in a terminal can be more efficient. + +#### cp + +The obvious terminal-based equivalent to copying and pasting a file on the desktop is the **cp** command. This command copies files and directories and is relatively straightforward. It uses the familiar _source_ and _target_ (strictly in that order) syntax, so to copy a file called **example.txt** into your **Documents** directory: + + +``` +$ cp example.txt ~/Documents +``` + +Just like when you drag and drop a file onto a folder, this action doesn’t replace **Documents** with **example.txt**. Instead, **cp** detects that **Documents** is a folder, and places a copy of **example.txt** into it. + +You can also, conveniently (and efficiently), rename the file as you copy it: + + +``` +$ cp example.txt ~/Documents/example_copy.txt +``` + +That fact is important because it allows you to make a copy of a file in the same directory as the original: + + +``` +$ cp example.txt example.txt +cp: 'example.txt' and 'example.txt' are the same file. +$ cp example.txt example_copy.txt +``` + +To copy a directory, you must use the **-r** option, which stands for --**recursive**. This option runs **cp** on the directory _inode_, and then on all files within the directory. Without the **-r** option, **cp** doesn’t even recognize a directory as an object that can be copied: + + +``` +$ cp notes/ notes-backup +cp: -r not specified; omitting directory 'notes/' +$ cp -r notes/ notes-backup +``` + +#### cat + +The **cat** command is one of the most misunderstood commands, but only because it exemplifies the extreme flexibility of a [POSIX][5] system. Among everything else **cat** does (including its intended purpose of con_cat_enating files), it can also copy. For instance, with **cat** you can [create two copies from one file][6] with just a single command. You can’t do that with **cp**. + +The significance of using **cat** to copy a file is the way the system interprets the action. When you use **cp** to copy a file, the file’s attributes are copied along with the file itself. That means that the file permissions of the duplicate are the same as the original: + + +``` +$ ls -l -G -g +-rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg +$ cp foo.jpg bar.jpg +-rw-r--r--. 1 57368 Jul 29 13:37  bar.jpg +-rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg +``` + +Using **cat** to read the contents of a file into another file, however, invokes a system call to create a new file. These new files are subject to your default **umask** settings. To learn more about `umask`, read Alex Juarez’s article covering [umask][7] and permissions in general. + +Run **umask** to get the current settings: + + +``` +$ umask +0002 +``` + +This setting means that new files created in this location are granted **664** (**rw-rw-r--**) permission because nothing is masked by the first digits of the **umask** setting (and the executable bit is not a default bit for file creation), and the write permission is blocked by the final digit. + +When you copy with **cat**, you don’t actually copy the file. You use **cat** to read the contents of the file, and then redirect the output into a new file: + + +``` +$ cat foo.jpg > baz.jpg +$ ls -l -G -g +-rw-r--r--. 1 57368 Jul 29 13:37  bar.jpg +-rw-rw-r--. 1 57368 Jul 29 13:42  baz.jpg +-rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg +``` + +As you can see, **cat** created a brand new file with the system’s default umask applied. + +In the end, when all you want to do is copy a file, the technicalities often don’t matter. But sometimes you want to copy a file and end up with a default set of permissions, and with **cat** you can do it all in one command**.** + +#### rsync + +The **rsync** command is a versatile tool for copying files, with the notable ability to synchronize your source and destination. At its most simple, **rsync** can be used similarly to **cp** command: + + +``` +$ rsync example.txt example_copy.txt +$ ls +example.txt    example_copy.txt +``` + +The command’s true power lies in its ability to _not_ copy when it’s not necessary. If you use **rsync** to copy a file into a directory, but that file already exists in that directory, then **rsync** doesn’t bother performing the copy operation. Locally, that fact doesn’t necessarily mean much, but if you’re copying gigabytes of data to a remote server, this feature makes a world of difference. + +What does make a difference even locally, though, is the command’s ability to differentiate files that share the same name but which contain different data. If you’ve ever found yourself faced with two copies of what is meant to be the same directory, then **rsync** can synchronize them into one directory containing the latest changes from each. This setup is a pretty common occurrence in industries that haven’t yet discovered the magic of version control, and for backup solutions in which there is one source of truth to propagate. + +You can emulate this situation intentionally by creating two folders, one called **example** and the other **example_dupe**: + + +``` +$ mkdir example example_dupe +``` + +Create a file in the first folder: + + +``` +$ echo "one" > example/foo.txt +``` + +Use **rsync** to synchronize the two directories. The most common options for this operation are **-a** (for _archive_, which ensures symlinks and other special files are preserved) and **-v** (for _verbose_, providing feedback to you on the command’s progress): + + +``` +$ rsync -av example/ example_dupe/ +``` + +The directories now contain the same information: + + +``` +$ cat example/foo.txt +one +$ cat example_dupe/foo.txt +one +``` + +If the file you are treating as the source diverges, then the target is updated to match: + + +``` +$ echo "two" >> example/foo.txt +$ rsync -av example/  example_dupe/ +$ cat example_dupe/foo.txt +one +two +``` + +Keep in mind that the **rsync** command is meant to copy data, not to act as a version control system. For instance, if a file in the destination somehow gets ahead of a file in the source, that file is still overwritten because **rsync** compares files for divergence and assumes that the destination is always meant to mirror the source: + + +``` +$ echo "You will never see this note again" > example_dupe/foo.txt +$ rsync -av example/  example_dupe/ +$ cat example_dupe/foo.txt +one +two +``` + +If there is no change, then no copy occurs. + +The **rsync** command has many options not available in **cp**, such as the ability to set target permissions, exclude files, delete outdated files that don’t appear in both directories, and much more. Use **rsync** as a powerful replacement for **cp**, or just as a useful supplement. + +### Many ways to copy + +There are many ways to achieve essentially the same outcome on a POSIX system, so it seems that open source’s reputation for flexibility is well earned. Have I missed a useful way to copy data? Share your copy hacks in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/copying-files-linux + +作者:[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/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-p +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/documents_papers_file_storage_work.png?itok=YlXpAqAJ (Filing papers and documents) +[2]: https://opensource.com/sites/default/files/uploads/copy-nautilus.jpg (Copying a file.) +[3]: https://opensource.com/article/19/7/understanding-file-paths-and-how-use-them +[4]: https://opensource.com/sites/default/files/uploads/copy-files-menu.jpg (Copying a file from the context menu.) +[5]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[6]: https://opensource.com/article/19/2/getting-started-cat-command +[7]: https://opensource.com/article/19/7/linux-permissions-101 From 7162ab5ae8db04a83f00cf8ce8f70049f0b0eb58 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Aug 2019 02:30:50 +0800 Subject: [PATCH 377/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190809=20Mutati?= =?UTF-8?q?on=20testing=20is=20the=20evolution=20of=20TDD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190809 Mutation testing is the evolution of TDD.md --- ...utation testing is the evolution of TDD.md | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 sources/tech/20190809 Mutation testing is the evolution of TDD.md diff --git a/sources/tech/20190809 Mutation testing is the evolution of TDD.md b/sources/tech/20190809 Mutation testing is the evolution of TDD.md new file mode 100644 index 0000000000..766d2a4285 --- /dev/null +++ b/sources/tech/20190809 Mutation testing is the evolution of TDD.md @@ -0,0 +1,285 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Mutation testing is the evolution of TDD) +[#]: via: (https://opensource.com/article/19/8/mutation-testing-evolution-tdd) +[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) + +Mutation testing is the evolution of TDD +====== +Since test-driven development is modeled on how nature works, mutation +testing is the natural next step in the evolution of DevOps. +![Ants and a leaf making the word "open"][1] + +In "[Failure is a feature in blameless DevOps][2]," I discussed the central role of failure in delivering quality by soliciting feedback. This is the failure agile DevOps teams rely on to guide them and drive development. [Test-driven development (TDD)][3] is the _[conditio sine qua non][4]_ of any agile DevOps value stream delivery. Failure-centric TDD methodology only works if it is paired with measurable tests. + +TDD methodology is modeled on how nature works and how nature produces winners and losers in the evolutionary game. + +### Natural selection + +![Charles Darwin][5] + +In 1859, [Charles Darwin][6] proposed the theory of evolution in his book _[On the Origin of Species][7]_. Darwin's thesis was that natural variability is caused by the combination of spontaneous mutations in individual organisms and environmental pressures. These pressures eliminate less-adapted organisms while favoring other, more fit organisms. Each and every living being mutates its chromosomes, and those spontaneous mutations are carried to the next generation (the offspring). The newly emerged variability is then tested under natural selection—the environmental pressures that exist due to the variability of environmental conditions. + +This simplified diagram illustrates the process of adjusting to environmental conditions. + +![Environmental pressures on fish][8] + +Fig. 1. Different environmental pressures result in different outcomes governed by natural selection. Image screenshot from a [video by Richard Dawkins][9]. + +This illustration shows a school of fish in their natural habitat. The habitat varies (darker or lighter gravel at the bottom of the sea or riverbed), as does each fish (darker or lighter body patterns and colors). + +It also shows two situations (i.e., two variations of the environmental pressure): + + 1. The predator is present + 2. The predator is absent + + + +In the first situation, fish that are easier to spot against the gravel shade are at higher risk of being picked off by predators. When the gravel is darker, the lighter portion of the fish population is thinned out. And vice versa—when the gravel is a lighter shade, the darker portion of the fish population suffers the thinning out scenario. + +In the second situation, fish are sufficiently relaxed to engage in mating. In the absence of predators and in the presence of the mating ritual, the opposite results can be expected: The fish that stand out against the background have a better chance of being picked for mating and transferring their characteristics to offspring. + +### Selection criteria + +When selecting among variability, the process is never arbitrary, capricious, whimsical, nor random. The decisive factor is always measurable. That decisive factor is usually called a _test_ or a _goal_. + +A simple mathematical example can illustrate this process of decision making. (Only in this case it won't be governed by natural selection, but by artificial selection.) Suppose someone asks you to build a little function that will take a positive number and calculate that number's square root. How would you go about doing that? + +The agile DevOps way is to _fail fast_. Start with humility, admitting upfront that you don't really know how to develop that function. All you know, at this point, is how to _describe_ what you'd like to do. In technical parlance, you are ready to engage in crafting a _unit test_. + +"Unit test" describes your specific expectation. It could simply be formulated as "given the number 16, I expect the square root function to return number 4." You probably know that the square root of 16 is 4. However, you don't know the square root for some larger numbers (such as 533). + +At the very least, you have formulated your selection criteria, your test or goal. + +### Implement the failing test + +The [.NET Core][10] platform can illustrate the implementation. .NET typically uses [xUnit.net][11] as a unit-testing framework. (To follow the coding examples, please install .NET Core and xUnit.net.) + +Open the command line and create a folder where your square root solution will be implemented. For example, type: + + +``` +`mkdir square_root` +``` + +Then type: + + +``` +`cd square_root` +``` + +Create a separate folder for unit tests: + + +``` +`mkdir unit_tests` +``` + +Move into the **unit_tests** folder (**cd unit_tests**) and initiate the xUnit framework: + + +``` +`dotnet new xunit` +``` + +Now, move one folder up to the **square_root** folder, and create the **app** folder: + + +``` +mkdir app +cd app +``` + +Create the scaffold necessary for the C# code: + + +``` +`dotnet new classlib` +``` + +Now open your favorite editor and start cracking! + +In your code editor, navigate to the **unit_tests** folder and open **UnitTest1.cs**. + +Replace auto-generated code in **UnitTest1.cs** with: + + +``` +using System; +using Xunit; +using app; + +namespace unit_tests{ + +   public class UnitTest1{ +       Calculator calculator = new Calculator(); + +       [Fact] +       public void GivenPositiveNumberCalculateSquareRoot(){ +           var expected = 4; +           var actual = calculator.CalculateSquareRoot(16); +           Assert.Equal(expected, actual); +       } +   } +} +``` + +This unit test describes the expectation that the variable **expected** should be 4. The next line describes the **actual** value. It proposes to calculate the **actual** value by sending a message to the component called **calculator**. This component is described as capable of handling the **CalculateSquareRoot** message by accepting a numeric value. That component hasn't been developed yet. But it doesn't really matter, because this merely describes the expectations. + +Finally, it describes what happens when the message is triggered to be sent. At that point, it asserts whether the **expected** value is equal to the **actual** value. If it is, the test passed and the goal is reached. If the **expected** value isn't equal to the **actual value**, the test fails. + +Next, to implement the component called **calculator**, create a new file in the **app** folder and call it **Calculator.cs**. To implement a function that calculates the square root of a number, add the following code to this new file: + + +``` +namespace app { +   public class Calculator { +       public double CalculateSquareRoot(double number) { +           double bestGuess = number; +           return bestGuess; +       } +   } +} +``` + +Before you can test this implementation, you need to instruct the unit test how to find this new component (**Calculator**). Navigate to the **unit_tests** folder and open the **unit_tests.csproj** file. Add the following line in the **<ItemGroup>** code block: + + +``` +`` +``` + +Save the **unit_test.csproj** file. Now you are ready for your first test run. + +Go to the command line and **cd** into the **unit_tests** folder. Run the following command: + + +``` +`dotnet test` +``` + +Running the unit test will produce the following output: + +![xUnit output after the unit test run fails][12] + +Fig. 2. xUnit output after the unit test run fails. + +As you can see, the unit test failed. It expected that sending number 16 to the **calculator** component would result in the number 4 as the output, but the output (the **actual** value) was the number 16. + +Congratulations! You have created your first failure. Your unit test provided strong, immediate feedback urging you to fix the failure. + +### Fix the failure + +To fix the failure, you must improve **bestGuess**. Right now, **bestGuess** merely takes the number the function receives and returns it. Not good enough. + +But how do you figure out a way to calculate the square root value? I have an idea—how about looking at how Mother Nature solves problems. + +### Emulate Mother Nature by iterating + +It is extremely hard (pretty much impossible) to guess the correct value from the first (and only) attempt. You must allow for several attempts at guessing to increase your chances of solving the problem. And one way to allow for multiple attempts is to _iterate_. + +To iterate, store the **bestGuess** value in the **previousGuess** variable, transform the **bestGuess** value, and compare the difference between the two values. If the difference is 0, you solved the problem. Otherwise, keep iterating. + +Here is the body of the function that produces the correct value for the square root of any positive number: + + +``` +double bestGuess = number; +double previousGuess; + +do { +   previousGuess = bestGuess; +   bestGuess = (previousGuess + (number/previousGuess))/2; +} while((bestGuess - previousGuess) != 0); + +return bestGuess; +``` + +This loop (iteration) converges bestGuess values to the desired solution. Now your carefully crafted unit test passes! + +![Unit test successful][13] + +Fig. 3. Unit test successful, 0 tests failed. + +### The iteration solves the problem + +Just like Mother Nature's approach, in this exercise, iteration solves the problem. An incremental approach combined with stepwise refinement is the guaranteed way to arrive at a satisfactory solution. The decisive factor in this game is having a measurable goal and test. Once you have that, you can keep iterating until you hit the mark. + +### Now the punchline! + +OK, this was an amusing experiment, but the more interesting discovery comes from playing with this newly minted solution. Until now, your starting **bestGuess** was always equal to the number the function receives as the input parameter. What happens if you change the initial **bestGuess**? + +To test that, you can run a few scenarios. First, observe the stepwise refinement as the iteration loops through a series of guesses as it tries to calculate the square root of 25: + +![Code iterating for the square root of 25][14] + +Fig. 4. Iterating to calculate the square root of 25. + +Starting with 25 as the **bestGuess**, it takes eight iterations for the function to calculate the square root of 25. But what would happen if you made a comical, ridiculously wrong stab at the **bestGuess**? What if you started with a clueless second guess, that 1 million might be the square root of 25? What would happen in such an obviously erroneous situation? Would your function be able to deal with such idiocy? + +Take a look at the horse's mouth. Rerun the scenario, this time starting from 1 million as the **bestGuess**: + +![Stepwise refinement][15] + +Fig. 5. Stepwise refinement when calculating the square root of 25 by starting with 1 million as the initial **bestGuess**. + +Oh wow! Starting with a ludicrously large number, the number of iterations only tripled (from eight iterations to 23). Not nearly as dramatic an increase as you might intuitively expect. + +### The moral of the story + +The _Aha!_ moment arrives when you realize that, not only is iteration guaranteed to solve the problem, but it doesn't matter whether your search for the solution begins with a good or a terribly botched initial guess. However erroneous your initial understanding, the process of iteration, coupled with a measurable test/goal, puts you on the right track and delivers the solution. Guaranteed. + +Figures 4 and 5 show a steep and dramatic burndown. From a wildly incorrect starting point, the iteration quickly burns down to an absolutely correct solution. + +This amazing methodology, in a nutshell, is the essence of agile DevOps. + +### Back to some high-level observations + +Agile DevOps practice stems from the recognition that we live in a world that is fundamentally based on uncertainty, ambiguity, incompleteness, and a healthy dose of confusion. From the scientific/philosophical point of view, these traits are well documented and supported by [Heisenberg's Uncertainty Principle][16] (covering the uncertainty part), [Wittgenstein's Tractatus Logico-Philosophicus][17] (the ambiguity part), [Gödel's incompleteness theorems][18] (the incompleteness aspect), and the [Second Law of Thermodynamics][19] (the confusion caused by relentless entropy). + +In a nutshell, no matter how hard you try, you can never get complete information when trying to solve any problem. It is, therefore, more profitable to abandon an arrogant stance and adopt a more humble approach to solving problems. Humility pays big dividends in rewarding you—not only with the hoped-for solution but also with the byproduct of a well-structured solution. + +### Conclusion + +Nature works incessantly—it's a continuous flow. Nature has no master plan; everything happens as a response to what happened earlier. The feedback loops are very tight, and apparent progress/regress is piecemeal. Everywhere you look in nature, you see stepwise refinement, in one shape or form or another. + +Agile DevOps is a very interesting outcome of the engineering model's gradual maturation. DevOps is based on the recognition that the information you have available is always incomplete, so you'd better proceed cautiously. Obtain a measurable test (e.g., a hypothesis, a measurable expectation), make a humble attempt at satisfying it, most likely fail, then collect the feedback, fix the failure, and continue. There is no plan other than agreeing that, with each step of the way, there must be a measurable hypothesis/test. + +In the next article in this series, I'll take a closer look at how mutation testing provides much-needed feedback that drives value. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/mutation-testing-evolution-tdd + +作者:[Alex Bunardzic][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/alex-bunardzic +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520X292_openanttrail-2.png?itok=xhD3WmUd (Ants and a leaf making the word "open") +[2]: https://opensource.com/article/19/7/failure-feature-blameless-devops +[3]: https://en.wikipedia.org/wiki/Test-driven_development +[4]: https://www.merriam-webster.com/dictionary/conditio%20sine%20qua%20non +[5]: https://opensource.com/sites/default/files/uploads/darwin.png (Charles Darwin) +[6]: https://en.wikipedia.org/wiki/Charles_Darwin +[7]: https://en.wikipedia.org/wiki/On_the_Origin_of_Species +[8]: https://opensource.com/sites/default/files/uploads/environmentalconditions2.png (Environmental pressures on fish) +[9]: https://www.youtube.com/watch?v=MgK5Rf7qFaU +[10]: https://dotnet.microsoft.com/ +[11]: https://xunit.net/ +[12]: https://opensource.com/sites/default/files/uploads/xunit-output.png (xUnit output after the unit test run fails) +[13]: https://opensource.com/sites/default/files/uploads/unit-test-success.png (Unit test successful) +[14]: https://opensource.com/sites/default/files/uploads/iterating-square-root.png (Code iterating for the square root of 25) +[15]: https://opensource.com/sites/default/files/uploads/bestguess.png (Stepwise refinement) +[16]: https://en.wikipedia.org/wiki/Uncertainty_principle +[17]: https://en.wikipedia.org/wiki/Tractatus_Logico-Philosophicus +[18]: https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems +[19]: https://en.wikipedia.org/wiki/Second_law_of_thermodynamics From 5f6e69cdecf494d5a3a63233c13d6b68aff08b35 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Aug 2019 02:31:47 +0800 Subject: [PATCH 378/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190809=20Goodby?= =?UTF-8?q?e,=20Linux=20Journal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190809 Goodbye, Linux Journal.md --- .../tech/20190809 Goodbye, Linux Journal.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/tech/20190809 Goodbye, Linux Journal.md diff --git a/sources/tech/20190809 Goodbye, Linux Journal.md b/sources/tech/20190809 Goodbye, Linux Journal.md new file mode 100644 index 0000000000..dd0964db66 --- /dev/null +++ b/sources/tech/20190809 Goodbye, Linux Journal.md @@ -0,0 +1,67 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Goodbye, Linux Journal) +[#]: via: (https://opensource.com/article/19/8/goodbye-linux-journal) +[#]: author: (Jim Hall https://opensource.com/users/jim-hallhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/alanfdoss) + +Goodbye, Linux Journal +====== +Linux Journal's coverage from 1994 to 2019 highlighted Linux’s rise to +an enterprise platform that runs a majority of the world’s servers and +services. +![Linux keys on the keyboard for a desktop computer][1] + +I first discovered Linux in 1993, when I was an undergraduate physics student who wanted the power of Big Unix on my home PC. I remember installing my first Linux distribution, SoftLanding Systems (SLS), and exploring the power of Linux on my ‘386 PC. I was immediately impressed. Since then, I’ve run Linux at home—and even at work. + +In those early days, it felt like I was the only person who knew about Linux. Certainly, there was an online community via Usenet, but there weren’t many other ways to get together with other Linux users—unless you had a local Linux User Group in your area. I shared what I knew about Linux with those around me, and we pooled our Linux fu. + +So, it was awesome to learn about a print magazine that was dedicated to all things Linux. In March 1994, Phil Hughes and Red Hat co-founder Bob Young published a new magazine about Linux, named _Linux Journal_. The [first issue][2] featured an "[Interview With Linus, The Author of Linux][3]" by Robert Young, and an article comparing "[Linux Vs. Windows NT and OS/2][4]" by Bernie Thompson. + +From the start, _Linux Journal_ aimed to be a community-driven magazine. Hughes and Young were not the only contributors to the magazine. Instead, they invited others to write about Linux and share what they had learned. In a way, _Linux Journal_ used a model similar to open source software. Anyone could contribute, and the editors acted as "maintainers" to ensure content was top quality and informative. + +_Linux Journal_ also went for a broad audience. The editors realized that a purely technical magazine would lose too many new users, while a magazine written for "newbies" would not attract a more focused audience. In the first issue, [Hughes highlighted][5] both groups of users as the audience _Linux Journal_ was looking for, writing: "We see this part of our audience as being two groups. Lots of the current Linux users have worked professionally with Unix. The other segment is the DOS user who wants to upgrade to a multi-user system. With a combination of tutorials and technical articles, we hope to satisfy the needs of both these groups." + +I was glad to discover _Linux Journal_ in those early days, and I quickly became a subscriber. In time, I contributed my own stories to _Linux Journal_. I’ve written several articles including essays on usability in open source software, Bash shell scripting tricks, and C programming how-tos. + +But my contributions to Linux Journal are meager compared to others. Over the years, I have enjoyed reading many article series from regular contributors. I loved Dave Taylor's "Work the Shell" series about practical and sometimes magical scripts written for the Bash shell. I always turned to Kyle Rankin's "Hack and /" series about cool projects with Linux. And I have enjoyed reading articles from the latest Linux Journal deputy editor Bryan Lunduke, especially a recent geeky article about "[How to Live Entirely in a Terminal][6]" that showed you can still do daily tasks on Linux without a graphical environment. + +Many years later, things took a turn. Linux Journal’s Publisher Carlie Fairchild wrote a seemingly terminal essay [_Linux Journal Ceases Publication_][7] in December 2017 that indicated _Linux Journal_ had "run out of money, and options along with it." But a month later, Carlie updated the news item to report that "*Linux Journal *was saved and brought back to life" by an angel investor. London Trust Media, the parent company of Private Internet Access, injected new funds into Linux Journal to get the magazine back on its feet. _Linux Journal_ resumed regular issues in March 2018. + +But it seems the rescue was not enough. Late in the evening of August 7, 2019, _Linux Journal_ posted a final, sudden goodbye. Kyle Rankin’s essay [_Linux Journal Ceases Publication: An Awkward Goodbye_][8] was preceded with this announcement: + +**IMPORTANT NOTICE FROM LINUX JOURNAL, LLC:** +_On August 7, 2019, Linux Journal shut its doors for good. All staff were laid off and the company is left with no operating funds to continue in any capacity. The website will continue to stay up for the next few weeks, hopefully longer for archival purposes if we can make it happen. +–Linux Journal, LLC_ + +The announcement came as a surprise to readers and staff alike. I reached out to Bryan Lunduke, who commented the shutdown was a "total surprise. Was writing an article the night before for an upcoming issue... No indication that things were preparing to fold." The next morning, on August 7, Lunduke said he "had a series of frantic messages from our Editor (Jill) and Publisher (Carlie). They had just found out, effective the night before... _Linux Journal_ was shut down. So we weren't so much being told that Linux Journal is shutting down... as _Linux Journal_ had already been shut down the day before... and we just didn't know it." + +It's the end of an era. And as we salute the passing of _Linux Journal_, I’d like to recognize the indelible mark the magazine has left on the Linux landscape. _Linux Journal_ was the first publication to highlight Linux as a serious platform, and I think that made people take notice. + +And with that seriousness, that maturity, _Linux Journal_ helped Linux shake its early reputation of being a hobby project. _Linux Journal's_ coverage from 1994 to 2019 highlighted Linux’s rise to an enterprise platform that runs a majority of the world’s servers and services. + +I tip my hat to everyone at _Linux Journal_ and any contributor who was part of its journey. It has been a pleasure to work with you over the years. You kept the spirit alive. This may be a painful experience, but I hope everyone ends up in a good place. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/goodbye-linux-journal + +作者:[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-hallhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/alanfdoss +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: https://www.linuxjournal.com/issue/1 +[3]: https://www.linuxjournal.com/article/2736 +[4]: https://www.linuxjournal.com/article/2734 +[5]: https://www.linuxjournal.com/article/2735 +[6]: https://www.linuxjournal.com/content/without-gui-how-live-entirely-terminal +[7]: https://www.linuxjournal.com/content/linux-journal-ceases-publication +[8]: https://www.linuxjournal.com/content/linux-journal-ceases-publication-awkward-goodbye From 839b2102945af55c158b25661773e0bfc183e598 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 10 Aug 2019 08:07:16 +0800 Subject: [PATCH 379/951] PRF @arrowfeng --- ... Understanding software design patterns.md | 101 ++++++++---------- 1 file changed, 45 insertions(+), 56 deletions(-) diff --git a/translated/tech/20190715 Understanding software design patterns.md b/translated/tech/20190715 Understanding software design patterns.md index 9767669658..b5c14cb53a 100644 --- a/translated/tech/20190715 Understanding software design patterns.md +++ b/translated/tech/20190715 Understanding software design patterns.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (arrowfeng) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Understanding software design patterns) @@ -9,66 +9,61 @@ 理解软件设计模式 ====== -设计模式可以帮助消除冗余代码。学习如何利用Java使用单例模式、工厂模式和观察者模式。 -![clouds in the sky with blue pattern][1] +> 设计模式可以帮助消除冗余代码。学习如何利用 Java 使用单例模式、工厂模式和观察者模式。 -如果你是一名正在致力于计算机科学或者相关学科的程序员或者学生,很快,你将会遇到一条术语 “软件设计模式。” 根据维基百科,_" [软件设计模式][2]是在平常的软件设计工作中所遭遇的问题是一种通用的, 可重复使用的解决方案。“_ 这里是我对定义的理解:当你在编码项目上的同时,你经常会思考,“呵呵,这里貌似是冗余代码,我想是否我能改变代码使得更灵活并且这个改变是可接受的?”因此,你将开始思考怎样分割那些保持不变的内容和需要经常改变的内容。 +![](https://img.linux.net.cn/data/attachment/album/201908/10/080849ygyqtrw88f2qtzk4.jpg) +如果你是一名正在致力于计算机科学或者相关学科的程序员或者学生,很快,你将会遇到一条术语 “软件设计模式software design pattern”。根据维基百科,“*[软件设计模式][2]是在平常的软件设计工作中所遭遇的问题的一种通用的、可重复使用的解决方案*”。我对该定义的理解是:当在从事于一个编码项目时,你经常会思考,“嗯,这里貌似是冗余代码,我觉得是否能改变这些代码使之更灵活和便于修改?”因此,你会开始考虑怎样分割那些保持不变的内容和需要经常改变的内容。 -> 设计模式是一种通过分割那些保持不变的部分和经常变化的部分,让你的代码更容易修改的方法。 +> **设计模式**是一种通过分割那些保持不变的部分和经常变化的部分,让你的代码更容易修改的方法。 -不出意外的话,每个从事编码工程的人都可能会有同样的思考。特别是那些工业级别的工程,在那里通常工作着数十甚至数百名开发者;协作过程表明必须有一些标准和规则来使代码更加优雅并适应变化。 这就是为什么我们有 [面向对象编程][3](OOP)和 [软件框架工具][4]。设计模式有点类似于OOP,但它通过将变化视为自然开发过程的一部分而进一步发展。基本上,设计模式利用了一些OOP的思想,比如抽象和接口,但是专注于改变的过程。 +不出意外的话,每个从事编程项目的人都可能会有同样的思考。特别是那些工业级别的项目,在那里通常工作着数十甚至数百名开发者;协作过程表明必须有一些标准和规则来使代码更加优雅并适应变化。这就是为什么我们有了 [面向对象编程][3](OOP)和 [软件框架工具][4]。设计模式有点类似于 OOP,但它通过将变化视为自然开发过程的一部分而进一步发展。基本上,设计模式利用了一些 OOP 的思想,比如抽象和接口,但是专注于改变的过程。 +当你开始开发项目时,你经常会听到这样一个术语*重构*,它意味着*通过改变代码使它变得更优雅和可复用*;这就是设计模式耀眼的地方。当你处理现有代码时(无论是由其他人构建还是你自己过去构建的),了解设计模式可以帮助你以不同的方式看待事物,你将发现问题以及改进代码的方法。 -当你开始开发项目时, 你经常会听到这样一个术语 _重构_,_意味着通过改变代码使它变得更优雅和可复用;_ 这就是设计模式耀眼的地方。 无论什么时候你处理现有代码时(无论是由其他人构建还是你自己过去构建的),了解设计模式可以帮助你以不同的方式看待事物,你将发现问题以及改进代码的方法。 - -那里有很多种设计模式,其中单例模式,工厂模式,和观察者模式三种最受欢迎,在这篇文章中我将会一一介绍它们。 +有很多种设计模式,其中单例模式、工厂模式和观察者模式三种最受欢迎,在这篇文章中我将会一一介绍它们。 ### 如何遵循本指南 -无论你是一位有经验的编程工作者还是一名刚刚接触的新手,我想让这篇教程很容易让每个人都可以理解。设计模式概念并不容易理解,减少开始旅程时的学习曲线始终是首要任务。因此,除了这篇带有图表和代码片段的文章外,我还创建了一个 [GitHub仓库][5],你可以克隆和在你的电脑上运行代码去实现这三种设计模式。你也可以观看我创建的 [YouTube视频][6]。 - +无论你是一位有经验的编程工作者还是一名刚刚接触的新手,我想让这篇教程让每个人都很容易理解。设计模式概念并不容易理解,减少开始旅程时的学习曲线始终是首要任务。因此,除了这篇带有图表和代码片段的文章外,我还创建了一个 [GitHub 仓库][5],你可以克隆仓库并在你的电脑上运行这些代码来实现这三种设计模式。你也可以观看我创建的 [YouTube视频][6]。 #### 必要条件 如果你只是想了解一般的设计模式思想,则无需克隆示例项目或安装任何工具。但是,如果要运行示例代码,你需要安装以下工具: + * **Java 开发套件(JDK)**:我强烈建议使用 [OpenJDK][7]。 + * **Apache Maven**:这个简单的项目使用 [Apache Maven][8] 构建;好的是许多 IDE 自带了Maven。 + * **交互式开发编辑器(IDE)**:我使用 [社区版 IntelliJ][9],但是你也可以使用 [Eclipse IDE][10] 或者其他你喜欢的 Java IDE。 + * **Git**:如果你想克隆这个工程,你需要 [Git][11] 客户端。 - * **Java Development Kit (JDK):** 我强烈建议 [OpenJDK][7]。 - * **Apache Maven:** 这个简单的工程使用 [Apache Maven][8] 构建; 幸好许多IDEs自带了Maven。 - * **Interactive development editor (IDE):** 我使用 [IntelliJ Community Edition][9], 但是你也可以使用 [Eclipse IDE][10] 或者其他你喜欢的 Java IDE。 - * **Git:** 如果你想克隆这个工程,你需要 [Git][11]客户端。 - - -安装好Git后运行下列命令克隆这个工程: +安装好 Git 后运行下列命令克隆这个工程: ``` -`git clone https://github.com/bryantson/OpensourceDotComDemos.git` +git clone https://github.com/bryantson/OpensourceDotComDemos.git ``` -然后在你喜欢的IDE中,你可以将TopDesignPatterns仓库中的代码作为Apache Maven项目导入。 +然后在你喜欢的 IDE 中,你可以将 TopDesignPatterns 仓库中的代码作为 Apache Maven 项目导入。 -我正在使用Java,但你也可以使用支持 [抽象原理][12]的任何编程语言来实现设计模式。 +我使用的是 Java,但你也可以使用支持[抽象原则][12]的任何编程语言来实现设计模式。 ### 单例模式:避免每次创建一个对象 -[单例模式][13]是非常受欢迎的设计模式,它的实现相对来说很简单,因为你只需要一个类。然而,许多开发人员争论单例设计模式的是否利大于弊,因为它缺乏明显的好处并且容易被滥用。很少有开发人员直接实现单例;相反,像Spring Framework和Google Guice等编程框架内置了单例设计模式的特性。 +[单例模式][13]singleton pattern是非常流行的设计模式,它的实现相对来说很简单,因为你只需要一个类。然而,许多开发人员争论单例设计模式的是否利大于弊,因为它缺乏明显的好处并且容易被滥用。很少有开发人员直接实现单例;相反,像 Spring Framework 和 Google Guice 等编程框架内置了单例设计模式的特性。 -但是了解单例模式仍然有巨大的用处。单例模式确保一个类仅创建一次且提供了一个对他的全局访问点。 +但是了解单例模式仍然有巨大的用处。单例模式确保一个类仅创建一次且提供了一个对它的全局访问点。 -> **Singleton pattern:** 确保仅有一个实例被创建且避免在同样的工程中创建多个实例。 +> **单例模式**:确保仅创建一个实例且避免在同一个项目中创建多个实例。 -下面这幅图展示了经典的类对象创建过程。当客户端请求创建一个对象时,构造函数会创建或者实例化一个对象并调用方法返回这个类。但是每次请求一个对象都会发生这样的情况——构造函数被调用,一个新的对象被创建并且它返回一个唯一的对象。我猜面向对象语言的创建者有每次都创建一个新对象的原因,但是单例过程的支持者说这是冗余的且浪费资源。 +下面这幅图展示了典型的类对象创建过程。当客户端请求创建一个对象时,构造函数会创建或者实例化一个对象并调用方法返回这个类给调用者。但是每次请求一个对象都会发生这样的情况:构造函数被调用,一个新的对象被创建并且它返回了一个独一无二的对象。我猜面向对象语言的创建者有每次都创建一个新对象的理由,但是单例过程的支持者说这是冗余的且浪费资源。 ![Normal class instantiation][14] -下面这幅图使用单例模式创建对象。这里,构造函数仅当对象首次通过调用预先设计好的 getInstance() 方法时才会被调用。这通常通过检查值是否为 null 来完成,并且这个对象被作为私有变量保存在单例类的内部。下次 getInstance() 被调用时,这个类会返回第一次被创建的对象。没有新的对象产生;它只是返回旧的那一个。 +下面这幅图使用单例模式创建对象。这里,构造函数仅当对象首次通过调用预先设计好的 `getInstance()` 方法时才会被调用。这通常通过检查该值是否为 `null` 来完成,并且这个对象被作为私有变量保存在单例类的内部。下次 `getInstance()` 被调用时,这个类会返回第一次被创建的对象。而没有新的对象产生;它只是返回旧的那一个。 ![Singleton pattern instantiation][15] 下面这段代码展示了创建单例模式最简单的方法: - ``` package org.opensource.demo.singleton; @@ -89,7 +84,7 @@ public class OpensourceSingleton { } ``` -在调用方, 这里展示了如何调用单例类来获取对象: +在调用方,这里展示了如何调用单例类来获取对象: ``` Opensource newObject = Opensource.getInstance(); @@ -97,11 +92,10 @@ Opensource newObject = Opensource.getInstance(); 这段代码很好的验证了单例模式的思想: - 1. 当 getInstance() 被调用时,它通过检查 null 值来见检查对象是否已经被创建。 - 2. 如果值为空,它会创建一个新对象并把它保存到私有域,返回这个对象给调用者。否则直接返回之前被创建的对象。 + 1. 当 `getInstance()` 被调用时,它通过检查 `null` 值来检查对象是否已经被创建。 + 2. 如果值为 `null`,它会创建一个新对象并把它保存到私有域,返回这个对象给调用者。否则直接返回之前被创建的对象。 - -单例模式实现的主要问题是它忽略了并行进程。当多个进程使用线程同时访问资源时,这个问题就产生了。对于这种情况有对应的解决方案,它被称为 _双重检查锁_ 用于多线程安全,如下所示: +单例模式实现的主要问题是它忽略了并行进程。当多个进程使用线程同时访问资源时,这个问题就产生了。对于这种情况有对应的解决方案,它被称为*双重检查锁*,用于多线程安全,如下所示: ``` package org.opensource.demo.singleton; @@ -126,21 +120,21 @@ public class ImprovedOpensourceSingleton { } ``` -只是为了强调前一点,确保只有在你认为这是一个安全的选项时才能直接实现你的单例模式。最好的方法是通过使用一个制作精良的编程框架来利用单例功能。 +再强调一下前面的观点,确保只有在你认为这是一个安全的选择时才直接实现你的单例模式。最好的方法是通过使用一个制作精良的编程框架来利用单例功能。 ### 工厂模式:将对象创建委派给工厂类以隐藏创建逻辑 -[工厂模式][16] 是另一种众所周知的设计模式,但是有一小点复杂。实现工厂模式的方法有很多,而下列的代码示例为最简单的实现方式。为了创建对象,工厂模式定义了一个接口,让它的子类去决定哪一个子类实例化。 +[工厂模式][16]factory pattern是另一种众所周知的设计模式,但是有一小点复杂。实现工厂模式的方法有很多,而下列的代码示例为最简单的实现方式。为了创建对象,工厂模式定义了一个接口,让它的子类去决定实例化哪一个类。 -> **Factory pattern:** 将对象创建委派给工厂类,因此它能隐藏创建逻辑。 +> **工厂模式**:将对象创建委派给工厂类,因此它能隐藏创建逻辑。 -下列的图片展示了最简单的工厂模式是如何实现的? +下列的图片展示了最简单的工厂模式是如何实现的。 ![Factory pattern][17] -客户端请求工厂类创建某个对象,类型 x,而不是客户端直接调用对象创建。根据类型,工厂模式决定要创建和返回的对象。 +客户端请求工厂类创建类型为 x 的某个对象,而不是客户端直接调用对象创建。根据其类型,工厂模式决定要创建和返回的对象。 -在下列代码示例中,OpensourceFactory 是工厂类实现,它从调用者那里获取 _类型_ 并根据该输入值决定要创建和返回的对象: +在下列代码示例中,`OpensourceFactory` 是工厂类实现,它从调用者那里获取*类型*并根据该输入值决定要创建和返回的对象: ``` package org.opensource.demo.factory; @@ -164,8 +158,7 @@ public class OpensourceFactory { } ``` -OpenSourceJVMServer 是一个100%的抽象类(或者一个接口类),它指示要实现的是什么,而不是怎样实现: - +`OpenSourceJVMServer` 是一个 100% 的抽象类(即接口类),它指示要实现的是什么,而不是怎样实现: ``` package org.opensource.demo.factory; @@ -177,8 +170,7 @@ public interface OpensourceJVMServers { } ``` -这是一个 OpensourceJVMServers 实现类示例。当 “RedHat” 被作为类型传递给工厂类,WildFly 服务器将被创建: - +这是一个 `OpensourceJVMServers` 类的实现示例。当 `RedHat` 被作为类型传递给工厂类,`WildFly` 服务器将被创建: ``` package org.opensource.demo.factory; @@ -200,18 +192,17 @@ public class WildFly implements OpensourceJVMServers { ### 观察者模式:订阅主题并获取相关更新的通知 -最后是[观察者模式][20]。像单例模式那样,很少有专业的程序员直接实现观察者模式。但是,许多消息队列和数据服务实现都借用了观察者模式的概念。观察者模式在对象之间定义了一对多的依赖关系,当一个对象的状态发生改变时,所有依赖它的对象都将被自动地通知和更新。 +最后是[观察者模式][20]observer pattern。像单例模式那样,很少有专业的程序员直接实现观察者模式。但是,许多消息队列和数据服务实现都借用了观察者模式的概念。观察者模式在对象之间定义了一对多的依赖关系,当一个对象的状态发生改变时,所有依赖它的对象都将被自动地通知和更新。 -> **Observer pattern:** 如果有更新,那么订阅了该话题/主题的客户端将被通知。 +> **观察者模式**:如果有更新,那么订阅了该话题/主题的客户端将被通知。 -思考观察者模式的最简单方法是想象一个邮件列表,你可以在其中订阅任何主题,无论是开源,技术,名人,烹饪还是您感兴趣的任何其他内容。每个主题维护者一个它的订阅者列表,在观察者模式中它们相当于观察者。当某一个主题更新时,它所有的订阅者(观察者)都将被通知这次改变。并且订阅者总是能取消某一个主题的订阅。 +理解观察者模式的最简单方法是想象一个邮件列表,你可以在其中订阅任何主题,无论是开源、技术、名人、烹饪还是您感兴趣的任何其他内容。每个主题维护者一个它的订阅者列表,在观察者模式中它们相当于观察者。当某一个主题更新时,它所有的订阅者(观察者)都将被通知这次改变。并且订阅者总是能取消某一个主题的订阅。 如下图所示,客户端可以订阅不同的主题并添加观察者以获得最新信息的通知。因为观察者不断的监听着这个主题,这个观察者会通知客户端任何发生的改变。 ![Observer pattern][21] -让我们呢来看看观察者模式的代码示例,从主题/话题类开始: - +让我们来看看观察者模式的代码示例,从主题/话题类开始: ``` package org.opensource.demo.observer; @@ -223,7 +214,8 @@ public interface Topic {     public void notifyObservers(); } ``` -这段代码描述了一个接口为不同的主题去实现已定义的方法。注意一个观察者如何被添加、移除和通知。 + +这段代码描述了一个为不同的主题去实现已定义方法的接口。注意一个观察者如何被添加、移除和通知的。 这是一个主题的实现示例: @@ -270,7 +262,7 @@ public class Conference implements Topic { } ``` -这段代码定义了一个特定主题的实现。当发生改变时,这个实现调用它自己的方法。 注意这将获取存储为列表的观察者的数量,并且可以通知和维护观察者。 +这段代码定义了一个特定主题的实现。当发生改变时,这个实现调用它自己的方法。注意这将获取观察者的数量,它以列表方式存储,并且可以通知和维护观察者。 这是一个观察者类: @@ -286,7 +278,6 @@ public interface [Observer][22] { 例如,实现了该接口的观察者可以在会议上打印出与会者和发言人的数量: - ``` package org.opensource.demo.observer; @@ -314,13 +305,11 @@ public class MonitorConferenceAttendees implements [Observer][22] { } ``` -### 之后去哪? +### 接下来 -现在你已经阅读了这篇对于设计模式的介绍引导,你应该去一个好地方寻求其他设计模式,例如外观模式,模版模式和装饰器模式。也有一些并发和分布式系统的设计模式如断路器模式和锚定模式。 +现在你已经阅读了这篇对于设计模式的介绍引导,你还可以去寻求了解其他设计模式,例如外观模式,模版模式和装饰器模式。也有一些并发和分布式系统的设计模式如断路器模式和锚定模式。 -可是,我相信最好的磨砺你的技能首先是通过在你的边缘工程或者练习中实现这些设计模式。你甚至可以开始考虑如何在实际项目中应用这些设计模式。接下来,我强烈建议您查看OOP的 [SOLID原则][23]。之后,你将准备好了解其他设计模式。 - -However, I believe it's best to hone your skills first by implementing these design patterns in your side projects or just as practice. You can even begin to contemplate how you can apply these design patterns in your real projects. Next, I highly recommend checking out the [SOLID principles][23] of OOP. After that, you will be ready to look into the other design patterns. +可是,我相信最好的磨砺你的技能的方式首先是通过在你的业余项目或者练习中实现这些设计模式。你甚至可以开始考虑如何在实际项目中应用这些设计模式。接下来,我强烈建议你查看 OOP 的 [SOLID 原则][23]。之后,你就准备好了解其他设计模式。 -------------------------------------------------------------------------------- @@ -329,7 +318,7 @@ via: https://opensource.com/article/19/7/understanding-software-design-patterns 作者:[Bryant Son][a] 选题:[lujun9972][b] 译者:[arrowfeng](https://github.com/arrowfeng) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From af5d361ed871b02ae9c841e93f10e64363a097a8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 10 Aug 2019 08:08:23 +0800 Subject: [PATCH 380/951] PUB @arrowfeng https://linux.cn/article-11208-1.html --- .../20190715 Understanding software design patterns.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190715 Understanding software design patterns.md (99%) diff --git a/translated/tech/20190715 Understanding software design patterns.md b/published/20190715 Understanding software design patterns.md similarity index 99% rename from translated/tech/20190715 Understanding software design patterns.md rename to published/20190715 Understanding software design patterns.md index b5c14cb53a..73e4082757 100644 --- a/translated/tech/20190715 Understanding software design patterns.md +++ b/published/20190715 Understanding software design patterns.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (arrowfeng) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11208-1.html) [#]: subject: (Understanding software design patterns) [#]: via: (https://opensource.com/article/19/7/understanding-software-design-patterns) [#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/erezhttps://opensource.com/users/brson) From fa660b12eeb0935b9f9be5ad2a131a9307db556e Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sat, 10 Aug 2019 08:22:38 +0800 Subject: [PATCH 381/951] [Translated] 20190805 How To Verify ISO Images In Linux.md Signed-off-by: FSSlc --- ...90805 How To Verify ISO Images In Linux.md | 155 ------------------ ...90805 How To Verify ISO Images In Linux.md | 145 ++++++++++++++++ 2 files changed, 145 insertions(+), 155 deletions(-) delete mode 100644 sources/tech/20190805 How To Verify ISO Images In Linux.md create mode 100644 translated/tech/20190805 How To Verify ISO Images In Linux.md diff --git a/sources/tech/20190805 How To Verify ISO Images In Linux.md b/sources/tech/20190805 How To Verify ISO Images In Linux.md deleted file mode 100644 index 8d36124e10..0000000000 --- a/sources/tech/20190805 How To Verify ISO Images In Linux.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (FSSlc) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Verify ISO Images In Linux) -[#]: via: (https://www.ostechnix.com/how-to-verify-iso-images-in-linux/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -How To Verify ISO Images In Linux -====== - -![How To Verify ISO Images In Linux][1] - -You just downloaded an ISO image of your favorite Linux distribution from the official site or a third party site, now what? [**Create bootable medium**][2] and start installing the OS? No, wait. Before start using it, It is highly recommended to verify that the downloaded ISO in your local system is the exact copy of the ISO present in the download mirrors. Because, [**Linux Mint’s website is hacked**][3] few years ago and the hackers made a modified Linux Mint ISO, with a backdoor in it. So, It is important to check the authenticity and integrity of your Linux ISO images. If you don’t know how to verify ISO images in Linux, this brief guide will help. Read on! - -### Verify ISO Images In Linux - -We can verify ISO images using the **Checksum** values. Checksum is a sequence of letters and numbers used to check data for errors and verify the authenticity and integrity of the downloaded files. There are different types of checksums, such as SHA-0, SHA-1, SHA-2 (224, 256, 384, 512) and MD5. MD5 sums have been the most popular, but nowadays SHA-256 sums are mostly used by modern Linux distros. - -We are going to use two tools namely **“gpg”** and **“sha256”** to verify authenticity and integrity of the ISO images. - -##### Download checksums and signatures - -For the purpose of this guide, I am going to use Ubuntu 18.04 LTS server ISO image. However, the steps given below should work on other Linux distributions as well. - -Near the top of the Ubuntu download page, you will see a few extra files (checksums and signatures) as shown in the following picture. - -![][4] - -Ubuntu 18.04 checksum and signature - -Here, the **SHA256SUMS** file contains checksums for all the available images and the **SHA256SUMS.gpg** file is the GnuPG signature for that file. We use this signature file to **verify** the checksum file in subsequent steps. - -Download the Ubuntu ISO images and these two files and put them all in a directory, for example **ISO**. - -``` -$ ls ISO/ -SHA256SUMS SHA256SUMS.gpg ubuntu-18.04.2-live-server-amd64.iso -``` - -As you see in the above output, I have downloaded Ubuntu 18.04.2 LTS server image along with checksum and signature values. - -##### Download valid signature key - -Now, download the correct signature key using command: - -``` -$ gpg --keyid-format long --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x46181433FBB75451 0xD94AA3F0EFE21092 -``` - -Sample output: - -``` -gpg: key D94AA3F0EFE21092: 57 signatures not checked due to missing keys -gpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" imported -gpg: key 46181433FBB75451: 105 signatures not checked due to missing keys -gpg: key 46181433FBB75451: public key "Ubuntu CD Image Automatic Signing Key <[email protected]>" imported -gpg: no ultimately trusted keys found -gpg: Total number processed: 2 -gpg: imported: 2 -``` - -##### Verify SHA-256 checksum - -Next verify the checksum file using the signature with command: - -``` -$ gpg --keyid-format long --verify SHA256SUMS.gpg SHA256SUMS -``` - -Sample output: - -``` -gpg: Signature made Friday 15 February 2019 04:23:33 AM IST -gpg: using DSA key 46181433FBB75451 -gpg: Good signature from "Ubuntu CD Image Automatic Signing Key <[email protected]>" [unknown] -gpg: WARNING: This key is not certified with a trusted signature! -gpg: There is no indication that the signature belongs to the owner. -Primary key fingerprint: C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451 -gpg: Signature made Friday 15 February 2019 04:23:33 AM IST -gpg: using RSA key D94AA3F0EFE21092 -gpg: Good signature from "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" [unknown] -gpg: WARNING: This key is not certified with a trusted signature! -gpg: There is no indication that the signature belongs to the owner. -Primary key fingerprint: 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 -``` - -If you see “Good signature” in the output,the checksum file is created by Ubuntu developer and signed by the owner of the key file. - -##### Check the downloaded ISO file - -Next, let us go ahead and check the downloaded ISO file matches the checksum. To do so, simply run: - -``` -$ sha256sum -c SHA256SUMS 2>&1 | grep OK -ubuntu-18.04.2-live-server-amd64.iso: OK -``` - -If the checksum values are matched, you will see the **“OK”** message. Meaning – the downloaded file is legitimate and hasn’t altered or tampered. - -If you don’t get any output or different than above output, the ISO file has been modified or incorrectly downloaded. You must re-download the file again from a good source. - -Some Linux distributions have included the checksum value in the download page itself. For example, **Pop!_os** developers have provided the SHA-256 checksum values for all ISO images in the download page itself, so you can quickly verify the ISO images. - -![][5] - -Pop os SHA256 sum value in download page - -After downloading the the ISO image, verify it using command: - -``` -$ sha256sum Soft_backup/ISOs/pop-os_18.04_amd64_intel_54.iso -``` - -Sample output: - -``` -680e1aa5a76c86843750e8120e2e50c2787973343430956b5cbe275d3ec228a6 Soft_backup/ISOs/pop-os_18.04_amd64_intel_54.iso -``` - -![][6] - -Pop os SHA256 sum value - -Here, the random string starting with **“680elaa…”** is the SHA-256 checksum value. Compare this value with the SHA-256 sum value provided on the downloads page. If both values are same, you’re good to go! The downloaded ISO file is legitimate and it hasn’t changed or modified from its original state. - -This is how we can verify the authenticity and integrity of an ISO file in Linux. Whether you download ISOs from official or third-party sources, it is always recommended to do a quick verification before using them. Hope this was useful. - -**Reference:** - - * [**https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu**][7] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/how-to-verify-iso-images-in-linux/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Verify-ISO-Images-In-Linux-720x340.png -[2]: https://www.ostechnix.com/etcher-beauitiful-app-create-bootable-sd-cards-usb-drives/ -[3]: https://blog.linuxmint.com/?p=2994 -[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-18.04-checksum-and-signature.png -[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Pop-os-SHA256-sum.png -[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Pop-os-SHA256-sum-value.png -[7]: https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu diff --git a/translated/tech/20190805 How To Verify ISO Images In Linux.md b/translated/tech/20190805 How To Verify ISO Images In Linux.md new file mode 100644 index 0000000000..86754a3b7b --- /dev/null +++ b/translated/tech/20190805 How To Verify ISO Images In Linux.md @@ -0,0 +1,145 @@ +[#]: collector: "lujun9972" +[#]: translator: "FSSlc" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "How To Verify ISO Images In Linux" +[#]: via: "https://www.ostechnix.com/how-to-verify-iso-images-in-linux/" +[#]: author: "sk https://www.ostechnix.com/author/sk/" + +如何在 Linux 中验证 ISO 镜像 +====== + +![如何在 Linux 中校验 ISO 镜像][1] + +刚才为了你最为喜爱的 Linux 发行版,你从它的官方网站或第三方网站下载了它的 ISO 镜像,接下来做啥呢?是[**创建可启动介质**][2]并开始安装系统吗?并不是,请稍等一下。在开始使用它之前,强烈建议你检查一下你刚下载到本地系统中的 ISO 文件是否是下载镜像站点中 ISO 文件的一个精确拷贝。因为在前几年 [Linux Mint 的网站被攻破了][3],并且攻击者创建了一个包含后门的经过修改的 Linux Mint ISO 文件。 所以验证下载的 Linux ISO 镜像的可靠性和完整性是非常重要的一件事儿。假如你不知道如何在 Linux 中验证 ISO 镜像,本次的简要介绍将给予你帮助,请接着往下看! + +### 在 Linux 中验证 ISO 镜像 + +我们可以使用 ISO 镜像的校验和来验证 ISO 镜像。校验和是一系列字母和数字的组合,用来检验下载文件的数据是否有错以及验证其可靠性和完整性。当前存在不同类型的校验和,例如 SHA-0、SHA-1、SHA-2(224、256、384、512)和 MD5。MD5 校验和最为常用,但对于现代的 Linux 发行版,SHA-256 最常被使用。 + +我们将使用名为 `gpg` 和 `sha256` 的两个工具来验证 ISO 镜像的可靠性和完整性。 + +##### 下载校验和及签名 + +针对本篇指南的目的,我将使用 Ubuntu 18.04 LTS 服务器 ISO 镜像来做验证,但对于其他的 Linux 发行版应该也是适用的。 + +在靠近 Ubuntu 下载页的最上端,你将看到一些额外的文件(校验和及签名),正如下面展示的图片那样: +![Ubuntu 18.04 的校验和及签名][4] + +其中名为 **SHA256SUMS** 的文件包含了这里所有可获取镜像的校验和,而 **SHA256SUMS.gpg** 文件则是这个文件的 GnuPG 签名。在下面的步骤中,我们将使用这个签名文件来 **验证** 校验和文件。 + +下载 Ubuntu 的 ISO 镜像文件以及刚才提到的那两个文件,然后将它们放到同一目录下,例如这里的 **ISO** 目录: + +``` +$ ls ISO/ +SHA256SUMS SHA256SUMS.gpg ubuntu-18.04.2-live-server-amd64.iso +``` +如你所见,我已经下载了 Ubuntu 18.04.2 LTS 服务器版本的镜像,以及对应的校验和文件和签名文件。 + +##### 下载有效的签名秘钥 + +现在,使用下面的命令来下载正确的签名秘钥: + +``` +$ gpg --keyid-format long --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x46181433FBB75451 0xD94AA3F0EFE21092 +``` + +示例输出如下: + +``` +gpg: key D94AA3F0EFE21092: 57 signatures not checked due to missing keys +gpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" imported +gpg: key 46181433FBB75451: 105 signatures not checked due to missing keys +gpg: key 46181433FBB75451: public key "Ubuntu CD Image Automatic Signing Key <[email protected]>" imported +gpg: no ultimately trusted keys found +gpg: Total number processed: 2 +gpg: imported: 2 +``` + +##### 验证 SHA-256 校验和 + +接下来我们将使用签名来验证校验和文件: + +``` +$ gpg --keyid-format long --verify SHA256SUMS.gpg SHA256SUMS +``` + +下面是示例输出: + +``` +gpg: Signature made Friday 15 February 2019 04:23:33 AM IST +gpg: using DSA key 46181433FBB75451 +gpg: Good signature from "Ubuntu CD Image Automatic Signing Key <[email protected]>" [unknown] +gpg: WARNING: This key is not certified with a trusted signature! +gpg: There is no indication that the signature belongs to the owner. +Primary key fingerprint: C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451 +gpg: Signature made Friday 15 February 2019 04:23:33 AM IST +gpg: using RSA key D94AA3F0EFE21092 +gpg: Good signature from "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" [unknown] +gpg: WARNING: This key is not certified with a trusted signature! +gpg: There is no indication that the signature belongs to the owner. +Primary key fingerprint: 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 +``` + +假如你在输出中看到 `Good signature` 字样,那么该校验和文件便是由 Ubuntu 开发者制作的,并且由秘钥文件的所属者签名认证。 + +##### 检验下载的 ISO 文件 + +下面让我们继续检查下载的 ISO 文件是否和所给的校验和相匹配。为了达到该目的,只需要运行: + +``` +$ sha256sum -c SHA256SUMS 2>&1 | grep OK +ubuntu-18.04.2-live-server-amd64.iso: OK +``` + +假如校验和是匹配的,你讲看到 **OK** 字样,这意味着下载的文件是合法的,没有被改变或篡改过。 + +假如你没有获得类似的输出,或者看到不同的输出,则该 ISO 文件可能已经被修改过或者没有被正确地下载。你必须从一个更好的下载源重新下载该文件。 + +某些 Linux 发行版已经在它的下载页面中包含了校验和。例如 **Pop!_os** 的开发者在他们的下载页面中提供了所有 ISO 镜像的 SHA-256 校验和,这样你就可以快速地验证这些 ISO 镜像。 + + +![Pop os 位于其下载页面中的 SHA256 校验和][5] + +在下载完 ISO 镜像文件后,可以使用下面的命令来验证它们: + +``` +$ sha256sum Soft_backup/ISOs/pop-os_18.04_amd64_intel_54.iso +``` + +示例输出如下: + +``` +680e1aa5a76c86843750e8120e2e50c2787973343430956b5cbe275d3ec228a6 Soft_backup/ISOs/pop-os_18.04_amd64_intel_54.iso +``` + +![Pop os 的 SHA256 校验和的值][6] +在上面的输出中,以 **680elaa…** 开头的部分为 SHA-256 校验和的值。请将该值与位于下载页面中提供的 SHA-256 校验和的值进行比较,如果这两个值相同,那说明这个下载的 ISO 文件是合法的,与它的原有状态相比没有经过更改或者篡改。万事俱备,你可以进行下一步了! + +上面的内容便是我们如何在 Linux 中验证一个 ISO 文件的可靠性和完整性的方法。无论你是从官方站点或者第三方站点下载 ISO 文件,我们总是推荐你在使用它们之前做一次简单的快速验证。希望本篇的内容对你有所帮助。 + +**参考文献:** + + * [**https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu**][7] + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-verify-iso-images-in-linux/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Verify-ISO-Images-In-Linux-720x340.png +[2]: https://www.ostechnix.com/etcher-beauitiful-app-create-bootable-sd-cards-usb-drives/ +[3]: https://blog.linuxmint.com/?p=2994 +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-18.04-checksum-and-signature.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Pop-os-SHA256-sum.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Pop-os-SHA256-sum-value.png +[7]: https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu From 694ca45c2f54d473ab8e0750672fdf9e70188172 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 10 Aug 2019 10:00:40 +0800 Subject: [PATCH 382/951] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...object-oriented programming with Python.md | 311 ------------------ ...object-oriented programming with Python.md | 302 +++++++++++++++++ 2 files changed, 302 insertions(+), 311 deletions(-) delete mode 100644 sources/tech/20190705 Learn object-oriented programming with Python.md create mode 100644 translated/tech/20190705 Learn object-oriented programming with Python.md diff --git a/sources/tech/20190705 Learn object-oriented programming with Python.md b/sources/tech/20190705 Learn object-oriented programming with Python.md deleted file mode 100644 index 3d647c2041..0000000000 --- a/sources/tech/20190705 Learn object-oriented programming with Python.md +++ /dev/null @@ -1,311 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Learn object-oriented programming with Python) -[#]: via: (https://opensource.com/article/19/7/get-modular-python-classes) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Learn object-oriented programming with Python -====== -Make your code more modular with Python classes. -![Developing code.][1] - -In my previous article, I explained how to [make Python modular][2] by using functions, creating modules, or both. Functions are invaluable to avoid repeating code you intend to use several times, and modules ensure that you can use your code across different projects. But there's another component to modularity: the class. - -If you've heard the term _object-oriented programming_, then you may have some notion of the purpose classes serve. Programmers tend to consider a class as a virtual object, sometimes with a direct correlation to something in the physical world, and other times as a manifestation of some programming concept. Either way, the idea is that you can create a class when you want to create "objects" within a program for you or other parts of the program to interact with. - -### Templates without classes - -Assume you're writing a game set in a fantasy world, and you need this application to be able to drum up a variety of baddies to bring some excitement into your players' lives. Knowing quite a lot about functions, you might think this sounds like a textbook case for functions: code that needs to be repeated often but is written once with allowance for variations when called. - -Here's an example of a purely function-based implementation of an enemy generator: - - -``` -#!/usr/bin/env python3 - -import random - -def enemy(ancestry,gear): -    enemy=ancestry -    weapon=gear -    hp=random.randrange(0,20) -    ac=random.randrange(0,20) -    return [enemy,weapon,hp,ac] - -def fight(tgt): -    print("You take a swing at the " + tgt[0] + ".") -    hit=random.randrange(0,20) -    if hit > tgt[3]: -        print("You hit the " + tgt[0] + " for " + str(hit) + " damage!") -        tgt[2] = tgt[2] - hit -    else: -        print("You missed.") - -foe=enemy("troll","great axe") -print("You meet a " + foe[0] + " wielding a " + foe[1]) -print("Type the a key and then RETURN to attack.") - -while True: -    action=input() - -    if action.lower() == "a": -        fight(foe) - -    if foe[2] < 1: -        print("You killed your foe!") -    else: -        print("The " + foe[0] + " has " + str(foe[2]) + " HP remaining") -``` - -The **enemy** function creates an enemy with several attributes, such as ancestry, a weapon, health points, and a defense rating. It returns a list of each attribute, representing the sum total of the enemy. - -In a sense, this code has created an object, even though it's not using a class yet. Programmers call this "enemy" an _object_ because the result (a list of strings and integers, in this case) of the function represents a singular but complex _thing_ in the game. That is, the strings and integers in the list aren't arbitrary: together, they describe a virtual object. - -When writing a collection of descriptors, you use variables so you can use them any time you want to generate an enemy. It's a little like a template. - -In the example code, when an attribute of the object is needed, the corresponding list item is retrieved. For instance, to get the ancestry of an enemy, the code looks at **foe[0]**, for health points, it looks at **foe[2]** for health points, and so on. - -There's nothing necessarily wrong with this approach. The code runs as expected. You could add more enemies of different types, you could create a list of enemy types and randomly select from the list during enemy creation, and so on. It works well enough, and in fact [Lua][3] uses this principle very effectively to approximate an object-oriented model. - -However, there's sometimes more to an object than just a list of attributes. - -### The way of the object - -In Python, everything is an object. Anything you create in Python is an _instance_ of some predefined template. Even basic strings and integers are derivatives of the Python **type** class. You can witness this for yourself an interactive Python shell: - - -``` ->>> foo=3 ->>> type(foo) -<class 'int'> ->>> foo="bar" ->>> type(foo) -<class 'str'> -``` - -When an object is defined by a class, it is more than just a collection of attributes. Python classes have functions all their own. This is convenient, logically, because actions that pertain only to a certain class of objects are contained within that object's class. - -In the example code, the fight code is a function of the main application. That works fine for a simple game, but in a complex one, there would be more than just players and enemies in the game world. There might be townsfolk, livestock, buildings, forests, and so on, and none of them ever need access to a fight function. Placing code for combat in an enemy class means your code is better organized; and in a complex application, that's a significant advantage. - -Furthermore, each class has privileged access to its own local variables. An enemy's health points, for instance, isn't data that should ever change except by some function of the enemy class. A random butterfly in the game should not accidentally reduce an enemy's health to 0. Ideally, even without classes, that would never happen, but in a complex application with lots of moving parts, it's a powerful trick of the trade to ensure that parts that don't need to interact with one another never do. - -Python classes are also subject to garbage collection. When an instance of a class is no longer used, it is moved out of memory. You may never know when this happens, but you tend to notice when it doesn't happen because your application takes up more memory and runs slower than it should. Isolating data sets into classes helps Python track what is in use and what is no longer needed. - -### Classy Python - -Here's the same simple combat game using a class for the enemy: - - -``` -#!/usr/bin/env python3 - -import random - -class Enemy(): -    def __init__(self,ancestry,gear): -        self.enemy=ancestry -        self.weapon=gear -        self.hp=random.randrange(10,20) -        self.ac=random.randrange(12,20) -        self.alive=True - -    def fight(self,tgt): -        print("You take a swing at the " + self.enemy + ".") -        hit=random.randrange(0,20) - -        if self.alive and hit > self.ac: -            print("You hit the " + self.enemy + " for " + str(hit) + " damage!") -            self.hp = self.hp - hit -            print("The " + self.enemy + " has " + str(self.hp) + " HP remaining") -        else: -            print("You missed.") - -        if self.hp < 1: -            self.alive=False - -# game start -foe=Enemy("troll","great axe") -print("You meet a " + foe.enemy + " wielding a " + foe.weapon) - -# main loop -while True: -    -    print("Type the a key and then RETURN to attack.") -        -    action=input() - -    if action.lower() == "a": -        foe.fight(foe) -                -    if foe.alive == False: -        print("You have won...this time.") -        exit() -``` - -This version of the game handles the enemy as an object containing the same attributes (ancestry, weapon, health, and defense), plus a new attribute measuring whether the enemy has been vanquished yet, as well as a function for combat. - -The first function of a class is a special function called (in Python) an _init_, or initialization, function. This is similar to a [constructor][4] in other languages; it creates an instance of the class, which is identifiable to you by its attributes and to whatever variable you use when invoking the class (**foe** in the example code). - -### Self and class instances - -The class' functions accept a new form of input you don't see outside of classes: **self**. If you don't include **self**, then Python has no way of knowing _which_ instance of the class to use when you call a class function. It's like challenging a single orc to a duel by saying "I'll fight the orc" in a room full of orcs; nobody knows which one you're referring to, and so bad things happen. - -![Image of an Orc, CC-BY-SA by Buch on opengameart.org][5] - -CC-BY-SA by Buch on opengameart.org - -Each attribute created within a class is prepended with the **self** notation, which identifies that variable as an attribute of the class. Once an instance of a class is spawned, you swap out the **self** prefix with the variable representing that instance. Using this technique, you could challenge just one orc to a duel in a room full of orcs by saying "I'll fight the gorblar.orc"; when Gorblar the Orc hears **gorblar.orc**, he knows which orc you're referring to (him_self_), and so you get a fair fight instead of a brawl. In Python: - - -``` -gorblar=Enemy("orc","sword") -print("The " + gorblar.enemy + " has " + str(gorblar.hp) + " remaining.") -``` - -Instead of looking to **foe[0]** (as in the functional example) or **gorblar[0]** for the enemy type, you retrieve the class attribute (**gorblar.enemy** or **gorblar.hp** or whatever value for whatever object you need). - -### Local variables - -If a variable in a class is not prepended with the **self** keyword, then it is a local variable, just as in any function. For instance, no matter what you do, you cannot access the **hit** variable outside the **Enemy.fight** class: - - -``` ->>> print(foe.hit) -Traceback (most recent call last): -  File "./enclass.py", line 38, in <module> -    print(foe.hit) -AttributeError: 'Enemy' object has no attribute 'hit' - ->>> print(foe.fight.hit) -Traceback (most recent call last): -  File "./enclass.py", line 38, in <module> -    print(foe.fight.hit) -AttributeError: 'function' object has no attribute 'hit' -``` - -The **hit** variable is contained within the Enemy class, and only "lives" long enough to serve its purpose in combat. - -### More modularity - -This example uses a class in the same text document as your main application. In a complex game, it's easier to treat each class almost as if it were its own self-standing application. You see this when multiple developers work on the same application: one developer works on a class, and the other works on the main program, and as long as they communicate with one another about what attributes the class must have, the two code bases can be developed in parallel. - -To make this example game modular, split it into two files: one for the main application and one for the class. Were it a more complex application, you might have one file per class, or one file per logical groups of classes (for instance, a file for buildings, a file for natural surroundings, a file for enemies and NPCs, and so on). - -Save one file containing just the Enemy class as **enemy.py** and another file containing everything else as **main.py**. - -Here's **enemy.py**: - - -``` -import random - -class Enemy(): -    def __init__(self,ancestry,gear): -        self.enemy=ancestry -        self.weapon=gear -        self.hp=random.randrange(10,20) -        self.stg=random.randrange(0,20) -        self.ac=random.randrange(0,20) -        self.alive=True - -    def fight(self,tgt): -        print("You take a swing at the " + self.enemy + ".") -        hit=random.randrange(0,20) - -        if self.alive and hit > self.ac: -            print("You hit the " + self.enemy + " for " + str(hit) + " damage!") -            self.hp = self.hp - hit -            print("The " + self.enemy + " has " + str(self.hp) + " HP remaining") -        else: -            print("You missed.") - -        if self.hp < 1: -            self.alive=False -``` - -Here's **main.py**: - - -``` -#!/usr/bin/env python3 - -import enemy as en - -# game start -foe=en.Enemy("troll","great axe") -print("You meet a " + foe.enemy + " wielding a " + foe.weapon) - -# main loop -while True: -    -    print("Type the a key and then RETURN to attack.") - -    action=input() - -    if action.lower() == "a": -        foe.fight(foe) - -    if foe.alive == False: -        print("You have won...this time.") -        exit() -``` - -Importing the module **enemy.py** is done very specifically with a statement that refers to the file of classes as its name without the **.py** extension, followed by a namespace designator of your choosing (for example, **import enemy as en**). This designator is what you use in the code when invoking a class. Instead of just using **Enemy()**, you preface the class with the designator of what you imported, such as **en.Enemy**. - -All of these file names are entirely arbitrary, although not uncommon in principle. It's a common convention to name the part of the application that serves as the central hub **main.py**, and a file full of classes is often named in lowercase with the classes inside it, each beginning with a capital letter. Whether you follow these conventions doesn't affect how the application runs, but it does make it easier for experienced Python programmers to quickly decipher how your application works. - -There's some flexibility in how you structure your code. For instance, using the code sample, both files must be in the same directory. If you want to package just your classes as a module, then you must create a directory called, for instance, **mybad** and move your classes into it. In **main.py**, your import statement changes a little: - - -``` -`from mybad import enemy as en` -``` - -Both systems produce the same results, but the latter is best if the classes you have created are generic enough that you think other developers could use them in their projects. - -Regardless of which you choose, launch the modular version of the game: - - -``` -$ python3 ./main.py -You meet a troll wielding a great axe -Type the a key and then RETURN to attack. -a -You take a swing at the troll. -You missed. -Type the a key and then RETURN to attack. -a -You take a swing at the troll. -You hit the troll for 8 damage! -The troll has 4 HP remaining -Type the a key and then RETURN to attack. -a -You take a swing at the troll. -You hit the troll for 11 damage! -The troll has -7 HP remaining -You have won...this time. -``` - -The game works. It's modular. And now you know what it means for an application to be object-oriented. But most importantly, you know to be specific when challenging an orc to a duel. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/get-modular-python-classes - -作者:[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/code_development_programming.png?itok=M_QDcgz5 (Developing code.) -[2]: https://opensource.com/article/19/6/get-modular-python-functions -[3]: https://opensource.com/article/17/4/how-program-games-raspberry-pi -[4]: https://opensource.com/article/19/6/what-java-constructor -[5]: https://opensource.com/sites/default/files/images/orc-buch-opengameart_cc-by-sa.jpg (CC-BY-SA by Buch on opengameart.org) diff --git a/translated/tech/20190705 Learn object-oriented programming with Python.md b/translated/tech/20190705 Learn object-oriented programming with Python.md new file mode 100644 index 0000000000..01f6902ad8 --- /dev/null +++ b/translated/tech/20190705 Learn object-oriented programming with Python.md @@ -0,0 +1,302 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Learn object-oriented programming with Python) +[#]: via: (https://opensource.com/article/19/7/get-modular-python-classes) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +使用 Python 学习面对对象的编程 +====== +使用 Python 类使你的代码变得更加模块化。 +![Developing code.][1] + +在我上一篇文章中,我解释了如何通过使用函数、创建模块或者两者一起来[使 Python 代码更加模块化][2]。函数对于避免重复多次使用的代码非常有用,而模块可以确保你在不同的项目中复用代码。但是模块化还有另一种方法:类。 + +如果你已经听过 _面对对象编程_ 这个术语,那么你可能会对类的用途有一些概念。程序员倾向于将类视为一个虚拟对象,有时与物理世界中的某些东西直接相关,有时则作为某种编程概念的表现形式。无论哪种表示,当你想要在程序中为你或程序的其他部分创建“对象”时,你都可以创建一个类来交互。 + +### 没有类的模板 + +假设你正在编写一个以幻想世界为背景的游戏,并且你需要这个应用程序能够涌现出各种坏蛋来给玩家的生活带来一些刺激。了解了很多关于函数的知识后,你可能会认为这听起来像是函数的一个教科书案例:需要经常重复的代码,但是在调用时可以考虑变量而只编写一次。 + +下面一个纯粹基于函数的敌人生成器实现的例子: + +``` +#!/usr/bin/env python3 + +import random + +def enemy(ancestry,gear): +    enemy=ancestry +    weapon=gear +    hp=random.randrange(0,20) +    ac=random.randrange(0,20) +    return [enemy,weapon,hp,ac] + +def fight(tgt): +    print("You take a swing at the " + tgt[0] + ".") +    hit=random.randrange(0,20) +    if hit > tgt[3]: +        print("You hit the " + tgt[0] + " for " + str(hit) + " damage!") +        tgt[2] = tgt[2] - hit +    else: +        print("You missed.") + +foe=enemy("troll","great axe") +print("You meet a " + foe[0] + " wielding a " + foe[1]) +print("Type the a key and then RETURN to attack.") + +while True: +    action=input() + +    if action.lower() == "a": +        fight(foe) + +    if foe[2] < 1: +        print("You killed your foe!") +    else: +        print("The " + foe[0] + " has " + str(foe[2]) + " HP remaining") +``` + +**enemy** 函数创造了一个具有多个属性的敌人,例如祖先、武器、生命值和防御等级。它返回每个属性的列表,表示敌人全部特征。 + +从某种意义上说,这段代码创建了一个对象,即使它还没有使用类。程序员将这个 "enemy" 称为 _对象_,因为该函数的结果(本例中是一个包含字符串和整数的列表)表示游戏中一个单独但复杂的 _东西_。也就是说,列表中字符串和整数不是任意的:它们一起描述了一个虚拟对象。 + +在编写描述符集合时,你可以使用变量,以便随时使用它们来生成敌人。这有点像模板。 + +在示例代码中,当需要对象的属性时,会检索相应的列表项。例如,要获取敌人的祖先,代码会查询 **foe[0]**,对于生命值,会查询 **foe[2]**,以此类推。 + +这种方法没有什么不妥,代码按预期运行。你可以添加更多不同类型的敌人,创建一个敌人类型列表,并在敌人创建期间从列表中随机选择,等等,它工作得很好。实际上,[Lua][3] 非常有效地利用这个原理来近似面对对象模型。 + +然而,有时候对象不仅仅是属性列表。 + +### 使用对象 + +在 Python 中,一切都是对象。你在 Python 中创建的任何东西都是某个预定义模板的 _实例_。甚至基本的字符串和整数都是 Python **type** 类的衍生物。你可以在这个交互式 Python shell 中见证: + +``` +>>> foo=3 +>>> type(foo) +<class 'int'> +>>> foo="bar" +>>> type(foo) +<class 'str'> +``` + +当一个对象由一个类定义时,它不仅仅是一个属性的集合,Python 类具有各自的函数。从逻辑上讲,这很方便,因为只涉及某个对象类的操作包含在该对象的类中。 + +在示例代码中,fight 代码是主应用程序的功能。这对于一个简单的游戏来说是可行的,但对于一个复杂的游戏来说,世界中不仅仅有玩家和敌人,还可能有城镇居民、牲畜、建筑物、森林等等,他们都不需要使用战斗功能。将战斗代码放在敌人的类中意味着你的代码更有条理,在一个复杂的应用程序中,这是一个重要的优势。 + +此外,每个类都有特权访问自己的本地变量。例如,敌人的生命值,除了某些功能之外,是不会改变的数据。游戏中的随机蝴蝶不应该意外地将敌人的生命值降低到 0。理想情况下,即使没有类,也不会发生这种情况。但是在具有大量活动部件的复杂应用程序中,确保不需要相互交互的部件永远不会发生这种情况,这是一个非常有用的技巧。 + +Python 类也受垃圾收集的影响。当不再使用类的实例时,它将被移出内存。你可能永远不知道这种情况会什么时候发生,但是你往往知道什么时候它不会发生,因为你的应用程序占用了更多的内存,而且运行速度比较慢。将数据集隔离到类中可以帮助 Python 跟踪哪些数据正在使用,哪些不在需要了。 + +### 优雅的 Python + +下面是一个同样简单的战斗游戏,使用了 Enemy 类: + +``` +#!/usr/bin/env python3 + +import random + +class Enemy(): +    def __init__(self,ancestry,gear): +        self.enemy=ancestry +        self.weapon=gear +        self.hp=random.randrange(10,20) +        self.ac=random.randrange(12,20) +        self.alive=True + +    def fight(self,tgt): +        print("You take a swing at the " + self.enemy + ".") +        hit=random.randrange(0,20) + +        if self.alive and hit > self.ac: +            print("You hit the " + self.enemy + " for " + str(hit) + " damage!") +            self.hp = self.hp - hit +            print("The " + self.enemy + " has " + str(self.hp) + " HP remaining") +        else: +            print("You missed.") + +        if self.hp < 1: +            self.alive=False + +# 游戏开始 +foe=Enemy("troll","great axe") +print("You meet a " + foe.enemy + " wielding a " + foe.weapon) + +# 主函数循环 +while True: +    +    print("Type the a key and then RETURN to attack.") +        +    action=input() + +    if action.lower() == "a": +        foe.fight(foe) +                +    if foe.alive == False: +        print("You have won...this time.") +        exit() +``` + +这个版本的游戏将敌人作为一个包含相同属性(祖先,武器,生命值和防御)的对象来处理,并添加一个新的属性来衡量敌人时候已被击败,以及一个战斗功能。 + +类的第一个函数是一个特殊的函数,在 Python 中称为 \_init\_ 或初始化函数。这类似于其他语言中的[构造器][4],它创建了类的一个实例,你可以通过它的属性和调用类时使用的任何变量来识别它(示例代码中的 **foe**)。 + +### Self 和类实例 + +类的函数接受一种你在类之外看不到的新形式的输入:**self**。如果不包含 **self**,那么当你调用类函数时,Python 无法知道要使用的类的 _哪个_ 实例。这就像在一间充满兽人的房间里说:“我要和兽人战斗”,向一个兽人发起。没有人知道你指的是谁,所以坏事就发生了。 + +![Image of an Orc, CC-BY-SA by Buch on opengameart.org][5] + +CC-BY-SA by Buch on opengameart.org + +类中创建的每个属性都以 **self** 符号作为前缀,该符号将变量标识为类的属性。一旦派生出类的实例,就用表示该实例的变量替换掉 **self** 前缀。使用这个技巧,你可以在一间满是兽人的房间里说:“我要和祖先是 orc 的兽人战斗”,这样来挑战一个兽人。当 orc 听到 "gorblar.orc" 时,它就知道你指的是谁(他自己),所以你得到是一场公平的战斗而不是争吵。在 Python 中: + +``` +gorblar=Enemy("orc","sword") +print("The " + gorblar.enemy + " has " + str(gorblar.hp) + " remaining.") +``` + +通过检索类属性而不是查询 **foe[0]**(在函数示例中)或 **gorblar[0]** 来寻找敌人(**gorblar.enemy** 或 **gorblar.hp** 或你需要的任何对象的任何值)。 + +### 本地变量 + +如果类中的变量没有以 **self** 关键字作为前缀,那么它就是一个局部变量,就像在函数中一样。例如,无论你做什么,你都无法访问 **Enemy.fight** 类之外的 **hit** 变量: + +``` +>>> print(foe.hit) +Traceback (most recent call last): +  File "./enclass.py", line 38, in <module> +    print(foe.hit) +AttributeError: 'Enemy' object has no attribute 'hit' + +>>> print(foe.fight.hit) +Traceback (most recent call last): +  File "./enclass.py", line 38, in <module> +    print(foe.fight.hit) +AttributeError: 'function' object has no attribute 'hit' +``` + +**hi** 变量包含在 Enemy 类中,并且只能“存活”到在战斗种发挥作用。 + +### 更模块化 + +本例使用与主应用程序相同的文本文档中的类。在一个复杂的游戏中,我们更容易将每个类看作是自己独立的应用程序。当多个开发人员处理同一个应用程序时,你会看到这一点:一个开发人员处理一个类,另一个开发主程序,只要他们彼此沟通这个类必须具有什么属性,就可以并行地开发这两个代码块。 + +要使这个示例游戏模块化,可以把它拆分为两个文件:一个用于主应用程序,另一个用于类。如果它是一个更复杂的应用程序,你可能每个类都有一个文件,或每个逻辑类组有一个文件(例如,用于建筑物的文件,用于自然环境的文件,用于敌人或 NPC 的文件等)。 + +将只包含 Enemy 类的一个文件保存为 **enemy.py**,将另一个包含其他内容的文件保存为 **main.py**。 + +以下是 **enemy.py**: + +``` +import random + +class Enemy(): +    def __init__(self,ancestry,gear): +        self.enemy=ancestry +        self.weapon=gear +        self.hp=random.randrange(10,20) +        self.stg=random.randrange(0,20) +        self.ac=random.randrange(0,20) +        self.alive=True + +    def fight(self,tgt): +        print("You take a swing at the " + self.enemy + ".") +        hit=random.randrange(0,20) + +        if self.alive and hit > self.ac: +            print("You hit the " + self.enemy + " for " + str(hit) + " damage!") +            self.hp = self.hp - hit +            print("The " + self.enemy + " has " + str(self.hp) + " HP remaining") +        else: +            print("You missed.") + +        if self.hp < 1: +            self.alive=False +``` + +以下是 **main.py**: + +``` +#!/usr/bin/env python3 + +import enemy as en + +# game start +foe=en.Enemy("troll","great axe") +print("You meet a " + foe.enemy + " wielding a " + foe.weapon) + +# main loop +while True: +    +    print("Type the a key and then RETURN to attack.") + +    action=input() + +    if action.lower() == "a": +        foe.fight(foe) + +    if foe.alive == False: +        print("You have won...this time.") +        exit() +``` + +导入模块 **enemy.py** 使用了一条特别的语句,将类文件名称作为引用而不是 **.py** 扩展名,后跟你选择的命名空间指示符(例如,**import enemy as en**)。这个指示符是在你调用类时在代码中使用的。你需要在导入时添加指定符,例如 **en.Enemy**,而不是只使用 **Enemy()**。 + +所有这些文件名都是任意的,尽管在原则上并不罕见。将应用程序的中心命名为 **main.py** 是一个常见约定,和一个充满类的文件通常以小写形式命名,其中的类都以大写字母开头。是否遵循这些约定不会影响应用程序的运行方式,但它确实使经验丰富的 Python 程序员更容易快速理解应用程序的工作方式。 + +在如何构建代码方面有一些灵活性。例如,使用代码示例,两个文件必须位于同一目录中。如果你只想将类打包为模块,那么必须创建一个名为 **mybad** 的目录,并将你的类移入其中。在 **main.py** 中,你的 import 语句稍有变化: + +``` +from mybad import enemy as en +``` + +两种方法都会产生相同的结果,但如果你创建的类足够通用,你认为其他开发人员可以在他们的项目中使用它们,那么后者是更好的。 + +无论你选择哪种方式,都可以启动游戏的模块化版本: + +``` +$ python3 ./main.py +You meet a troll wielding a great axe +Type the a key and then RETURN to attack. +a +You take a swing at the troll. +You missed. +Type the a key and then RETURN to attack. +a +You take a swing at the troll. +You hit the troll for 8 damage! +The troll has 4 HP remaining +Type the a key and then RETURN to attack. +a +You take a swing at the troll. +You hit the troll for 11 damage! +The troll has -7 HP remaining +You have won...this time. +``` + +游戏启动了,它现在更加模块化了。现在你知道了面对对象的应用程序意味着什么,但最重要的是,当你向兽人发起决斗的时候,你要想清楚。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/get-modular-python-classes + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者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/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[2]: https://opensource.com/article/19/6/get-modular-python-functions +[3]: https://opensource.com/article/17/4/how-program-games-raspberry-pi +[4]: https://opensource.com/article/19/6/what-java-constructor +[5]: https://opensource.com/sites/default/files/images/orc-buch-opengameart_cc-by-sa.jpg (CC-BY-SA by Buch on opengameart.org) From ea36e9518d7eeb799cd9dc0be28baf89e6495ce1 Mon Sep 17 00:00:00 2001 From: LuMing <784315443@qq.com> Date: Sat, 10 Aug 2019 14:26:27 +0800 Subject: [PATCH 383/951] translating --- ...guide to building DevOps pipelines with open source tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190408 A beginner-s guide to building DevOps pipelines with open source tools.md b/sources/tech/20190408 A beginner-s guide to building DevOps pipelines with open source tools.md index 2110c17606..b5650680bc 100644 --- a/sources/tech/20190408 A beginner-s guide to building DevOps pipelines with open source tools.md +++ b/sources/tech/20190408 A beginner-s guide to building DevOps pipelines with open source tools.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (luming) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2a6a5d850e36e59965de6baf18aaec742cd38701 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 10 Aug 2019 21:34:03 +0800 Subject: [PATCH 384/951] Rename sources/tech/20190809 Goodbye, Linux Journal.md to sources/talk/20190809 Goodbye, Linux Journal.md --- sources/{tech => talk}/20190809 Goodbye, Linux Journal.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190809 Goodbye, Linux Journal.md (100%) diff --git a/sources/tech/20190809 Goodbye, Linux Journal.md b/sources/talk/20190809 Goodbye, Linux Journal.md similarity index 100% rename from sources/tech/20190809 Goodbye, Linux Journal.md rename to sources/talk/20190809 Goodbye, Linux Journal.md From 1645c91e301a3f25fa349b3a6ca10cf5383e9791 Mon Sep 17 00:00:00 2001 From: Furrybear Date: Sun, 11 Aug 2019 00:34:59 +0800 Subject: [PATCH 385/951] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How to create a pull request in GitHub.md | 144 ------------------ ... How to create a pull request in GitHub.md | 137 +++++++++++++++++ 2 files changed, 137 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20190730 How to create a pull request in GitHub.md create mode 100755 translated/tech/20190730 How to create a pull request in GitHub.md diff --git a/sources/tech/20190730 How to create a pull request in GitHub.md b/sources/tech/20190730 How to create a pull request in GitHub.md deleted file mode 100644 index 3c8ace6cf4..0000000000 --- a/sources/tech/20190730 How to create a pull request in GitHub.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (furrybear) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to create a pull request in GitHub) -[#]: via: (https://opensource.com/article/19/7/create-pull-request-github) -[#]: author: (Kedar Vijay Kulkarni https://opensource.com/users/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p) - -如何在Github上创建一个拉取请求 -====== -Learn how to fork a repo, make changes, and ask the maintainers to -review and merge it. -![a checklist for a team][1] - -So, you know how to use git. You have a [GitHub][2] repo and can push to it. All is well. But how the heck do you contribute to other people's GitHub projects? That is what I wanted to know after I learned git and GitHub. In this article, I will explain how to fork a git repo, make changes, and submit a pull request. - -When you want to work on a GitHub project, the first step is to fork a repo. - -![Forking a GitHub repo][3] - -Use [my demo repo][4] to try it out. - -Once there, click on the **Fork** button in the top-right corner. This creates a new copy of my demo repo under your GitHub user account with a URL like: - - -``` -`https://github.com//demo` -``` - -The copy includes all the code, branches, and commits from the original repo. - -Next, clone the repo by opening the terminal on your computer and running the command: - - -``` -`git clone https://github.com//demo` -``` - -Once the repo is cloned, you need to do two things: - - 1. Create a new branch by issuing the command: - - -``` -`git checkout -b new_branch` -``` - - 2. Create a new remote for the upstream repo with the command: - - -``` -`git remote add upstream https://github.com/kedark3/demo` -``` - - - - -In this case, "upstream repo" refers to the original repo you created your fork from. - -Now you can make changes to the code. The following code creates a new branch, makes an arbitrary change, and pushes it to **new_branch**: - - -``` -$ git checkout -b new_branch -Switched to a new branch ‘new_branch’ -$ echo “some test file” > test -$ cat test -Some test file -$ git status -On branch new_branch -No commits yet -Untracked files: -  (use "git add <file>..." to include in what will be committed) -    test -nothing added to commit but untracked files present (use "git add" to track) -$ git add test -$ git commit -S -m "Adding a test file to new_branch" -[new_branch (root-commit) 4265ec8] Adding a test file to new_branch - 1 file changed, 1 insertion(+) - create mode 100644 test -$ git push -u origin new_branch -Enumerating objects: 3, done. -Counting objects: 100% (3/3), done. -Writing objects: 100% (3/3), 918 bytes | 918.00 KiB/s, done. -Total 3 (delta 0), reused 0 (delta 0) -Remote: Create a pull request for ‘new_branch’ on GitHub by visiting: -Remote:   -Remote: - * [new branch]         new_branch -> new_branch -``` - -Once you push the changes to your repo, the **Compare & pull request** button will appear in GitHub. - -![GitHub's Compare & Pull Request button][5] - -Click it and you'll be taken to this screen: - -![GitHub's Open pull request button][6] - -Open a pull request by clicking the **Create pull request** button. This allows the repo's maintainers to review your contribution. From here, they can merge it if it is good, or they may ask you to make some changes. - -### TLDR - -In summary, if you want to contribute to a project, the simplest way is to: - - 1. Find a project you want to contribute to - 2. Fork it - 3. Clone it to your local system - 4. Make a new branch - 5. Make your changes - 6. Push it back to your repo - 7. Click the **Compare & pull request** button - 8. Click **Create pull request** to open a new pull request - - - -If the reviewers ask for changes, repeat steps 5 and 6 to add more commits to your pull request. - -Happy coding! - -In a previous article , I discussed the complaints that have been leveled against GitHub during the... - -Arfon Smith works at GitHub and is involved in a number of activities at the intersection of open... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/create-pull-request-github - -作者:[Kedar Vijay Kulkarni][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/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) -[2]: https://github.com/ -[3]: https://opensource.com/sites/default/files/uploads/forkrepo.png (Forking a GitHub repo) -[4]: https://github.com/kedark3/demo -[5]: https://opensource.com/sites/default/files/uploads/compare-and-pull-request-button.png (GitHub's Compare & Pull Request button) -[6]: https://opensource.com/sites/default/files/uploads/open-a-pull-request_crop.png (GitHub's Open pull request button) diff --git a/translated/tech/20190730 How to create a pull request in GitHub.md b/translated/tech/20190730 How to create a pull request in GitHub.md new file mode 100755 index 0000000000..56bebaa9ae --- /dev/null +++ b/translated/tech/20190730 How to create a pull request in GitHub.md @@ -0,0 +1,137 @@ +[#]: collector: "lujun9972" +[#]: translator: "furrybear" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "How to create a pull request in GitHub" +[#]: via: "https://opensource.com/article/19/7/create-pull-request-github" +[#]: author: "Kedar Vijay Kulkarni https://opensource.com/users/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p" + + + +如何在Github上创建一个拉取请求 +====== +学习如何复刻一个仓库,进行更改,并要求维护人员审查并合并它 + +![a checklist for a team][1] + +所以,你知道如何使用 git。 你有一个 [GitHub][2] 仓库并且可以向它推送。这 一切都很好。 但是你如何为他人的 GitHub 项目做出贡献? 这是我在学习 git 和 GitHub 之后想知道的。在本文中,我将解释如何复刻一个 git 仓库、进行更改并提交一个拉取请求。 + +当你想要在一个 GitHub 项目上工作时,第一步是复刻一个仓库。 + +![Forking a GitHub repo][3] + +你可以使用[我的演示仓库][4]试一试. + +一旦在这个页面,单击右上角的 Fork (复刻)按钮。这将在你的GitHub用户账户下创建我的演示仓库的一个新副本,其统一资源定位符如下: + + +``` +`https://github.com/<你的用户名>/demo` +``` + +这个副本包含了原始仓库中的所有代码,分支和提交。 + +接下来,打开你计算机上的终端并运行命令来克隆仓库: + + +``` +`git clone https://github.com/<你的用户名>/demo` +``` + +一旦仓库被克隆后,你需要做两件事: + + 1. 通过发出命令创建一个新分支 `new_branch` : + +``` +`git checkout -b new_branch` +``` + + 2. 使用以下命令为上游仓库创建一个新的远程( remote ): + +``` +`git remote add upstream https://github.com/kedark3/demo` +``` + +在这种情况下,“上游仓库”指的是你创建复刻来自的原始仓库。 + +现在你可以更改代码了。 以下代码创建一个新分支,进行任意更改,并将其推送到 **new_branch** 分支: + +``` +$ git checkout -b new_branch +Switched to a new branch ‘new_branch’ +$ echo “some test file” > test +$ cat test +Some test file +$ git status +On branch new_branch +No commits yet +Untracked files: +  (use "git add <file>..." to include in what will be committed) +    test +nothing added to commit but untracked files present (use "git add" to track) +$ git add test +$ git commit -S -m "Adding a test file to new_branch" +[new_branch (root-commit) 4265ec8] Adding a test file to new_branch + 1 file changed, 1 insertion(+) + create mode 100644 test +$ git push -u origin new_branch +Enumerating objects: 3, done. +Counting objects: 100% (3/3), done. +Writing objects: 100% (3/3), 918 bytes | 918.00 KiB/s, done. +Total 3 (delta 0), reused 0 (delta 0) +Remote: Create a pull request for ‘new_branch’ on GitHub by visiting: +Remote:   +Remote: + * [new branch]         new_branch -> new_branch +``` + +一旦你将更改推送到您的仓库后, **Compare & pull request(比较和拉取请求)** 按钮将出现在GitHub。 + +![GitHub's Compare & Pull Request button][5] + +单击它,你将进入此屏幕: + +![GitHub's Open pull request button][6] + +单击 **Create pull request(创建拉取请求)** 按钮打开一个拉取请求。 这允许仓库的维护者们审查你的贡献。 从这个页面,如果你的贡献是好的,他们可以合并它,或者他们可能会要求你做一些改变。 + +### 太长,别看 + +总之,如果您想为一个项目做出贡献,最简单的方法是: + 1. 找到您想要贡献的项目 + 2. 复刻它 + 3. 将其克隆到你的本地系统 + 4. 建立一个新的分支 + 5. 进行你的更改 + 6. 将其推送回你的仓库 + 7. 单击**Compare & pull request(比较和拉取请求)**按钮 + 8. 单击**Create pull request(创建拉取请求)**以打开一个新的拉取请求 + +如果审阅者要求更改,请重复步骤5和6,为你的拉取请求添加更多提交。 + +快乐编码! + +在之前的一篇文章中,我讨论了在...期间针对GitHub的投诉。 + +Arfon Smith在GitHub工作,并在开放的十字路口参与了许多活动...... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/create-pull-request-github + +作者:[Kedar Vijay Kulkarni][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/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk "a checklist for a team" +[2]: https://github.com/ +[3]: https://opensource.com/sites/default/files/uploads/forkrepo.png "Forking a GitHub repo" +[4]: https://github.com/kedark3/demo +[5]: https://opensource.com/sites/default/files/uploads/compare-and-pull-request-button.png "GitHub's Compare & Pull Request button" +[6]: https://opensource.com/sites/default/files/uploads/open-a-pull-request_crop.png "GitHub's Open pull request button" From 8bba936f8402751c7496e8fae19e63c44b921b3d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Aug 2019 07:48:11 +0800 Subject: [PATCH 386/951] PRF @geekpi --- ... To Improve Gaming Performance On Linux.md | 54 ++++++++----------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md b/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md index 96bc025a28..82966b142a 100644 --- a/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md +++ b/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md @@ -1,40 +1,38 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (GameMode – A Tool To Improve Gaming Performance On Linux) [#]: via: (https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/) [#]: author: (sk https://www.ostechnix.com/author/sk/) -GameMode - 提高 Linux 游戏性能的工具 +GameMode:提高 Linux 游戏性能的工具 ====== ![Gamemmode improve gaming performance on Linux][1] -去问一些 Linux 用户为什么他们仍然坚持 Windows 双启动,他们的答案可能是 - “游戏!”。这是真的!幸运的是,开源游戏平台如 [**Lutris**][2] 和专有游戏平台 **Steam** 已经为 Linux 平台带来了许多游戏,并且近几年来显著改善了 Linux 的游戏体验。今天,我偶然发现了另一款名为 **GameMode** 的 Linux 游戏相关开源工具,它能让用户提高 Linux 上的游戏性能。 +去问一些 Linux 用户为什么他们仍然坚持 Windows 双启动,他们的答案可能是 - “游戏!”。这是真的!幸运的是,开源游戏平台如 [Lutris][2] 和专有游戏平台 Steam 已经为 Linux 平台带来了许多游戏,并且近几年来显著改善了 Linux 的游戏体验。今天,我偶然发现了另一款名为 GameMode 的 Linux 游戏相关开源工具,它能让用户提高 Linux 上的游戏性能。 -GameMode 基本上是一组守护进程/lib,它可以按需优化 Linux 系统的游戏性能。我以为 GameMode 是一个杀死在后台运行的对资源消耗大进程的工具。但它并不是。它实际上只是让 CPU **自动运行在高性能模式下**并帮助 Linux 用户从游戏中获得最佳性能。 +GameMode 基本上是一组守护进程/库,它可以按需优化 Linux 系统的游戏性能。我以为 GameMode 是一个杀死在后台运行的对资源消耗大进程的工具。但它并不是。它实际上只是让 CPU **在用户玩游戏时自动运行在高性能模式下**并帮助 Linux 用户从游戏中获得最佳性能。 -在玩游戏时,GameMode 通过请求一组优化临时应用于宿主机来显著提升游戏性能。目前,它支持下面这些优化: +在玩游戏时,GameMode 通过对宿主机请求临时应用一组优化来显著提升游戏性能。目前,它支持下面这些优化: - * CPU 调控器, -  * I/O 优先级, -  * 进程 nice 值 -  * 内核调度器(SCHED_ISO), -  * 进制屏幕保护, -  * GPU 高性能模式(NVIDIA 和 AMD),GPU 超频(NVIDIA), -  * 自定义脚本。 +* CPU 调控器, +* I/O 优先级, +* 进程 nice 值 +* 内核调度器(SCHED_ISO), +* 禁止屏幕保护, +* GPU 高性能模式(NVIDIA 和 AMD),GPU 超频(NVIDIA), +* 自定义脚本。 - - -GameMode 是由世界领先的游戏发行商 [**Feral Interactive**][3] 开发的免费开源系统工具。 +GameMode 是由世界领先的游戏发行商 [Feral Interactive][3] 开发的自由开源的系统工具。 ### 安装 GameMode GameMode 适用于许多 Linux 发行版。 -在 Arch Linux 及其变体上,你可以使用任何 AUR 助手程序,如 [**Yay**][5] 从 [**AUR**][4] 安装它。 +在 Arch Linux 及其变体上,你可以使用任何 AUR 助手程序,如 [Yay][5] 从 [AUR][4] 安装它。 ``` $ yay -S gamemode @@ -50,7 +48,7 @@ $ sudo apt install gamemode ### 激活 GameMode 支持以改善 Linux 上的游戏性能 -以下是 GameMode 集成支持的游戏列表,因此我们无需进行任何其他配置即可激活 GameMode 支持。 +以下是集成支持了 GameMode 的游戏列表,因此我们无需进行任何其他配置即可激活 GameMode 支持。 * 古墓丽影:崛起 * 全面战争传奇:不列颠尼亚王座 @@ -58,8 +56,6 @@ $ sudo apt install gamemode * 尘埃 4 * 全面战争:三国 - - 只需运行这些游戏,就会自动启用 GameMode 支持。 这里还有将 GameMode 与 GNOME shell 集成的的[扩展][6]。它会在顶部指示 GameMode 何时处于活跃。 @@ -72,24 +68,16 @@ gamemoderun ./game 我不喜欢游戏,并且我已经很多年没玩游戏了。所以,我无法分享一些实际的基准测试。 -但是,我在 Youtube 上找到了一个简短的视频教程,以便为 Lutris 游戏启用 GameMode 支持。对于那些想要第一次尝试 GameMode 的人来说,这是个不错的开始。 - - +但是,我在 Youtube 上找到了一个简短的[视频教程](https://youtu.be/4gyRyYfyGJw),以便为 Lutris 游戏启用 GameMode 支持。对于那些想要第一次尝试 GameMode 的人来说,这是个不错的开始。 通过浏览视频中的评论,我可以说 GameMode 确实提高了 Linux 上的游戏性能。 -对于更多细节,请参阅 [**GameMode 的 GitHub 仓库**][7]。 +对于更多细节,请参阅 [GameMode 的 GitHub 仓库][7]。 -* * * +相关阅读: -**相关阅读:** - - * [**GameHub – 将所有游戏集合在一起的仓库**][8] - * [**如何在 Linux 中运行 MS-DOS 游戏和程序**][9] - - - -* * * +* [GameHub – 将所有游戏集合在一起的仓库][8] +* [如何在 Linux 中运行 MS-DOS 游戏和程序][9] 你用过 GameMode 吗?它真的有改善 Linux 上的游戏性能吗?请在下面的评论栏分享你的想法。 @@ -100,7 +88,7 @@ via: https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on- 作者:[sk][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 f175a153f8704fc24ac13072aee73821a4db39b2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Aug 2019 07:48:46 +0800 Subject: [PATCH 387/951] PUB @geekpi https://linux.cn/article-11211-1.html --- ...ameMode - A Tool To Improve Gaming Performance On Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md (98%) diff --git a/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md b/published/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md similarity index 98% rename from translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md rename to published/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md index 82966b142a..423a6a06f5 100644 --- a/translated/tech/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md +++ b/published/20190805 GameMode - A Tool To Improve Gaming Performance On Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11211-1.html) [#]: subject: (GameMode – A Tool To Improve Gaming Performance On Linux) [#]: via: (https://www.ostechnix.com/gamemode-a-tool-to-improve-gaming-performance-on-linux/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From e0e6d3312a3a73d217181a57884a425a7c04f93c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Aug 2019 07:59:41 +0800 Subject: [PATCH 388/951] PRF @FSSlc --- ...90805 How To Verify ISO Images In Linux.md | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/translated/tech/20190805 How To Verify ISO Images In Linux.md b/translated/tech/20190805 How To Verify ISO Images In Linux.md index 86754a3b7b..2d0845edf7 100644 --- a/translated/tech/20190805 How To Verify ISO Images In Linux.md +++ b/translated/tech/20190805 How To Verify ISO Images In Linux.md @@ -1,6 +1,6 @@ [#]: collector: "lujun9972" [#]: translator: "FSSlc" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "How To Verify ISO Images In Linux" @@ -12,32 +12,34 @@ ![如何在 Linux 中校验 ISO 镜像][1] -刚才为了你最为喜爱的 Linux 发行版,你从它的官方网站或第三方网站下载了它的 ISO 镜像,接下来做啥呢?是[**创建可启动介质**][2]并开始安装系统吗?并不是,请稍等一下。在开始使用它之前,强烈建议你检查一下你刚下载到本地系统中的 ISO 文件是否是下载镜像站点中 ISO 文件的一个精确拷贝。因为在前几年 [Linux Mint 的网站被攻破了][3],并且攻击者创建了一个包含后门的经过修改的 Linux Mint ISO 文件。 所以验证下载的 Linux ISO 镜像的可靠性和完整性是非常重要的一件事儿。假如你不知道如何在 Linux 中验证 ISO 镜像,本次的简要介绍将给予你帮助,请接着往下看! +你从喜爱的 Linux 发行版的官方网站或第三方网站下载了它的 ISO 镜像之后,接下来要做什么呢?是[创建可启动介质][2]并开始安装系统吗?并不是,请稍等一下。在开始使用它之前,强烈建议你检查一下你刚下载到本地系统中的 ISO 文件是否是下载镜像站点中 ISO 文件的一个精确拷贝。因为在前几年 [Linux Mint 的网站被攻破了][3],并且攻击者创建了一个包含后门的经过修改的 Linux Mint ISO 文件。 所以验证下载的 Linux ISO 镜像的可靠性和完整性是非常重要的一件事儿。假如你不知道如何在 Linux 中验证 ISO 镜像,本次的简要介绍将给予你帮助,请接着往下看! ### 在 Linux 中验证 ISO 镜像 -我们可以使用 ISO 镜像的校验和来验证 ISO 镜像。校验和是一系列字母和数字的组合,用来检验下载文件的数据是否有错以及验证其可靠性和完整性。当前存在不同类型的校验和,例如 SHA-0、SHA-1、SHA-2(224、256、384、512)和 MD5。MD5 校验和最为常用,但对于现代的 Linux 发行版,SHA-256 最常被使用。 +我们可以使用 ISO 镜像的“校验和”来验证 ISO 镜像。校验和是一系列字母和数字的组合,用来检验下载文件的数据是否有错以及验证其可靠性和完整性。当前存在不同类型的校验和,例如 SHA-0、SHA-1、SHA-2(224、256、384、512)和 MD5。MD5 校验和最为常用,但对于现代的 Linux 发行版,SHA-256 最常被使用。 我们将使用名为 `gpg` 和 `sha256` 的两个工具来验证 ISO 镜像的可靠性和完整性。 -##### 下载校验和及签名 +#### 下载校验和及签名 针对本篇指南的目的,我将使用 Ubuntu 18.04 LTS 服务器 ISO 镜像来做验证,但对于其他的 Linux 发行版应该也是适用的。 在靠近 Ubuntu 下载页的最上端,你将看到一些额外的文件(校验和及签名),正如下面展示的图片那样: + ![Ubuntu 18.04 的校验和及签名][4] -其中名为 **SHA256SUMS** 的文件包含了这里所有可获取镜像的校验和,而 **SHA256SUMS.gpg** 文件则是这个文件的 GnuPG 签名。在下面的步骤中,我们将使用这个签名文件来 **验证** 校验和文件。 +其中名为 `SHA256SUMS` 的文件包含了这里所有可获取镜像的校验和,而 `SHA256SUMS.gpg` 文件则是这个文件的 GnuPG 签名。在下面的步骤中,我们将使用这个签名文件来 **验证** 校验和文件。 -下载 Ubuntu 的 ISO 镜像文件以及刚才提到的那两个文件,然后将它们放到同一目录下,例如这里的 **ISO** 目录: +下载 Ubuntu 的 ISO 镜像文件以及刚才提到的那两个文件,然后将它们放到同一目录下,例如这里的 `ISO` 目录: ``` $ ls ISO/ SHA256SUMS SHA256SUMS.gpg ubuntu-18.04.2-live-server-amd64.iso ``` + 如你所见,我已经下载了 Ubuntu 18.04.2 LTS 服务器版本的镜像,以及对应的校验和文件和签名文件。 -##### 下载有效的签名秘钥 +#### 下载有效的签名秘钥 现在,使用下面的命令来下载正确的签名秘钥: @@ -57,7 +59,7 @@ gpg: Total number processed: 2 gpg: imported: 2 ``` -##### 验证 SHA-256 校验和 +#### 验证 SHA-256 校验和 接下来我们将使用签名来验证校验和文件: @@ -84,7 +86,7 @@ Primary key fingerprint: 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 假如你在输出中看到 `Good signature` 字样,那么该校验和文件便是由 Ubuntu 开发者制作的,并且由秘钥文件的所属者签名认证。 -##### 检验下载的 ISO 文件 +#### 检验下载的 ISO 文件 下面让我们继续检查下载的 ISO 文件是否和所给的校验和相匹配。为了达到该目的,只需要运行: @@ -93,12 +95,11 @@ $ sha256sum -c SHA256SUMS 2>&1 | grep OK ubuntu-18.04.2-live-server-amd64.iso: OK ``` -假如校验和是匹配的,你讲看到 **OK** 字样,这意味着下载的文件是合法的,没有被改变或篡改过。 +假如校验和是匹配的,你将看到 `OK` 字样,这意味着下载的文件是合法的,没有被改变或篡改过。 假如你没有获得类似的输出,或者看到不同的输出,则该 ISO 文件可能已经被修改过或者没有被正确地下载。你必须从一个更好的下载源重新下载该文件。 -某些 Linux 发行版已经在它的下载页面中包含了校验和。例如 **Pop!_os** 的开发者在他们的下载页面中提供了所有 ISO 镜像的 SHA-256 校验和,这样你就可以快速地验证这些 ISO 镜像。 - +某些 Linux 发行版已经在它的下载页面中包含了校验和。例如 Pop!_os 的开发者在他们的下载页面中提供了所有 ISO 镜像的 SHA-256 校验和,这样你就可以快速地验证这些 ISO 镜像。 ![Pop os 位于其下载页面中的 SHA256 校验和][5] @@ -115,13 +116,14 @@ $ sha256sum Soft_backup/ISOs/pop-os_18.04_amd64_intel_54.iso ``` ![Pop os 的 SHA256 校验和的值][6] -在上面的输出中,以 **680elaa…** 开头的部分为 SHA-256 校验和的值。请将该值与位于下载页面中提供的 SHA-256 校验和的值进行比较,如果这两个值相同,那说明这个下载的 ISO 文件是合法的,与它的原有状态相比没有经过更改或者篡改。万事俱备,你可以进行下一步了! + +在上面的输出中,以 `680elaa` 开头的部分为 SHA-256 校验和的值。请将该值与位于下载页面中提供的 SHA-256 校验和的值进行比较,如果这两个值相同,那说明这个下载的 ISO 文件是合法的,与它的原有状态相比没有经过更改或者篡改。万事俱备,你可以进行下一步了! 上面的内容便是我们如何在 Linux 中验证一个 ISO 文件的可靠性和完整性的方法。无论你是从官方站点或者第三方站点下载 ISO 文件,我们总是推荐你在使用它们之前做一次简单的快速验证。希望本篇的内容对你有所帮助。 -**参考文献:** +参考文献: - * [**https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu**][7] +* [https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu][7] -------------------------------------------------------------------------------- @@ -130,7 +132,7 @@ via: https://www.ostechnix.com/how-to-verify-iso-images-in-linux/ 作者:[sk][a] 选题:[lujun9972][b] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 17961f9b1e13f750533bf637e3d112de37589df6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Aug 2019 08:00:14 +0800 Subject: [PATCH 389/951] PUB @FSSlc https://linux.cn/article-11212-1.html --- .../20190805 How To Verify ISO Images In Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190805 How To Verify ISO Images In Linux.md (99%) diff --git a/translated/tech/20190805 How To Verify ISO Images In Linux.md b/published/20190805 How To Verify ISO Images In Linux.md similarity index 99% rename from translated/tech/20190805 How To Verify ISO Images In Linux.md rename to published/20190805 How To Verify ISO Images In Linux.md index 2d0845edf7..80b5a39a57 100644 --- a/translated/tech/20190805 How To Verify ISO Images In Linux.md +++ b/published/20190805 How To Verify ISO Images In Linux.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "FSSlc" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-11212-1.html" [#]: subject: "How To Verify ISO Images In Linux" [#]: via: "https://www.ostechnix.com/how-to-verify-iso-images-in-linux/" [#]: author: "sk https://www.ostechnix.com/author/sk/" From d4c741f56a6a8d8690c0d2b3afde8d551b9029ff Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Aug 2019 09:06:27 +0800 Subject: [PATCH 390/951] PRF @wxy --- ... Webhooks when youre developing locally.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/translated/tech/20180131 How to test Webhooks when youre developing locally.md b/translated/tech/20180131 How to test Webhooks when youre developing locally.md index 153cacdb9c..2ac7fb588b 100644 --- a/translated/tech/20180131 How to test Webhooks when youre developing locally.md +++ b/translated/tech/20180131 How to test Webhooks when youre developing locally.md @@ -1,15 +1,15 @@ -当你在本地开发时如何测试 Webhooks +本地开发如何测试 Webhook =================== -![](https://cdn-images-1.medium.com/max/1000/1*0HNQmPw5yXva6powvVwn5Q.jpeg) +![](https://img.linux.net.cn/data/attachment/album/201908/11/090540wipp5c65iinyyf63.jpg) -[Webhooks][10] 可用于外部系统通知你的系统发生了某个事件或更新。可能最知名的 [Webhooks][10] 是支付服务提供商(PSP)通知你的系统支付状态有了更新。 +[Webhook][10] 可用于外部系统通知你的系统发生了某个事件或更新。可能最知名的 [Webhook][10] 类型是支付服务提供商(PSP)通知你的系统支付状态有了更新。 -它们通常以你在监听预定义 URL 的形式出现,例如 `http://example.com/webhooks/payment-update`。 同时,另一个系统向该 URL 发送具有特定有效载荷的 POST 请求(例如支付 ID)。一旦请求进入,你就会获取支付 ID,可以通过它们的 API 用这个支付 ID 向 PSP 询问最新状态,然后更新你的数据库。 +它们通常以监听的预定义 URL 的形式出现,例如 `http://example.com/webhooks/payment-update`。同时,另一个系统向该 URL 发送具有特定有效载荷的 POST 请求(例如支付 ID)。一旦请求进入,你就会获得支付 ID,可以通过 PSP 的 API 用这个支付 ID 向它们询问最新状态,然后更新你的数据库。 其他例子可以在这个对 Webhook 的出色的解释中找到:[https://sendgrid.com/blog/whats-webhook/][12]。 -只要系统可通过互联网公开访问(这可能是你的生产环境或可公开访问的临时环境),测试这些 webhook 就相当顺利。而当你在笔记本电脑上或虚拟机内部进行本地开发(例如,Vagrant 虚拟机)时,它变得困难了。在这些情况下,发送 webhook 的一方无法公开访问本地 URL。此外,监视发送的请求也很困难,这可能使开发和调试变得困难。 +只要系统可通过互联网公开访问(这可能是你的生产环境或可公开访问的临时环境),测试这些 webhook 就相当顺利。而当你在笔记本电脑上或虚拟机内部(例如,Vagrant 虚拟机)进行本地开发时,它就变得困难了。在这些情况下,发送 webhook 的一方无法公开访问你的本地 URL。此外,监视发送的请求也很困难,这可能使开发和调试变得困难。 因此,这个例子将解决: @@ -19,20 +19,19 @@ 前置需求: * *可选*:如果你使用虚拟机(VM)进行开发,请确保它正在运行,并确保在 VM 中完成后续步骤。 -* 对于本教程,我们假设你定义了一个 vhost:`webhook.example.vagrant`。我在本教程中使用了 Vagrant VM,但你可以自由选择 vhost 的名称。 -* 按照[安装说明][3]安装 `ngrok`。 在 VM 中,我发现它的 Node 版本也很有用:[https://www.npmjs.com/package/ngrok][4],但你可以随意使用其他方法。 +* 对于本教程,我们假设你定义了一个 vhost:`webhook.example.vagrant`。我在本教程中使用了 Vagrant VM,但你可以自由选择 vhost。 +* 按照这个[安装说明][3]安装 `ngrok`。在 VM 中,我发现它的 Node 版本也很有用:[https://www.npmjs.com/package/ngrok][4],但你可以随意使用其他方法。 -我假设你没有在你的环境中运行 SSL,但如果你这样做了,请将在下面的示例中的端口 80 替换为端口 433,`http://` 替换为 `https://`。 +我假设你没有在你的环境中运行 SSL,但如果你使用了,请将在下面的示例中的端口 80 替换为端口 433,`http://` 替换为 `https://`。 ### 使 webhook 可测试 -我们假设以下示例代码。我将使用 PHP,但将其视作伪代码,因为我留下了一些关键部分(例如 API 密钥、输入验证等)没有编写。 +我们假设以下示例代码。我将使用 PHP,但请将其视作伪代码,因为我留下了一些关键部分(例如 API 密钥、输入验证等)没有编写。 第一个文件:`payment.php`。此文件创建一个 `$payment` 对象,将其注册到 PSP。然后它获取客户需要访问的 URL,以便支付并将用户重定向到客户那里。 请注意,此示例中的 `webhook.example.vagrant` 是我们为开发设置定义的本地虚拟主机。它无法从外部世界进入。 - ``` getPaymentUrl()); ### 如何监控对 webhook 的调用? -你在上面看到的屏幕截图概述了对隧道主机的调用。这些数据相当有限。幸运的是,`ngrok` 提供了一个非常好的仪表板,允许你检查所有调用: +你在上面看到的屏幕截图概述了对隧道主机的调用,这些数据相当有限。幸运的是,`ngrok` 提供了一个非常好的仪表板,允许你检查所有调用: ![](https://cdn-images-1.medium.com/max/1000/1*qZw9GRTnG1sMgEUmsJPz3g.png) @@ -155,7 +154,7 @@ ngrok http -config=/path/to/config/ngrok.conf -host-header=rewrite webhook.examp 现在将浏览器指向 `http://webhook.example.vagrant:4040` 以访问仪表板。另外,对 `https://e65642b5.ngrok.io/webhook.php` 做个调用。这可能会导致你的浏览器出错,但仪表板应显示正有一个请求。 -#### 最后的评论 +### 最后的备注 上面的例子是伪代码。原因是每个外部系统都以不同的方式使用 webhook。我试图基于一个虚构的 PSP 实现给出一个例子,因为可能很多开发人员在某个时刻肯定会处理付款。 @@ -173,7 +172,7 @@ via: https://medium.freecodecamp.org/testing-webhooks-while-using-vagrant-for-de 作者:[Stefan Doorn][a] 译者:[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 3aa72c0afd835e1fba87b1391885b938687401a4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Aug 2019 09:06:52 +0800 Subject: [PATCH 391/951] PUB @wxy https://linux.cn/article-11213-1.html --- ...20180131 How to test Webhooks when youre developing locally.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180131 How to test Webhooks when youre developing locally.md (100%) diff --git a/translated/tech/20180131 How to test Webhooks when youre developing locally.md b/published/20180131 How to test Webhooks when youre developing locally.md similarity index 100% rename from translated/tech/20180131 How to test Webhooks when youre developing locally.md rename to published/20180131 How to test Webhooks when youre developing locally.md From 6e41b272619e9502b801eae584483fdb0fc45cd3 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 11 Aug 2019 15:26:12 +0800 Subject: [PATCH 392/951] Translating by MjSeven --- ...190802 Use Postfix to get email from your Fedora system.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190802 Use Postfix to get email from your Fedora system.md b/sources/tech/20190802 Use Postfix to get email from your Fedora system.md index e9c4336a5b..0906a83a5e 100644 --- a/sources/tech/20190802 Use Postfix to get email from your Fedora system.md +++ b/sources/tech/20190802 Use Postfix to get email from your Fedora system.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -157,7 +157,7 @@ via: https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system 作者:[Gregory Bartholomew][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[MjSeven](https://github.com/MjSeven) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a68264cf30fe66d662105b22aded4bf1dac6e636 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 11 Aug 2019 20:43:40 +0800 Subject: [PATCH 393/951] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ix to get email from your Fedora system.md | 179 ------------------ ...ix to get email from your Fedora system.md | 170 +++++++++++++++++ 2 files changed, 170 insertions(+), 179 deletions(-) delete mode 100644 sources/tech/20190802 Use Postfix to get email from your Fedora system.md create mode 100644 translated/tech/20190802 Use Postfix to get email from your Fedora system.md diff --git a/sources/tech/20190802 Use Postfix to get email from your Fedora system.md b/sources/tech/20190802 Use Postfix to get email from your Fedora system.md deleted file mode 100644 index 0906a83a5e..0000000000 --- a/sources/tech/20190802 Use Postfix to get email from your Fedora system.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use Postfix to get email from your Fedora system) -[#]: via: (https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/) -[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) - -Use Postfix to get email from your Fedora system -====== - -![][1] - -Communication is key. Your computer might be trying to tell you something important. But if your mail transport agent ([MTA][2]) isn’t properly configured, you might not be getting the notifications. Postfix is a MTA [that’s easy to configure and known for a strong security record][3]. Follow these steps to ensure that email notifications sent from local services will get routed to your internet email account through the Postfix MTA. - -### Install packages - -Use _dnf_ to install the required packages ([you configured][4] _[sudo][4]_[, right?][4]): - -``` -$ sudo -i -# dnf install postfix mailx -``` - -If you previously had a different MTA configured, you may need to set Postfix to be the system default. Use the _alternatives_ command to set your system default MTA: - -``` -$ sudo alternatives --config mta -There are 2 programs which provide 'mta'. - Selection Command -*+ 1 /usr/sbin/sendmail.sendmail - 2 /usr/sbin/sendmail.postfix -Enter to keep the current selection[+], or type selection number: 2 -``` - -### Create a _password_maps_ file - -You will need to create a Postfix lookup table entry containing the email address and password of the account that you want to use to for sending email: - -``` -# MY_EMAIL_ADDRESS=glb@gmail.com -# MY_EMAIL_PASSWORD=abcdefghijklmnop -# MY_SMTP_SERVER=smtp.gmail.com -# MY_SMTP_SERVER_PORT=587 -# echo "[$MY_SMTP_SERVER]:$MY_SMTP_SERVER_PORT $MY_EMAIL_ADDRESS:$MY_EMAIL_PASSWORD" >> /etc/postfix/password_maps -# chmod 600 /etc/postfix/password_maps -# unset MY_EMAIL_PASSWORD -# history -c -``` - -If you are using a Gmail account, you’ll need to configure an “app password” for Postfix, rather than using your gmail password. See “[Sign in using App Passwords][5]” for instructions on configuring an app password. - -Next, you must run the _postmap_ command against the Postfix lookup table to create or update the hashed version of the file that Postfix actually uses: - -``` -# postmap /etc/postfix/password_maps -``` - -The hashed version will have the same file name but it will be suffixed with _.db_. - -### Update the _main.cf_ file - -Update Postfix’s _main.cf_ configuration file to reference the Postfix lookup table you just created. Edit the file and add these lines. - -``` -relayhost = smtp.gmail.com:587 -smtp_tls_security_level = verify -smtp_tls_mandatory_ciphers = high -smtp_tls_verify_cert_match = hostname -smtp_sasl_auth_enable = yes -smtp_sasl_security_options = noanonymous -smtp_sasl_password_maps = hash:/etc/postfix/password_maps -``` - -The example assumes you’re using Gmail for the _relayhost_ setting, but you can substitute the correct hostname and port for the mail host to which your system should hand off mail for sending. - -For the most up-to-date details about the above configuration options, see the man page: - -``` -$ man postconf.5 -``` - -### Enable, start, and test Postfix - -After you have updated the main.cf file, enable and start the Postfix service: - -``` -# systemctl enable --now postfix.service -``` - -You can then exit your _sudo_ session as root using the _exit_ command or **Ctrl+D**. You should now be able to test your configuration with the _mail_ command: - -``` -$ echo 'It worked!' | mail -s "Test: $(date)" glb@gmail.com -``` - -### Update services - -If you have services like [logwatch][6], [mdadm][7], [fail2ban][8], [apcupsd][9] or [certwatch][10] installed, you can now update their configurations so that their email notifications will go to your internet email address. - -Optionally, you may want to configure all email that is sent to your local system’s root account to go to your internet email address. Add this line to the _/etc/aliases_ file on your system (you’ll need to use _sudo_ to edit this file, or switch to the _root_ account first): - -``` -root: glb+root@gmail.com -``` - -Now run this command to re-read the aliases: - -``` -# newaliases -``` - - * TIP: If you are using Gmail, you can [add an alpha-numeric mark][11] between your username and the **@** symbol as demonstrated above to make it easier to identify and filter the email that you will receive from your computer(s). - - - -### Troubleshooting - -**View the mail queue:** - -``` -$ mailq -``` - -**Clear all email from the queues:** - -``` -# postsuper -d ALL -``` - -**Filter the configuration settings for interesting values:** - -``` -$ postconf | grep "^relayhost\|^smtp_" -``` - -**View the _postfix/smtp_ logs:** - -``` -$ journalctl --no-pager -t postfix/smtp -``` - -**Reload _postfix_ after making configuration changes:** - -``` -$ systemctl reload postfix -``` - -* * * - -_Photo by _[_Sharon McCutcheon_][12]_ on [Unsplash][13]_. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/ - -作者:[Gregory Bartholomew][a] -选题:[lujun9972][b] -译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/glb/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/postfix-816x345.jpg -[2]: https://en.wikipedia.org/wiki/Message_transfer_agent -[3]: https://en.wikipedia.org/wiki/Postfix_(software) -[4]: https://fedoramagazine.org/howto-use-sudo/ -[5]: https://support.google.com/accounts/answer/185833 -[6]: https://src.fedoraproject.org/rpms/logwatch -[7]: https://fedoramagazine.org/mirror-your-system-drive-using-software-raid/ -[8]: https://fedoraproject.org/wiki/Fail2ban_with_FirewallD -[9]: https://src.fedoraproject.org/rpms/apcupsd -[10]: https://www.linux.com/learn/automated-certificate-expiration-checks-centos -[11]: https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html -[12]: https://unsplash.com/@sharonmccutcheon?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[13]: https://unsplash.com/search/photos/envelopes?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/translated/tech/20190802 Use Postfix to get email from your Fedora system.md b/translated/tech/20190802 Use Postfix to get email from your Fedora system.md new file mode 100644 index 0000000000..b0438adb76 --- /dev/null +++ b/translated/tech/20190802 Use Postfix to get email from your Fedora system.md @@ -0,0 +1,170 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use Postfix to get email from your Fedora system) +[#]: via: (https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/) +[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) + +使用 Postfix 从 Fedora 系统中获取电子邮件 +====== + +![][1] + +交流是非常重要的。你的电脑可能正试图告诉你一些重要的事情。但是,如果你没有正确配置邮件传输代理([MTA][2]),那么你可能不会收到通知。Postfix 是一个[易于配置且以强大的安全记录而闻名][3]的 MTA。遵循以下步骤,以确保从本地服务发送的电子邮件通知将通过 Postfix MTA 路由到你的 Internet 电子邮件账户中。 + +### 安装软件包 + +使用 _dnf_ 来安装一些必须软件包([你应该配置了][4] _[sudo][4]_[,对吧?][4]): +``` +$ sudo -i +# dnf install postfix mailx +``` + +如果以前配置了不同的 MTA,那么你可能需要将 Postfix 设置为系统默认。使用 _alternatives_ 命令设置系统默认 MTA: + +``` +$ sudo alternatives --config mta +There are 2 programs which provide 'mta'. + Selection Command +*+ 1 /usr/sbin/sendmail.sendmail + 2 /usr/sbin/sendmail.postfix +Enter to keep the current selection[+], or type selection number: 2 +``` + +### 创建一个 _密码映射_ 文件 + +你需要创建一个 Postfix 查询表条目,其中包含你要用于发送电子邮件账户的地址和密码: + +``` +# MY_EMAIL_ADDRESS=glb@gmail.com +# MY_EMAIL_PASSWORD=abcdefghijklmnop +# MY_SMTP_SERVER=smtp.gmail.com +# MY_SMTP_SERVER_PORT=587 +# echo "[$MY_SMTP_SERVER]:$MY_SMTP_SERVER_PORT $MY_EMAIL_ADDRESS:$MY_EMAIL_PASSWORD" >> /etc/postfix/password_maps +# chmod 600 /etc/postfix/password_maps +# unset MY_EMAIL_PASSWORD +# history -c +``` + +如果你使用的是 Gmail 账户,那么你需要为 Postfix 配置一个“应用程序密码”而不是使用你的 Gmail 密码。有关配置应用程序密码的说明,参阅“[使用应用程序密码登录][5]”。 + +接下来,你必须对 Postfix 查询表运行 _postmap_ 命令,以创建或更新 Postfix 实际使用的文件的散列版本: +``` +# postmap /etc/postfix/password_maps +``` + +散列后的版本将具有相同的文件名,但后缀为 _.db_。 + +### 更新 _main.cf_ 文件 + +更新 Postfix 的 _main.cf_ 配置文件,以引用刚刚创建 Postfix 查询表。编辑文件并添加以下行: +``` +relayhost = smtp.gmail.com:587 +smtp_tls_security_level = verify +smtp_tls_mandatory_ciphers = high +smtp_tls_verify_cert_match = hostname +smtp_sasl_auth_enable = yes +smtp_sasl_security_options = noanonymous +smtp_sasl_password_maps = hash:/etc/postfix/password_maps +``` + +假设你使用 Gmail 作为 _relayhost_ 设置,但是你可以用正确的主机名和端口替换系统应该将邮件发送到的邮件主机。 + +有关上述配置选项的最新详细信息,参考 man 帮助: +``` +$ man postconf.5 +``` + +### 启用,启动和测试 Postfix + +更新 main.cf 文件后,启用并启动 Postfix 服务: +``` +# systemctl enable --now postfix.service +``` + +然后,你可以使用 _exit_ 命令或 **Ctrl+D** 以 root 身份退出 _sudo_ 会话。你现在应该能够使用 _mail_ 命令测试你的配置: + +``` +$ echo 'It worked!' | mail -s "Test: $(date)" glb@gmail.com +``` + +### 更新服务 + +如果你安装了像 [logwatch][6]、[mdadm][7]、[fail2ban][8]、[apcupsd][9] 或 [certwatch][10] 这样的服务,你现在可以更新它们的配置,以便它们的电子邮件通知转到你的 Internet 电子邮件地址。 + +另外,你可能希望将发送到本地系统 root 账户的所有电子邮件都转到 Internet 电子邮件地址中,将以下行添加到系统的 _/etc/alises_ 文件中(你需要使用 _sudo_ 编辑此文件,或首先切换到 _root_ 账户): +``` +root: glb+root@gmail.com +``` + +现在运行此命令重新读取别名: +``` +# newaliases +``` + + * 提示: 如果你使用的是 Gmail,那么你可以在用户名和 **@** 符号之间[添加字母数字标记][11],如上所示,以便更轻松地识别和过滤从计算机收到的电子邮件。 + + + +### 常用命令 + +**查看邮件队列** +``` +$ mailq +``` + +**清除队列中的所有电子邮件:** +``` +# postsuper -d ALL +``` + +**过滤设置,以获得感兴趣的值** + +``` +$ postconf | grep "^relayhost\|^smtp_" +``` + +**查看 _postfix/smtp_ 日志:** + +``` +$ journalctl --no-pager -t postfix/smtp +``` + +**进行配置更改后重新加载 _postfix_:** + +``` +$ systemctl reload postfix +``` + +* * * + +_照片由 _[_Sharon McCutcheon_][12]_ 在 [Unsplash][13] 提供_。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/ + +作者:[Gregory Bartholomew][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/glb/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/postfix-816x345.jpg +[2]: https://en.wikipedia.org/wiki/Message_transfer_agent +[3]: https://en.wikipedia.org/wiki/Postfix_(software) +[4]: https://fedoramagazine.org/howto-use-sudo/ +[5]: https://support.google.com/accounts/answer/185833 +[6]: https://src.fedoraproject.org/rpms/logwatch +[7]: https://fedoramagazine.org/mirror-your-system-drive-using-software-raid/ +[8]: https://fedoraproject.org/wiki/Fail2ban_with_FirewallD +[9]: https://src.fedoraproject.org/rpms/apcupsd +[10]: https://www.linux.com/learn/automated-certificate-expiration-checks-centos +[11]: https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html +[12]: https://unsplash.com/@sharonmccutcheon?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[13]: https://unsplash.com/search/photos/envelopes?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText From 6bef6fbb10075cefa86f02fa55ff10ec411ff103 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 11 Aug 2019 22:43:44 +0800 Subject: [PATCH 394/951] Translating by MjSeven --- ...7 How To Check Linux Package Version Before Installing It.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190617 How To Check Linux Package Version Before Installing It.md b/sources/tech/20190617 How To Check Linux Package Version Before Installing It.md index 0ce1a510ac..a8848cf5d9 100644 --- a/sources/tech/20190617 How To Check Linux Package Version Before Installing It.md +++ b/sources/tech/20190617 How To Check Linux Package Version Before Installing It.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 95859edc818c67b27595586e63aa7a1fc9e9b1f6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 08:00:37 +0800 Subject: [PATCH 395/951] PRF @0x996 --- ...- Sysadmins vs. natural disasters - HPE.md | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md b/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md index b6d44132d4..c582a3bd3f 100644 --- a/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md +++ b/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md @@ -1,13 +1,13 @@ -IT 灾备:系统管理员对抗自然灾害 | HPE +IT 灾备:系统管理员对抗自然灾害 ====== ![](https://www.hpe.com/content/dam/hpe/insights/articles/2017/11/it-disaster-recovery-sysadmins-vs-natural-disasters/featuredStory/Sysadmins-vs-natural-disasters-1740.jpg.transform/nxt-1043x496-crop/image.jpeg) -面对倾泻的洪水或地震时业务需要继续运转。在飓风卡特里娜、桑迪和其他灾难中幸存下来的系统管理员向在紧急状况下负责 IT 的人们分享真实世界中的建议。 +> 面对倾泻的洪水或地震时业务需要继续运转。在飓风卡特里娜、桑迪和其他灾难中幸存下来的系统管理员向在紧急状况下负责 IT 的人们分享真实世界中的建议。 -说到自然灾害,2017 年可算是多灾多难。飓风哈维,厄玛和玛莉亚给休斯顿,波多黎各,弗罗里达和加勒比造成了严重破坏。此外,西部的野火将多处住宅和商业建筑付之一炬。 +说到自然灾害,2017 年可算是多灾多难。(LCTT 译注:本文发表于 2017 年)飓风哈维、厄玛和玛莉亚给休斯顿、波多黎各、弗罗里达和加勒比造成了严重破坏。此外,西部的野火将多处住宅和商业建筑付之一炬。 -再来一篇关于[有备无患][1]的警示文章——当然其中都是好的建议——是很简单的,但这无法帮助网络管理员应对湿漉漉的烂摊子。那些善意的建议中大多数都假定掌权的人乐于投入资金来实施这些建议。 +再来一篇关于[有备无患][1]的警示文章 —— 当然其中都是好的建议 —— 是很简单的,但这无法帮助网络管理员应对湿漉漉的烂摊子。那些善意的建议中大多数都假定掌权的人乐于投入资金来实施这些建议。 我们对真实世界更感兴趣。不如让我们来充分利用这些坏消息。 @@ -23,21 +23,21 @@ IT 灾备:系统管理员对抗自然灾害 | HPE 当灯光忽明忽暗,狂风象火车机车一样怒号时,就该启动你的业务持续计划和灾备计划了。 -有太多的系统管理员报告当暴风雨来临时这两个计划中一个也没有。这并不令人惊讶。2014 年[灾备预备状态委员会Disaster Recovery Preparedness Council][6]发现[世界范围内被调查的公司中有 73% 没有足够的灾备计划][7]。 +有太多的系统管理员报告当暴风雨来临时这两个计划中一个也没有。这并不令人惊讶。2014 年[灾备预备状态委员会][6]Disaster Recovery Preparedness Council发现[世界范围内被调查的公司中有 73% 没有足够的灾备计划][7]。 -“足够”是关键词。正如一个系统管理员2016年在 Reddit 上写的那样,“[我们的灾备计划就是一场灾难。][8]我们所有的数据都备份在离这里大约 30 英里的一个存储区域网络SAN。我们没有将数据重新上线的硬件,甚至好几天过去了都没能让核心服务器启动运行起来。我们是个年营收 40 亿美元的公司,却不愿为适当的设备投入几十万美元,或是在数据中心添置几台服务器。当添置硬件的提案被提出的时候,我们的管理层说,‘嗐,碰到这种事情的机会能有多大呢’。” +“**足够**”是关键词。正如一个系统管理员 2016 年在 Reddit 上写的那样,“[我们的灾备计划就是一场灾难。][8]我们所有的数据都备份在离这里大约 30 英里的一个存储区域网络SAN。我们没有将数据重新上线的硬件,甚至好几天过去了都没能让核心服务器启动运行起来。我们是个年营收 40 亿美元的公司,却不愿为适当的设备投入几十万美元,或是在数据中心添置几台服务器。当添置硬件的提案被提出的时候,我们的管理层说,‘嗐,碰到这种事情的机会能有多大呢’。” 同一个帖子中另一个人说得更简洁:“眼下我的灾备计划只能在黑暗潮湿的角落里哭泣,但愿没人在乎损失的任何东西。” 如果你在哭泣,但愿你至少不是独自流泪。任何灾备计划,即便是 IT 部门制订的灾备计划,必须确定[你能跟别人通讯][10],如同系统管理员 Jim Thompson 从卡特里娜飓风中得到的教训:“确保你有一个与人们通讯的计划。在一场严重的区域性灾难期间,你将无法给身处灾区的任何人打电话。” -有一个选择可能会让有技术头脑的人感兴趣:[业余电台ham radio][11]。[它在波多黎各发挥了巨大作用][12]。 +有一个选择可能会让有技术头脑的人感兴趣:[业余电台][11]ham radio。[它在波多黎各发挥了巨大作用][12]。 ### 列一个愿望清单 第一步是承认问题。“许多公司实际上对灾备计划不感兴趣,或是消极对待”,[Micro Focus][14] 的首席架构师 [Joshua Focus][13] 说。“将灾备看作业务持续性的一个方面是种不同的视角。所有公司都要应对业务持续性,所以灾备应被视为业务持续性的一部分。” -IT 部门需要将其需求书面化以确保适当的灾备和业务持续性计划。即使是你不知道如何着手,或尤其是这种时候,也是如此。正如一个系统管理员所言,“我喜欢有一个‘想法转储’,让所有计划,点子,改进措施毫无保留地提出来。[这][对一类情况尤其有帮助,即当你提议变更][15],并付诸实施,接着 6 个月之后你警告过的状况就要来临。”现在你做好了一切准备并且可以开始讨论:“如同我们之前在 4 月讨论过的那样……” +IT 部门需要将其需求书面化以确保适当的灾备和业务持续性计划。即使是你不知道如何着手,或尤其是这种时候,也是如此。正如一个系统管理员所言,“我喜欢有一个‘想法转储’,让所有计划、点子、改进措施毫无保留地提出来。(这)[对一类情况尤其有帮助,即当你提议变更][15],并付诸实施,接着 6 个月之后你警告过的状况就要来临。”现在你做好了一切准备并且可以开始讨论:“如同我们之前在 4 月讨论过的那样……” 因此,当你的管理层对业务持续性计划回应道“嗐,碰到这种事的机会能有多大呢?”的时候你能做些什么呢?有个系统管理员称这也完全是管理层的正常行为。在这种糟糕的处境下,老练的系统管理员建议用书面形式把这些事情记录下来。记录应清楚表明你告知管理层需要采取的措施,且[他们拒绝采纳建议][16]。“总的来说就是有足够的书面材料能让他们搓成一根绳子上吊,”该系统管理员补充道。 @@ -47,13 +47,13 @@ IT 部门需要将其需求书面化以确保适当的灾备和业务持续性 “[我们的办公室是幢摇摇欲坠的建筑][18],”飓风哈维重创休斯顿之后有个系统管理员提到。“我们盲目地进入那幢建筑,现场的基础设施糟透了。正是我们给那幢建筑里带去了最不想要的一滴水,现在基础设施整个都沉在水下了。” -尽管如此,如果你想让数据中心继续运转——或在暴风雨过后恢复运转——你需要确保该场所不仅能经受住你所在地区那些意料中的灾难,而且能经受住那些意料之外的灾难。一个旧金山的系统管理员知道为什么重要的是确保公司的服务器安置在可以承受里氏 7 级地震的建筑内。一家圣路易斯的公司知道如何应对龙卷风。但你应当为所有可能发生的事情做好准备:加州的龙卷风,密苏里州的地震,或[僵尸末日][19](给你在 IT 预算里增加一把链锯提供了充分理由)。 +尽管如此,如果你想让数据中心继续运转——或在暴风雨过后恢复运转 —— 你需要确保该场所不仅能经受住你所在地区那些意料中的灾难,而且能经受住那些意料之外的灾难。一个旧金山的系统管理员知道为什么重要的是确保公司的服务器安置在可以承受里氏 7 级地震的建筑内。一家圣路易斯的公司知道如何应对龙卷风。但你应当为所有可能发生的事情做好准备:加州的龙卷风、密苏里州的地震,或[僵尸末日][19](给你在 IT 预算里增加一把链锯提供了充分理由)。 在休斯顿的情况下,[多数数据中心保持运转][20],因为它们是按照抵御暴风雨和洪水的标准建造的。[Data Foundry][21] 的首席技术官 Edward Henigin 说他们公司的数据中心之一,“专门建造的休斯顿 2 号的设计能抵御 5 级飓风的风速。这个场所的公共供电没有中断,我们得以避免切换到后备发电机。” -那是好消息。坏消息是伴随着超级飓风桑迪于2012年登场,如果[你的数据中心没准备好应对洪水][22],你会陷入一个麻烦不断的世界。一个不能正常运转的数据中心 [Datagram][23] 服务的客户包括 Gawker,Gizmodo 和 Buzzfeed 等知名网站。 +那是好消息。坏消息是伴随着超级飓风桑迪于 2012 年登场,如果[你的数据中心没准备好应对洪水][22],你会陷入一个麻烦不断的世界。一个不能正常运转的数据中心 [Datagram][23] 服务的客户包括 Gawker、Gizmodo 和 Buzzfeed 等知名网站。 -当然,有时候你什么也做不了。正如某个波多黎各圣胡安的系统管理员在飓风厄玛扫过后悲伤地写到,“发电机没油了。服务器机房靠电池在运转但是没有[空调]。[永别了,服务器][24]。”由于 MPLSMultiprotocol Lable Switching 线路亦中断,该系统管理员没法切换到灾备措施:“多么充实的一天。” +当然,有时候你什么也做不了。正如某个波多黎各圣胡安的系统管理员在飓风厄玛扫过后悲伤地写到,“发电机没油了。服务器机房靠电池在运转但是没有(空调)。[永别了,服务器][24]。”由于 MPLSMultiprotocol Lable Switching 线路亦中断,该系统管理员没法切换到灾备措施:“多么充实的一天。” 总而言之,IT 专业人士需要了解他们所处的地区,了解他们面临的风险并将他们的服务器安置在能抵御当地自然灾害的数据中心内。 @@ -73,37 +73,37 @@ IT 部门需要将其需求书面化以确保适当的灾备和业务持续性 某个系统管理员挖苦式的计划是什么呢?“趁 UPS 完蛋之前把你能关的机器关掉,不能关的就让它崩溃咯。然后,[喝个痛快直到供电恢复][28]。” -在 2016 年德尔塔和西南航空停电事故之后,IT 员工驱动的一个更加严肃的计划是由一个有管理的服务供应商为其客户[部署不间断电源][29]:“对于至关重要的部分,在供电中断时我们结合使用简单网络管理协议SNMP信令和 PowerChute 网络关机PowerChute Nrework Shutdown客户端来关闭设备。至于重新开机,那取决于客户。有些是自动启动,有些则需要人工干预。” +在 2016 年德尔塔和西南航空停电事故之后,IT 员工推动的一个更加严肃的计划是由一个有管理的服务供应商为其客户[部署不间断电源][29]:“对于至关重要的部分,在供电中断时我们结合使用简单网络管理协议SNMP信令和 PowerChute 网络关机PowerChute Nrework Shutdown客户端来关闭设备。至于重新开机,那取决于客户。有些是自动启动,有些则需要人工干预。” 另一种做法是用来自两个供电所的供电线路支持数据中心。例如,[西雅图威斯汀大厦数据中心][30]有来自不同供电所的多路 13.4 千伏供电线路,以及多个 480 伏三相变电箱。 预防严重断电的系统不是“通用的”设备。系统管理员应当[为数据中心请求一台定制的柴油发电机][31]。除了按你特定的需求调整,发电机必须能迅速跳至全速运转并承载全部电力负荷而不致影响系统负载性能。” -这些发电机也必须加以保护。例如,将你的发电机安置在泛洪区的一楼就不是个聪明的主意。位于纽约百老街Broad street的数据中心在超级飓风桑迪期间就是类似情形,备用发电机的燃料油桶在地下室——并且被水淹了。尽管一场[“人力接龙”用容量 5 加仑的水桶将柴油输送到 17 段楼梯之上的发电机][32]使 [Peer 1 Hosting][33] 得以继续运营,这不是一个切实可行的业务持续计划。 +这些发电机也必须加以保护。例如,将你的发电机安置在泛洪区的一楼就不是个聪明的主意。位于纽约百老街Broad street的数据中心在超级飓风桑迪期间就是类似情形,备用发电机的燃料油桶在地下室 —— 并且被水淹了。尽管一场[“人力接龙”用容量 5 加仑的水桶将柴油输送到 17 段楼梯之上的发电机][32]使 [Peer 1 Hosting][33] 得以继续运营,但这不是一个切实可行的业务持续计划。 -正如多数数据中心专家所知那样,如果你有时间——假设一个飓风离你有一天的距离——确保你的发电机正常工作,加满油,准备好当供电线路被刮断时立即开启,不管怎样你之前应当每月测试你的发电机。你之前是那么做的,是吧?是就好! +正如多数数据中心专家所知那样,如果你有时间 —— 假设一个飓风离你有一天的距离 —— 确保你的发电机正常工作,加满油,准备好当供电线路被刮断时立即开启,不管怎样你之前应当每月测试你的发电机。你之前是那么做的,是吧?是就好! ### 测试你对备份的信心 普通用户几乎从不备份,检查备份是否实际完好的就更少了。系统管理员对此更加了解。 -有些 [IT 部门在寻求将他们的备份迁移到云端][34]。但有些系统管理员仍对此不买账——他们有很好的理由。最近有人报告,“在用了整整 5 天[从亚马逊 Glacier 恢复了 [400 GB] 数据][35]之后,我欠了亚马逊将近 200 美元的传输费,并且[我还是]处于未完全恢复状态,还差大约 100 GB 文件。 +有些 [IT 部门在寻求将他们的备份迁移到云端][34]。但有些系统管理员仍对此不买账 —— 他们有很好的理由。最近有人报告,“在用了整整 5 天[从亚马逊 Glacier 恢复了(400 GB)数据][35]之后,我欠了亚马逊将近 200 美元的传输费,并且(我还是)处于未完全恢复状态,还差大约 100 GB 文件。” 结果是有些系统管理员依然喜欢磁带备份。磁带肯定不够时髦,但正如操作系统专家 Andrew S. Tanenbaum 说的那样,“[永远不要低估一辆装满磁带在高速上飞驰的旅行车的带宽][36]。” -目前每盘磁带可以存储 10 TB 数据;有的进行中的实验可在磁带上存储高达 200 TB 数据。诸如[线性磁带文件系统Linear Tape File System][37]之类的技术允许你象访问网络硬盘一样读取磁带数据。 +目前每盘磁带可以存储 10 TB 数据;有的进行中的实验可在磁带上存储高达 200 TB 数据。诸如[线性磁带文件系统][37]Linear Tape File System之类的技术允许你象访问网络硬盘一样读取磁带数据。 -然而对许多人而言,磁带[绝对是最后选择的手段][38]。没关系,因为备份应该有大量的可选方案。在这种情况下,一个系统管理员说到,“故障时我们会用这些方法(恢复备份):[Windows] 服务器层面的 VSS [Volume Shadow Storage] 快照,存储区域网络SAN层面的卷快照,以及存储区域网络层面的异地归档快照。但是万一有什么事情发生并摧毁了我们的虚拟机,存储区域网络和备份存储区域网络,我们还是可以取回磁带并恢复数据。” +然而对许多人而言,磁带[绝对是最后选择的手段][38]。没关系,因为备份应该有大量的可选方案。在这种情况下,一个系统管理员说到,“故障时我们会用这些方法(恢复备份):(Windows)服务器层面的 VSS (Volume Shadow Storage)快照,存储区域网络SAN层面的卷快照,以及存储区域网络层面的异地归档快照。但是万一有什么事情发生并摧毁了我们的虚拟机,存储区域网络和备份存储区域网络,我们还是可以取回磁带并恢复数据。” 当麻烦即将到来时,可使用副本工具如 [Veeam][39],它会为你的服务器创建一个虚拟机副本。若出现故障,副本会自动启动。没有麻烦,没有手忙脚乱,正如某个系统管理员在这个流行的系统管理员帖子中所说,“[我爱你 Veeam][40]。” ### 网络?什么网络? -当然,如果员工们无法触及他们的服务,没有任何云,colo 和远程数据中心能帮到你。你不需要一场自然灾害来证明冗余互联网连接的正确性。只需要一台挖断线路的挖掘机或断掉的光缆就能让你在工作中渡过糟糕的一天。 +当然,如果员工们无法触及他们的服务,没有任何云、colo 和远程数据中心能帮到你。你不需要一场自然灾害来证明冗余互联网连接的正确性。只需要一台挖断线路的挖掘机或断掉的光缆就能让你在工作中渡过糟糕的一天。 “理想状态下”,某个系统管理员明智地观察到,“你应该有[两路互联网接入线路连接到有独立基础设施的两个 ISP][41]。例如,你不希望两个 ISP 都依赖于同一根光缆。你也不希望采用两家本地 ISP,并发现他们的上行带宽都依赖于同一家骨干网运营商。” -聪明的系统管理员知道他们公司的互联网接入线路[必须是商业级别的,带有服务等级协议service-level agreement(SLA)][43],其中包含“修复时间”条款。或者更好的是采用互联网接入专线dedicated Internet access。技术上这与任何其他互联网接入方式没有区别。区别在于互联网接入专线不是一种“尽力而为”的接入方式,而是你会得到明确规定的专供你使用的带宽并附有服务等级协议。这种专线不便宜,但正如一句格言所说的那样,“速度,可靠性,便宜,只能挑两个。”当你的业务跑在这条线路上并且一场暴风雨即将来袭,“可靠性”必须是你挑的两个之一。 +聪明的系统管理员知道他们公司的互联网接入线路[必须是商业级别的][43],带有服务等级协议service-level agreement(SLA),其中包含“修复时间”条款。或者更好的是采用互联网接入专线dedicated Internet access。技术上这与任何其他互联网接入方式没有区别。区别在于互联网接入专线不是一种“尽力而为”的接入方式,而是你会得到明确规定的专供你使用的带宽并附有服务等级协议。这种专线不便宜,但正如一句格言所说的那样,“速度、可靠性、便宜,只能挑两个。”当你的业务跑在这条线路上并且一场暴风雨即将来袭,“可靠性”必须是你挑的两个之一。 ### 晴空重现之时 @@ -113,7 +113,7 @@ IT 部门需要将其需求书面化以确保适当的灾备和业务持续性 * 你的 IT 员工得说多少次:不要仅仅备份,还得测试备份? * 没电就没公司。确保你的服务器有足够的应急电源来满足业务需要,并确保它们能正常工作。 - * 如果你的公司在一场自然灾害中幸存下来——或者避开了灾害——明智的系统管理员知道这就是向管理层申请被他们推迟的灾备预算的时候了。因为下次你就未必有这么幸运了。 + * 如果你的公司在一场自然灾害中幸存下来,或者避开了灾害,明智的系统管理员知道这就是向管理层申请被他们推迟的灾备预算的时候了。因为下次你就未必有这么幸运了。 -------------------------------------------------------------------------------- @@ -121,8 +121,8 @@ IT 部门需要将其需求书面化以确保适当的灾备和业务持续性 via: https://www.hpe.com/us/en/insights/articles/it-disaster-recovery-sysadmins-vs-natural-disasters-1711.html 作者:[Steven-J-Vaughan-Nichols][a] -译者:[译者ID](https://github.com/0x996) -校对:[校对者ID](https://github.com/校对者ID) +译者:[0x996](https://github.com/0x996) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a17f0c5aa6e111abf52c9ecd8e2881fd379576d5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 08:00:58 +0800 Subject: [PATCH 396/951] PUB @0x996 https://linux.cn/article-11214-1.html --- ...IT disaster recovery- Sysadmins vs. natural disasters - HPE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md (100%) diff --git a/translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md b/published/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md similarity index 100% rename from translated/tech/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md rename to published/20171113 IT disaster recovery- Sysadmins vs. natural disasters - HPE.md From 0b18a96b52ddfd83cebe4bd71e16adae2ccfbdf6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 08:37:07 +0800 Subject: [PATCH 397/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @furrybear 恭喜你完成了第一篇翻译! --- ... How to create a pull request in GitHub.md | 56 +++++++++---------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/translated/tech/20190730 How to create a pull request in GitHub.md b/translated/tech/20190730 How to create a pull request in GitHub.md index 56bebaa9ae..e99dea288f 100755 --- a/translated/tech/20190730 How to create a pull request in GitHub.md +++ b/translated/tech/20190730 How to create a pull request in GitHub.md @@ -5,57 +5,54 @@ [#]: url: " " [#]: subject: "How to create a pull request in GitHub" [#]: via: "https://opensource.com/article/19/7/create-pull-request-github" -[#]: author: "Kedar Vijay Kulkarni https://opensource.com/users/kkulkarnhttps://opensource.com/users/fontanahttps://opensource.com/users/mhanwellhttps://opensource.com/users/mysentimentshttps://opensource.com/users/greg-p" +[#]: author: "Kedar Vijay Kulkarni https://opensource.com/users/kkulkarn" - - -如何在Github上创建一个拉取请求 +如何在 Github 上创建一个拉取请求 ====== -学习如何复刻一个仓库,进行更改,并要求维护人员审查并合并它 + +> 学习如何复刻一个仓库,进行更改,并要求维护人员审查并合并它。 ![a checklist for a team][1] -所以,你知道如何使用 git。 你有一个 [GitHub][2] 仓库并且可以向它推送。这 一切都很好。 但是你如何为他人的 GitHub 项目做出贡献? 这是我在学习 git 和 GitHub 之后想知道的。在本文中,我将解释如何复刻一个 git 仓库、进行更改并提交一个拉取请求。 +你知道如何使用 git 了,你有一个 [GitHub][2] 仓库并且可以向它推送。这一切都很好。但是你如何为他人的 GitHub 项目做出贡献? 这是我在学习 git 和 GitHub 之后想知道的。在本文中,我将解释如何复刻fork一个 git 仓库、进行更改并提交一个拉取请求pull request。 当你想要在一个 GitHub 项目上工作时,第一步是复刻一个仓库。 ![Forking a GitHub repo][3] -你可以使用[我的演示仓库][4]试一试. - -一旦在这个页面,单击右上角的 Fork (复刻)按钮。这将在你的GitHub用户账户下创建我的演示仓库的一个新副本,其统一资源定位符如下: +你可以使用[我的演示仓库][4]试一试。 +当你在这个页面时,单击右上角的 “Fork”(复刻)按钮。这将在你的 GitHub 用户账户下创建我的演示仓库的一个新副本,其 URL 如下: ``` -`https://github.com/<你的用户名>/demo` +https://github.com/<你的用户名>/demo ``` -这个副本包含了原始仓库中的所有代码,分支和提交。 - -接下来,打开你计算机上的终端并运行命令来克隆仓库: +这个副本包含了原始仓库中的所有代码、分支和提交。 +接下来,打开你计算机上的终端并运行命令来克隆clone仓库: ``` -`git clone https://github.com/<你的用户名>/demo` +git clone https://github.com/<你的用户名>/demo ``` 一旦仓库被克隆后,你需要做两件事: - 1. 通过发出命令创建一个新分支 `new_branch` : +1、通过发出命令创建一个新分支 `new_branch` : ``` -`git checkout -b new_branch` +git checkout -b new_branch ``` - 2. 使用以下命令为上游仓库创建一个新的远程( remote ): +2、使用以下命令为上游仓库创建一个新的远程remote: ``` -`git remote add upstream https://github.com/kedark3/demo` +git remote add upstream https://github.com/kedark3/demo ``` 在这种情况下,“上游仓库”指的是你创建复刻来自的原始仓库。 -现在你可以更改代码了。 以下代码创建一个新分支,进行任意更改,并将其推送到 **new_branch** 分支: +现在你可以更改代码了。以下代码创建一个新分支,进行任意更改,并将其推送到 `new_branch` 分支: ``` $ git checkout -b new_branch @@ -86,7 +83,7 @@ Remote:  * [new branch]         new_branch -> new_branch ``` -一旦你将更改推送到您的仓库后, **Compare & pull request(比较和拉取请求)** 按钮将出现在GitHub。 +一旦你将更改推送到您的仓库后, “Compare & pull request”(比较和拉取请求)按钮将出现在GitHub。 ![GitHub's Compare & Pull Request button][5] @@ -94,36 +91,33 @@ Remote: ![GitHub's Open pull request button][6] -单击 **Create pull request(创建拉取请求)** 按钮打开一个拉取请求。 这允许仓库的维护者们审查你的贡献。 从这个页面,如果你的贡献是好的,他们可以合并它,或者他们可能会要求你做一些改变。 +单击 “Create pull request”(创建拉取请求)按钮打开一个拉取请求。这将允许仓库的维护者们审查你的贡献。然后,如果你的贡献是没问题的,他们可以合并它,或者他们可能会要求你做一些改变。 -### 太长,别看 +### 精简版 总之,如果您想为一个项目做出贡献,最简单的方法是: + 1. 找到您想要贡献的项目 2. 复刻它 3. 将其克隆到你的本地系统 4. 建立一个新的分支 5. 进行你的更改 6. 将其推送回你的仓库 - 7. 单击**Compare & pull request(比较和拉取请求)**按钮 - 8. 单击**Create pull request(创建拉取请求)**以打开一个新的拉取请求 + 7. 单击 “Compare & pull request”(比较和拉取请求)按钮 + 8. 单击 “Create pull request”(创建拉取请求)以打开一个新的拉取请求 -如果审阅者要求更改,请重复步骤5和6,为你的拉取请求添加更多提交。 +如果审阅者要求更改,请重复步骤 5 和 6,为你的拉取请求添加更多提交。 快乐编码! -在之前的一篇文章中,我讨论了在...期间针对GitHub的投诉。 - -Arfon Smith在GitHub工作,并在开放的十字路口参与了许多活动...... - -------------------------------------------------------------------------------- via: https://opensource.com/article/19/7/create-pull-request-github 作者:[Kedar Vijay Kulkarni][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[furrybear](https://github.com/furrybear) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ee814c61508dfe433338147a7c086bba3c6a68cf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 08:38:32 +0800 Subject: [PATCH 398/951] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @furrybear 本文首发地址: https://linux.cn/article-11215-1.html 您的 LCTT 专页地址: https://linux.cn/lctt/furrybear 请注册领取 LCCN:https://lctt.linux.cn/ --- .../20190730 How to create a pull request in GitHub.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190730 How to create a pull request in GitHub.md (98%) diff --git a/translated/tech/20190730 How to create a pull request in GitHub.md b/published/20190730 How to create a pull request in GitHub.md similarity index 98% rename from translated/tech/20190730 How to create a pull request in GitHub.md rename to published/20190730 How to create a pull request in GitHub.md index e99dea288f..b92280d6a0 100755 --- a/translated/tech/20190730 How to create a pull request in GitHub.md +++ b/published/20190730 How to create a pull request in GitHub.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "furrybear" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-11215-1.html" [#]: subject: "How to create a pull request in GitHub" [#]: via: "https://opensource.com/article/19/7/create-pull-request-github" [#]: author: "Kedar Vijay Kulkarni https://opensource.com/users/kkulkarn" From 08545c26b5ab1d0a50de542fe2543d534fa5ee8e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 08:46:02 +0800 Subject: [PATCH 399/951] APL --- ...0809 Use a drop-down terminal for fast commands in Fedora.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md b/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md index 8a26e90cfe..7158e9cffc 100644 --- a/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md +++ b/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9bf4b80243991076b64905f1cd88a7535e1d6391 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 12 Aug 2019 09:01:13 +0800 Subject: [PATCH 400/951] translated --- ...o Set Up Time Synchronization On Ubuntu.md | 89 ++++++++++--------- 1 file changed, 45 insertions(+), 44 deletions(-) rename {sources => translated}/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md (51%) diff --git a/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md b/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md similarity index 51% rename from sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md rename to translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md index 38527f87dd..c1261fd19f 100644 --- a/sources/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md +++ b/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md @@ -7,45 +7,46 @@ [#]: via: (https://www.ostechnix.com/how-to-set-up-time-synchronization-on-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) -How To Set Up Time Synchronization On Ubuntu +如何在 Ubuntu 上设置时间同步 ====== ![Set Up Time Synchronization On Ubuntu][1] -You might have set up [**cron jobs**][2] that runs at a specific time to backup important files or perform any system related tasks. Or, you might have configured a [**log server to rotate the logs**][3] out of your system at regular interval time. If your clock is out-of-sync, these jobs will not execute at the desired time. This is why setting up a correct time zone on the Linux systems and keep the clock synchronized with Internet is important. This guide describes how to set up time synchronization on Ubuntu Linux. The steps given below have been tested on Ubuntu 18.04, however they are same for other Ubuntu-based systems that uses systemd’s **timesyncd** service. +你可能设置过 [**cron 任务**][2] 来在特定时间备份重要文件或执行系统相关任务。也许你配置了一个[**日志服务**][3]在特定时间间隔轮转日志。如果你的时钟不同步,这些任务将无法按时执行。这就是要在 Linux 系统上设置正确的时区并保持时钟与 Internet 同步的原因。本指南介绍如何在 Ubuntu Linux 上设置时间同步。下面的步骤已经在 Ubuntu 18.04 上进行了测试,但是对于使用 systemd 的 **timesyncd** 服务的其他基于 Ubuntu 的系统它们是相同的。 -### Set Up Time Synchronization On Ubuntu -Usually, we set time zone during installation. You can however change it or set different time zone if you want to. +### 在 Ubuntu 上设置时间同步 -First, let us see the current time zone in our Ubuntu system using “date” command: +通常,我们在安装时设置时区。但是,你可以根据需要更改或设置不同的时区。 + +首先,让我们使用 “date” 命令查看 Ubuntu 系统中的当前时区: ``` $ date ``` -Sample output: +示例输出: ``` Tue Jul 30 11:47:39 UTC 2019 ``` -As you see in the above output, the “date” command shows the actual date as well as the current time. Here, my current time zone is **UTC** which stands for **Coordinated Universal Time**. +如上所见,“date” 命令显示实际日期和当前时间。这里,我当前的时区是 **UTC**,代表**协调世界时**。 -Alternatively, you can look up the **/etc/timezone** file to find the current time zone. +或者,你可以在 **/etc/timezone** 文件中查找当前时区。 ``` $ cat /etc/timezone UTC ``` -Now, let us see if the clock is synchronized with Internet. To do so, simply run: +现在,让我们看看时钟是否与 Internet 同步。只需运行: ``` $ timedatectl ``` -Sample output: +示例输出: ``` Local time: Tue 2019-07-30 11:53:58 UTC @@ -57,23 +58,23 @@ systemd-timesyncd.service active: yes RTC in local TZ: no ``` -As you can see, the “timedatectl” command displays the local time, universal time, time zone and whether the system clock is synchronized with Internet servers and if the **systemd-timesyncd.service** is active or inactive. In my case, the system clock is synchronizing with Internet time servers. +如你所见,“timedatectl” 命令显示本地时间、世界时、时区以及系统时钟是否与 Internet 服务器同步,以及 **systemd-timesyncd.service** 是处于活动状态还是非活动状态。就我而言,系统时钟已与 Internet 时间服务器同步。 -If the clock is out-of-sync, you would see **“System clock synchronized: no”** as shown in the below screenshot. +如果时钟不同步,你会看到下面截图中显示的 **“System clock synchronized: no”**。 ![][4] -Time synchronization is disabled. +时间同步已禁用。 -Note: The above screenshot is old one. That’s why you see the different date. +注意:上面的截图是旧截图。这就是你看到不同日期的原因。 -If you see **“System clock synchronized:** value set as **no** , the timesyncd service might be inactive. So, simply restart the service and see if it helps. +如果你看到 **“System clock synchronized:** 值设置为 **no**,那么 timeyncd 服务可能处于非活动状态。因此,只需重启服务并看下是否正常。 ``` $ sudo systemctl restart systemd-timesyncd.service ``` -Now check the timesyncd service status: +现在检查 timesyncd 服务状态: ``` $ sudo systemctl status systemd-timesyncd.service @@ -99,50 +100,50 @@ Jul 30 10:50:35 ubuntuserver systemd-timesyncd[498]: Network configuration chang Jul 30 10:51:06 ubuntuserver systemd-timesyncd[498]: Synchronized to time server [2001:67c:1560:800 ``` -If this service is enabled and active, your system clock should sync with Internet time servers. +如果此服务已启用并处于活动状态,那么系统时钟应与 Internet 时间服务器同步。 -You can verify if the time synchronization is enabled or not using command: +你可以使用命令验证是否启用了时间同步: ``` $ timedatectl ``` -If it still not works, run the following command to enable the time synchronization: +如果仍然不起作用,请运行以下命令以启用时间同步: ``` $ sudo timedatectl set-ntp true ``` -Now your system clock will synchronize with Internet time servers. +现在,你的系统时钟将与 Internet 时间服务器同步。 -##### Change time zone using Timedatectl command +##### 使用 timedatectl 命令更改时区 -What if I want to use different time zone other than UTC? It is easy! +如果我想使用 UTC 以外的其他时区怎么办?这很容易! -First, list of available time zones using command: +首先,使用命令列出可用时区: ``` $ timedatectl list-timezones ``` -You will see an output similar to below image. +你将看到类似于下图的输出。 ![][5] -List time zones using timedatectl command +使用 timedatectl 命令列出时区 -You can set the desired time zone(E.g. Asia/Kolkata) using command: +你可以使用以下命令设置所需的时区(例如,Asia/Kolkata): ``` $ sudo timedatectl set-timezone Asia/Kolkata ``` -Check again if the time zone has been really changed using “date” command: +使用 “date” 命令再次检查时区是否已真正更改: **$ date** Tue Jul 30 17:52:33 **IST** 2019 -Or, use timedatectl command if you want the detailed output: +或者,如果需要详细输出,请使用 timedatectl 命令: ``` $ timedatectl @@ -155,31 +156,31 @@ systemd-timesyncd.service active: yes RTC in local TZ: no ``` -As you noticed, I have changed the time zone from UTC to IST (Indian standard time). +如你所见,我已将时区从 UTC 更改为 IST(印度标准时间)。 -To switch back to UTC time zone, simply run: +要切换回 UTC 时区,只需运行: ``` $ sudo timedatectl set-timezone UTC ``` -##### Change time zone using Tzdata +##### 使用 tzdata 更改时区 -In older Ubuntu versions, the Timedatectl command is not available. In such cases, you can use **Tzdata** (Time zone data) to set up time synchronization. +在较旧的 Ubuntu 版本中,没有 timedatectl 命令。这种情况下,你可以使用 **tzdata**(Time zone data)来设置时间同步。 ``` $ sudo dpkg-reconfigure tzdata ``` -Choose the geographic area in which you live. In my case, I chose **Asia**. Select OK and hit ENTER key. +选择你居住的地理区域。对我而言,我选择 **Asia**。选择 OK,然后按回车键。 ![][6] -Next, select the city or region corresponding to your time zone. Here I’ve chosen **Kolkata**. +接下来,选择与你的时区对应的城市或地区。这里,我选择了 **Kolkata**。 ![][7] -Finally, you will see an output something like below in the Terminal. +最后,你将在终端中看到类似下面的输出。 ``` Current default time zone: 'Asia/Kolkata' @@ -187,29 +188,29 @@ Local time is now: Tue Jul 30 19:29:25 IST 2019. Universal Time is now: Tue Jul 30 13:59:25 UTC 2019. ``` -##### Configure time zone in graphical mode +##### 在图形模式下配置时区 -Some users may not be comfortable with CLI way. If you’re one of them, you can easily change do all this from system settings panel in graphical mode. +有些用户可能对命令行方式不太满意。如果你是其中之一,那么你可以轻松地在图形模式的系统设置面板中进行设置。 -Hit the **Super key** (Windows key), type **settings** in the Ubuntu dash and click on **Settings** icon. +点击**超级键**(Windows 键),在Ubuntu dash 中输入 **settings**,然后点击 **Settings** 图标。 ![][8] -Launch System’s settings from Ubuntu dash +从 Ubuntu dash 启动系统的设置 -Alternatively, click on the down arrow located at the top right corner of your Ubuntu desktop and click the Settings icon in the left corner. +或者,单击位于 Ubuntu 桌面右上角的向下箭头,然后单击左上角的 “Settings” 图标。 ![][9] -Launch System’s settings from top panel +从顶部面板启动系统的设置 -In the next window, choose **Details** and then Click **Date & Time** option. Turn on both **Automatic Date & Time** and **Automatic Time Zone** options. +在下一个窗口中,选择 **Details**,然后单击 **Date & Time** 选项。打开 **Automatic Date & Time** 和 **Automatic Time Zone**。 ![][10] -Set automatic time zone in Ubuntu +在 Ubuntu 中设置自动时区 -Close the Settings window an you’re done! Your system clock should now sync with Internet time servers. +关闭设置窗口就行了!你的系统始终应该与 Internet 时间服务器同步了。 -------------------------------------------------------------------------------- From 0f20377c31385e8a31538a4007d166c22e357d99 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 12 Aug 2019 09:14:07 +0800 Subject: [PATCH 401/951] translating --- sources/tech/20190808 How to manipulate PDFs on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190808 How to manipulate PDFs on Linux.md b/sources/tech/20190808 How to manipulate PDFs on Linux.md index d4229386fa..c2af8547ff 100644 --- a/sources/tech/20190808 How to manipulate PDFs on Linux.md +++ b/sources/tech/20190808 How to manipulate PDFs on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c0f2601450ceb0267520c88a2fed2d2b95e90c65 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 09:37:43 +0800 Subject: [PATCH 402/951] TSL&PRF @wxy --- ...wn terminal for fast commands in Fedora.md | 193 ------------------ ...wn terminal for fast commands in Fedora.md | 183 +++++++++++++++++ 2 files changed, 183 insertions(+), 193 deletions(-) delete mode 100644 sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md create mode 100644 translated/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md diff --git a/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md b/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md deleted file mode 100644 index 7158e9cffc..0000000000 --- a/sources/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md +++ /dev/null @@ -1,193 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use a drop-down terminal for fast commands in Fedora) -[#]: via: (https://fedoramagazine.org/use-a-drop-down-terminal-for-fast-commands-in-fedora/) -[#]: author: (Guilherme Schelp https://fedoramagazine.org/author/schelp/) - -Use a drop-down terminal for fast commands in Fedora -====== - -![][1] - -A **drop-down terminal** lets you tap a key and quickly enter any command on your desktop. Often it creates a terminal in a smooth way, sometimes with effects. This article demonstrates how it helps to improve and speed up daily tasks, using drop-down terminals like Yakuake, Tilda, Guake and a GNOME extension. - -### Yakuake - -[Yakuake][2] is a drop-down terminal emulator based on KDE Konsole techonology. It is distributed under the terms of the GNU GPL Version 2. It includes features such as: - - * Smoothly rolls down from the top of your screen - * Tabbed interface - * Configurable dimensions and animation speed - * Skinnable - * Sophisticated D-Bus interface - - - -To install Yakuake, use the following command: - -``` -$ sudo dnf install -y yakuake -``` - -#### Startup and configuration - -If you’re runnign KDE, open the System Settings and go to _Startup and Shutdown_. Add _yakuake_ to the list of programs under _Autostart_, like this: - -![][3] - -It’s easy to configure Yakuake while running the app. To begin, launch the program at the command line: - -``` -$ yakuake & -``` - -The following welcome dialog appears. You can set a new keyboard shortcut if the standard one conflicts with another keystroke you already use: - -![][4] - -Now click the menu button, and the following help menu appears. Next, select _Configure Yakuake…_ to access the configuration options. - -![][5] - -You can customize the options for appearance, such as opacity; behavior, such as focusing terminals when the mouse pointer is moved over them; and window, such as size and animation. In the window options you’ll find one of the most useful options is you use two or more monitors: _Open on screen: At mouse location_. - -#### Using Yakuake - -The main shortcuts are: - - * **F12** = Open/Retract Yakuake - * **Ctrl+F11** = Full Screen Mode - * **Ctrl+)** = Split Top/Bottom - * **Ctrl+(** = Split Left/Right - * **Ctrl+Shift+T** = New Session - * **Shift+Right** = Next Session - * **Shift+Left** = Previous Session - * **Ctrl+Alt+S** = Rename Session - - - -Below is an example of Yakuake being used to split the session like a [terminal multiplexer][6]. Using this feature, you can run several shells in one session. - -![][7] - -### Tilda - -[Tilda][8] is a drop-down terminal that compares with other popular terminal emulators such as GNOME Terminal, KDE’s Konsole, xterm, and many others. - -It features a highly configurable interface. You can even change options such as the terminal size and animation speed. Tilda also lets you enable hotkeys you can bind to commands and operations. - -To install Tilda, run this command: - -``` -$ sudo dnf install -y tilda -``` - -#### Startup and configuration - -Most users prefer to have a drop-down terminal available behind the scenes when they login. To set this option, first go to the app launcher in your desktop, search for Tilda, and open it. - -Next, open up the Tilda Config window. Select _Start Tilda hidden_, which means it will not display a terminal immediately when started. - -![][9] - -Next, you’ll set your desktop to start Tilda automatically. If you’re using KDE, go to _System Settings_ > _Startup and Shutdown_ > _Autostart_ and use _Add a Program_. - -![][10] - -If you’re using GNOME, you can run this command in a terminal: - -``` -$ ln -s /usr/share/applications/tilda.desktop ~/.config/autostart/ -``` - -When you run for the first time, a wizard shows up to set your preferences. If you need to change something, right click and go to _Preferences_ in the menu. - -![][11] - -You can also create multiple configuration files, and bind other keys to open new terminals at different places on the screen. To do that, run this command: - -``` -$ tilda -C -``` - -Every time you use the above command, Tilda creates a new config file located in the _~/.config/tilda/_ folder called _config_0_, _config_1_, and so on. You can then map a key combination to open a new Tilda terminal with a specific set of options. - -#### Using Tilda - -The main shortcuts are: - - * **F1** = Pull Down Terminal Tilda (Note: If you have more than one config file, the shortcuts are the same, with a diferent _open/retract_ shortcut like F1, F2, F3, and so on) - * **F11** = Full Screen Mode - * **F12** = Toggle Transparency - * **Ctrl+Shift+T** = Add Tab - * **Ctrl+Page Up** = Go to Next Tab - * **Ctrl+Page Down** = Go to Previous Tab - - - -### GNOME Extension - -The Drop-down Terminal [GNOME Extension][12] lets you use this useful tool in your GNOME Shell. It is easy to install and configure, and gives you fast access to a terminal session. - -#### Installation - -Open a browser and go to the [site for this GNOME extension][12]. Enable the extension setting to _On_, as shown here: - -![][13] - -Then select _Install_ to install the extension on your system. - -![][14] - -Once you do this, there’s no reason to set any autostart options. The extension will automatically run whenever you login to GNOME! - -#### Configuration - -After install, the Drop Down Terminal configuration window opens to set your preferences. For example, you can set the size of the terminal, animation, transparency, and scrollbar use. - -![][15] - -If you need change some preferences in the future, run the _gnome-shell-extension-prefs_ command and choose _Drop Down Terminal_. - -#### Using the extension - -The shortcuts are simple: - - * **`** (usually the key above **Tab**) = Open/Retract Terminal - * **F12** (customize as you prefer) = Open/Retract Terminal - - - -* * * - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/use-a-drop-down-terminal-for-fast-commands-in-fedora/ - -作者:[Guilherme Schelp][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/schelp/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/dropdown-terminals-816x345.jpg -[2]: https://kde.org/applications/system/org.kde.yakuake -[3]: https://fedoramagazine.org/wp-content/uploads/2019/07/auto_start-1024x723.png -[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_config-1024x419.png -[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_config_01.png -[6]: https://fedoramagazine.org/4-cool-terminal-multiplexers/ -[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_usage.gif -[8]: https://github.com/lanoxx/tilda -[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_startup.png -[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_startup_alt.png -[11]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_config.png -[12]: https://extensions.gnome.org/extension/442/drop-down-terminal/ -[13]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_2-1024x455.png -[14]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_3.png -[15]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_4.png diff --git a/translated/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md b/translated/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md new file mode 100644 index 0000000000..cf10a3a37f --- /dev/null +++ b/translated/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md @@ -0,0 +1,183 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use a drop-down terminal for fast commands in Fedora) +[#]: via: (https://fedoramagazine.org/use-a-drop-down-terminal-for-fast-commands-in-fedora/) +[#]: author: (Guilherme Schelp https://fedoramagazine.org/author/schelp/) + +在 Fedora 下使用下拉式终端更快输入命令 +====== + +![][1] + +下拉式终端可以一键打开,并快速输入桌面上的任何命令。通常它会以平滑的方式创建终端,有时会带有下拉效果。本文演示了如何使用 Yakuake、Tilda、Guake 和 GNOME 扩展等下拉式终端来改善和加速日常任务。 + +### Yakuake + +[Yakuake][2] 是一个基于 KDE Konsole 技术的下拉式终端模拟器。它以 GNU GPLv2 条款分发。它包括以下功能: + +* 从屏幕顶部平滑地滚下 +* 标签式界面 +* 尺寸和动画速度可配置 +* 换肤 +* 先进的 D-Bus 接口 + +要安装 Yakuake,请使用以下命令: + +``` +$ sudo dnf install -y yakuake +``` + +#### 启动和配置 + +如果你运行 KDE,请打开系统设置,然后转到“启动和关闭”。将“yakuake”添加到“自动启动”下的程序列表中,如下所示: + +![][3] + +Yakuake 运行时很容易配置,首先在命令行启动该程序: + +``` +$ yakuake & +``` + +随后出现欢迎对话框。如果标准的快捷键和你已经使用的快捷键冲突,你可以设置一个新的。 + +![][4] + +点击菜单按钮,出现如下帮助菜单。接着,选择“配置 Yakuake……”访问配置选项。 + +![][5] + +你可以自定义外观选项,例如透明度、行为(例如当鼠标指针移过它们时聚焦终端)和窗口(如大小和动画)。在窗口选项中,你会发现当你使用两个或更多监视器时最有用的选项之一:“在鼠标所在的屏幕上打开”。 + +#### 使用 Yakuake + +主要的快捷键有: + + * `F12` = 打开/撤回 Yakuake + * `Ctrl+F11` = 全屏模式 + * `Ctrl+)` = 上下分割 + * `Ctrl+(` = 左右分割 + * `Ctrl+Shift+T` = 新会话 + * `Shift+Right` = 下一个会话 + * `Shift+Left` = 上一个会话 + * `Ctrl+Alt+S` = 重命名会话 + +以下是 Yakuake 像[终端多路复用器][6]一样分割会话的示例。使用此功能,你可以在一个会话中运行多个 shell。 + +![][7] + +### Tilda + +[Tilda][8] 是一个下拉式终端,可与其他流行的终端模拟器相媲美,如 GNOME 终端、KDE 的 Konsole、xterm 等等。 + +它具有高度可配置的界面。你甚至可以更改终端大小和动画速度等选项。Tilda 还允许你启用热键,以绑定到各种命令和操作。 + +要安装 Tilda,请运行以下命令: + +``` +$ sudo dnf install -y tilda +``` + +#### 启动和配置 + +大多数用户更喜欢在登录时就在后台运行一个下拉式终端。要设置此选项,请首先转到桌面上的应用启动器,搜索 Tilda,然后将其打开。 + +接下来,打开 Tilda 配置窗口。 选择“隐藏启动 Tilda”,即启动时不会立即显示终端。 + +![][9] + +接下来,你要设置你的桌面自动启动 Tilda。如果你使用的是 KDE,请转到“系统设置 > 启动与关闭 > 自动启动”并“添加一个程序”。 + +![][10] + +如果你正在使用 GNOME,则可以在终端中运行此命令: + +``` +$ ln -s /usr/share/applications/tilda.desktop ~/.config/autostart/ +``` + +当你第一次运行它时,会出现一个向导来设置首选项。如果需要更改设置,请右键单击终端并转到菜单中的“首选项”。 + +![][11] + +你还可以创建多个配置文件,并绑定其他快捷键以在屏幕上的不同位置打开新终端。为此,请运行以下命令: + +``` +$ tilda -C +``` + +每次使用上述命令时,Tilda 都会在名为 `~/.config/tilda/` 文件夹中创建名为 `config_0`、`config_1` 之类的新配置文件。然后,你可以映射组合键以打开具有一组特定选项的新 Tilda 终端。 + +#### 使用 Tilda + +主要快捷键有: + + * `F1` = 拉下终端 Tilda(注意:如果你有多个配置文件,快捷方式是 F1、F2、F3 等) + * `F11` = 全屏模式 + * `F12` = 切换透明模式 + * `Ctrl+Shift+T` = 添加标签 + * `Ctrl+Page Up` = 下一个标签 + * `Ctrl+Page Down` = 上一个标签 + +### GNOME 扩展 + +Drop-down Terminal [GNOME 扩展][12]允许你在 GNOME Shell 中使用这个有用的工具。它易于安装和配置,使你可以快速访问终端会话。 + +#### 安装 + +打开浏览器并转到[此 GNOME 扩展的站点][12]。启用扩展设置为“On”,如下所示: + +![][13] + +然后选择“Install”以在系统上安装扩展。 + +![][14] + +执行此操作后,无需设置任何自动启动选项。只要你登录 GNOME,扩展程序就会自动运行! + +#### 配置 + +安装后,将打开 Drop-down Terminal 配置窗口以设置首选项。例如,可以设置终端大小、动画、透明度和使用滚动条。 + +![][15] + +如果你将来需要更改某些首选项,请运行 `gnome-shell-extension-prefs` 命令并选择“Drop Down Terminal”。 + +#### 使用该扩展 + +快捷键很简单: + + * 反尖号 (通常是 `Tab` 键上面的一个键) = 打开/撤回终端 + * `F12` (可以定制) = 打开/撤回终端 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/use-a-drop-down-terminal-for-fast-commands-in-fedora/ + +作者:[Guilherme Schelp][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/schelp/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/dropdown-terminals-816x345.jpg +[2]: https://kde.org/applications/system/org.kde.yakuake +[3]: https://fedoramagazine.org/wp-content/uploads/2019/07/auto_start-1024x723.png +[4]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_config-1024x419.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_config_01.png +[6]: https://fedoramagazine.org/4-cool-terminal-multiplexers/ +[7]: https://fedoramagazine.org/wp-content/uploads/2019/07/yakuake_usage.gif +[8]: https://github.com/lanoxx/tilda +[9]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_startup.png +[10]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_startup_alt.png +[11]: https://fedoramagazine.org/wp-content/uploads/2019/07/tilda_config.png +[12]: https://extensions.gnome.org/extension/442/drop-down-terminal/ +[13]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_2-1024x455.png +[14]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_3.png +[15]: https://fedoramagazine.org/wp-content/uploads/2019/07/gnome-shell-install_4.png From dbba7aa67ffe263690af6137a6c5c93835ab3356 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 09:41:45 +0800 Subject: [PATCH 403/951] PUB @wxy https://linux.cn/article-11216-1.html --- ...09 Use a drop-down terminal for fast commands in Fedora.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190809 Use a drop-down terminal for fast commands in Fedora.md (98%) diff --git a/translated/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md b/published/20190809 Use a drop-down terminal for fast commands in Fedora.md similarity index 98% rename from translated/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md rename to published/20190809 Use a drop-down terminal for fast commands in Fedora.md index cf10a3a37f..337f193c5b 100644 --- a/translated/tech/20190809 Use a drop-down terminal for fast commands in Fedora.md +++ b/published/20190809 Use a drop-down terminal for fast commands in Fedora.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11216-1.html) [#]: subject: (Use a drop-down terminal for fast commands in Fedora) [#]: via: (https://fedoramagazine.org/use-a-drop-down-terminal-for-fast-commands-in-fedora/) [#]: author: (Guilherme Schelp https://fedoramagazine.org/author/schelp/) From 2190f8923a87fdb219755fc8e46ddbbc0e39cde3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 12:47:40 +0800 Subject: [PATCH 404/951] APL:20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application --- ...- A Terminal File Manager Based On An Old DOS Application.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md b/sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md index f250cca056..63e19fdc0c 100644 --- a/sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md +++ b/sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md @@ -1,3 +1,5 @@ +wxy applied + DF-SHOW – A Terminal File Manager Based On An Old DOS Application ====== ![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-720x340.png) From 287b5522b7ee69e9c99b19c1718a2fce5771121e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 13:21:49 +0800 Subject: [PATCH 405/951] TSL&PRF @wxy --- ...Manager Based On An Old DOS Application.md | 164 ------------------ ...Manager Based On An Old DOS Application.md | 150 ++++++++++++++++ 2 files changed, 150 insertions(+), 164 deletions(-) delete mode 100644 sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md create mode 100644 translated/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md diff --git a/sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md b/sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md deleted file mode 100644 index 63e19fdc0c..0000000000 --- a/sources/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md +++ /dev/null @@ -1,164 +0,0 @@ -wxy applied - -DF-SHOW – A Terminal File Manager Based On An Old DOS Application -====== -![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-720x340.png) - -If you have worked on good-old MS-DOS, you might have used or heard about **DF-EDIT**. The DF-EDIT, stands for **D** irectory **F** ile **Edit** or, is an obscure DOS file manager, originally written by **Larry Kroeker** for MS-DOS and PC-DOS systems. It is used to display the contents of a given directory or file in MS-DOS and PC-DOS systems. Today, I stumbled upon a similar utility named **DF-SHOW** ( **D** irectory **F** ile **S** how), a terminal file manager for Unix-like operating systems. It is an Unix rewrite of obscure DF-EDIT file manager and is based on DF-EDIT 2.3d release from 1986. DF-SHOW is completely free, open source and released under GPLv3. - -DF-SHOW can be able to, - - * List contents of a directory, - * View files, - * Edit files using your default file editor, - * Copy files to/from different locations, - * Rename files, - * Delete files, - * Create new directories from within the DF-SHOW interface, - * Update file permissions, owners and groups, - * Search files matching a search term, - * Launch executable files. - - - -### DF-SHOW Usage - -DF-SHOW consists of two programs, namely **“show”** and **“sf”**. - -**Show command** - -The “show” program (similar to the `ls` command) is used to display the contents of a directory, create new directories, rename, delete files/folders, update permissions, search files and so on. - -To view the list of contents in a directory, use the following command: - -``` -$ show -``` - -Example: - -``` -$ show dfshow -``` - -Here, dfshow is a directory. If you invoke the “show” command without specifying a directory path, it will display the contents of current directory. - -Here is how DF-SHOW default interface looks like. - -![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-1.png) - -As you can see, DF-SHOW interface is self-explanatory. - -On the top bar, you see the list of available options such as Copy, Delete, Edit, Modify etc. - -Complete list of available options are given below: - - * **C** opy, - * **D** elete, - * **E** dit, - * **H** idden, - * **M** odify, - * **Q** uit, - * **R** ename, - * **S** how, - * h **U** nt, - * e **X** ec, - * **R** un command, - * **E** dit file, - * **H** elp, - * **M** ake dir, - * **Q** uit, - * **S** how dir - - - -In each option, one letter has been capitalized and marked as bold. Just press the capitalized letter to perform the respective operation. For example, to rename a file, just press **R** and type the new name and hit ENTER to rename the selected item. - -![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-2.png) - -To display all options or cancel an operation, just press **ESC** key. - -Also, you will see a bunch of function keys at the bottom of DF-SHOW interface to navigate through the contents of a directory. - - * **UP/DOWN** arrows or **F1/F2** – Move up and down (one line at time), - * **PgUp/Pg/Dn** – Move one page at a time, - * **F3/F4** – Instantly go to Top and bottom of the list, - * **F5** – Refresh, - * **F6** – Mark/Unmark files (Files marked will be indicated with an ***** in front of them), - * **F7/F8** – Mark/Unmark all files at once, - * **F9** – Sort the list by – Date & time, Name, Size., - - - -Press **h** to learn more details about **show** command and its options. - -To exit DF-SHOW, simply press **q**. - -**SF Command** - -The “sf” (show files) is used to display the contents of a file. - -``` -$ sf -``` - -![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-3.png) - -Press **h** to learn more “sf” command and its options. To quit, press **q**. - -Want to give it a try? Great! Go ahead and install DF-SHOW on your Linux system as described below. - -### Installing DF-SHOW - -DF-SHOW is available in [**AUR**][1], so you can install it on any Arch-based system using AUR programs such as [**Yay**][2]. - -``` -$ yay -S dfshow -``` - -On Ubuntu and its derivatives: - -``` -$ sudo add-apt-repository ppa:ian-hawdon/dfshow - -$ sudo apt-get update - -$ sudo apt-get install dfshow -``` - -On other Linux distributions, you can compile and build it from the source as shown below. - -``` -$ git clone https://github.com/roberthawdon/dfshow -$ cd dfshow -$ ./bootstrap -$ ./configure -$ make -$ sudo make install -``` - -The author of DF-SHOW project has only rewritten some of the applications of DF-EDIT utility. Since the source code is freely available on GitHub, you can add more features, improve the code and submit or fix the bugs (if there are any). It is still in alpha stage, but fully functional. - -Have you tried it already? If so, how’d go? Tell us your experience in the comments section below. - -And, that’s all for now. Hope this was useful.More good stuffs to come. - -Stay tuned! - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/df-show-a-terminal-file-manager-based-on-an-old-dos-application/ - -作者:[SK][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://aur.archlinux.org/packages/dfshow/ -[2]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/ diff --git a/translated/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md b/translated/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md new file mode 100644 index 0000000000..d4cab1b4c9 --- /dev/null +++ b/translated/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md @@ -0,0 +1,150 @@ +DF-SHOW:一个基于老式 DOS 应用的终端文件管理器 +====== + +![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-720x340.png) + +如果你曾经使用过老牌的 MS-DOS,你可能已经使用或听说过 DF-EDIT。DF-EDIT,意即 **D**irectory **F**ile **Edit**,它是一个鲜为人知的 DOS 文件管理器,最初由 Larry Kroeker 为 MS-DOS 和 PC-DOS 系统而编写。它用于在 MS-DOS 和 PC-DOS 系统中显示给定目录或文件的内容。今天,我偶然发现了一个名为 DF-SHOW 的类似实用程序(**D**irectory **F**ile **Show**),这是一个类 Unix 操作系统的终端文件管理器。它是鲜为人知的 DF-EDIT 文件管理器的 Unix 重写版本,其基于 1986 年发布的 DF-EDIT 2.3d。DF-SHOW 完全是自由开源的,并在 GPLv3 下发布。 + +DF-SHOW 可以: + +* 列出目录的内容, +* 查看文件, +* 使用你的默认文件编辑器编辑文件, +* 将文件复制到不同位置, +* 重命名文件, +* 删除文件, +* 在 DF-SHOW 界面中创建新目录, +* 更新文件权限,所有者和组, +* 搜索与搜索词匹配的文件, +* 启动可执行文件。 + +### DF-SHOW 用法 + +DF-SHOW 实际上是两个程序的结合,名为 `show` 和 `sf`。 + +#### Show 命令 + +`show` 程序(类似于 `ls` 命令)用于显示目录的内容、创建新目录、重命名和删除文件/文件夹、更新权限、搜索文件等。 + +要查看目录中的内容列表,请使用以下命令: + +``` +$ show +``` + +示例: + +``` +$ show dfshow +``` + +这里,`dfshow` 是一个目录。如果在未指定目录路径的情况下调用 `show` 命令,它将显示当前目录的内容。 + +这是 DF-SHOW 默认界面的样子。 + +![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-1.png) + +如你所见,DF-SHOW 的界面不言自明。 + +在顶部栏上,你会看到可用的选项列表,例如复制、删除、编辑、修改等。 + +完整的可用选项列表如下: + + * `C` opy(复制) + * `D` elete(删除) + * `E` dit(编辑) + * `H` idden(隐藏) + * `M` odify(修改) + * `Q` uit(退出) + * `R` ename(重命名) + * `S` how(显示) + * h `U` nt(文件内搜索) + * e `X` ec(执行) + * `R` un command(运行命令) + * `E` dit file(编辑文件) + * `H` elp(帮助) + * `M` ake dir(创建目录) + * `S` how dir(显示目录) + +在每个选项中,有一个字母以大写粗体标记。只需按下该字母即可执行相应的操作。例如,要重命名文件,只需按 `R` 并键入新名称,然后按回车键重命名所选项目。 + +![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-2.png) + +要显示所有选项或取消操作,只需按 `ESC` 键即可。 + +此外,你将在 DF-SHOW 界面的底部看到一堆功能键,以浏览目录的内容。 + +* `UP` / `DOWN` 箭头或 `F1` / `F2` - 上下移动(一次一行), +* `PgUp` / `PgDn` - 一次移动一页, +* `F3` / `F4` - 立即转到列表的顶部和底部, +* `F5` - 刷新, +* `F6` - 标记/取消标记文件(标记的文件将在它们前面用 `*`表示), +* `F7` / `F8` - 一次性标记/取消标记所有文件, +* `F9` - 按以下顺序对列表排序 - 日期和时间、名称、大小。 + +按 `h` 了解有关 `show` 命令及其选项的更多详细信息。 + +要退出 DF-SHOW,只需按 `q` 即可。 + +#### SF 命令 + +`sf` (显示文件)用于显示文件的内容。 + +``` +$ sf +``` + +![](https://www.ostechnix.com/wp-content/uploads/2018/10/dfshow-3.png) + +按 `h` 了解更多 `sf` 命令及其选项。要退出,请按 `q`。 + +想试试看?很好,让我们继续在 Linux 系统上安装 DF-SHOW,如下所述。 + +### 安装 DF-SHOW + +DF-SHOW 在 [AUR][1] 中可用,因此你可以使用 AUR 程序(如 [yay][2])在任何基于 Arch 的系统上安装它。 + +``` +$ yay -S dfshow +``` + +在 Ubuntu 及其衍生版上: + +``` +$ sudo add-apt-repository ppa:ian-hawdon/dfshow +$ sudo apt-get update +$ sudo apt-get install dfshow +``` + +在其他 Linux 发行版上,你可以从源代码编译和构建它,如下所示。 + +``` +$ git clone https://github.com/roberthawdon/dfshow +$ cd dfshow +$ ./bootstrap +$ ./configure +$ make +$ sudo make install +``` + +DF-SHOW 项目的作者只重写了 DF-EDIT 实用程序的一些应用程序。由于源代码可以在 GitHub 上免费获得,因此你可以添加更多功能、改进代码并提交或修复错误(如果有的话)。它仍处于 beta 阶段,但功能齐全。 + +你有没试过吗?如果试过,觉得如何?请在下面的评论部分告诉我们你的体验。 + +不管如何,希望这有用。还有更多好东西。敬请关注! + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/df-show-a-terminal-file-manager-based-on-an-old-dos-application/ + +作者:[SK][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://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://aur.archlinux.org/packages/dfshow/ +[2]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/ From 9191880d45b92a5ba7c1b156ae55cc4a187db545 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Aug 2019 13:30:51 +0800 Subject: [PATCH 406/951] APL:20190725 Introduction to GNU Autotools --- sources/tech/20190725 Introduction to GNU Autotools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190725 Introduction to GNU Autotools.md b/sources/tech/20190725 Introduction to GNU Autotools.md index 5eb41ad803..525f07bdde 100644 --- a/sources/tech/20190725 Introduction to GNU Autotools.md +++ b/sources/tech/20190725 Introduction to GNU Autotools.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4f47aa31aedd0ee3896959369e18daf2fa32bb65 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 12 Aug 2019 14:24:22 +0800 Subject: [PATCH 407/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190812=20How=20?= =?UTF-8?q?to=20Get=20Linux=20Kernel=205.0=20in=20Ubuntu=2018.04=20LTS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md --- ...et Linux Kernel 5.0 in Ubuntu 18.04 LTS.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md diff --git a/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md b/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md new file mode 100644 index 0000000000..e3b4d29d94 --- /dev/null +++ b/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md @@ -0,0 +1,91 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS) +[#]: via: (https://itsfoss.com/ubuntu-hwe-kernel/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS +====== + +_**The recently released Ubuntu 18.04.3 includes Linux Kernel 5.0 among several new features and improvements but you won’t get it by default. This tutorial demonstrates how to get Linux Kernel 5 in Ubuntu 18.04 LTS.**_ + +[Subscribe to It’s FOSS YouTube Channel for More Videos][1] + +The [third point release of Ubuntu 18.04 is here][2] and it brings new stable versions of GNOME component, livepatch desktop integration and kernel 5.0. + +But wait! What is a point release? Let me explain it to you first. + +### Ubuntu LTS point release + +Ubuntu 18.04 was released in April 2018 and since it’s a long term support (LTS) release, it will be supported till 2023. There have been a number of bug fixes, security updates and software upgrades since then. If you download Ubuntu 18.04 today, you’ll have to install all those updates as one of the first [things to do after installing Ubuntu 18.04][3]. + +That, of course, is not an ideal situation. This is why Ubuntu provides these “point releases”. A point release consists of all the feature and security updates along with the bug fixes that has been added since the initial release of the LTS version. If you download Ubuntu today, you’ll get Ubuntu 18.04.3 instead of Ubuntu 18.04. This saves the trouble of downloading and installing hundreds of updates on a newly installed Ubuntu system. + +Okay! So now you know the concept of point release. How do you upgrade to these point releases? The answer is simple. Just [update your Ubuntu system][4] like you normally do and you’ll be already on the latest point release. + +You can [check Ubuntu version][5] to see which point release you are using. I did a check and since I was on Ubuntu 18.04.3, I assumed that I would have gotten Linux kernel 5 as well. When I [check the Linux kernel version][6], it was still the base kernel 4.15. + +![Ubuntu Version And Linux Kernel Version Check][7] + +Why is that? If Ubuntu 18.04.3 has Linux kernel 5.0 then why does it still have Linux Kernel 4.15? It’s because you have to manually ask for installing the new kernel in Ubuntu LTS by opting for LTS Enablement Stack popularly known as HWE. + +[][8] + +Suggested read  Canonical Announces Ubuntu Edge! + +### Get Linux Kernel 5.0 in Ubuntu 18.04 with Hardware Enablement Stack + +By default, Ubuntu LTS release stay on the same Linux kernel they were released with. The [hardware enablement stack][9] (HWE) provides newer kernel and xorg support for existing Ubuntu LTS release. + +Things have been changed recently. If you downloaded Ubuntu 18.04.2 or newer desktop version, HWE is enabled for you and you’ll get the new kernel along with the regular updates by default. + +For server versions and people who downloaded 18.04 and 18.04.1, you’ll have to install the HWE kernel. Once you do that, you’ll get the newer kernel releases provided by Ubuntu to the LTS version. + +To install HWE kernel in Ubuntu desktop along with newer xorg, you can use this command in the terminal: + +``` +sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04 +``` + +If you are using Ubuntu Server edition, you won’t have the xorg option. So just install the HWE kernel in Ubutnu server: + +``` +sudo apt-get install --install-recommends linux-generic-hwe-18.04 +``` + +Once you finish installing the HWE kernel, restart your system. Now you should have the newer Linux kernel. + +**Are you getting kernel 5.0 in Ubuntu 18.04?** + +Do note that HWE is enabled for people who downloaded and installed Ubuntu 18.04.2. So these users will get Kernel 5.0 without any trouble. + +Should you go by the trouble of enabling HWE kernel in Ubuntu? It’s entirely up to you. [Linux Kernel 5.0][10] has several performance improvement and better hardware support. You’ll get the benefit of the new kernel. + +What do you think? Will you install kernel 5.0 or will you rather stay on the kernel 4.15? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-hwe-kernel/ + +作者:[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.youtube.com/channel/UCEU9D6KIShdLeTRyH3IdSvw +[2]: https://ubuntu.com/blog/enhanced-livepatch-desktop-integration-available-with-ubuntu-18-04-3-lts +[3]: https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/ +[4]: https://itsfoss.com/update-ubuntu/ +[5]: https://itsfoss.com/how-to-know-ubuntu-unity-version/ +[6]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/ubuntu-version-and-kernel-version-check.png?resize=800%2C300&ssl=1 +[8]: https://itsfoss.com/canonical-announces-ubuntu-edge/ +[9]: https://wiki.ubuntu.com/Kernel/LTSEnablementStack +[10]: https://itsfoss.com/linux-kernel-5/ From 9851b7c0c655912499b93e69539446421305a707 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 12 Aug 2019 14:24:45 +0800 Subject: [PATCH 408/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190811=20How=20?= =?UTF-8?q?to=20Setup=20Disk=20Quota=20on=20XFS=20File=20System=20in=20Lin?= =?UTF-8?q?ux=20Servers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190811 How to Setup Disk Quota on XFS File System in Linux Servers.md --- ...ota on XFS File System in Linux Servers.md | 310 ++++++++++++++++++ 1 file changed, 310 insertions(+) create mode 100644 sources/tech/20190811 How to Setup Disk Quota on XFS File System in Linux Servers.md diff --git a/sources/tech/20190811 How to Setup Disk Quota on XFS File System in Linux Servers.md b/sources/tech/20190811 How to Setup Disk Quota on XFS File System in Linux Servers.md new file mode 100644 index 0000000000..056d130074 --- /dev/null +++ b/sources/tech/20190811 How to Setup Disk Quota on XFS File System in Linux Servers.md @@ -0,0 +1,310 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Setup Disk Quota on XFS File System in Linux Servers) +[#]: via: (https://www.linuxtechi.com/disk-quota-xfs-file-system-linux-servers/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +How to Setup Disk Quota on XFS File System in Linux Servers +====== + +Managing Disk quota on file systems is one of the most common day to day operation tasks for Linux admins, in this article we will demonstrate how to setup disk quota on XFS file system / partition on Linux Servers like **CentOS**, **RHEL**, **Ubuntu** and **Debian**. Here Disk quota means implementing limit on disk usage and file or inode usage. + +[![Setup-Disk-Quota-XFS-Linux-Servers][1]][2] + +Disk quota on XFS file system is implemented as followings: + + * User Quota + * Group Quota + * Project Quota (or Directory Quota) + + + +To setup disk quota on XFS file system, first we must enable quota using following mount options: + + * **uquota**: Enable user quota & also enforce usage limits. + * **uqnoenforce**: Enable user quota and report usage but don’t enforce usage limits. + * **gquota**: Enable group quota & also enforce usage limits. + * **gqnoenforce**: Enable group quota and report usage, but don’t enforce usage limits. + * **prjquota / pquota**:  Enable project quota & enforce usage limits. + * **pqnoenforce**:  Enable project quota and report usage but don’t enforce usage limits. + + + +In article we will implement user & group disk quota on /home partition and apart from this we will also see how to setup  inode quota on /home file system and project quota on /var file system. + +``` +[root@linuxtechi ~]# df -Th /home /var +Filesystem Type Size Used Avail Use% Mounted on +/dev/mapper/Vol-home xfs 16G 33M 16G 1% /home +/dev/mapper/Vol-var xfs 18G 87M 18G 1% /var +[root@linuxtechi ~]# +``` + +### Enable User and Group Quota on /home + +Unmount /home partition and then edit the /etc/fstab file, + +``` +[root@linuxtechi ~]# umount /home/ +``` + +Add uquota and gquota after default keyword for /home partition in /etc/fstab file, example is shown below + +``` +[root@linuxtechi ~]# vi /etc/fstab +…………………………… +/dev/mapper/Vol-home /home xfs defaults,uquota,gquota 0 0 +…………………………… +``` + +![user-group-quota-fstab-file][1] + +Now mount the /home partition using below “**mount -a**” command, + +``` +[root@linuxtechi ~]# mount -a +[root@linuxtechi ~]# +``` + +Verify whether quota is enabled on /home or not, + +``` +[root@linuxtechi ~]# mount | grep /home +/dev/mapper/Vol-home on /home type xfs (rw,relatime,seclabel,attr2,inode64,usrquota,grpquota) +[root@linuxtechi ~]# +``` + +**Note :** While umounting /home partition if you get /home is busy then edit the fstab file, add uquota and gquota keywords after default keyword for /home partition and then reboot your system. After reboot we will see that quota is enabled on /home. + +Quota on XFS file system is managed by the command line tool called “**xfs_quota**“. xfs_quota works in two modes: + + * **Basic Mode** – For this mode, simply type xfs_quota then you will enter basic mode there you can print disk usage of all file system and disk quota for users, example is show below + + + +![xfs-quota-basic-mode][1] + + * **Expert Mode** – This mode is invoked using “-x” option in “xfs_quota” command, as the name suggests this mode is used to configure disk and file quota for local users on xfs file system. + + + +To print disk quota on any file system, let’s say /home, use the following command, + +``` +[root@linuxtechi ~]# xfs_quota -x -c 'report -h' /home +User quota on /home (/dev/mapper/Vol-home) + Blocks +User ID Used Soft Hard Warn/Grace +---------- --------------------------------- +root 0 0 0 00 [------] +pkumar 12K 0 0 00 [------] + +Group quota on /home (/dev/mapper/Vol-home) + Blocks +Group ID Used Soft Hard Warn/Grace +---------- --------------------------------- +root 0 0 0 00 [------] +pkumar 12K 0 0 00 [------] +[root@linuxtechi ~]# +``` + +### Configure User Quota + +Let’s assume we have a user named “pkumar”, let’s set disk and file quota on his home directory using “xfs_quota” command + +``` +[root@linuxtechi ~]# xfs_quota -x -c 'limit bsoft=4250m bhard=4550m pkumar' /home +``` + +In above command, **bsoft** is block soft limit in MBs and **bhard** is block hard limit in MBs, limit is a keyword to implement disk or file limit on a file system for a specific user. + +Let’s set file or inode limit for user pkumar on his home directory, + +``` +[root@linuxtechi ~]# xfs_quota -x -c 'limit isoft=400 ihard=500 pkumar' /home +``` + +In above command isoft is inode or file soft limit and ihard is inode or file hard limit. + +Both block (disk) limit and Inode (file) limit can be applied using a single command, example is shown below, + +``` +root@linuxtechi ~]# xfs_quota -x -c 'limit bsoft=4250m bhard=4550m isoft=400 ihard=500 pkumar' /home +[root@linuxtechi ~]# +``` + +Now verify whether disk and inode limits are implemented on pkumar user using the following xfs_quota command, + +``` +[root@linuxtechi ~]# xfs_quota -x -c "report -bih" /home +``` + +![User-Quota-Details-xfs-linux][1] + +In above xfs_quota command, report is a keyword , b is for block report , i is for inode report and h is for to display report in human readable format, + +### Configure Group Quota + +Let’s assume we have a group named called “**engineering**” and two local users (shashi & rakesh) whose secondary group is engineering + +Now set the following quotas: + + * Soft block limit: 6 GB (or 6144 MB), + * Hard block limit :8 GB (or 8192 MB), + * Soft file limit: 1000 + * Hard file limit: 1200 + + + +So to configure disk and file quota on engineering group, use the beneath xfs_quota command, + +``` +[root@linuxtechi ~]# xfs_quota -x -c 'limit -g bsoft=6144m bhard=8192m isoft=1000 ihard=1200 engineering' /home +[root@linuxtechi ~]# +``` + +**Note:** In xfs_quota we can also specify the block limit size in GB like “bsoft=6g and bhard=8g” + +Now verify the Quota details for group engineering using the following command, + +``` +[root@linuxtechi ~]# xfs_quota -x -c "report -gbih" /home +Group quota on /home (/dev/mapper/Vol-home) + Blocks Inodes +Group ID Used Soft Hard Warn/Grace Used Soft Hard Warn/Grace +---------- --------------------------------- --------------------------------- +root 0 0 0 00 [------] 3 0 0 00 [------] +pkumar 12K 0 0 00 [------] 4 0 0 00 [------] +engineering 0 6G 8G 00 [------] 0 1000 1.2k 00 [------] +shashi 12K 0 0 00 [------] 4 0 0 00 [------] +rakesh 12K 0 0 00 [------] 4 0 0 00 [------] +[root@linuxtechi ~]# +``` + +As we can see above command output, disk and file quota is implemented on engineering group and under the engineering group, we have two users. + +### Configure Project (or Directory) Quota + +Let’s assume we want to set project quota or directory Quota on “**/var/log**“, So first enable project quota(**prjquota**) on /var file system, edit the /etc/fstab file, add “**prjquota**” after default keyword for /var file system, example is shown below, + +``` +[root@linuxtechi ~]# vi /etc/fstab +………………………………. +/dev/mapper/Vol-var /var xfs defaults,prjquota 0 0 +………………………………… +``` + +Save & exit the file + +To make the above changes into the effect, we must reboot our system, + +``` +[root@linuxtechi ~]# init 6 +``` + +After reboot, we can verify whether project quota is enabled or not on /var file system using below mount command + +``` +[root@linuxtechi ~]# mount | grep /var +/dev/mapper/Vol-var on /var type xfs (rw,relatime,seclabel,attr2,inode64,prjquota) +[root@linuxtechi ~]# +``` + +As we can see in above output, project quota is enabled now, so to configure quota /var/log directory, first we must define directory path and its unique id in the file /etc/projects ( In my case i am taking 151 as unique id for /var/log) + +``` +[root@linuxtechi ~]# vi /etc/projects +51:/var/log +``` + +Save & exit the file + +Now associate the above id “151” to a project called “**Logs**”, create a file **/etc/projid** and add the following content to it, + +``` +[root@linuxtechi ~]# vi /etc/projid +Logs:151 +``` + +Save & exit the file + +Initialize “Logs” project directory using the xfs_quota command, + +**Syntax: #**  xfs_quota -x -c ‘project -s project_name’ project_directory + +``` +[root@linuxtechi ~]# xfs_quota -x -c 'project -s Logs' /var +Setting up project Logs (path /var/log)... +Processed 1 (/etc/projects and cmdline) paths for project Logs with recursion depth infinite (-1). +[root@linuxtechi ~]# +``` + +Let’s suppose we want to implement 10 GB hard disk limit and 8 GB soft limit on /var/log directory, run the following xfs_quota command, + +``` +[root@linuxtechi ~]# xfs_quota -x -c 'limit -p bsoft=8g bhard=10g Logs' /var +[root@linuxtechi ~]# +``` + +In above command we have used “-p” after limit keyword which shows that we want to implement project quota + +Use below xfs_quota command to set file or inode limit on /var/log directory + +``` +[root@linuxtechi ~]# xfs_quota -x -c 'limit -p isoft=1800 ihard=2000 Logs' /var +[root@linuxtechi ~]# +``` + +Use below command to print Project quota details + +``` +[root@linuxtechi ~]# xfs_quota -xc 'report -pbih' /var +Project quota on /var (/dev/mapper/Vol-var) + Blocks Inodes +Project ID Used Soft Hard Warn/Grace Used Soft Hard Warn/Grace +---------- --------------------------------- --------------------------------- +#0 137.6M 0 0 00 [------] 1.5k 0 0 00 [------] +Logs 3.1M 8G 10G 00 [------] 33 1.8k 2k 00 [------] +[root@linuxtechi ~]# +``` + +Test Project quota by creating big files under /var/log folder and see whether you can cross 10GB block limit, + +``` +[root@linuxtechi ~]# cd /var/log/ +[root@linuxtechi log]# dd if=/dev/zero of=big_file bs=1G count=9 +9+0 records in +9+0 records out +9663676416 bytes (9.7 GB) copied, 37.8915 s, 255 MB/s +[root@linuxtechi log]# dd if=/dev/zero of=big_file2 bs=1G count=5 +dd: error writing ‘big_file2’: No space left on device +1+0 records in +0+0 records out +1069219840 bytes (1.1 GB) copied, 3.90945 s, 273 MB/s +[root@linuxtechi log]# +``` + +Above dd error command confirms that configured project quota is working fine, we can also confirm the same from xfs_quota command, + +![xfs-project-quota-details][1] + +That’s all from this tutorial, I hope these steps helps you to understand about quota on XFS file system, please do share your feedback and comments in the comments section below. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/disk-quota-xfs-file-system-linux-servers/ + +作者:[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/08/Setup-Disk-Quota-XFS-Linux-Servers.jpg From 79b046a1504897188c02ad4dfb3e4c58ae14afa7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 12 Aug 2019 14:25:08 +0800 Subject: [PATCH 409/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190811=20How=20?= =?UTF-8?q?to=20measure=20the=20health=20of=20an=20open=20source=20communi?= =?UTF-8?q?ty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190811 How to measure the health of an open source community.md --- ... the health of an open source community.md | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 sources/tech/20190811 How to measure the health of an open source community.md diff --git a/sources/tech/20190811 How to measure the health of an open source community.md b/sources/tech/20190811 How to measure the health of an open source community.md new file mode 100644 index 0000000000..2c9b90ada3 --- /dev/null +++ b/sources/tech/20190811 How to measure the health of an open source community.md @@ -0,0 +1,202 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to measure the health of an open source community) +[#]: via: (https://opensource.com/article/19/8/measure-project) +[#]: author: (Jon Lawrence https://opensource.com/users/the3rdlaw) + +How to measure the health of an open source community +====== +It's complicated. +![metrics and data shown on a computer screen][1] + +As a person who normally manages software development teams, over the years I’ve come to care about metrics quite a bit. Time after time, I’ve found myself leading teams using one project platform or another (Jira, GitLab, and Rally, for example) generating an awful lot of measurable data. From there, I’ve promptly invested significant amounts of time to pull useful metrics out of the platform-of-record and into a format where we could make sense of them, and then use the metrics to make better choices about many aspects of development. + +Earlier this year, I had the good fortune of coming across a project at the [Linux Foundation][2] called [Community Health Analytics for Open Source Software][3], or CHAOSS. This project focuses on collecting and enriching metrics from a wide range of sources so that stakeholders in open source communities can measure the health of their projects. + +### What is CHAOSS? + +As I grew familiar with the project’s underlying metrics and objectives, one question kept turning over in my head. What is a "healthy" open source project, and by whose definition? + +What’s considered healthy by someone in a particular role may not be viewed that way by someone in another role. It seemed there was an opportunity to back out from the granular data that CHAOSS collects and do a market segmentation exercise, focusing on what might be the most meaningful contextual questions for a given role, and what metrics CHAOSS collects that might help answer those questions. + +This exercise was made possible by the fact that the CHAOSS project creates and maintains a suite of open source applications and metric definitions, including: + + * A number of server-based applications for gathering, aggregating, and enriching metrics (such as Augur and GrimoireLab). + * The open source versions of ElasticSearch, Kibana, and Logstash (ELK). + * Identity services, data analysis services, and a wide range of integration libraries. + + + +In one of my past programs, where half a dozen teams were working on projects of varying complexity, we found a neat tool which allowed us to create any kind of metric we wanted from a simple (or complex) JQL statement, and then develop calculations against and between those metrics. Before we knew it, we were pulling over 400 metrics from Jira alone, and more from manual sources. + +By the end of the project, we decided that out of the 400-ish metrics, most of them didn’t really matter when it came to making decisions _in our roles_. At the end of the day, there were only three that really mattered to us: "Defect Removal Efficiency," "Points completed vs. Points committed," and "Work-in-Progress per Developer." Those three metrics mattered most because they were promises we made to ourselves, to our clients, and to our team members, and were, therefore, the most meaningful. + +Drawing from the lessons learned through that experience and the question of what is a healthy open source project?, I jumped into the CHAOSS community and started building a set of personas to offer a constructive approach to answering that question from a role-based lens. + +CHAOSS is an open source project and we try to operate using democratic consensus. So, I decided that instead of stakeholders, I’d use the word _constituent_, because it aligns better with the responsibility we have as open source contributors to create a more symbiotic value chain. + +While the exercise of creating this constituent model takes a particular goal-question-metric approach, there are many ways to segment. CHAOSS contributors have developed great models that segment by vectors, like project profiles (for example, individual, corporate, or coalition) and "Tolerance to Failure." Every model provides constructive influence when developing metric definitions for CHAOSS. + +Based on all of this, I set out to build a model of who might care about CHAOSS metrics, and what questions each constituent might care about most in each of CHAOSS’ four focus areas: + + * [Diversity and Inclusion][4] + * [Evolution][5] + * [Risk][6] + * [Value][7] + + + +Before we dive in, it’s important to note that the CHAOSS project expressly leaves contextual judgments to teams implementing the metrics. What’s "meaningful" and the answer to "What is healthy?" is expected to vary by team and by project. The CHAOSS software’s ready-made dashboards focus on objective metrics as much as possible. In this article, we focus on project founders, project maintainers, and contributors. + +### Project constituents + +While this is by no means an exhaustive list of questions these constituents might feel are important, these choices felt like a good place to start. Each of the Goal-Question-Metric segments below is directly tied to metrics that the CHAOSS project is collecting and aggregating. + +Now, on to Part 1 of the analysis! + +#### Project founders + +As a **project founder**, I care **most** about: + + * Is my project **useful to others?** Measured as a function of: + + * How many forks over time? +**Metric:** Repository forks. + + * How many contributors over time? +**Metric:** Contributor count. + + * Net quality of contributions. +**Metric:** Bugs filed over time. +**Metric:** Regressions over time. + + * Financial health of my project. +**Metric:** Donations/Revenue over time. +**Metric:** Expenses over time. + + * How **visible** is my project to others? + + * Does anyone know about my project? Do others think it’s neat? +**Metric:** Social media mentions, shares, likes, and subscriptions. + + * Does anyone with influence know about my project? +**Metric:** Social reach of contributors. + + * What are people saying about the project in public spaces? Is it positive or negative? +**Metric:** Sentiment (keyword or NLP) analysis across social media channels. + + * How **viable** is my project? + + * Do we have enough maintainers? Is the number rising or falling over time? +**Metric:** Number of maintainers. + + * Do we have enough contributors? Is the number rising or falling over time? +**Metric:** Number of contributors. + + * How is velocity changing over time? +**Metric:** Percent change of code over time. +**Metric:** Time between pull request, code review, and merge. + + * How [**diverse & inclusive**][4] is my project? + + * Do we have a valid, public, Code of Conduct (CoC)? +**Metric:** CoC repository file check. + + * Are events associated with my project actively inclusive? +**Metric:** Manual reporting on event ticketing policies and event inclusion activities. + + * Does our project do a good job of being accessible? +**Metric:** Validation of typed meeting minutes being posted. +**Metric:** Validation of closed captioning used during meetings. +**Metric:** Validation of color-blind-accessible materials in presentations and in project front-end designs. + + * How much [**value**][7] does my project represent? + + * How can I help organizations understand how much time and money using our project would save them (labor investment) +**Metric:** Repo count of issues, commits, pull requests, and the estimated labor rate. + + * How can I understand the amount of downstream value my project creates and how vital (or not) it is to the wider community to maintain my project? +**Metric:** Repo count of how many other projects rely on my project. + + * How much opportunity is there for those contributing to my project to use what they learn working on it to land good jobs and at what organizations (aka living wage)? +**Metric:** Count of organizations using or contributing to this library. +**Metric:** Averages of salaries for developers working with this kind of project. +**Metric:** Count of job postings with keywords that match this project. + + + + +### Project maintainers + +As a **Project Maintainer,** I care **most** about: + + * Am I an **efficient** maintainer? +**Metric:** Time PR’s wait before a code review. +**Metric:** Time between code review and subsequent PR’s. +**Metric:** How many of my code reviews are approvals? +**Metric:** How many of my code reviews are rejections/rework requests? +**Metric:** Sentiment analysis of code review comments. + + * How do I get **more people** to help me maintain this thing? +**Metric:** Count of social reach of project contributors. + + * Is our **code quality** getting better or worse over time? +**Metric:** Count how many regressions are being introduced over time. +**Metric:** Count how many bugs are being introduced over time. +**Metric:** Time between bug filing, pull request, review, merge, and release. + + + + +### Project developers and contributors + +As a **project developer or contributor**, I care most about: + + * What things of value can I gain from contributing to this project and how long might it take to realize that value? +**Metric:** Downstream value. +**Metric:** Time between commits, code reviews, and merges. + + * Are there good prospects for using what I learn by contributing to increase my job opportunities? +**Metric:** Living wage. + + * How popular is this project? +**Metric:** Counts of social media posts, shares, and favorites. + + * Do community influencers know about my project? +**Metric:** Social reach of founders, maintainers, and contributors. + + + + +By creating this list, we’ve just begun to put meat on the contextual bones of CHAOSS, and with the first release of metrics in the project this summer, I can’t wait to see what other great ideas the broader open source community may have to contribute and what else we can all learn (and measure!) from those contributions. + +### Other roles + +Next, you need to learn more about goal-question-metric sets for other roles (such as foundations, corporate open source program offices, business risk and legal teams, human resources, and others) as well as end users, who have a distinctly different set of things they care about when it comes to open source. + +If you’re an open source contributor or constituent, we invite you to [come check out the project][8] and get engaged in the community! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/measure-project + +作者:[Jon Lawrence][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/the3rdlaw +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://www.linuxfoundation.org/ +[3]: https://chaoss.community/ +[4]: https://github.com/chaoss/wg-diversity-inclusion +[5]: https://github.com/chaoss/wg-evolution +[6]: https://github.com/chaoss/wg-risk +[7]: https://github.com/chaoss/wg-value +[8]: https://github.com/chaoss/ From 95f2d56c68f129144b2eda9218b4d3a0ec4e1591 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Aug 2019 00:52:11 +0800 Subject: [PATCH 410/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190813=20How=20?= =?UTF-8?q?to=20Install=20&=20Use=20VirtualBox=20Guest=20Additions=20on=20?= =?UTF-8?q?Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190813 How to Install - Use VirtualBox Guest Additions on Ubuntu.md --- ...se VirtualBox Guest Additions on Ubuntu.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sources/tech/20190813 How to Install - Use VirtualBox Guest Additions on Ubuntu.md diff --git a/sources/tech/20190813 How to Install - Use VirtualBox Guest Additions on Ubuntu.md b/sources/tech/20190813 How to Install - Use VirtualBox Guest Additions on Ubuntu.md new file mode 100644 index 0000000000..0f6fdce7f8 --- /dev/null +++ b/sources/tech/20190813 How to Install - Use VirtualBox Guest Additions on Ubuntu.md @@ -0,0 +1,161 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Install & Use VirtualBox Guest Additions on Ubuntu) +[#]: via: (https://itsfoss.com/virtualbox-guest-additions-ubuntu/) +[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) + +How to Install & Use VirtualBox Guest Additions on Ubuntu +====== + +_**Brief: Install VirtualBox Guest Additions in Ubuntu and with this you’ll be able to copy-paste, drag and drop between the host and guest system. It makes using Ubuntu in virtual machine a lot easier.**_ + +The VirtualBox Guest Additions consist of device drivers and system applications that optimize the operating system for better performance and usability. These drivers provide a tighter integration between the guest and host systems. + +No matter how you are using your Virtual Machine, Guest Additions can be very helpful for you. For example, I test many installations and applications inside a VM and take a lot of screenshots. It comes in very handy to be able to move those screenshots freely between the Host OS and the Guest OS. + +Guest? Host? What’s that? + +If you are not aware already, you should know the terminology first. +Host system is your actual operating system installed on your physical system. +Guest system is the virtual machine you have installed inside your host operating system. + +Before you see the steps to install VirtualBox Guest Additions in Ubuntu, let’s first talk about its features. + +### Why should you use VirtualBox Guest Additions? + +![][1] + +With VirtualBox Guest Additions enabled, using the virtual machine becomes a lot more comfortable. Don’t believe me? Here are the important features that the Guest Additions offer: + + * **Mouse pointer integration**: You no longer need to press any key to “free” the cursor from the Guest OS. + * **Shared clipboard**: With the Guest Additions installed, you can copy-paste between the guest and the host operating systems. + * **Drag and drop**: You can also drag and drop files between the host and the guest OS. + * **Shared folders**: My favorite feature; this feature allows you to exchange files between the host and the guest. You can tell VirtualBox to treat a certain host directory as a shared folder, and the program will make it available to the guest operating system as a network share, irrespective of whether guest actually has a network. + * **Better video support**: The custom video drivers that are installed with the Guest Additions provide you with extra high and non-standard video modes, as well as accelerated video performance. It also allows you to resize the virtual machine’s window. The video resolution in the guest will be automatically adjusted, as if you had manually entered an arbitrary resolution in the guest’s Display settings. + * **Seamless windows**: The individual windows that are displayed on the desktop of the virtual machine can be mapped on the host’s desktop, as if the underlying application was actually running on the host. + * **Generic host/guest communication channels**: The Guest Additions enable you to control and monitor guest execution. The “guest properties” provide a generic string-based mechanism to exchange data bits between a guest and a host, some of which have special meanings for controlling and monitoring the guest. Applications can be started in the Guest machine from the Host. + * **Time synchronization**: The Guest Additions will resynchronize the time with that of the Host machine regularly. The parameters of the time synchronization mechanism can be configured. + * **Automated logins**: Basically credentials passing, it can be a useful feature. + + + +[][2] + +Suggested read  How To Extract Audio From Video In Ubuntu Linux + +Impressed by the features it provides? Let’s see how you can install VirtualBox Guest Additions on Ubuntu Linux. + +### Installing VirtualBox Guest Additions on Ubuntu + +The scenario here is that you have [Ubuntu Linux installed inside VirtualBox][3]. The host system could be any operating system. + +I’ll demonstrate the installation process on a minimal install of a Ubuntu virtual machine. First run your virtual machine: + +![VirtualBox Ubuntu Virtual Machine][4] + +To get started, select **Device > Insert Guest Additions CD image…**: + +![Insert Guest Additions CD Image][5] + +This will provide you with the required installer inside the guest system (i.e. the virtual operating system). It will try auto-running, so just click **Run**: + +![AutoRun Guest Additions Installation][6] + +This should open up the installation in a terminal window. Follow the on-screen instructions and you’ll have the Guest Additions installed in a few minutes at most. + +**Troubleshooting tips:** + +If you get an error like this one, it means you are missing some kernel modules (happens in some cases, such as minimal installs): + +![Error while installing Guest Additions in Ubuntu][7] + +You need to install a few more packages here. Just to clarify, you need to run these commands in the virtual Ubuntu system: + +``` +sudo apt install build-essential dkms linux-headers-$(uname -r) +``` + +Now run the Guest Addition setup again: + +``` +sudo rcvboxadd setup +``` + +### Using VirtualBox Guest Addition features + +Here are some screenshots for enabling/using helpful features of VirtualBox Guest Additions in use: + +#### Change the Virtual Screen Resolution + +![Change Virtual Screen Resolution][8] + +#### Configure Drag And Drop (any files) + +You can enable drag and drop from the top menu -> Devices ->Drag and Drop -> Bidirectional. + +With Bidirectional, you can drag and drop from guest to host and from host to guest, both. + +![Drag and Drop][9] + +##### Configure Shared Clipboard (for copy-pasting) + +Similarly, you can enable shared clipboard from the top menu -> Devices -> Shared Clipboard -> Bidirectional. + +![Shared Clipboard][10] + +### Uninstalling VirtualBox Guest Additions + +Navigate to the CD image and open it in terminal (**Right Click** inside directory > **Open in Terminal**): + +![Open in Terminal][11] + +Now enter: + +``` +sh ./VBoxLinuxAdditions.run uninstall +``` + +However, in some cases you might have to do some more cleanup. Use the command: + +``` +/opt/VBoxGuestAdditions-version/uninstall.sh +``` + +**Note:** _Replace **VBoxGuestAdditions-version** with the right version (you can hit **tab** to autocomplete; in my case it is **VBoxGuestAdditions-6.0.4**)._ + +### Wrapping Up + +Hopefully by now you have learned how to install and use the VirtualBox Guest Additions in Ubuntu. Let us know if you use these Additions, and what feature you find to be the most helpful! + +[][12] + +Suggested read  Fix Grub Not Showing For Windows 10 Linux Dual Boot + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/virtualbox-guest-additions-ubuntu/ + +作者:[Sergiu][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/sergiu/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/08/virtual-box-guest-additions-ubuntu.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/extract-audio-video-ubuntu/ +[3]: https://itsfoss.com/install-linux-in-virtualbox/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/virtualbox_ubuntu_virtual_machine.png?fit=800%2C450&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/install_guest_additions.png?fit=800%2C504&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/autorun_guest_additions_installation.png?fit=800%2C602&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/guest_additions_terminal_output.png?fit=800%2C475&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/change_virtual_screen_resolution.png?fit=744%2C800&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/drag_and_drop.png?fit=800%2C352&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/shared_clipboard.png?fit=800%2C331&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/open_in_terminal.png?fit=800%2C537&ssl=1 +[12]: https://itsfoss.com/no-grub-windows-linux/ From 352bb1bdda3e07d7d4554d26acfcb8dcf78a41eb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Aug 2019 00:52:43 +0800 Subject: [PATCH 411/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190812=20Cloud-?= =?UTF-8?q?native=20Java,=20open=20source=20security,=20and=20more=20indus?= =?UTF-8?q?try=20trends?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190812 Cloud-native Java, open source security, and more industry trends.md --- ...urce security, and more industry trends.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20190812 Cloud-native Java, open source security, and more industry trends.md diff --git a/sources/tech/20190812 Cloud-native Java, open source security, and more industry trends.md b/sources/tech/20190812 Cloud-native Java, open source security, and more industry trends.md new file mode 100644 index 0000000000..cbc42dbbbd --- /dev/null +++ b/sources/tech/20190812 Cloud-native Java, open source security, and more industry trends.md @@ -0,0 +1,88 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Cloud-native Java, open source security, and more industry trends) +[#]: via: (https://opensource.com/article/19/8/cloud-native-java-and-more) +[#]: author: (Tim Hildred https://opensource.com/users/thildred) + +Cloud-native Java, open source security, 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. + +## [Why is modern web development so complicated?][2] + +> Modern frontend web development is a polarizing experience: many love it, others despise it. +> +> I am a huge fan of modern web development, though I would describe it as "magical"—and magic has its upsides and downsides... Recently I’ve been needing to explain “modern web development workflows” to folks who only have a cursory of vanilla web development workflows and… It is a LOT to explain! Even a hasty explanation ends up being pretty long. So in the effort of writing more of my explanations down, here is the beginning of a long yet hasty explanation of the evolution of web development.. + +**The impact:** Specific enough to be useful to (especially new) frontend developers, but simple and well explained enough to help non-developers understand better some of the frontend developer problems. By the end, you'll (kinda) know the difference between Javascript and WebAPIs and how 2019 Javascript is different than 2006 Javascript. + +## [Open sourcing the Kubernetes security audit][3] + +> Last year, the Cloud Native Computing Foundation (CNCF) began the process of performing and open sourcing third-party security audits for its projects in order to improve the overall security of our ecosystem. The idea was to start with a handful of projects and gather feedback from the CNCF community as to whether or not this pilot program was useful. The first projects to undergo this process were [CoreDNS][4], [Envoy][5] and [Prometheus][6]. These first public audits identified security issues from general weaknesses to critical vulnerabilities. With these results, project maintainers for CoreDNS, Envoy and Prometheus have been able to address the identified vulnerabilities and add documentation to help users. +> +> The main takeaway from these initial audits is that a public security audit is a great way to test the quality of an open source project along with its vulnerability management process and more importantly, how resilient the open source project’s security practices are. With CNCF [graduated projects][7] especially, which are used widely in production by some of the largest companies in the world, it is imperative that they adhere to the highest levels of security best practices. + +**The impact:** A lot of companies are placing big bets on Kubernetes being to the cloud what Linux is to that data center. Seeing 4 of those companies working together to make sure the project is doing what it should be from a security perspective inspires confidence. Sharing that research shows that open source is so much more than code in a repository; it is the capturing and sharing of expert opinions in a way that benefits the community at large rather than the interests of a few. + +## [Quarkus—what's next for the lightweight Java framework?][8] + +> What does “container first” mean? What are the strengths of Quarkus? What’s new in 0.20.0? What features can we look forward to in the future? When will version 1.0.0 be released? We have so many questions about Quarkus and Alex Soto was kind enough to answer them all. _With the release of Quarkus 0.20.0, we decided to get in touch with [JAX London speaker][9], Java Champion, and Director of Developer Experience at Red Hat – Alex Soto. He was kind enough to answer all our questions about the past, present, and future of Quarkus. It seems like we have a lot to look forward to with this exciting lightweight framework!_ + +**The impact**: Someone clever recently told me that Quarkus has the potential to make Java "possibly one of the best languages for containers and serverless environments". That made me do a double-take; while Java is one of the most popular programming languages ([if not the most popular][10]) it probably isn't the first one that jumps to mind when you hear the words "cloud native." Quarkus could extend and grow the value of the skills held by a huge chunk of the developer workforce by allowing them to apply their experience to new challenges. + +## [Julia programming language: Users reveal what they love and hate the most about it][11] + +> The most popular technical feature of Julia is speed and performance followed by ease of use, while the most popular non-technical feature is that users don't have to pay to use it.  +> +> Users also report their biggest gripes with the language. The top one is that packages for add-on features aren't sufficiently mature or well maintained to meet their needs.  + +**The impact:** The Julia 1.0 release has been out for a year now, and has seen impressive growth in a bunch of relevant metrics (downloads, GitHub stars, etc). It is a language aimed squarely at some of our biggest current and future challenges ("scientific computing, machine learning, data mining, large-scale linear algebra, distributed and parallel computing") so finding out how it's users are feeling about it gives an indirect read on how well those challenges are being addressed. + +## [Multi-cloud by the numbers: 11 interesting stats][12] + +> If you boil our recent dive into [interesting stats about Kubernetes][13] down to its bottom line, it looks something like this: [Kubernetes'][14] popularity will continue for the foreseeable future. +> +> Spoiler alert: When you dig up recent numbers about [multi-cloud][15] usage, they tell a similar story: Adoption is soaring. +> +> This congruity makes sense. Perhaps not every organization will use Kubernetes to manage its multi-cloud and/or [hybrid cloud][16] infrastructure, but the two increasingly go hand-in-hand. Even when they don’t, they both reflect a general shift toward more distributed and heterogeneous IT environments, as well as [cloud-native development][17] and other overlapping trends. + +**The impact**: Another explanation of increasing adoption of "multi-cloud strategies" is they retroactively legitimize decisions taken in separate parts of an organization without consultation as "strategic." "Wait, so you bought hours from who? And you bought hours from the other one? Why wasn't that in the meeting minutes? I guess we're a multi-cloud company now!" Of course I'm joking, I'm sure most big companies are a lot better coordinated than that, right? + +_I hope you enjoyed this list of what stood out to me from last week and come back next Monday for more open source community, market, and industry trends._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/cloud-native-java-and-more + +作者:[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.vrk.dev/2019/07/11/why-is-modern-web-development-so-complicated-a-long-yet-hasty-explanation-part-1/ +[3]: https://www.cncf.io/blog/2019/08/06/open-sourcing-the-kubernetes-security-audit/ +[4]: https://coredns.io/2018/03/15/cure53-security-assessment/ +[5]: https://github.com/envoyproxy/envoy/blob/master/docs/SECURITY_AUDIT.pdf +[6]: https://cure53.de/pentest-report_prometheus.pdf +[7]: https://www.cncf.io/projects/ +[8]: https://jaxenter.com/quarkus-whats-next-for-the-lightweight-java-framework-160793.html +[9]: https://jaxlondon.com/cloud-kubernetes-serverless/java-particle-acceleration-using-quarkus/ +[10]: https://opensource.com/article/19/8/possibly%20one%20of%20the%20best%20languages%20for%20containers%20and%20serverless%20environments. +[11]: https://www.zdnet.com/article/julia-programming-language-users-reveal-what-they-love-and-hate-the-most-about-it/#ftag=RSSbaffb68 +[12]: https://enterprisersproject.com/article/2019/8/multi-cloud-statistics +[13]: https://enterprisersproject.com/article/2019/7/kubernetes-statistics-13-compelling +[14]: https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=701f2000000tjyaAAA +[15]: https://www.redhat.com/en/topics/cloud-computing/what-is-multicloud?intcmp=701f2000000tjyaAAA +[16]: https://enterprisersproject.com/hybrid-cloud +[17]: https://enterprisersproject.com/article/2018/10/how-explain-cloud-native-apps-plain-english From 41c470b579fe57febfa158678eaacbaf2b471186 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Aug 2019 00:53:00 +0800 Subject: [PATCH 412/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190812=20How=20?= =?UTF-8?q?Hexdump=20works?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190812 How Hexdump works.md --- sources/tech/20190812 How Hexdump works.md | 240 +++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 sources/tech/20190812 How Hexdump works.md diff --git a/sources/tech/20190812 How Hexdump works.md b/sources/tech/20190812 How Hexdump works.md new file mode 100644 index 0000000000..a8ca95f97c --- /dev/null +++ b/sources/tech/20190812 How Hexdump works.md @@ -0,0 +1,240 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How Hexdump works) +[#]: via: (https://opensource.com/article/19/8/dig-binary-files-hexdump) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/shishz) + +How Hexdump works +====== +Hexdump helps you investigate the contents of binary files. Learn how +hexdump works. +![Magnifying glass on code][1] + +Hexdump is a utility that displays the contents of binary files in hexadecimal, decimal, octal, or ASCII. It’s a utility for inspection and can be used for [data recovery][2], reverse engineering, and programming. + +### Learning the basics + +Hexdump provides output with very little effort on your part and depending on the size of the file you’re looking at, there can be a lot of output. For the purpose of this article, create a 1x1 PNG file. You can do this with a graphics application such as [GIMP][3] or [Mtpaint][4], or you can create it in a terminal with [ImageMagick][5]. + +Here’s a command to generate a 1x1 pixel PNG with ImageMagick: + + +``` +$ convert -size 1x1 canvas:black pixel.png +``` + +You can confirm that this file is a PNG with the **file** command: + + +``` +$ file pixel.png +pixel.png: PNG image data, 1 x 1, 1-bit grayscale, non-interlaced +``` + +You may wonder how the **file** command is able to determine what kind of file it is. Coincidentally, that’s what **hexdump** will reveal. For now, you can view your one-pixel graphic in the image viewer of your choice (it looks like this: **.** ), or you can view what’s inside the file with **hexdump**: + + +``` +$ hexdump pixel.png +0000000 5089 474e 0a0d 0a1a 0000 0d00 4849 5244 +0000010 0000 0100 0000 0100 0001 0000 3700 f96e +0000020 0024 0000 6704 4d41 0041 b100 0b8f 61fc +0000030 0005 0000 6320 5248 004d 7a00 0026 8000 +0000040 0084 fa00 0000 8000 00e8 7500 0030 ea00 +0000050 0060 3a00 0098 1700 9c70 51ba 003c 0000 +0000060 6202 474b 0044 dd01 138a 00a4 0000 7407 +0000070 4d49 0745 07e3 081a 3539 a487 46b0 0000 +0000080 0a00 4449 5441 d708 6063 0000 0200 0100 +0000090 21e2 33bc 0000 2500 4574 7458 6164 6574 +00000a0 633a 6572 7461 0065 3032 3931 302d 2d37 +00000b0 3532 3254 3a30 3735 353a 2b33 3231 303a +00000c0 ac30 5dcd 00c1 0000 7425 5845 6474 7461 +00000d0 3a65 6f6d 6964 7966 3200 3130 2d39 3730 +00000e0 322d 5435 3032 353a 3a37 3335 312b 3a32 +00000f0 3030 90dd 7de5 0000 0000 4549 444e 42ae +0000100 8260 +0000102 +``` + +What you’re seeing is the contents of the sample PNG file through a lens you may have never used before. It’s the exact same data you see in an image viewer, encoded in a way that’s probably unfamiliar to you. + +### Extracting familiar strings + +Just because the default data dump seems meaningless, that doesn’t mean it’s devoid of valuable information. You can translate this output or at least the parts that actually translate, to a more familiar character set with the **\--canonical** option: + + +``` +$ hexdump --canonical foo.png +00000000  89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52  |.PNG........IHDR| +00000010  00 00 00 01 00 00 00 01  01 00 00 00 00 37 6e f9  |.............7n.| +00000020  24 00 00 00 04 67 41 4d  41 00 00 b1 8f 0b fc 61  |$....gAMA......a| +00000030  05 00 00 00 20 63 48 52  4d 00 00 7a 26 00 00 80  |.... cHRM..z&...| +00000040  84 00 00 fa 00 00 00 80  e8 00 00 75 30 00 00 ea  |...........u0...| +00000050  60 00 00 3a 98 00 00 17  70 9c ba 51 3c 00 00 00  |`..:....p..Q<...| +00000060  02 62 4b 47 44 00 01 dd  8a 13 a4 00 00 00 07 74  |.bKGD..........t| +00000070  49 4d 45 07 e3 07 1a 08  39 35 87 a4 b0 46 00 00  |IME.....95...F..| +00000080  00 0a 49 44 41 54 08 d7  63 60 00 00 00 02 00 01  |..IDAT..c`......| +00000090  e2 21 bc 33 00 00 00 25  74 45 58 74 64 61 74 65  |.!.3...%tEXtdate| +000000a0  3a 63 72 65 61 74 65 00  32 30 31 39 2d 30 37 2d  |:create.2019-07-| +000000b0  32 35 54 32 30 3a 35 37  3a 35 33 2b 31 32 3a 30  |25T20:57:53+12:0| +000000c0  30 ac cd 5d c1 00 00 00  25 74 45 58 74 64 61 74  |0..]....%tEXtdat| +000000d0  65 3a 6d 6f 64 69 66 79  00 32 30 31 39 2d 30 37  |e:modify.2019-07| +000000e0  2d 32 35 54 32 30 3a 35  37 3a 35 33 2b 31 32 3a  |-25T20:57:53+12:| +000000f0  30 30 dd 90 e5 7d 00 00  00 00 49 45 4e 44 ae 42  |00...}....IEND.B| +00000100  60 82                                             |`.| +00000102 +``` + +In the right column, you see the same data that’s on the left but presented as ASCII. If you look carefully, you can pick out some useful information, such as the file’s format (PNG) and—toward the bottom—the date and time the file was created and last modified. The dots represent symbols that aren’t present in the ASCII character set, which is to be expected because binary formats aren’t restricted to mundane letters and numbers. + +The **file** command knows from the first 8 bytes what this file is. The [libpng specification][6] alerts programmers what to look for. You can see that within the first 8 bytes of this image file, specifically, is the string **PNG**. That fact is significant because it reveals how the **file** command knows what kind of file to report. + +You can also control how many bytes **hexdump** displays, which is useful with files larger than one pixel: + + +``` +$ hexdump --length 8 pixel.png +0000000 5089 474e 0a0d 0a1a +0000008 +``` + +You don’t have to limit **hexdump** to PNG or graphic files. You can run **hexdump** against binaries you run on a daily basis as well, such as [ls][7], [rsync][8], or any binary format you want to inspect. + +### Implementing cat with hexdump + +If you read the PNG spec, you may notice that the data in the first 8 bytes looks different than what **hexdump** provides. Actually, it’s the same data, but it’s presented using a different conversion. So, the output of **hexdump** is true, but not always directly useful to you, depending on what you’re looking for. For that reason, **hexdump** has options to format and convert the raw data it dumps. + +The conversion options can get complex, so it’s useful to practice with something trivial first. Here’s a gentle introduction to formatting **hexdump** output by reimplementing the [**cat**][9] command. First, run **hexdump** on a text file to see its raw data. You can usually find a copy of the [GNU General Public License (GPL)][10] license somewhere on your hard drive, or you can use any text file you have handy. Your output may differ, but here’s how to find a copy of the GPL on your system (or at least part of it): + + +``` +$ find /usr/share/doc/ -type f -name "COPYING" | tail -1 +/usr/share/doc/libblkid-devel/COPYING +``` + +Run **hexdump** against it: + + +``` +$ hexdump /usr/share/doc/libblkid-devel/COPYING +0000000 6854 7369 6c20 6269 6172 7972 6920 2073 +0000010 7266 6565 7320 666f 7774 7261 3b65 7920 +0000020 756f 6320 6e61 7220 6465 7369 7274 6269 +0000030 7475 2065 7469 6120 646e 6f2f 0a72 6f6d +0000040 6964 7966 6920 2074 6e75 6564 2072 6874 +0000050 2065 6574 6d72 2073 666f 7420 6568 4720 +0000060 554e 4c20 7365 6573 2072 6547 656e 6172 +0000070 206c 7550 6c62 6369 4c0a 6369 6e65 6573 +0000080 6120 2073 7570 6c62 7369 6568 2064 7962 +[...] +``` + +If the file’s output is very long, use the **\--length** (or **-n** for short) to make it manageable for yourself. + +The raw data probably means nothing to you, but you already know how to convert it to ASCII: + + +``` +hexdump --canonical /usr/share/doc/libblkid-devel/COPYING +00000000  54 68 69 73 20 6c 69 62  72 61 72 79 20 69 73 20  |This library is | +00000010  66 72 65 65 20 73 6f 66  74 77 61 72 65 3b 20 79  |free software; y| +00000020  6f 75 20 63 61 6e 20 72  65 64 69 73 74 72 69 62  |ou can redistrib| +00000030  75 74 65 20 69 74 20 61  6e 64 2f 6f 72 0a 6d 6f  |ute it and/or.mo| +00000040  64 69 66 79 20 69 74 20  75 6e 64 65 72 20 74 68  |dify it under th| +00000050  65 20 74 65 72 6d 73 20  6f 66 20 74 68 65 20 47  |e terms of the G| +00000060  4e 55 20 4c 65 73 73 65  72 20 47 65 6e 65 72 61  |NU Lesser Genera| +00000070  6c 20 50 75 62 6c 69 63  0a 4c 69 63 65 6e 73 65  |l Public.License| +[...] +``` + +That output is helpful but unwieldy and difficult to read. To format **hexdump**’s output beyond what’s offered by its own options, use **\--format** (or **-e**) along with specialized formatting codes. The shorthand used for formatting is similar to what the **printf** command uses, so if you are familiar with **printf** statements, you may find **hexdump** formatting easier to learn. + +In **hexdump**, the character sequence **%_p** tells **hexdump** to print a character in your system’s default character set. All formatting notation for the **\--format** option must be enclosed in _single quotes_: + + +``` +$ hexdump -e'"%_p"' /usr/share/doc/libblkid-devel/COPYING +This library is fre* + software; you can redistribute it and/or.modify it under the terms of the GNU Les* +er General Public.License as published by the Fre* + Software Foundation; either.version 2.1 of the License, or (at your option) any later.version..* +The complete text of the license is available in the..* +/Documentation/licenses/COPYING.LGPL-2.1-or-later file.. +``` + +This output is better, but still inconvenient to read. Traditionally, UNIX text files assume an 80-character output width (because long ago, monitors tended to fit only 80 characters across). + +While this output isn’t bound by formatting, you can force **hexdump** to process 80 bytes at a time with additional options. Specifically, by dividing 80 by one, you can tell **hexdump** to treat 80 bytes as one unit: + + +``` +$ hexdump -e'80/1 "%_p"' /usr/share/doc/libblkid-devel/COPYING +This library is free software; you can redistribute it and/or.modify it under the terms of the GNU Lesser General Public.License as published by the Free Software Foundation; either.version 2.1 of the License, or (at your option) any later.version...The complete text of the license is available in the.../Documentation/licenses/COPYING.LGPL-2.1-or-later file.. +``` + +Now the file is processed in 80-byte chunks, but it’s lost any sense of new lines. You can add your own with the **\n** character, which in UNIX represents a new line: + + +``` +$ hexdump -e'80/1 "%_p""\n"' +This library is free software; you can redistribute it and/or.modify it under th +e terms of the GNU Lesser General Public.License as published by the Free Softwa +re Foundation; either.version 2.1 of the License, or (at your option) any later. +version...The complete text of the license is available in the.../Documentation/ +licenses/COPYING.LGPL-2.1-or-later file.. +``` + +You have now (approximately) implemented the **cat** command with **hexdump** formatting. + +### Controlling the output + +Formatting is, realistically, how you make **hexdump** useful. Now that you’re familiar, in principle at least, with **hexdump** formatting, you can make the output of **hexdump -n 8** match the output of the PNG header as described by the official **libpng** spec. + +First, you know that you want **hexdump** to process the PNG file in 8-byte chunks. Furthermore, you may know by integer recognition that the PNG spec is documented in decimal, which is represented by **%d** according to the **hexdump** documentation: + + +``` +$ hexdump -n8 -e'8/1 "%d""\n"' pixel.png +13780787113102610 +``` + +You can make the output perfect by adding a blank space after each integer: + + +``` +$ hexdump -n8 -e'8/1 "%d ""\n"' pixel.png +137 80 78 71 13 10 26 10 +``` + +The output is now a perfect match to the PNG specification. + +### Hexdumping for fun and profit + +Hexdump is a fascinating tool that not only teaches you more about how computers process and convert information, but also about how file formats and compiled binaries function. You should try running **hexdump** on files at random throughout the day as you work. You never know what kinds of information you may find, nor when having that insight may be useful. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/dig-binary-files-hexdump + +作者:[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/sethhttps://opensource.com/users/shishz +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 (Magnifying glass on code) +[2]: https://www.redhat.com/sysadmin/find-lost-files-scalpel +[3]: http://gimp.org +[4]: https://opensource.com/article/17/2/mtpaint-pixel-art-animated-gifs +[5]: https://opensource.com/article/17/8/imagemagick +[6]: http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html +[7]: https://opensource.com/article/19/7/master-ls-command +[8]: https://opensource.com/article/19/5/advanced-rsync +[9]: https://opensource.com/article/19/2/getting-started-cat-command +[10]: https://en.wikipedia.org/wiki/GNU_General_Public_License From 46794cd057304431c441ad8644e32b9a2f9360f4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Aug 2019 00:53:23 +0800 Subject: [PATCH 413/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190812=20What?= =?UTF-8?q?=20open=20source=20is=20not?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190812 What open source is not.md --- .../tech/20190812 What open source is not.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sources/tech/20190812 What open source is not.md diff --git a/sources/tech/20190812 What open source is not.md b/sources/tech/20190812 What open source is not.md new file mode 100644 index 0000000000..72788635a0 --- /dev/null +++ b/sources/tech/20190812 What open source is not.md @@ -0,0 +1,94 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What open source is not) +[#]: via: (https://opensource.com/article/19/8/what-open-source-not) +[#]: author: (Gordon Haff https://opensource.com/users/ghaff) + +What open source is not +====== +Here are some things that are not central to what open source is and +where it’s going. +![Open here.][1] + +From its early days, the availability of source code was one of the defining characteristics of open source software. Indeed, Brian Behlendorf of the Apache web server project, an early open source software success, favored "source code available software." + +Another important aspect related to user rights. Hence, the "free software" terminology that came out of Richard Stallman’s GNU Manifesto and GNU Public License (GPL). As the shorthand went, free was about freedom, not price. [Christine Peterson would later coin "open source"][2] as an alternative that avoided the confusion that regularly arose between these two meanings of free. And that’s the term that’s most widely used today. + +These and other historical contexts still flavor how many think about open source today. Where open source came from should still inform today’s thinking about open source. But it also shouldn’t overly constrain that thinking. + +With that background, here are some things that open source is not, or at least that aren’t central to what open source is and where it’s going. + +### Open source is not licenses + +Licenses as a legal concept remain an important part of open source software’s foundations. But, recent hullabaloo on the topic notwithstanding, licenses are mostly not the central topic that they once were. It’s generally understood that the gamut of licenses from copyleft ones like the GPL family to the various permissionless licenses like the Apache, BSD, and MIT licenses come with various strengths and tradeoffs. + +Today’s projects tend to choose licenses based on practical concerns—with a general overall rise in using permissionless licenses for new projects. The proliferation of new open source licenses has also largely subsided given a broad recognition that the [Open Source Definition (OSD)][3] is well-covered by existing license options. + +(The OSD and the set of approved licenses maintained by the Open Source Initiative (OSI) serve as a generally accepted standard for what constitutes an open source software license. Core principles include free redistribution, providing a means to obtain source code, allowing modifications, and a lack of prohibitions about who can use the software and for what purpose.) + +### Open source is not a buzzword + +Words matter. + +Open source software is popular with users for many reasons. They can acquire the software for free and modify it as needed. They can also purchase commercial products that package up open source projects and support them through a life cycle in ways that are needed for many enterprise production deployments. + +Many users of open source software also view it as a great way to get [access to all of the innovation][4] happening in upstream community projects. + +The term "open source" carries a generally positive vibe in other words. + +But open source also has a specific definition, according to the aforementioned OSD. So you can’t just slap an open source label on your license and software and call it open source if it is not, in fact, open source. Well, no one can stop you, but they can call you out for it. Proprietary software with an open source label doesn’t confer any of the advantages of an open source approach for either you or your users. + +### Open source is not viewing code + +The ability to obtain and view open source code is inherent to open source’s definition. But viewing isn’t the interesting part. + +If I write something and put it up on a public repo under an open source license and call it a day, that’s not a very interesting act. It’s _possible_ that there’s enough value in just the code that someone else will fork the software and do something useful with it. + +However, for the most part, if I don’t invite contributions or otherwise make an effort to form a community around the project and codebase, it’s unlikely to gain traction. And, if no one is around to look at the code, does it really matter that it’s possible to do so? + +### Open source is not a business model + +It’s common to hear people talk about "open source business models." I’m going to be just a bit pedantic and argue that there’s no such thing. + +It’s not that open source doesn’t intersect with and influence business models. Of course, it does. Most obviously, open source tends to preclude business models that depend in whole—or in significant part—on restricting access to software that has not been purchased in some manner. + +Conversely, participation in upstream open source communities can create opportunities that otherwise wouldn’t exist. For example, companies can share the effort of writing common infrastructure software with competitors while focusing on those areas of their business where they think they can add unique value—their secret sauce if you will. + +However, thinking of open source itself as a business model is, I would argue, the wrong framing. It draws attention away from thinking about business models in terms of sustainable company objectives and differentiation. + +### Open source is... + +Which brings us to a key aspect of open source, as it’s developed into such an important part of the software landscape. + +Open source preserves user freedoms and provides users with the strategic flexibility to shift vendors and technologies to a degree that’s rarely possible with proprietary software. That’s a given. + +Open source has also emerged as a great model for collaborative software development. + +But taking full advantage of that model requires embracing it and not just adopting some superficial trappings. + +Are there challenges associated with creating and executing business models that depend in large part on open source software today? Certainly. But those challenges have always existed even if large cloud providers have arguably dialed up the degree of difficulty. And, truly, building sustainable software businesses has never been easy. + +Open source software is increasingly an integral part of most software businesses. That fact introduces some new challenges. But it also opens up new possibilities. + +**Watch: Gordon Haff and Spender Krum discuss this topic IBM Think 2019** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/what-open-source-not + +作者:[Gordon Haff][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/ghaff +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OPENHERE_green.png?itok=4kTXtbNP (Open here.) +[2]: https://opensource.com/article/18/2/coining-term-open-source-software +[3]: https://opensource.org/osd +[4]: https://www.redhat.com/en/enterprise-open-source-report/2019 From ba258892a02b85c1350907e368747b94a45e5884 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Aug 2019 00:54:28 +0800 Subject: [PATCH 414/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190812=20How=20?= =?UTF-8?q?SD-Branch=20addresses=20today=E2=80=99s=20network=20security=20?= =?UTF-8?q?concerns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190812 How SD-Branch addresses today-s network security concerns.md --- ...esses today-s network security concerns.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/talk/20190812 How SD-Branch addresses today-s network security concerns.md diff --git a/sources/talk/20190812 How SD-Branch addresses today-s network security concerns.md b/sources/talk/20190812 How SD-Branch addresses today-s network security concerns.md new file mode 100644 index 0000000000..57182e07a3 --- /dev/null +++ b/sources/talk/20190812 How SD-Branch addresses today-s network security concerns.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How SD-Branch addresses today’s network security concerns) +[#]: via: (https://www.networkworld.com/article/3431166/how-sd-branch-addresses-todays-network-security-concerns.html) +[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) + +How SD-Branch addresses today’s network security concerns +====== +New digital technologies such as IoT at remote locations increase the need to identify devices and monitor network activity. That’s where SD-Branch can help, says Fortinet’s John Maddison. +![KontekBrothers / Getty Images][1] + +Secure software-defined WAN (SD-WAN) has become one of the hottest new technologies, with some reports claiming that 85% of companies are actively considering [SD-WAN][2] to improve cloud-based application performance, replace expensive and inflexible fixed WAN connections, and increase security. + +But now the industry is shifting to software-defined branch ([SD-Branch][3]), which is broader than SD-WAN but introduced several new things for organizations to consider, including better security for new digital technologies. To understand what's required in this new solution set, I recently sat down with John Maddison, Fortinet’s executive vice president of products and solutions. + +**[ Learn more: [SD-Branch: What it is, and why you'll need it][3] | Get regularly scheduled insights: [Sign up for Network World newsletters][4] ]** + +### Zeus Kerravala: To get started, what exactly is SD-Branch? + +**John Maddison:** To answer that question, let’s step back and look at the need for a secure SD-WAN solution. Organizations need to expand their digital transformation efforts out to their remote locations, such as branch offices, remote school campuses, and retail locations. The challenge is that today’s networks and applications are highly elastic and constantly changing, which means that the traditional fixed and static WAN connections to their remote offices, such as [MPLS][5], can’t support this new digital business model. + +That’s where SD-WAN comes in. It replaces those legacy, and sometimes quite expensive, connections with flexible and intelligent connectivity designed to optimize bandwidth, maximize application performance, secure direct internet connections, and ensure that traffic, applications, workflows, and data are secure. + +However, most branch offices and retail stores have a local LAN behind that connection that is undergoing rapid transformation. Internet of things (IoT) devices, for example, are being adopted at remote locations at an unprecedented rate. Retail shops now include a wide array of connected devices, from cash registers and scanners to refrigeration units and thermostats, to security cameras and inventory control devices. Hotels monitor room access, security and safety devices, elevators, HVAC systems, and even minibar purchases. The same sort of transformation is happening at schools, branch and field offices, and remote production facilities. + +![John Maddison, executive vice president, Fortinet][6] + +The challenge is that many of these environments, especially these new IoT and mobile end-user devices, lack adequate safeguards. SD-Branch extends the benefits of the secure SD-WAN’s security and control functions into the local network by securing wired and wireless access points, monitoring and inspecting internal traffic and applications, and leveraging network access control (NAC) to identify the devices being deployed at the branch and then dynamically assigning them to network segments where they can be more easily controlled. + +### What unique challenges do remote locations, such as branch offices, schools, and retail locations, face?  + +Many of the devices being deployed at these remote locations need access to the internal network, to cloud services, or to internet resources to operate. The challenge is that IoT devices, in particular, are notoriously insecure and vulnerable to a host of threats and exploits. In addition, end users are connecting a growing number of unauthorized devices to the office. While these are usually some sort of personal smart device, they can also include anything from a connected coffee maker to a wireless access point. + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][7] ]** + +Any of these, if connected to the network and then exploited, not only represent a threat to that remote location, but they can also be used as a door into the larger core network. There are numerous examples of vulnerable point-of-sale devices or HVAC systems being used to tunnel back into the organization’s data center to steal account and financial information. + +Of course, these issues might be solved by adding a number of additional networking and security technologies to the branch, but most IT teams can’t afford to put IT resources onsite to deploy and manage these solutions, even temporarily. What’s needed is a security solution that combines traffic scanning and security enforcement, access control for both wired and wireless connections, device recognition, dynamic segmentation, and integrated management in a single low-touch/no-touch device. That’s where SD-Branch comes in. + +### Why aren't traditional branch solutions, such as integrated routers, solving these challenges?  + +Most of the solutions designed for branch and retail locations predate SD-WAN and digital transformation. As a result, most do not provide support for the sort of flexible SD-WAN functionality that today’s remote locations require. In addition, while they may claim to provide low-touch deployment and management, the experience of most organizations tells a different story. Complicating things further, these solutions provide little more than a superficial integration between their various services. + +For example, few if any of these integrated devices can manage or secure the wired and wireless access points deployed as part of the larger branch LAN, provide device recognition and network access control, scan network traffic, or deliver the sort of robust security that today’s networks require. Instead, many of these solutions are little more than a collection of separate limited networking, connectivity, and security elements wrapped in a piece of sheet metal that all require separate management systems, providing little to no control for those extended LAN environments with their own access points and switches – which adds to IT overhead rather than reducing it. + +### What role does security play in an SD-Branch?  + +Security is a critical element of any branch or retail location, especially as the ongoing deployment of IoT and end-user devices continues to expand the potential attack surface. As I explained before, IoT devices are a particular concern, as they are generally quite insecure, and as a result, they need to be automatically identified, segmented, and continuously monitored for malware and unusual behaviors. + +But that is just part of the equation. Security tools need to be integrated into the switch and wireless infrastructure so that networking protocols, security policies, and network access controls can work together as a single system. This allows the SD-Branch solution to identify devices and dynamically match them to security policies, inspect applications and workflows, and dynamically assign devices and traffic to their appropriate network segment based on their function and role. + +The challenge is that there is often no IT staff on site to set up, manage, and fine-tune a system like this. SD-Branch provides these advanced security, access control, and network management services in a zero-touch model so they can be deployed across multiple locations and then be remotely managed through a common interface. + +### Security teams often face challenges with a lack of visibility and control at their branch offices. How does SD-Branch address this?  + +An SD-Branch solution seamlessly extends an organization's core security into the local branch network. For organizations with multiple branch or retail locations, this enables the creation of an integrated security fabric operating through a single pane of glass management system that can see all devices and orchestrate all security policies and configurations. This approach allows all remote locations to be dynamically coordinated and updated, supports the collection and correlation of threat intelligence from every corner of the network – from the core to the branch to the cloud – and enables a coordinated response to cyber events that can automatically raise defenses everywhere while identifying and eliminating all threads of an attack. + +Combining security with switches, access points, and network access control systems means that every connected device can not only be identified and monitored, but every application and workflow can also be seen and tracked, even if they travel across or between the different branch and cloud environments. + +### How is SD-Branch related to secure SD-WAN? + +SD-Branch is a natural extension of secure SD-WAN. We are finding that once an organization deploys a secure SD-WAN solution, they quickly discover that the infrastructure behind that connection is often not ready to support their digital transformation efforts. Every new threat vector adds additional risk to their organization. + +While secure SD-WAN can see and secure applications running to or between remote locations, the applications and workflows running inside those branch offices, schools, or retail stores are not being recognized or properly inspected. Shadow IT instances are not being identified. Wired and wireless access points are not secured. End-user devices have open access to network resources. And IoT devices are expanding the potential attack surface without corresponding protections in place. That requires an SD-Branch solution. + +Of course, this is about much more than the emergence of the next-gen branch. These new remote network environments are just another example of the new edge model that is extending and replacing the traditional network perimeter. Cloud and multi-cloud, mobile workers, 5G networks, and the next-gen branch – including offices, retail locations, and extended school campuses – are all emerging simultaneously. That means they all need to be addressed by IT and security teams at the same time. However, the traditional model of building a separate security strategy for each edge environment is a recipe for an overwhelmed IT staff. Instead, every edge needs to be seen as part of a larger, integrated security strategy where every component contributes to the overall health of the entire distributed network. + +With that in mind, adding SD-Branch solutions to SD-WAN deployments not only extends security deep into branch office and other remote locations, but they are also a critical component of a broader strategy that ensures consistent security across all edge environments, while providing a mechanism for controlling operational expenses across the entire distributed network through central management, visibility, and control. + +**[ For more on IoT security, see [our corporate guide to addressing IoT security concerns][8]. ]** + +Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3431166/how-sd-branch-addresses-todays-network-security-concerns.html + +作者:[Zeus Kerravala][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/Zeus-Kerravala/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/07/cio_cw_distributed_decentralized_global_network_africa_by_kontekbrothers_gettyimages-1004007018_2400x1600-100802403-large.jpg +[2]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html +[3]: https://www.networkworld.com/article/3250664/sd-branch-what-it-is-and-why-youll-need-it.html +[4]: https://www.networkworld.com/newsletters/signup.html +[5]: https://www.networkworld.com/article/2297171/network-security-mpls-explained.html +[6]: https://images.idgesg.net/images/article/2019/08/john-maddison-_fortinet-square-100808017-small.jpg +[7]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[8]: https://www.networkworld.com/article/3269165/internet-of-things/a-corporate-guide-to-addressing-iot-security-concerns.html +[9]: https://www.facebook.com/NetworkWorld/ +[10]: https://www.linkedin.com/company/network-world From 3413267d35486909a797c2ef39990ec53e3b69e9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Aug 2019 00:54:50 +0800 Subject: [PATCH 415/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190812=20Xilinx?= =?UTF-8?q?=20launches=20new=20FPGA=20cards=20that=20can=20match=20GPU=20p?= =?UTF-8?q?erformance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190812 Xilinx launches new FPGA cards that can match GPU performance.md --- ...GA cards that can match GPU performance.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/talk/20190812 Xilinx launches new FPGA cards that can match GPU performance.md diff --git a/sources/talk/20190812 Xilinx launches new FPGA cards that can match GPU performance.md b/sources/talk/20190812 Xilinx launches new FPGA cards that can match GPU performance.md new file mode 100644 index 0000000000..d53ca0253f --- /dev/null +++ b/sources/talk/20190812 Xilinx launches new FPGA cards that can match GPU performance.md @@ -0,0 +1,69 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Xilinx launches new FPGA cards that can match GPU performance) +[#]: via: (https://www.networkworld.com/article/3430763/xilinx-launches-new-fpga-cards-that-can-match-gpu-performance.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Xilinx launches new FPGA cards that can match GPU performance +====== +Xilinx says its new FPGA card, the Alveo U50, can match the performance of a GPU in areas of artificial intelligence (AI) and machine learning. +![Thinkstock][1] + +Xilinx has launched a new FPGA card, the Alveo U50, that it claims can match the performance of a GPU in areas of artificial intelligence (AI) and machine learning. + +The company claims the card is the industry’s first low-profile adaptable accelerator with PCIe Gen 4 support, which offers double the throughput over PCIe Gen3. It was finalized in 2017, but cards and motherboards to support it have been slow to come to market. + +The Alveo U50 provides customers with a programmable low-profile and low-power accelerator platform built for scale-out architectures and domain-specific acceleration of any server deployment, on premises, in the cloud, and at the edge. + +**[ Also read: [What is quantum computing (and why enterprises should care)][2] ]** + +Xilinx claims the Alveo U50 delivers 10 to 20 times improvements in throughput and latency as compared to a CPU. One thing's for sure, it beats the competition on power draw. It has a 75 watt power envelope, which is comparable to a desktop CPU and vastly better than a Xeon or GPU. + +For accelerated networking and storage workloads, the U50 card helps developers identify and eliminate latency and data movement bottlenecks by moving compute closer to the data. + +![Xilinx Alveo U50][3] + +The Alveo U50 card is the first in the Alveo portfolio to be packaged in a half-height, half-length form factor. It runs the Xilinx UltraScale+ FPGA architecture, features high-bandwidth memory (HBM2), 100 gigabits per second (100 Gbps) networking connectivity, and support for the PCIe Gen 4 and CCIX interconnects. Thanks to the 8GB of HBM2 memory, data transfer speeds can reach 400Gbps. It also supports NVMe-over-Fabric for high-speed SSD transfers. + +That’s a lot of performance packed into a small card. + +**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]** + +### What the Xilinx Alveo U50 can do + +Xilinx is making some big boasts about Alveo U50's capabilities: + + * Deep learning inference acceleration (speech translation): delivers up to 25x lower latency, 10x higher throughput, and significantly improved power efficiency per node compared to GPU-only for speech translation performance. + * Data analytics acceleration (database query): running the TPC-H Query benchmark, Alveo U50 delivers 4x higher throughput per hour and reduced operational costs by 3x compared to in-memory CPU. + * Computational storage acceleration (compression): delivers 20x more compression/decompression throughput, faster Hadoop and big data analytics, and over 30% lower cost per node compared to CPU-only nodes. + * Network acceleration (electronic trading): delivers 20x lower latency and sub-500ns trading time compared to CPU-only latency of 10us. + * Financial modeling (grid computing): running the Monte Carlo simulation, Alveo U50 delivers 7x greater power efficiency compared to GPU-only performance for a faster time to insight, deterministic latency and reduced operational costs. + + + +The Alveo U50 is sampling now with OEM system qualifications in process. General availability is slated for fall 2019. + +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/3430763/xilinx-launches-new-fpga-cards-that-can-match-gpu-performance.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://images.techhive.com/images/article/2014/04/bolts-of-light-speeding-through-the-acceleration-tunnel-95535268-100264665-large.jpg +[2]: https://www.networkworld.com/article/3275367/what-s-quantum-computing-and-why-enterprises-need-to-care.html +[3]: https://images.idgesg.net/images/article/2019/08/xilinx-alveo-u50-100808003-medium.jpg +[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 806a7a78e9ae659dc56d3193acbb965230717ca9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Aug 2019 00:55:50 +0800 Subject: [PATCH 416/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190812=20Why=20?= =?UTF-8?q?const=20Doesn't=20Make=20C=20Code=20Faster?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190812 Why const Doesn-t Make C Code Faster.md --- ...12 Why const Doesn-t Make C Code Faster.md | 402 ++++++++++++++++++ 1 file changed, 402 insertions(+) create mode 100644 sources/tech/20190812 Why const Doesn-t Make C Code Faster.md diff --git a/sources/tech/20190812 Why const Doesn-t Make C Code Faster.md b/sources/tech/20190812 Why const Doesn-t Make C Code Faster.md new file mode 100644 index 0000000000..c066e32129 --- /dev/null +++ b/sources/tech/20190812 Why const Doesn-t Make C Code Faster.md @@ -0,0 +1,402 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Why const Doesn't Make C Code Faster) +[#]: via: (https://theartofmachinery.com/2019/08/12/c_const_isnt_for_performance.html) +[#]: author: (Simon Arneaud https://theartofmachinery.com) + +Why const Doesn't Make C Code Faster +====== + +In a post a few months back I said [it’s a popular myth that `const` is helpful for enabling compiler optimisations in C and C++][1]. I figured I should explain that one, especially because I used to believe it was obviously true, myself. I’ll start off with some theory and artificial examples, then I’ll do some experiments and benchmarks on a real codebase: Sqlite. + +### A simple test + +Let’s start with what I used to think was the simplest and most obvious example of how `const` can make C code faster. First, let’s say we have these two function declarations: + +``` +void func(int *x); +void constFunc(const int *x); +``` + +And suppose we have these two versions of some code: + +``` +void byArg(int *x) +{ + printf("%d\n", *x); + func(x); + printf("%d\n", *x); +} + +void constByArg(const int *x) +{ + printf("%d\n", *x); + constFunc(x); + printf("%d\n", *x); +} +``` + +To do the `printf()`, the CPU has to fetch the value of `*x` from RAM through the pointer. Obviously, `constByArg()` can be made slightly faster because the compiler knows that `*x` is constant, so there’s no need to load its value a second time after `constFunc()` does its thing. It’s just printing the same thing. Right? Let’s see the assembly code generated by GCC with optimisations cranked up: + +``` +$ gcc -S -Wall -O3 test.c +$ view test.s +``` + +Here’s the full assembly output for `byArg()`: + +``` +byArg: +.LFB23: + .cfi_startproc + pushq %rbx + .cfi_def_cfa_offset 16 + .cfi_offset 3, -16 + movl (%rdi), %edx + movq %rdi, %rbx + leaq .LC0(%rip), %rsi + movl $1, %edi + xorl %eax, %eax + call __printf_chk@PLT + movq %rbx, %rdi + call func@PLT # The only instruction that's different in constFoo + movl (%rbx), %edx + leaq .LC0(%rip), %rsi + xorl %eax, %eax + movl $1, %edi + popq %rbx + .cfi_def_cfa_offset 8 + jmp __printf_chk@PLT + .cfi_endproc +``` + +The only difference between the generated assembly code for `byArg()` and `constByArg()` is that `constByArg()` has a `call constFunc@PLT`, just like the source code asked. The `const` itself has literally made zero difference. + +Okay, that’s GCC. Maybe we just need a sufficiently smart compiler. Is Clang any better? + +``` +$ clang -S -Wall -O3 -emit-llvm test.c +$ view test.ll +``` + +Here’s the IR. It’s more compact than assembly, so I’ll dump both functions so you can see what I mean by “literally zero difference except for the call”: + +``` +; Function Attrs: nounwind uwtable +define dso_local void @byArg(i32*) local_unnamed_addr #0 { + %2 = load i32, i32* %0, align 4, !tbaa !2 + %3 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2) + tail call void @func(i32* %0) #4 + %4 = load i32, i32* %0, align 4, !tbaa !2 + %5 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4) + ret void +} + +; Function Attrs: nounwind uwtable +define dso_local void @constByArg(i32*) local_unnamed_addr #0 { + %2 = load i32, i32* %0, align 4, !tbaa !2 + %3 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2) + tail call void @constFunc(i32* %0) #4 + %4 = load i32, i32* %0, align 4, !tbaa !2 + %5 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4) + ret void +} +``` + +### Something that (sort of) works + +Here’s some code where `const` actually does make a difference: + +``` +void localVar() +{ + int x = 42; + printf("%d\n", x); + constFunc(&x); + printf("%d\n", x); +} + +void constLocalVar() +{ + const int x = 42; // const on the local variable + printf("%d\n", x); + constFunc(&x); + printf("%d\n", x); +} +``` + +Here’s the assembly for `localVar()`, which has two instructions that have been optimised out of `constLocalVar()`: + +``` +localVar: +.LFB25: + .cfi_startproc + subq $24, %rsp + .cfi_def_cfa_offset 32 + movl $42, %edx + movl $1, %edi + movq %fs:40, %rax + movq %rax, 8(%rsp) + xorl %eax, %eax + leaq .LC0(%rip), %rsi + movl $42, 4(%rsp) + call __printf_chk@PLT + leaq 4(%rsp), %rdi + call constFunc@PLT + movl 4(%rsp), %edx # not in constLocalVar() + xorl %eax, %eax + movl $1, %edi + leaq .LC0(%rip), %rsi # not in constLocalVar() + call __printf_chk@PLT + movq 8(%rsp), %rax + xorq %fs:40, %rax + jne .L9 + addq $24, %rsp + .cfi_remember_state + .cfi_def_cfa_offset 8 + ret +.L9: + .cfi_restore_state + call __stack_chk_fail@PLT + .cfi_endproc +``` + +The LLVM IR is a little clearer. The `load` just before the second `printf()` call has been optimised out of `constLocalVar()`: + +``` +; Function Attrs: nounwind uwtable +define dso_local void @localVar() local_unnamed_addr #0 { + %1 = alloca i32, align 4 + %2 = bitcast i32* %1 to i8* + call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %2) #4 + store i32 42, i32* %1, align 4, !tbaa !2 + %3 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 42) + call void @constFunc(i32* nonnull %1) #4 + %4 = load i32, i32* %1, align 4, !tbaa !2 + %5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4) + call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %2) #4 + ret void +} +``` + +Okay, so, `constLocalVar()` has sucessfully elided the reloading of `*x`, but maybe you’ve noticed something a bit confusing: it’s the same `constFunc()` call in the bodies of `localVar()` and `constLocalVar()`. If the compiler can deduce that `constFunc()` didn’t modify `*x` in `constLocalVar()`, why can’t it deduce that the exact same function call didn’t modify `*x` in `localVar()`? + +The explanation gets closer to the heart of why C `const` is impractical as an optimisation aid. C `const` effectively has two meanings: it can mean the variable is a read-only alias to some data that may or may not be constant, or it can mean the variable is actually constant. If you cast away `const` from a pointer to a constant value and then write to it, the result is undefined behaviour. On the other hand, it’s okay if it’s just a `const` pointer to a value that’s not constant. + +This possible implementation of `constFunc()` shows what that means: + +``` +// x is just a read-only pointer to something that may or may not be a constant +void constFunc(const int *x) +{ + // local_var is a true constant + const int local_var = 42; + + // Definitely undefined behaviour by C rules + doubleIt((int*)&local_var); + // Who knows if this is UB? + doubleIt((int*)x); +} + +void doubleIt(int *x) +{ + *x *= 2; +} +``` + +`localVar()` gave `constFunc()` a `const` pointer to non-`const` variable. Because the variable wasn’t originally `const`, `constFunc()` can be a liar and forcibly modify it without triggering UB. So the compiler can’t assume the variable has the same value after `constFunc()` returns. The variable in `constLocalVar()` really is `const`, though, so the compiler can assume it won’t change — because this time it _would_ be UB for `constFunc()` to cast `const` away and write to it. + +The `byArg()` and `constByArg()` functions in the first example are hopeless because the compiler has no way of knowing if `*x` really is `const`. + +But why the inconsistency? If the compiler can assume that `constFunc()` doesn’t modify its argument when called in `constLocalVar()`, surely it can go ahead an apply the same optimisations to other `constFunc()` calls, right? Nope. The compiler can’t assume `constLocalVar()` is ever run at all. If it isn’t (say, because it’s just some unused extra output of a code generator or macro), `constFunc()` can sneakily modify data without ever triggering UB. + +You might want to read the above explanation and examples a few times, but don’t worry if it sounds absurd: it is. Unfortunately, writing to `const` variables is the worst kind of UB: most of the time the compiler can’t know if it even would be UB. So most of the time the compiler sees `const`, it has to assume that someone, somewhere could cast it away, which means the compiler can’t use it for optimisation. This is true in practice because enough real-world C code has “I know what I’m doing” casting away of `const`. + +In short, a whole lot of things can prevent the compiler from using `const` for optimisation, including receiving data from another scope using a pointer, or allocating data on the heap. Even worse, in most cases where `const` can be used by the compiler, it’s not even necessary. For example, any decent compiler can figure out that `x` is constant in the following code, even without `const`: + +``` +int x = 42, y = 0; +printf("%d %d\n", x, y); +y += x; +printf("%d %d\n", x, y); +``` + +TL;DR: `const` is almost useless for optimisation because + + 1. Except for special cases, the compiler has to ignore it because other code might legally cast it away + 2. In most of the exceptions to #1, the compiler can figure out a variable is constant, anyway + + + +### C++ + +There’s another way `const` can affect code generation if you’re using C++: function overloads. You can have `const` and non-`const` overloads of the same function, and maybe the non-`const` can be optimised (by the programmer, not the compiler) to do less copying or something. + +``` +void foo(int *p) +{ + // Needs to do more copying of data +} + +void foo(const int *p) +{ + // Doesn't need defensive copies +} + +int main() +{ + const int x = 42; + // const-ness affects which overload gets called + foo(&x); + return 0; +} +``` + +On the one hand, I don’t think this is exploited much in practical C++ code. On the other hand, to make a real difference, the programmer has to make assumptions that the compiler can’t make because they’re not guaranteed by the language. + +### An experiment with Sqlite3 + +That’s enough theory and contrived examples. How much effect does `const` have on a real codebase? I thought I’d do a test on the Sqlite database (version 3.30.0) because + + * It actually uses `const` + * It’s a non-trivial codebase (over 200KLOC) + * As a database, it includes a range of things from string processing to arithmetic to date handling + * It can be tested with CPU-bound loads + + + +Also, the author and contributors have put years of effort into performance optimisation already, so I can assume they haven’t missed anything obvious. + +#### The setup + +I made two copies of [the source code][2] and compiled one normally. For the other copy, I used this hacky preprocessor snippet to turn `const` into a no-op: + +``` +#define const +``` + +(GNU) `sed` can add that to the top of each file with something like `sed -i '1i#define const' *.c *.h`. + +Sqlite makes things slightly more complicated by generating code using scripts at build time. Fortunately, compilers make a lot of noise when `const` and non-`const` code are mixed, so it was easy to detect when this happened, and tweak the scripts to include my anti-`const` snippet. + +Directly diffing the compiled results is a bit pointless because a tiny change can affect the whole memory layout, which can change pointers and function calls throughout the code. Instead I took a fingerprint of the disassembly (`objdump -d libsqlite3.so.0.8.6`), using the binary size and mnemonic for each instruction. For example, this function: + +``` +000000000005d570 : + 5d570: 4c 8d 05 59 a2 ff ff lea -0x5da7(%rip),%r8 # 577d0 + 5d577: e9 04 fe ff ff jmpq 5d380 + 5d57c: 0f 1f 40 00 nopl 0x0(%rax) +``` + +would turn into something like this: + +``` +sqlite3_blob_read 7lea 5jmpq 4nopl +``` + +I left all the Sqlite build settings as-is when compiling anything. + +#### Analysing the compiled code + +The `const` version of libsqlite3.so was 4,740,704 bytes, about 0.1% larger than the 4,736,712 bytes of the non-`const` version. Both had 1374 exported functions (not including low-level helpers like stuff in the PLT), and a total of 13 had any difference in fingerprint. + +A few of the changes were because of the dumb preprocessor hack. For example, here’s one of the changed functions (with some Sqlite-specific definitions edited out): + +``` +#define LARGEST_INT64 (0xffffffff|(((int64_t)0x7fffffff)<<32)) +#define SMALLEST_INT64 (((int64_t)-1) - LARGEST_INT64) + +static int64_t doubleToInt64(double r){ + /* + ** Many compilers we encounter do not define constants for the + ** minimum and maximum 64-bit integers, or they define them + ** inconsistently. And many do not understand the "LL" notation. + ** So we define our own static constants here using nothing + ** larger than a 32-bit integer constant. + */ + static const int64_t maxInt = LARGEST_INT64; + static const int64_t minInt = SMALLEST_INT64; + + if( r<=(double)minInt ){ + return minInt; + }else if( r>=(double)maxInt ){ + return maxInt; + }else{ + return (int64_t)r; + } +} +``` + +Removing `const` makes those constants into `static` variables. I don’t see why anyone who didn’t care about `const` would make those variables `static`. Removing both `static` and `const` makes GCC recognise them as constants again, and we get the same output. Three of the 13 functions had spurious changes because of local `static const` variables like this, but I didn’t bother fixing any of them. + +Sqlite uses a lot of global variables, and that’s where most of the real `const` optimisations came from. Typically they were things like a comparison with a variable being replaced with a constant comparison, or a loop being partially unrolled a step. (The [Radare toolkit][3] was handy for figuring out what the optimisations did.) A few changes were underwhelming. `sqlite3ParseUri()` is 487 instructions, but the only difference `const` made was taking this pair of comparisons: + +``` +test %al, %al +je +cmp $0x23, %al +je +``` + +And swapping their order: + +``` +cmp $0x23, %al +je +test %al, %al +je +``` + +#### Benchmarking + +Sqlite comes with a performance regression test, so I tried running it a hundred times for each version of the code, still using the default Sqlite build settings. Here are the timing results in seconds: + +| const | No const +---|---|--- +Minimum | 10.658s | 10.803s +Median | 11.571s | 11.519s +Maximum | 11.832s | 11.658s +Mean | 11.531s | 11.492s + +Personally, I’m not seeing enough evidence of a difference worth caring about. I mean, I removed `const` from the entire program, so if it made a significant difference, I’d expect it to be easy to see. But maybe you care about any tiny difference because you’re doing something absolutely performance critical. Let’s try some statistical analysis. + +I like using the Mann-Whitney U test for stuff like this. It’s similar to the more-famous t test for detecting differences in groups, but it’s more robust to the kind of complex random variation you get when timing things on computers (thanks to unpredictable context switches, page faults, etc). Here’s the result: + +| const | No const +---|---|--- +N | 100 | 100 +Mean rank | 121.38 | 79.62 +Mann-Whitney U | 2912 +---|--- +Z | -5.10 +2-sided p value | <10-6 +HL median difference | -.056s +95% confidence interval | -.077s – -0.038s + +The U test has detected a statistically significant difference in performance. But, surprise, it’s actually the non-`const` version that’s faster — by about 60ms, or 0.5%. It seems like the small number of “optimisations” that `const` enabled weren’t worth the cost of extra code. It’s not like `const` enabled any major optimisations like auto-vectorisation. Of course, your mileage may vary with different compiler flags, or compiler versions, or codebases, or whatever, but I think it’s fair to say that if `const` were effective at improving C performance, we’d have seen it by now. + +### So, what’s `const` for? + +For all its flaws, C/C++ `const` is still useful for type safety. In particular, combined with C++ move semantics and `std::unique_pointer`s, `const` can make pointer ownership explicit. Pointer ownership ambiguity was a huge pain in old C++ codebases over ~100KLOC, so personally I’m grateful for that alone. + +However, I used to go beyond using `const` for meaningful type safety. I’d heard it was best practices to use `const` literally as much as possible for performance reasons. I’d heard that when performance really mattered, it was important to refactor code to add more `const`, even in ways that made it less readable. That made sense at the time, but I’ve since learned that it’s just not true. + +-------------------------------------------------------------------------------- + +via: https://theartofmachinery.com/2019/08/12/c_const_isnt_for_performance.html + +作者:[Simon Arneaud][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://theartofmachinery.com +[b]: https://github.com/lujun9972 +[1]: https://theartofmachinery.com/2019/04/05/d_as_c_replacement.html#const-and-immutable +[2]: https://sqlite.org/src/doc/trunk/README.md +[3]: https://rada.re/r/ From 9f4a98304ddba6e0f11e322ceb0a2f549a595ee2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Aug 2019 08:43:05 +0800 Subject: [PATCH 417/951] translated --- ...stall Elasticsearch and Kibana on Linux.md | 185 ------------------ ...stall Elasticsearch and Kibana on Linux.md | 185 ++++++++++++++++++ 2 files changed, 185 insertions(+), 185 deletions(-) delete mode 100644 sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md create mode 100644 translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md diff --git a/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md b/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md deleted file mode 100644 index efdd33d6fb..0000000000 --- a/sources/tech/20190709 How to install Elasticsearch and Kibana on Linux.md +++ /dev/null @@ -1,185 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to install Elasticsearch and Kibana on Linux) -[#]: via: (https://opensource.com/article/19/7/install-elasticsearch-and-kibana-linux) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -How to install Elasticsearch and Kibana on Linux -====== -Get our simplified instructions for installing both. -![5 pengiuns floating on iceburg][1] - -If you're keen to learn Elasticsearch, the famous open source search engine based on the open source Lucene library, then there's no better way than to install it locally. The process is outlined in detail on the [Elasticsearch website][2], but the official instructions have a lot more detail than necessary if you're a beginner. This article takes a simplified approach. - -### Add the Elasticsearch repository - -First, add the Elasticsearch software repository to your system, so you can install it and receive updates as needed. How you do so depends on your distribution. On an RPM-based system, such as [Fedora][3], [CentOS][4], [Red Hat Enterprise Linux (RHEL)][5], or [openSUSE][6], (anywhere in this article that references Fedora or RHEL applies to CentOS and openSUSE as well) create a repository description file in **/etc/yum.repos.d/** called **elasticsearch.repo**: - - -``` -$ cat << EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo -[elasticsearch-7.x] -name=Elasticsearch repository for 7.x packages -baseurl= -gpgcheck=1 -gpgkey= -enabled=1 -autorefresh=1 -type=rpm-md -EOF -``` - -On Ubuntu or Debian, do not use the **add-apt-repository** utility. It causes errors due to a mismatch in its defaults and what Elasticsearch’s repository provides. Instead, set up this one: - - -``` -$ echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list -``` - -This repository contains only Elasticsearch’s open source features, under an [Apache License][7], with none of the extra features provided by a subscription. If you need subscription-only features (these features are _not_ open source), the **baseurl** must be set to: - - -``` -`baseurl=https://artifacts.elastic.co/packages/7.x/yum` -``` - -  - -### Install Elasticsearch - -The name of the package you need to install depends on whether you use the open source version or the subscription version. This article uses the open source version, which appends **-oss** to the end of the package name. Without **-oss** appended to the package name, you are requesting the subscription-only version. - -If you create a repository pointing to the subscription version but try to install the open source version, you will get a fairly non-specific error in return. If you create a repository for the open source version and fail to append **-oss** to the package name, you will also get an error. - -Install Elasticsearch with your package manager. For instance, on Fedora, CentOS, or RHEL, run the following: - - -``` -$ sudo dnf install elasticsearch-oss -``` - -On Ubuntu or Debian, run: - - -``` -$ sudo apt install elasticsearch-oss -``` - -If you get errors while installing Elasticsearch, then you may be attempting to install the wrong package. If your intention is to use the open source package, as this article does, then make sure you are using the correct **apt** repository or baseurl in your Yum configuration. - -### Start and enable Elasticsearch - -Once Elasticsearch has been installed, you must start and enable it: - - -``` -$ sudo systemctl daemon-reload -$ sudo systemctl enable --now elasticsearch.service -``` - -Then, to confirm that Elasticsearch is running on its default port of 9200, point a web browser to **localhost:9200**. You can use a GUI browser or you can do it in the terminal: - - -``` -$ curl localhost:9200 -{ - -  "name" : "fedora30", -  "cluster_name" : "elasticsearch", -  "cluster_uuid" : "OqSbb16NQB2M0ysynnX1hA", -  "version" : { -    "number" : "7.2.0", -    "build_flavor" : "oss", -    "build_type" : "rpm", -    "build_hash" : "508c38a", -    "build_date" : "2019-06-20T15:54:18.811730Z", -    "build_snapshot" : false, -    "lucene_version" : "8.0.0", -    "minimum_wire_compatibility_version" : "6.8.0", -    "minimum_index_compatibility_version" : "6.0.0-beta1" -  }, -  "tagline" : "You Know, for Search" -} -``` - -### Install Kibana - -Kibana is a graphical interface for Elasticsearch data visualization. It’s included in the Elasticsearch repository, so you can install it with your package manager. Just as with Elasticsearch itself, you must append **-oss** to the end of the package name if you are using the open source version of Elasticsearch, and not the subscription version (the two installations need to match): - - -``` -$ sudo dnf install kibana-oss -``` - -On Ubuntu or Debian: - - -``` -$ sudo apt install kibana-oss -``` - -Kibana runs on port 5601, so launch a graphical web browser and navigate to **localhost:5601** to start using the Kibana interface, which is shown below: - -![Kibana running in Firefox.][8] - -### Troubleshoot - -If you get errors while installing Elasticsearch, try installing a Java environment manually. On Fedora, CentOS, and RHEL: - - -``` -$ sudo dnf install java-openjdk-devel java-openjdk -``` - -On Ubuntu: - - -``` -`$ sudo apt install default-jdk` -``` - -If all else fails, try installing the Elasticsearch RPM directly from the Elasticsearch servers: - - -``` -$ wget -$ shasum -a 512 -c elasticsearch-oss-7.2.0-x86_64.rpm.sha512 && sudo rpm --install elasticsearch-oss-7.2.0-x86_64.rpm -``` - -On Ubuntu or Debian, use the DEB package instead. - -If you cannot access either Elasticsearch or Kibana with a web browser, then your firewall may be blocking those ports. You can allow traffic on those ports by adjusting your firewall settings. For instance, if you are running **firewalld** (the default on Fedora and RHEL, and installable on Debian and Ubuntu), then you can use **firewall-cmd**: - - -``` -$ sudo firewall-cmd --add-port=9200/tcp --permanent -$ sudo firewall-cmd --add-port=5601/tcp --permanent -$ sudo firewall-cmd --reload -``` - -You’re now set up and can follow along with our upcoming installation articles for Elasticsearch and Kibana. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/install-elasticsearch-and-kibana-linux - -作者:[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/rh_003499_01_linux31x_cc.png?itok=Pvim4U-B (5 pengiuns floating on iceburg) -[2]: https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html -[3]: https://getfedora.org -[4]: https://www.centos.org -[5]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[6]: https://www.opensuse.org -[7]: http://www.apache.org/licenses/ -[8]: https://opensource.com/sites/default/files/uploads/kibana.jpg (Kibana running in Firefox.) diff --git a/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md b/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md new file mode 100644 index 0000000000..f655bd2cae --- /dev/null +++ b/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md @@ -0,0 +1,185 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Elasticsearch and Kibana on Linux) +[#]: via: (https://opensource.com/article/19/7/install-elasticsearch-and-kibana-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +如何在 Linux 上安装 Elasticsearch 和 Kibana +====== +获取我们关于安装两者的简化说明。 +![5 pengiuns floating on iceburg][1] + +如果你热衷学习基于开源 Lucene 库的著名开源搜索引擎 Elasticsearch,那么没有比在本地安装它更好的方法了。这个过程在 [Elasticsearch 网站][2]中有详细介绍,但如果你是初学者,官方说明就比必要的信息多得多。本文采用一种简化的方法。 + +### 添加 Elasticsearch 仓库 + +首先,将 Elasticsearch 仓库添加到你的系统,以便你可以根据需要安装它并接收更新。如何做取决于你的发行版。在基于 RPM 的系统上,例如 [Fedora][3]、[CentOS] [4]、[Red Hat Enterprise Linux(RHEL)][5]或 [openSUSE][6],(本文任何地方引用 Fedora 或 RHEL 的也适用于 CentOS 和 openSUSE)在 **/etc/yum.repos.d/** 中创建一个名为 **elasticsearch.repo** 的仓库描述文件: + + +``` +$ cat << EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo +[elasticsearch-7.x] +name=Elasticsearch repository for 7.x packages +baseurl= +gpgcheck=1 +gpgkey= +enabled=1 +autorefresh=1 +type=rpm-md +EOF +``` + +在 Ubuntu 或 Debian 上,不要使用 **add-apt-repository** 工具。由于它自身默认的和 Elasticsearch 仓库提供的不匹配而导致错误 。相反,设置这个: + + +``` +$ echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list +``` + +此存储库仅包含 Elasticsearch 的开源功能,在 [Apache 许可证][7]下,订阅没有提供额外功能。如果你需要仅限订阅的功能(这些功能是_并不_开源),那么 **baseurl** 必须设置为: + + +``` +`baseurl=https://artifacts.elastic.co/packages/7.x/yum` +``` + +  + +### 安装 Elasticsearch + +你需要安装的软件包的名称取决于你使用的是开源版本还是订阅版本。本文使用开源版本,包名最后有 **-oss** 后缀。如果包名后没有 **-oss**,那么表示你请求的是仅限订阅版本。 + +如果你创建了订阅版本的仓库却尝试安装开源版本,那么就会收到“非指定”的错误。如果你创建了一个开源版本仓库却没有将 **-oss** 添加到包名后,那么你也会收到错误。 + +使用包管理器安装 Elasticsearch。例如,在 Fedora、CentOS 或 RHEL 上运行以下命令: + + +``` +$ sudo dnf install elasticsearch-oss +``` + +在 Ubuntu 或 Debian 上,运行: + + +``` +$ sudo apt install elasticsearch-oss +``` + +如果你在安装 Elasticsearch 时遇到错误,那么你可能安装的是错误的软件包。如果你想如本文这样使用开源包,那么请确保在 Yum 配置中使用正确的 **apt** 仓库或 baseurl。 + +### 启动并启用 Elasticsearch + +安装 Elasticsearch 后,你必须启动并启用它: + + +``` +$ sudo systemctl daemon-reload +$ sudo systemctl enable --now elasticsearch.service +``` + +要确认 Elasticsearch 在其默认端口 9200 上运行,请在 Web 浏览器中打开 **localhost:9200**。你可以使用 GUI 浏览器,也可以在终端中执行此操作: + + +``` +$ curl localhost:9200 +{ + +  "name" : "fedora30", +  "cluster_name" : "elasticsearch", +  "cluster_uuid" : "OqSbb16NQB2M0ysynnX1hA", +  "version" : { +    "number" : "7.2.0", +    "build_flavor" : "oss", +    "build_type" : "rpm", +    "build_hash" : "508c38a", +    "build_date" : "2019-06-20T15:54:18.811730Z", +    "build_snapshot" : false, +    "lucene_version" : "8.0.0", +    "minimum_wire_compatibility_version" : "6.8.0", +    "minimum_index_compatibility_version" : "6.0.0-beta1" +  }, +  "tagline" : "You Know, for Search" +} +``` + +### 安装 Kibana + +Kibana 是 Elasticsearch 数据可视化的图形界面。它包含在 Elasticsearch 仓库,因此你可以使用包管理器进行安装。与 Elasticsearch 本身一样,如果你使用的是 Elasticsearch 的开源版本,那么必须将 **-oss** 放到包名最后,订阅版本则不用(两者安装需要匹配): + + +``` +$ sudo dnf install kibana-oss +``` + +在 Ubuntu 或 Debian 上: + + +``` +$ sudo apt install kibana-oss +``` + +Kibana 在端口 5601 上运行,因此打开图形化 Web 浏览器并进入 **localhost:5601** 来开始使用 Kibana,如下所示: + +![Kibana running in Firefox.][8] + +### 故障排除 + +如果在安装 Elasticsearch 时出现错误,请尝试手动安装 Java 环境。在 Fedora、CentOS 和 RHEL 上: + + +``` +$ sudo dnf install java-openjdk-devel java-openjdk +``` + +在 Ubuntu 上: + + +``` +`$ sudo apt install default-jdk` +``` + +如果所有其他方法都失败,请尝试直接从 Elasticsearch 服务器安装 Elasticsearch RPM: + + +``` +$ wget +$ shasum -a 512 -c elasticsearch-oss-7.2.0-x86_64.rpm.sha512 && sudo rpm --install elasticsearch-oss-7.2.0-x86_64.rpm +``` + +在 Ubuntu 或 Debian 上,请使用 DEB 包。 + +如果你无法使用 Web 浏览器访问 Elasticsearch 或 Kibana,那么可能是你的防火墙阻止了这些端口。你可以通过调整防火墙设置来允许这些端口上的流量。例如,如果你运行的是 **firewalld**(Fedora 和 RHEL 上的默认值,并且可以在 Debian 和 Ubuntu 上安装),那么你可以使用 **firewall-cmd**: + + +``` +$ sudo firewall-cmd --add-port=9200/tcp --permanent +$ sudo firewall-cmd --add-port=5601/tcp --permanent +$ sudo firewall-cmd --reload +``` + +设置完成了,你可以关注我们接下来的 Elasticsearch 和 Kibana 安装文章。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/install-elasticsearch-and-kibana-linux + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux31x_cc.png?itok=Pvim4U-B (5 pengiuns floating on iceburg) +[2]: https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html +[3]: https://getfedora.org +[4]: https://www.centos.org +[5]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[6]: https://www.opensuse.org +[7]: http://www.apache.org/licenses/ +[8]: https://opensource.com/sites/default/files/uploads/kibana.jpg (Kibana running in Firefox.) From b18e8860a85dc4d1f9e8f9d59334d59b94402516 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Aug 2019 08:47:20 +0800 Subject: [PATCH 418/951] translating --- .../20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md b/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md index e3b4d29d94..18ecf1d97b 100644 --- a/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md +++ b/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From fac3518c0a86d910188ca8f92a217e7ddb86f6bb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 09:45:57 +0800 Subject: [PATCH 419/951] TSL&PRF --- .../20190725 Introduction to GNU Autotools.md | 263 ------------------ .../20190725 Introduction to GNU Autotools.md | 245 ++++++++++++++++ 2 files changed, 245 insertions(+), 263 deletions(-) delete mode 100644 sources/tech/20190725 Introduction to GNU Autotools.md create mode 100644 translated/tech/20190725 Introduction to GNU Autotools.md diff --git a/sources/tech/20190725 Introduction to GNU Autotools.md b/sources/tech/20190725 Introduction to GNU Autotools.md deleted file mode 100644 index 525f07bdde..0000000000 --- a/sources/tech/20190725 Introduction to GNU Autotools.md +++ /dev/null @@ -1,263 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Introduction to GNU Autotools) -[#]: via: (https://opensource.com/article/19/7/introduction-gnu-autotools) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Introduction to GNU Autotools -====== -If you're not using Autotools yet, this tutorial will change the way you -deliver your code. -![Linux kernel source code \(C\) in Visual Studio Code][1] - -Have you ever downloaded the source code for a popular software project that required you to type the almost ritualistic **./configure; make && make install** command sequence to build and install it? If so, you’ve used [GNU Autotools][2]. If you’ve ever looked into some of the files accompanying such a project, you’ve likely also been terrified at the apparent complexity of such a build system. - -Good news! GNU Autotools is a lot simpler to set up than you think, and it’s GNU Autotools itself that generates those 1,000-line configuration files for you. Yes, you can write 20 or 30 lines of installation code and get the other 4,000 for free. - -### Autotools at work - -If you’re a user new to Linux looking for information on how to install applications, you do not have to read this article! You’re welcome to read it if you want to research how software is built, but if you’re just installing a new application, go read my article about [installing apps on Linux][3]. - -For developers, Autotools is a quick and easy way to manage and package source code so users can compile and install software. Autotools is also well-supported by major packaging formats, like DEB and RPM, so maintainers of software repositories can easily prepare a project built with Autotools. - -Autotools works in stages: - - 1. First, during the **./configure** step, Autotools scans the host system (the computer it’s being run on) to discover the default settings. Default settings include where support libraries are located, and where new software should be placed on the system. - 2. Next, during the **make** step, Autotools builds the application, usually by converting human-readable source code into machine language. - 3. Finally, during the **make install** step, Autotools copies the files it built to the appropriate locations (as detected during the configure stage) on your computer. - - - -This process seems simple, and it is, as long as you use Autotools. - -### The Autotools advantage - -GNU Autotools is a big and important piece of software that most of us take for granted. Along with [GCC (the GNU Compiler Collection)][4], Autotools is the scaffolding that allows Free Software to be constructed and installed to a running system. If you’re running a [POSIX][5] system, it’s not an understatement to say that most of your operating system exists as runnable software on your computer because of these projects. - -In the likely event that your pet project isn’t an operating system, you might assume that Autotools is overkill for your needs. But, despite its reputation, Autotools has lots of little features that may benefit you, even if your project is a relatively simple application or series of scripts. - -#### Portability - -First of all, Autotools comes with portability in mind. While it can’t make your project work across all POSIX platforms (that’s up to you, as the coder), Autotools can ensure that the files you’ve marked for installation get installed to the most sensible locations on a known platform. And because of Autotools, it’s trivial for a power user to customize and override any non-optimal value, according to their own system. - -With Autotools, all you need to know is what files need to be installed to what general location. It takes care of everything else. No more custom install scripts that break on any untested OS. - -#### Packaging - -Autotools is also well-supported. Hand a project with Autotools over to a distro packager, whether they’re packaging an RPM, DEB, TGZ, or anything else, and their job is simple. Packaging tools know Autotools, so there’s likely to be no patching, hacking, or adjustments necessary. In many cases, incorporating an Autotools project into a pipeline can even be automated. - -### How to use Autotools - -To use Autotools, you must first have Autotools installed. Your distribution may provide one package meant to help developers build projects, or it may provide separate packages for each component, so you may have to do some research on your platform to discover what packages you need to install. - -The components of Autotools are: - - * **automake** - * **autoconf** - * **automake** - * **make** - - - -While you likely need to install the compiler (GCC, for instance) required by your project, Autotools works just fine with scripts or binary assets that don’t need to be compiled. In fact, Autotools can be useful for such projects because it provides a **make uninstall** script for easy removal. - -Once you have all of the components installed, it’s time to look at the structure of your project’s files. - -#### Autotools project structure - -GNU Autotools has very specific expectations, and most of them are probably familiar if you download and build source code often. First, the source code itself is expected to be in a subdirectory called **src**. - -Your project doesn’t have to follow all of these expectations, but if you put files in non-standard locations (from the perspective of Autotools), then you’ll have to make adjustments for that in your Makefile later. - -Additionally, these files are required: - - * **NEWS** - * **README** - * **AUTHORS** - * **ChangeLog** - - - -You don’t have to actively use the files, and they can be symlinks to a monolithic document (like **README.md**) that encompasses all of that information, but they must be present. - -#### Autotools configuration - -Create a file called **configure.ac** at your project’s root directory. This file is used by **autoconf** to create the **configure** shell script that users run before building. The file must contain, at the very least, the **AC_INIT** and **AC_OUTPUT** [M4 macros][6]. You don’t need to know anything about the M4 language to use these macros; they’re already written for you, and all of the ones relevant to Autotools are defined in the documentation. - -Open the file in your favorite text editor. The **AC_INIT** macro may consist of the package name, version, an email address for bug reports, the project URL, and optionally the name of the source TAR file. - -The **[AC_OUTPUT][7]** macro is much simpler and accepts no arguments. - - -``` -AC_INIT([penguin], [2019.3.6], [[seth@example.com][8]]) -AC_OUTPUT -``` - -If you were to run **autoconf** at this point, a **configure** script would be generated from your **configure.ac** file, and it would run successfully. That’s all it would do, though, because all you have done so far is define your project’s metadata and called for a configuration script to be created. - -The next macros you must invoke in your **configure.ac** file are functions to create a [Makefile][9]. A Makefile tells the **make** command what to do (usually, how to compile and link a program). - -The macros to create a Makefile are **AM_INIT_AUTOMAKE**, which accepts no arguments, and **AC_CONFIG_FILES**, which accepts the name you want to call your output file. - -Finally, you must add a macro to account for the compiler your project needs. The macro you use obviously depends on your project. If your project is written in C++, the appropriate macro is **AC_PROG_CXX**, while a project written in C requires **AC_PROG_CC**, and so on, as detailed in the [Building Programs and Libraries][10] section in the Autoconf documentation. - -For example, I might add the following for my C++ program: - - -``` -AC_INIT([penguin], [2019.3.6], [[seth@example.com][8]]) -AC_OUTPUT -AM_INIT_AUTOMAKE -AC_CONFIG_FILES([Makefile]) -AC_PROG_CXX -``` - -Save the file. It’s time to move on to the Makefile. - -#### Autotools Makefile generation - -Makefiles aren’t difficult to write manually, but Autotools can write one for you, and the one it generates will use the configuration options detected during the `./configure` step, and it will contain far more options than you would think to include or want to write yourself. However, Autotools can’t detect everything your project requires to build, so you have to add some details in the file **Makefile.am**, which in turn is used by **automake** when constructing a Makefile. - -**Makefile.am** uses the same syntax as a Makefile, so if you’ve ever written a Makefile from scratch, then this process will be familiar and simple. Often, a **Makefile.am** file needs only a few variable definitions to indicate what files are to be built, and where they are to be installed. - -Variables ending in **_PROGRAMS** identify code that is to be built (this is usually considered the _primary_ target; it’s the main reason the Makefile exists). Automake recognizes other primaries, like **_SCRIPTS**, **_DATA**, **_LIBRARIES**, and other common parts that make up a software project. - -If your application is literally compiled during the build process, then you identify it as a binary program with the **bin_PROGRAMS** variable, and then reference any part of the source code required to build it (these parts may be one or more files to be compiled and linked together) using the program name as the variable prefix: - - -``` -bin_PROGRAMS = penguin -penguin_SOURCES = penguin.cpp -``` - -The target of **bin_PROGRAMS** is installed into the **bindir**, which is user-configurable during compilation. - -If your application isn’t actually compiled, then your project doesn’t need a **bin_PROGRAMS** variable at all. For instance, if your project is a script written in Bash, Perl, or a similar interpreted language, then define a **_SCRIPTS** variable instead: - - -``` -bin_SCRIPTS = bin/penguin -``` - -Automake expects sources to be located in a directory called **src**, so if your project uses an alternative directory structure for its layout, you must tell Automake to accept code from outside sources: - - -``` -AUTOMAKE_OPTIONS = foreign subdir-objects -``` - -Finally, you can create any custom Makefile rules in **Makefile.am** and they’ll be copied verbatim into the generated Makefile. For instance, if you know that a temporary value needs to be replaced in your source code before the installation proceeds, you could make a custom rule for that process: - - -``` -all-am: penguin -        touch bin/penguin.sh -        -penguin: bin/penguin.sh -        @sed "s|__datadir__|@datadir@|" $< >bin/$@ -``` - -A particularly useful trick is to extend the existing **clean** target, at least during development. The **make clean** command generally removes all generated build files with the exception of the Automake infrastructure. It’s designed this way because most users rarely want **make clean** to obliterate the files that make it easy to build their code. - -However, during development, you might want a method to reliably return your project to a state relatively unaffected by Autotools. In that case, you may want to add this: - - -``` -clean-local: -        @rm config.status configure config.log -        @rm Makefile -        @rm -r autom4te.cache/ -        @rm aclocal.m4 -        @rm compile install-sh missing Makefile.in -``` - -There’s a lot of flexibility here, and if you’re not already familiar with Makefiles, it can be difficult to know what your **Makefile.am** needs. The barest necessity is a primary target, whether that’s a binary program or a script, and an indication of where the source code is located (whether that’s through a **_SOURCES** variable or by using **AUTOMAKE_OPTIONS** to tell Automake where to look for source code). - -Once you have those variables and settings defined, you can try generating your build scripts as you see in the next section, and adjust for anything that’s missing. - -#### Autotools build script generation - -You’ve built the infrastructure, now it’s time to let Autotools do what it does best: automate your project tooling. The way the developer (you) interfaces with Autotools is different from how users building your code do. - -Builders generally use this well-known sequence: - - -``` -$ ./configure -$ make -$ sudo make install -``` - -For that incantation to work, though, you as the developer must bootstrap the build infrastructure. First, run **autoreconf** to generate the configure script that users invoke before running **make**. Use the **–install** option to bring in auxiliary files, such as a symlink to **depcomp**, a script to generate dependencies during the compiling process, and a copy of the **compile** script, a wrapper for compilers to account for syntax variance, and so on. - - -``` -$ autoreconf --install -configure.ac:3: installing './compile' -configure.ac:2: installing './install-sh' -configure.ac:2: installing './missing' -``` - -With this development build environment, you can then create a package for source code distribution: - - -``` -$ make dist -``` - -The **dist** target is a rule you get for "free" from Autotools. -It’s a feature that gets built into the Makefile generated from your humble **Makefile.am** configuration. This target produces a **tar.gz** archive containing all of your source code and all of the essential Autotools infrastructure so that people downloading the package can build the project. - -At this point, you should review the contents of the archive carefully to ensure that it contains everything you intend to ship to your users. You should also, of course, try building from it yourself: - - -``` -$ tar --extract --file penguin-0.0.1.tar.gz -$ cd penguin-0.0.1 -$ ./configure -$ make -$ DESTDIR=/tmp/penguin-test-build make install -``` - -If your build is successful, you find a local copy of your compiled application specified by **DESTDIR** (in the case of this example, **/tmp/penguin-test-build**). - - -``` -$ /tmp/example-test-build/usr/local/bin/example -hello world from GNU Autotools -``` - -### Time to use Autotools - -Autotools is a great collection of scripts for a predictable and automated release process. This toolset may be new to you if you’re used to Python or Bash builders, but it’s likely worth learning for the structure and adaptability it provides to your project. - -And Autotools is not just for code, either. Autotools can be used to build [Docbook][11] projects, to keep media organized (I use Autotools for my music releases), documentation projects, and anything else that could benefit from customizable install targets. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/introduction-gnu-autotools - -作者:[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/linux_kernel_clang_vscode.jpg?itok=fozZ4zrr (Linux kernel source code (C) in Visual Studio Code) -[2]: https://www.gnu.org/software/automake/faq/autotools-faq.html -[3]: https://opensource.com/article/18/1/how-install-apps-linux -[4]: https://en.wikipedia.org/wiki/GNU_Compiler_Collection -[5]: https://en.wikipedia.org/wiki/POSIX -[6]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Initializing-configure.html -[7]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Output.html#Output -[8]: mailto:seth@example.com -[9]: https://www.gnu.org/software/make/manual/html_node/Introduction.html -[10]: https://www.gnu.org/software/automake/manual/html_node/Programs.html#Programs -[11]: https://opensource.com/article/17/9/docbook diff --git a/translated/tech/20190725 Introduction to GNU Autotools.md b/translated/tech/20190725 Introduction to GNU Autotools.md new file mode 100644 index 0000000000..e7adaf0b1e --- /dev/null +++ b/translated/tech/20190725 Introduction to GNU Autotools.md @@ -0,0 +1,245 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Introduction to GNU Autotools) +[#]: via: (https://opensource.com/article/19/7/introduction-gnu-autotools) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +GNU Autotools 介绍 +====== + +> 如果你仍未使用过 Autotools,那么这篇文章将改变你递交代码的方式。 + +![](https://img.linux.net.cn/data/attachment/album/201908/13/094739ahql50gx9x10y157.jpg) + +你有没有下载过流行的软件项目的源代码,要求你输入几乎是仪式般的 `./configure; make && make install` 命令序列来构建和安装它?如果是这样,你已经使用过 [GNU Autotools][2] 了。如果你曾经研究过这样的项目所附带的一些文件,你可能会对这种构建系统的显而易见的复杂性感到害怕。 + +好的消息是,GNU Autotools 的设置要比你想象的要简单得多,GNU Autotools 本身可以为你生成这些上千行的配置文件。是的,你可以编写 20 或 30 行安装代码,并免费获得其他 4,000 行。 + +### Autotools 工作方式 + +如果你是初次使用 Linux 的用户,正在寻找有关如何安装应用程序的信息,那么你不必阅读本文!如果你想研究如何构建软件,欢迎阅读它;但如果你只是要安装一个新应用程序,请阅读我在[在 Linux 上安装应用程序][3]的文章。 + +对于开发人员来说,Autotools 是一种管理和打包源代码的快捷方式,以便用户可以编译和安装软件。 Autotools 也得到了主要打包格式(如 DEB 和 RPM)的良好支持,因此软件存储库的维护者可以轻松管理使用 Autotools 构建的项目。 + +Autotools 工作步骤: + +1. 首先,在 `./configure` 步骤中,Autotools 扫描宿主机系统(即当前正在运行的计算机)以发现默认设置。默认设置包括支持库所在的位置,以及新软件应放在系统上的位置。 +2. 接下来,在 `make` 步骤中,Autotools 通常通过将人类可读的源代码转换为机器语言来构建应用程序。 +3. 最后,在 `make install` 步骤中,Autotools 将其构建好的文件复制到计算机上(在配置阶段检测到)的相应位置。 + +这个过程看起来很简单,和你使用 Autotools 的步骤一样。 + +### Autotools 的优势 + +GNU Autotools 是我们大多数人认为理所当然的重要软件。与 [GCC(GNU 编译器集合)][4]一起,Autotools 是支持将自由软件构建和安装到正在运行的系统的脚手架。如果你正在运行 [POSIX][5] 系统,可以毫不保守地说,你的计算机上的操作系统里大多数可运行软件都是这些这样构建的。 + +即使是你的项目是个玩具项目不是操作系统,你可能会认为 Autotools 对你的需求来说太过分了。但是,尽管它的名气很大,Autotools 有许多可能对你有益的小功能,即使你的项目只是一个相对简单的应用程序或一系列脚本。 + +#### 可移植性 + +首先,Autotools 考虑到了可移植性。虽然它无法使你的项目在所有 POSIX 平台上工作(这取决于你,编码的人),但 Autotools 可以确保你标记为要安装的文件安装到已知平台上最合理的位置。而且由于 Autotools,高级用户可以轻松地根据他们自己的系统情况定制和覆盖任何非最佳设定。 + +使用 Autotools,你只要知道需要将文件安装到哪个常规位置就行了。它会处理其他一切。不需要可能破坏未经测试的操作系统的定制安装脚本。 + +#### 打包 + +Autotools 也得到了很好的支持。将一个带有 Autotools 的项目交给一个发行版打包者,无论他们是打包成 RPM、DEB、TGZ 还是其他任何东西,都很简单。打包工具知道 Autotools,因此可能不需要修补、魔改或调整。在许多情况下,将 Autotools 项目结合到流程中甚至可以实现自动化。 + +### 如何使用 Autotools + +要使用 Autotools,必须先安装它。你的发行版可能提供一个单个的软件包来帮助开发人员构建项目,或者它可能为每个组件提供了单独的软件包,因此你可能需要在你的平台上进行一些研究以发现需要安装的软件包。 + +Autotools 的组件是: + + * `automake` + * `autoconf` + * `automake` + * `make` + +虽然你可能需要安装项目所需的编译器(例如 GCC),但 Autotools 可以很好地处理不需要编译的脚本或二进制文件。实际上,Autotools 对于此类项目非常有用,因为它提供了一个 `make uninstall` 脚本,以便于删除。 + +安装了所有组件之后,现在让我们了解一下你的项目文件的组成结构。 + +#### Autotools 项目结构 + +GNU Autotools 有非常具体的预期规范,如果你经常下载和构建源代码,可能大多数都很熟悉。首先,源代码本身应该位于一个名为 `src` 的子目录中。 + +你的项目不必遵循所有这些预期规范,但如果你将文件放在非标准位置(从 Autotools 的角度来看),那么你将不得不稍后在 `Makefile` 中对其进行调整。 + +此外,这些文件是必需的: + + * `NEWS` + * `README` + * `AUTHORS` + * `ChangeLog` + +你不必主动使用这些文件,它们可以是包含所有信息的单个汇总文档(如 `README.md`)的符号链接,但它们必须存在。 + +#### Autotools 配置 + +在你的项目根目录下创建一个名为 `configure.ac` 的文件。`autoconf` 使用此文件来创建用户在构建之前运行的 `configure` shell 脚本。该文件必须至少包含 `AC_INIT` 和 `AC_OUTPUT` [M4 宏][6]。你不需要了解有关 M4 语言的任何信息就可以使用这些宏;它们已经为你编写好了,并且所有与 Autotools 相关的内容都在该文档中定义好了。 + +在你喜欢的文本编辑器中打开该文件。`AC_INIT` 宏可以包括包名称、版本、报告错误的电子邮件地址、项目 URL 以及可选的源 TAR 文件名称等参数。 + +[AC_OUTPUT][7] 宏更简单,不用任何参数。 + +``` +AC_INIT([penguin], [2019.3.6], [[seth@example.com][8]]) +AC_OUTPUT +``` + +如果你此刻运行 `autoconf`,会依据你的 `configure.ac` 文件生成一个 `configure` 脚本,它是可以运行的。但是,也就是能运行而已,因为到目前为止你所做的就是定义项目的元数据,并要求创建一个配置脚本。 + +你必须在 `configure.ac` 文件中调用的下一个宏是创建 [Makefile][9] 的函数。 `Makefile` 会告诉 `make` 命令做什么(通常是如何编译和链接程序)。 + +创建 `Makefile` 的宏是 `AM_INIT_AUTOMAKE`,它不接受任何参数,而 `AC_CONFIG_FILES` 接受的参数是你要输出的文件的名称。 + +最后,你必须添加一个宏来考虑你的项目所需的编译器。你使用的宏显然取决于你的项目。如果你的项目是用 C++ 编写的,那么适当的宏是 `AC_PROG_CXX`,而用 C 编写的项目需要 `AC_PROG_CC`,依此类推,详见 Autoconf 文档中的 [Building Programs and Libraries][10] 部分。 + +例如,我可能会为我的 C++ 程序添加以下内容: + +``` +AC_INIT([penguin], [2019.3.6], [[seth@example.com][8]]) +AC_OUTPUT +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +AC_PROG_CXX +``` + +保存该文件。现在让我们将目光转到 `Makefile`。 + +#### 生成 Autotools Makefile + +`Makefile` 并不难手写,但 Autotools 可以为你编写一个,而它生成的那个将使用在 `./configure` 步骤中检测到的配置选项,并且它将包含比你考虑要包括或想要自己写的还要多得多的选项。然而,Autotools 并不能检测你的项目构建所需的所有内容,因此你必须在文件 `Makefile.am` 中添加一些细节,然后在构造 `Makefile` 时由 `automake` 使用。 + +`Makefile.am` 使用与 `Makefile` 相同的语法,所以如果你曾经从头开始编写过 `Makefile`,那么这个过程将是熟悉和简单的。通常,`Makefile.am` 文件只需要几个变量定义来指示要构建的文件以及它们的安装位置即可。 + +以 `_PROGRAMS` 结尾的变量标识了要构建的代码(这通常被认为是原语primary目标;这是 `Makefile` 存在的主要意义)。Automake 也会识别其他原语,如 `_SCRIPTS`、`_ DATA`、`_LIBRARIES`,以及构成软件项目的其他常见部分。 + +如果你的应用程序在构建过程中需要实际编译,那么你可以用 `bin_PROGRAMS` 变量将其标记为二进制程序,然后使用该程序名称作为变量前缀引用构建它所需的源代码的任何部分(这些部分可能是将被编译和链接在一起的一个或多个文件): + +``` +bin_PROGRAMS = penguin +penguin_SOURCES = penguin.cpp +``` + +`bin_PROGRAMS` 的目标被安装在 `bindir` 中,它在编译期间可由用户配置。 + +如果你的应用程序不需要实际编译,那么你的项目根本不需要 `bin_PROGRAMS` 变量。例如,如果你的项目是用 Bash、Perl 或类似的解释语言编写的脚本,那么定义一个 `_SCRIPTS` 变量来替代: + +``` +bin_SCRIPTS = bin/penguin +``` + +Automake 期望源代码位于名为 `src` 的目录中,因此如果你的项目使用替代目录结构进行布局,则必须告知 Automake 接受来自外部源的代码: + +``` +AUTOMAKE_OPTIONS = foreign subdir-objects +``` + +最后,你可以在 `Makefile.am` 中创建任何自定义的 `Makefile` 规则,它们将逐字复制到生成的 `Makefile` 中。例如,如果你知道一些源代码中的临时值需要在安装前替换,则可以为该过程创建自定义规则: + +``` +all-am: penguin +        touch bin/penguin.sh +        +penguin: bin/penguin.sh +        @sed "s|__datadir__|@datadir@|" $< >bin/$@ +``` + +一个特别有用的技巧是扩展现有的 `clean` 目标,至少在开发期间是这样的。`make clean` 命令通常会删除除了 Automake 基础结构之外的所有生成的构建文件。它是这样设计的,因为大多数用户很少想要 `make clean` 来删除那些便于构建代码的文件。 + +但是,在开发期间,你可能需要一种方法可靠地将项目返回到相对不受 Autotools 影响的状态。在这种情况下,你可能想要添加: + +``` +clean-local: +        @rm config.status configure config.log +        @rm Makefile +        @rm -r autom4te.cache/ +        @rm aclocal.m4 +        @rm compile install-sh missing Makefile.in +``` + +这里有很多灵活性,如果你还不熟悉 `Makefile`,那么很难知道你的 `Makefile.am` 需要什么。最基本需要的是原语目标,无论是二进制程序还是脚本,以及源代码所在位置的指示(无论是通过 `_SOURCES` 变量还是使用 `AUTOMAKE_OPTIONS` 告诉 Automake 在哪里查找源代码)。 + +一旦定义了这些变量和设置,如下一节所示,你就可以尝试生成构建脚本,并调整缺少的任何内容。 + +#### 生成 Autotools 构建脚本 + +你已经构建了基础结构,现在是时候让 Autotools 做它最擅长的事情:自动化你的项目工具。对于开发人员(你),Autotools 的接口与构建代码的用户的不同。 + +构建者通常使用这个众所周知的顺序: + +``` +$ ./configure +$ make +$ sudo make install +``` + +但是,要使这种咒语起作用,你作为开发人员必须引导构建这些基础结构。首先,运行 `autoreconf` 以生成用户在运行 `make` 之前调用的 `configure` 脚本。使用 `-install` 选项将辅助文件(例如符号链接)引入到 `depcomp`(这是在编译过程中生成依赖项的脚本),以及 `compile` 脚本的副本(一个编译器的包装器,用于说明语法,等等)。 + +``` +$ autoreconf --install +configure.ac:3: installing './compile' +configure.ac:2: installing './install-sh' +configure.ac:2: installing './missing' +``` + +使用此开发构建环境,你可以创建源代码分发包: + +``` +$ make dist +``` + +`dist` 目标是从 Autotools “免费”获得的规则。这是一个内置于 `Makefile` 中的功能,它是通过简单的 `Makefile.am` 配置生成的。该目标可以生成一个 `tar.gz` 存档,其中包含了所有源代码和所有必要的 Autotools 基础设施,以便下载程序包的人员可以构建项目。 + +此时,你应该仔细查看存档文件的内容,以确保它包含你要发送给用户的所有内容。当然,你也应该尝试自己构建: + +``` +$ tar --extract --file penguin-0.0.1.tar.gz +$ cd penguin-0.0.1 +$ ./configure +$ make +$ DESTDIR=/tmp/penguin-test-build make install +``` + +如果你的构建成功,你将找到由 `DESTDIR` 指定的已编译应用程序的本地副本(在此示例的情况下为 `/tmp/penguin-test-build`)。 + +``` +$ /tmp/example-test-build/usr/local/bin/example +hello world from GNU Autotools +``` + +### 去使用 Autotools + +Autotools 是一个很好的脚本集合,可用于可预测的自动发布过程。如果你习惯使用 Python 或 Bash 构建器,这个工具集对你来说可能是新的,但它为你的项目提供的结构和适应性可能值得学习。 + +而 Autotools 也不只是用于代码。Autotools 可用于构建 [Docbook][11] 项目,保持媒体有序(我使用 Autotools 进行音乐发布),文档项目以及其他任何可以从可自定义安装目标中受益的内容。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/introduction-gnu-autotools + +作者:[Seth Kenlon][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://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_kernel_clang_vscode.jpg?itok=fozZ4zrr (Linux kernel source code (C) in Visual Studio Code) +[2]: https://www.gnu.org/software/automake/faq/autotools-faq.html +[3]: https://linux.cn/article-9486-1.html +[4]: https://en.wikipedia.org/wiki/GNU_Compiler_Collection +[5]: https://en.wikipedia.org/wiki/POSIX +[6]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Initializing-configure.html +[7]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Output.html#Output +[8]: mailto:seth@example.com +[9]: https://www.gnu.org/software/make/manual/html_node/Introduction.html +[10]: https://www.gnu.org/software/automake/manual/html_node/Programs.html#Programs +[11]: https://opensource.com/article/17/9/docbook From 99eda89ea4e2df8b5faf68644aadd0de7739912c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 10:22:09 +0800 Subject: [PATCH 420/951] PUB @wxy https://linux.cn/article-11218-1.html --- .../20190725 Introduction to GNU Autotools.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190725 Introduction to GNU Autotools.md (99%) diff --git a/translated/tech/20190725 Introduction to GNU Autotools.md b/published/20190725 Introduction to GNU Autotools.md similarity index 99% rename from translated/tech/20190725 Introduction to GNU Autotools.md rename to published/20190725 Introduction to GNU Autotools.md index e7adaf0b1e..71cda2d23a 100644 --- a/translated/tech/20190725 Introduction to GNU Autotools.md +++ b/published/20190725 Introduction to GNU Autotools.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11218-1.html) [#]: subject: (Introduction to GNU Autotools) [#]: via: (https://opensource.com/article/19/7/introduction-gnu-autotools) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 4e2705b5b5382418a55da4fe77af40721fbd1bdb Mon Sep 17 00:00:00 2001 From: "qfzy1233@163.com" Date: Tue, 13 Aug 2019 10:34:31 +0800 Subject: [PATCH 421/951] Update 20190611 What is a Linux user.md --- sources/tech/20190611 What is a Linux user.md | 56 ++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/sources/tech/20190611 What is a Linux user.md b/sources/tech/20190611 What is a Linux user.md index c7d52b521c..7d521431dd 100644 --- a/sources/tech/20190611 What is a Linux user.md +++ b/sources/tech/20190611 What is a Linux user.md @@ -1,43 +1,49 @@ -[#]: collector: (lujun9972) -[#]: translator: (qfzy1233 ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is a Linux user?) -[#]: via: (https://opensource.com/article/19/6/what-linux-user) -[#]: author: (Anderson Silva https://opensource.com/users/ansilva/users/petercheer/users/ansilva/users/greg-p/users/ansilva/users/ansilva/users/bcotton/users/ansilva/users/seth/users/ansilva/users/don-watkins/users/ansilva/users/seth) +[#]: collector: "lujun9972" +[#]: translator: "qfzy1233 " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "What is a Linux user?" +[#]: via: "https://opensource.com/article/19/6/what-linux-user" +[#]: author: "Anderson Silva https://opensource.com/users/ansilva/users/petercheer/users/ansilva/users/greg-p/users/ansilva/users/ansilva/users/bcotton/users/ansilva/users/seth/users/ansilva/users/don-watkins/users/ansilva/users/seth" -What is a Linux user? +何谓 Linux 用户? ====== -The definition of who is a "Linux user" has grown to be a bigger tent, -and it's a great change. + +“Linux 用户”这一定义已经拓展到了更大的范围,同时也发生了巨大的改变。 ![][1] -> _Editor's note: this article was updated on Jun 11, 2019, at 1:15:19 PM to more accurately reflect the author's perspective on an open and inclusive community of practice in the Linux community._ +> _编者按: 本文更新于2019年6月11日下午1:15:19更新,以更准确地反映作者对Linux社区中开放和包容的社区性的看法_ -In only two years, the Linux kernel will be 30 years old. Think about that! Where were you in 1991? Were you even born? I was 13! Between 1991 and 1993 a few Linux distributions were created, and at least three of them—Slackware, Debian, and Red Hat–provided the [backbone][2] the Linux movement was built on. -Getting a copy of a Linux distribution and installing and configuring it on a desktop or server was very different back then than today. It was hard! It was frustrating! It was an accomplishment if you got it running! We had to fight with incompatible hardware, configuration jumpers on devices, BIOS issues, and many other things. Even if the hardware was compatible, many times, you still had to compile the kernel, modules, and drivers to get them to work on your system. -If you were around during those days, you are probably nodding your head. Some readers might even call them the "good old days," because choosing to use Linux meant you had to learn about operating systems, computer architecture, system administration, networking, and even programming, just to keep the OS functioning. I am not one of them though: Linux being a regular part of everyone's technology experience is one of the most amazing changes in our industry! +再过两年,Linux 内核就要迎来它30岁的生日了。让我们回想一下!1991年的时候你在哪里?你出生了吗?那年我13岁!在1991到1993年间只推出了极少数的 Linux 发行版,且至少有三款—Slackware, Debian, 和 Red Hat–支持[backbone][2] 这也使得 Linux 运动得以发展。 -Almost 30 years later, Linux has gone far beyond the desktop and server. You will find Linux in automobiles, airplanes, appliances, smartphones… virtually everywhere! You can even purchase laptops, desktops, and servers with Linux preinstalled. If you consider cloud computing, where corporations and even individuals can deploy Linux virtual machines with the click of a button, it's clear how widespread the availability of Linux has become. +当年获得Linux发行版的副本,并在笔记本或服务器上进行安装和配置,和今天相比是很不一样的。当时是十分艰难的!也是令人沮丧的!如果你让能让它运行起来,就是一个了不起的成就!我们不得不与不兼容的硬件、设备上的配置跳线、BIOS 问题以及许多其他问题作斗争。即使硬件是兼容的,很多时候,你仍然需要编译内核、模块和驱动程序才能让它们在你的系统上工作。 -With all that in mind, my question for you is: **How do you define a "Linux user" today?** +如果你当时在场,你可能会点头。有些读者甚至称它们为“美好的过往”,因为选择使用 Linux 意味着仅仅是为了让操作系统继续运行,你就必须学习操作系统、计算机体系架构、系统管理、网络,甚至编程。但我并不赞同他们的说法,窃以为: Linux 在 IT 行业带给我们的最让人惊讶的改变就是,它成为了我们每个人技术能力的基础组成部分! -If you buy your parent or grandparent a Linux laptop from System76 or Dell, log them into their social media and email, and tell them to click "update system" every so often, they are now a Linux user. If you did the same with a Windows or MacOS machine, they would be Windows or MacOS users. It's incredible to me that, unlike the '90s, Linux is now a place for anyone and everyone to compute. +将近30年过去了,无论是桌面和服务器领域 Linux 系统都有了脱胎换骨的变换。你可以在汽车上,在飞机上,家用电器上,智能手机上……几乎任何地方发现 Linux 的影子!你甚至可以购买预装 Linux 的笔记本电脑、台式机和服务器。如果你考虑云计算,企业甚至个人都可以一键部署 Linux 虚拟机,由此可见 Linux 的应用已经变得多么普遍了。 -In many ways, this is due to the web browser becoming the "killer app" on the desktop computer. Now, many users don't care what operating system they are using as long as they can get to their app or service. +考虑到这些,我想问你的问题是: **这个时代如何定义“Linux用户”** -How many people do you know who use their phone, desktop, or laptop regularly but can't manage files, directories, and drivers on their systems? How many can't install a binary that isn't attached to an "app store" of some sort? How about compiling an application from scratch?! For me, it's almost no one. That's the beauty of open source software maturing along with an ecosystem that cares about accessibility. +如果你从 System76 或 Dell 为你的父母或祖父母购买一台 Linux 笔记本电脑,为其登录好他们的社交媒体和电子邮件,并告诉他们经常单击“系统升级”,那么他们现在就是 Linux 用户了。如果你是在 Windows 或MacOS 机器上进行以上操作,那么他们就是 Windows 或 MacOS 用户。令人难以置信的是,与90年代不同,现在的 Linux 任何人都可以轻易上手。 -Today's Linux user is not required to know, study, or even look up information as the Linux user of the '90s or early 2000s did, and that's not a bad thing. The old imagery of Linux being exclusively for bearded men is long gone, and I say good riddance. +由于种种原因,这也归因于web浏览器成为了桌面计算机上的“杀手级应用程序”。现在,许多用户并不关心他们使用的是什么操作系统,只要他们能够访问到他们的应用程序或服务。 -There will always be room for a Linux user who is interested, curious, _fascinated_ about computers, operating systems, and the idea of creating, using, and collaborating on free software. There is just as much room for creative open source contributors on Windows and MacOS these days as well. Today, being a Linux user is being anyone with a Linux system. And that's a wonderful thing. +你知道有多少人经常使用他们的电话、桌面或笔记本电脑,但无法管理他们系统上的文件、目录和驱动程序?又有多少人不会通过二进制文件安装“应用程序商店”没有收录的程序?更不要提从头编译应用程序,对我来说,几乎没有人。这正是成熟的开源软件和相应的生态对于易用性的改进的动人之处。 + +今天的 Linux 用户不需要像90年代或21世纪初的 Linux 用户那样了解、学习甚至查询信息,这并不是一件坏事。过去那种认为Linux只适合工科男使用的想法已经一去不复返了。 + +对于那些对计算机、操作系统以及在自由软件上创建、使用和协作的想法感兴趣、好奇、着迷的Linux用户来说,Liunx 依旧有研究的空间。如今在 Windows 和 MacOS 上也有同样多的空间留给创造性的开源贡献者。今天,成为Linux用户就是成为一名与 Linux 系统同行的人。这是一件很棒的事情。 + + + +### Linux 用户定义的转变 + +当我开始使用Linux时,作为一个 Linux 用户意味着知道操作系统如何以各种方式、形态和形式运行。Linux 在某种程度上已经成熟,这使得“Linux用户”的定义可以包含更广泛的领域及那些领域里的人们。这可能是显而易见的一点,但重要的还是要说清楚:任何Linux 用户皆“生”而平等。 -### The change to what it means to be a Linux user -When I started with Linux, being a user meant knowing how to the operating system functioned in every way, shape, and form. Linux has matured in a way that allows the definition of "Linux users" to encompass a much broader world of possibility and the people who inhabit it. It may be obvious to say, but it is important to say clearly: anyone who uses Linux is an equal Linux user. -------------------------------------------------------------------------------- @@ -45,7 +51,7 @@ via: https://opensource.com/article/19/6/what-linux-user 作者:[Anderson Silva][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 ab75030eb28dcefa91bddca8a4905951e238413e Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Tue, 13 Aug 2019 10:36:16 +0800 Subject: [PATCH 422/951] Rename sources/tech/20190611 What is a Linux user.md to translated/tech/20190611 What is a Linux user.md --- {sources => translated}/tech/20190611 What is a Linux user.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20190611 What is a Linux user.md (100%) diff --git a/sources/tech/20190611 What is a Linux user.md b/translated/tech/20190611 What is a Linux user.md similarity index 100% rename from sources/tech/20190611 What is a Linux user.md rename to translated/tech/20190611 What is a Linux user.md From 9389b2fba91adc239d9d1c39eb500562f396e342 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Tue, 13 Aug 2019 13:37:14 +0800 Subject: [PATCH 423/951] Translating Why const Doesn't Make C Code Faster. --- sources/tech/20190812 Why const Doesn-t Make C Code Faster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190812 Why const Doesn-t Make C Code Faster.md b/sources/tech/20190812 Why const Doesn-t Make C Code Faster.md index c066e32129..c30d5bddfe 100644 --- a/sources/tech/20190812 Why const Doesn-t Make C Code Faster.md +++ b/sources/tech/20190812 Why const Doesn-t Make C Code Faster.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (LazyWolfLin) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -390,7 +390,7 @@ via: https://theartofmachinery.com/2019/08/12/c_const_isnt_for_performance.html 作者:[Simon Arneaud][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[LazyWolfLin](https://github.com/LazyWolfLin) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 419c249fc7a8cdfce2d106b09bfaaa1bd894d9d3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 13:53:25 +0800 Subject: [PATCH 424/951] PRF @geekpi --- ...o Set Up Time Synchronization On Ubuntu.md | 79 ++++++++++--------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md b/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md index c1261fd19f..424bbf7498 100644 --- a/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md +++ b/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Set Up Time Synchronization On Ubuntu) @@ -12,14 +12,13 @@ ![Set Up Time Synchronization On Ubuntu][1] -你可能设置过 [**cron 任务**][2] 来在特定时间备份重要文件或执行系统相关任务。也许你配置了一个[**日志服务**][3]在特定时间间隔轮转日志。如果你的时钟不同步,这些任务将无法按时执行。这就是要在 Linux 系统上设置正确的时区并保持时钟与 Internet 同步的原因。本指南介绍如何在 Ubuntu Linux 上设置时间同步。下面的步骤已经在 Ubuntu 18.04 上进行了测试,但是对于使用 systemd 的 **timesyncd** 服务的其他基于 Ubuntu 的系统它们是相同的。 - +你可能设置过 [cron 任务][2] 来在特定时间备份重要文件或执行系统相关任务。也许你配置了一个日志服务器在特定时间间隔[轮转日志][3]。但如果你的时钟不同步,这些任务将无法按时执行。这就是要在 Linux 系统上设置正确的时区并保持时钟与互联网同步的原因。本指南介绍如何在 Ubuntu Linux 上设置时间同步。下面的步骤已经在 Ubuntu 18.04 上进行了测试,但是对于使用 systemd 的 `timesyncd` 服务的其他基于 Ubuntu 的系统它们是相同的。 ### 在 Ubuntu 上设置时间同步 通常,我们在安装时设置时区。但是,你可以根据需要更改或设置不同的时区。 -首先,让我们使用 “date” 命令查看 Ubuntu 系统中的当前时区: +首先,让我们使用 `date` 命令查看 Ubuntu 系统中的当前时区: ``` $ date @@ -31,16 +30,16 @@ $ date Tue Jul 30 11:47:39 UTC 2019 ``` -如上所见,“date” 命令显示实际日期和当前时间。这里,我当前的时区是 **UTC**,代表**协调世界时**。 +如上所见,`date` 命令显示实际日期和当前时间。这里,我当前的时区是 **UTC**,代表**协调世界时**。 -或者,你可以在 **/etc/timezone** 文件中查找当前时区。 +或者,你可以在 `/etc/timezone` 文件中查找当前时区。 ``` $ cat /etc/timezone UTC ``` -现在,让我们看看时钟是否与 Internet 同步。只需运行: +现在,让我们看看时钟是否与互联网同步。只需运行: ``` $ timedatectl @@ -58,23 +57,23 @@ systemd-timesyncd.service active: yes RTC in local TZ: no ``` -如你所见,“timedatectl” 命令显示本地时间、世界时、时区以及系统时钟是否与 Internet 服务器同步,以及 **systemd-timesyncd.service** 是处于活动状态还是非活动状态。就我而言,系统时钟已与 Internet 时间服务器同步。 +如你所见,`timedatectl` 命令显示本地时间、世界时、时区以及系统时钟是否与互联网服务器同步,以及 `systemd-timesyncd.service` 是处于活动状态还是非活动状态。就我而言,系统时钟已与互联网时间服务器同步。 -如果时钟不同步,你会看到下面截图中显示的 **“System clock synchronized: no”**。 +如果时钟不同步,你会看到下面截图中显示的 `System clock synchronized: no`。 ![][4] -时间同步已禁用。 +*时间同步已禁用。* 注意:上面的截图是旧截图。这就是你看到不同日期的原因。 -如果你看到 **“System clock synchronized:** 值设置为 **no**,那么 timeyncd 服务可能处于非活动状态。因此,只需重启服务并看下是否正常。 +如果你看到 `System clock synchronized:` 值设置为 `no`,那么 `timesyncd` 服务可能处于非活动状态。因此,只需重启服务并看下是否正常。 ``` $ sudo systemctl restart systemd-timesyncd.service ``` -现在检查 timesyncd 服务状态: +现在检查 `timesyncd` 服务状态: ``` $ sudo systemctl status systemd-timesyncd.service @@ -100,7 +99,7 @@ Jul 30 10:50:35 ubuntuserver systemd-timesyncd[498]: Network configuration chang Jul 30 10:51:06 ubuntuserver systemd-timesyncd[498]: Synchronized to time server [2001:67c:1560:800 ``` -如果此服务已启用并处于活动状态,那么系统时钟应与 Internet 时间服务器同步。 +如果此服务已启用并处于活动状态,那么系统时钟应与互联网时间服务器同步。 你可以使用命令验证是否启用了时间同步: @@ -114,9 +113,9 @@ $ timedatectl $ sudo timedatectl set-ntp true ``` -现在,你的系统时钟将与 Internet 时间服务器同步。 +现在,你的系统时钟将与互联网时间服务器同步。 -##### 使用 timedatectl 命令更改时区 +#### 使用 timedatectl 命令更改时区 如果我想使用 UTC 以外的其他时区怎么办?这很容易! @@ -130,33 +129,37 @@ $ timedatectl list-timezones ![][5] -使用 timedatectl 命令列出时区 +*使用 timedatectl 命令列出时区* -你可以使用以下命令设置所需的时区(例如,Asia/Kolkata): +你可以使用以下命令设置所需的时区(例如,Asia/Shanghai): + +(LCTT 译注:本文原文使用印度时区作为示例,这里为了便于使用,换为中国标准时区 CST。另外,在时区设置中,要注意 CST 这个缩写会代表四个不同的时区,因此建议使用城市和 UTC+8 来说设置。) ``` -$ sudo timedatectl set-timezone Asia/Kolkata +$ sudo timedatectl set-timezone Asia/Shanghai ``` -使用 “date” 命令再次检查时区是否已真正更改: +使用 `date` 命令再次检查时区是否已真正更改: -**$ date** -Tue Jul 30 17:52:33 **IST** 2019 +``` +$ date +Tue Jul 30 17:52:33 CST 2019 +``` -或者,如果需要详细输出,请使用 timedatectl 命令: +或者,如果需要详细输出,请使用 `timedatectl` 命令: ``` $ timedatectl -Local time: Tue 2019-07-30 17:52:35 IST +Local time: Tue 2019-07-30 20:22:35 CST Universal time: Tue 2019-07-30 12:22:35 UTC RTC time: Tue 2019-07-30 12:22:36 -Time zone: Asia/Kolkata (IST, +0530) +Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: yes systemd-timesyncd.service active: yes RTC in local TZ: no ``` -如你所见,我已将时区从 UTC 更改为 IST(印度标准时间)。 +如你所见,我已将时区从 UTC 更改为 CST(中国标准时间)。() 要切换回 UTC 时区,只需运行: @@ -164,9 +167,9 @@ RTC in local TZ: no $ sudo timedatectl set-timezone UTC ``` -##### 使用 tzdata 更改时区 +#### 使用 tzdata 更改时区 -在较旧的 Ubuntu 版本中,没有 timedatectl 命令。这种情况下,你可以使用 **tzdata**(Time zone data)来设置时间同步。 +在较旧的 Ubuntu 版本中,没有 `timedatectl` 命令。这种情况下,你可以使用 `tzdata`(Time zone data)来设置时间同步。 ``` $ sudo dpkg-reconfigure tzdata @@ -176,7 +179,7 @@ $ sudo dpkg-reconfigure tzdata ![][6] -接下来,选择与你的时区对应的城市或地区。这里,我选择了 **Kolkata**。 +接下来,选择与你的时区对应的城市或地区。这里,我选择了 **Kolkata**(LCTT 译注:中国用户请相应使用 Shanghai 等城市)。 ![][7] @@ -188,29 +191,29 @@ Local time is now: Tue Jul 30 19:29:25 IST 2019. Universal Time is now: Tue Jul 30 13:59:25 UTC 2019. ``` -##### 在图形模式下配置时区 +#### 在图形模式下配置时区 有些用户可能对命令行方式不太满意。如果你是其中之一,那么你可以轻松地在图形模式的系统设置面板中进行设置。 -点击**超级键**(Windows 键),在Ubuntu dash 中输入 **settings**,然后点击 **Settings** 图标。 +点击 Super 键(Windows 键),在 Ubuntu dash 中输入 **settings**,然后点击设置图标。 ![][8] -从 Ubuntu dash 启动系统的设置 +*从 Ubuntu dash 启动系统的设置* -或者,单击位于 Ubuntu 桌面右上角的向下箭头,然后单击左上角的 “Settings” 图标。 +或者,单击位于 Ubuntu 桌面右上角的向下箭头,然后单击左上角的“设置”图标。 ![][9] -从顶部面板启动系统的设置 +*从顶部面板启动系统的设置* -在下一个窗口中,选择 **Details**,然后单击 **Date & Time** 选项。打开 **Automatic Date & Time** 和 **Automatic Time Zone**。 +在下一个窗口中,选择“细节”,然后单击“日期与时间”选项。打开“自动的日期与时间”和“自动的时区”。 ![][10] -在 Ubuntu 中设置自动时区 +*在 Ubuntu 中设置自动时区* -关闭设置窗口就行了!你的系统始终应该与 Internet 时间服务器同步了。 +关闭设置窗口就行了!你的系统始终应该与互联网时间服务器同步了。 -------------------------------------------------------------------------------- @@ -218,8 +221,8 @@ via: https://www.ostechnix.com/how-to-set-up-time-synchronization-on-ubuntu/ 作者:[sk][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b0d857d978022b139ad61651771ff77cb1034ff0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 13:54:34 +0800 Subject: [PATCH 425/951] PUB @geekpi https://linux.cn/article-11220-1.html --- ...20190805 How To Set Up Time Synchronization On Ubuntu.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190805 How To Set Up Time Synchronization On Ubuntu.md (98%) diff --git a/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md b/published/20190805 How To Set Up Time Synchronization On Ubuntu.md similarity index 98% rename from translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md rename to published/20190805 How To Set Up Time Synchronization On Ubuntu.md index 424bbf7498..5ed53d6edd 100644 --- a/translated/tech/20190805 How To Set Up Time Synchronization On Ubuntu.md +++ b/published/20190805 How To Set Up Time Synchronization On Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11220-1.html) [#]: subject: (How To Set Up Time Synchronization On Ubuntu) [#]: via: (https://www.ostechnix.com/how-to-set-up-time-synchronization-on-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) @@ -10,7 +10,7 @@ 如何在 Ubuntu 上设置时间同步 ====== -![Set Up Time Synchronization On Ubuntu][1] +![](https://img.linux.net.cn/data/attachment/album/201908/13/135423xnk7zib00nn2aebv.jpg) 你可能设置过 [cron 任务][2] 来在特定时间备份重要文件或执行系统相关任务。也许你配置了一个日志服务器在特定时间间隔[轮转日志][3]。但如果你的时钟不同步,这些任务将无法按时执行。这就是要在 Linux 系统上设置正确的时区并保持时钟与互联网同步的原因。本指南介绍如何在 Ubuntu Linux 上设置时间同步。下面的步骤已经在 Ubuntu 18.04 上进行了测试,但是对于使用 systemd 的 `timesyncd` 服务的其他基于 Ubuntu 的系统它们是相同的。 From b37f5a45d0a4c3eb6a4922f49d668ae7ef2b9449 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 13:58:16 +0800 Subject: [PATCH 426/951] PRF --- ...190805 How To Set Up Time Synchronization On Ubuntu.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/published/20190805 How To Set Up Time Synchronization On Ubuntu.md b/published/20190805 How To Set Up Time Synchronization On Ubuntu.md index 5ed53d6edd..22254d2f1c 100644 --- a/published/20190805 How To Set Up Time Synchronization On Ubuntu.md +++ b/published/20190805 How To Set Up Time Synchronization On Ubuntu.md @@ -143,7 +143,7 @@ $ sudo timedatectl set-timezone Asia/Shanghai ``` $ date -Tue Jul 30 17:52:33 CST 2019 +Tue Jul 30 20:22:33 CST 2019 ``` 或者,如果需要详细输出,请使用 `timedatectl` 命令: @@ -159,7 +159,7 @@ systemd-timesyncd.service active: yes RTC in local TZ: no ``` -如你所见,我已将时区从 UTC 更改为 CST(中国标准时间)。() +如你所见,我已将时区从 UTC 更改为 CST(中国标准时间)。 要切换回 UTC 时区,只需运行: @@ -186,8 +186,8 @@ $ sudo dpkg-reconfigure tzdata 最后,你将在终端中看到类似下面的输出。 ``` -Current default time zone: 'Asia/Kolkata' -Local time is now: Tue Jul 30 19:29:25 IST 2019. +Current default time zone: 'Asia/Shanghai' +Local time is now: Tue Jul 30 21:59:25 CST 2019. Universal Time is now: Tue Jul 30 13:59:25 UTC 2019. ``` From 03d55f4d1905bb995cbf23a3a132882ecc9e28a5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 14:33:05 +0800 Subject: [PATCH 427/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi 。 @lujun9972 这篇中出现代码块中的 URL 误编码和加上了 <> 的情况。以及,一直都有当代码块中是单行代码时会额外在该行两端加上符号的情况。 --- ...stall Elasticsearch and Kibana on Linux.md | 96 +++++++++---------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md b/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md index f655bd2cae..a15d9c8b44 100644 --- a/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md +++ b/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to install Elasticsearch and Kibana on Linux) @@ -9,105 +9,108 @@ 如何在 Linux 上安装 Elasticsearch 和 Kibana ====== -获取我们关于安装两者的简化说明。 + +> 获取我们关于安装两者的简化说明。 + ![5 pengiuns floating on iceburg][1] -如果你热衷学习基于开源 Lucene 库的著名开源搜索引擎 Elasticsearch,那么没有比在本地安装它更好的方法了。这个过程在 [Elasticsearch 网站][2]中有详细介绍,但如果你是初学者,官方说明就比必要的信息多得多。本文采用一种简化的方法。 +如果你渴望学习基于开源 Lucene 库的著名开源搜索引擎 Elasticsearch,那么没有比在本地安装它更好的方法了。这个过程在 [Elasticsearch 网站][2]中有详细介绍,但如果你是初学者,官方说明就比必要的信息多得多。本文采用一种简化的方法。 ### 添加 Elasticsearch 仓库 -首先,将 Elasticsearch 仓库添加到你的系统,以便你可以根据需要安装它并接收更新。如何做取决于你的发行版。在基于 RPM 的系统上,例如 [Fedora][3]、[CentOS] [4]、[Red Hat Enterprise Linux(RHEL)][5]或 [openSUSE][6],(本文任何地方引用 Fedora 或 RHEL 的也适用于 CentOS 和 openSUSE)在 **/etc/yum.repos.d/** 中创建一个名为 **elasticsearch.repo** 的仓库描述文件: - +首先,将 Elasticsearch 仓库添加到你的系统,以便你可以根据需要安装它并接收更新。如何做取决于你的发行版。在基于 RPM 的系统上,例如 [Fedora][3]、[CentOS] [4]、[Red Hat Enterprise Linux(RHEL)][5] 或 [openSUSE][6],(本文任何地方引用 Fedora 或 RHEL 的也适用于 CentOS 和 openSUSE)在 `/etc/yum.repos.d/` 中创建一个名为 `elasticsearch.repo` 的仓库描述文件: ``` -$ cat << EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo +$ cat << EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo [elasticsearch-7.x] name=Elasticsearch repository for 7.x packages -baseurl= +baseurl=https://artifacts.elastic.co/packages/oss-7.x/yum gpgcheck=1 -gpgkey= +gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md EOF ``` -在 Ubuntu 或 Debian 上,不要使用 **add-apt-repository** 工具。由于它自身默认的和 Elasticsearch 仓库提供的不匹配而导致错误 。相反,设置这个: - +在 Ubuntu 或 Debian 上,不要使用 `add-apt-repository` 工具。由于它自身默认的和 Elasticsearch 仓库提供的不匹配而导致错误。相反,设置这个: ``` -$ echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list +$ echo "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list ``` -此存储库仅包含 Elasticsearch 的开源功能,在 [Apache 许可证][7]下,订阅没有提供额外功能。如果你需要仅限订阅的功能(这些功能是_并不_开源),那么 **baseurl** 必须设置为: - +在你从该仓库安装之前,导入 GPG 公钥,然后更新: ``` -`baseurl=https://artifacts.elastic.co/packages/7.x/yum` +$ sudo apt-key adv --keyserver \ +hkp://keyserver.ubuntu.com:80 \ +--recv D27D666CD88E42B4 +$ sudo apt update ``` -  +此存储库仅包含 Elasticsearch 的开源功能,在 [Apache 许可证][7]下发布,没有提供订阅版本的额外功能。如果你需要仅限订阅的功能(这些功能是**并不**开源),那么 `baseurl` 必须设置为: + +``` +baseurl=https://artifacts.elastic.co/packages/7.x/yum +``` ### 安装 Elasticsearch -你需要安装的软件包的名称取决于你使用的是开源版本还是订阅版本。本文使用开源版本,包名最后有 **-oss** 后缀。如果包名后没有 **-oss**,那么表示你请求的是仅限订阅版本。 +你需要安装的软件包的名称取决于你使用的是开源版本还是订阅版本。本文使用开源版本,包名最后有 `-oss` 后缀。如果包名后没有 `-oss`,那么表示你请求的是仅限订阅版本。 -如果你创建了订阅版本的仓库却尝试安装开源版本,那么就会收到“非指定”的错误。如果你创建了一个开源版本仓库却没有将 **-oss** 添加到包名后,那么你也会收到错误。 +如果你创建了订阅版本的仓库却尝试安装开源版本,那么就会收到“非指定”的错误。如果你创建了一个开源版本仓库却没有将 `-oss` 添加到包名后,那么你也会收到错误。 使用包管理器安装 Elasticsearch。例如,在 Fedora、CentOS 或 RHEL 上运行以下命令: - ``` $ sudo dnf install elasticsearch-oss ``` 在 Ubuntu 或 Debian 上,运行: - ``` $ sudo apt install elasticsearch-oss ``` -如果你在安装 Elasticsearch 时遇到错误,那么你可能安装的是错误的软件包。如果你想如本文这样使用开源包,那么请确保在 Yum 配置中使用正确的 **apt** 仓库或 baseurl。 +如果你在安装 Elasticsearch 时遇到错误,那么你可能安装的是错误的软件包。如果你想如本文这样使用开源包,那么请确保使用正确的 apt 仓库或在 Yum 配置正确的 `baseurl`。 ### 启动并启用 Elasticsearch 安装 Elasticsearch 后,你必须启动并启用它: - ``` $ sudo systemctl daemon-reload $ sudo systemctl enable --now elasticsearch.service ``` -要确认 Elasticsearch 在其默认端口 9200 上运行,请在 Web 浏览器中打开 **localhost:9200**。你可以使用 GUI 浏览器,也可以在终端中执行此操作: +要确认 Elasticsearch 在其默认端口 9200 上运行,请在 Web 浏览器中打开 `localhost:9200`。你可以使用 GUI 浏览器,也可以在终端中执行此操作: ``` $ curl localhost:9200 { -  "name" : "fedora30", -  "cluster_name" : "elasticsearch", -  "cluster_uuid" : "OqSbb16NQB2M0ysynnX1hA", -  "version" : { -    "number" : "7.2.0", -    "build_flavor" : "oss", -    "build_type" : "rpm", -    "build_hash" : "508c38a", -    "build_date" : "2019-06-20T15:54:18.811730Z", -    "build_snapshot" : false, -    "lucene_version" : "8.0.0", -    "minimum_wire_compatibility_version" : "6.8.0", -    "minimum_index_compatibility_version" : "6.0.0-beta1" -  }, -  "tagline" : "You Know, for Search" + "name" : "fedora30", + "cluster_name" : "elasticsearch", + "cluster_uuid" : "OqSbb16NQB2M0ysynnX1hA", + "version" : { + "number" : "7.2.0", + "build_flavor" : "oss", + "build_type" : "rpm", + "build_hash" : "508c38a", + "build_date" : "2019-06-20T15:54:18.811730Z", + "build_snapshot" : false, + "lucene_version" : "8.0.0", + "minimum_wire_compatibility_version" : "6.8.0", + "minimum_index_compatibility_version" : "6.0.0-beta1" + }, + "tagline" : "You Know, for Search" } ``` ### 安装 Kibana -Kibana 是 Elasticsearch 数据可视化的图形界面。它包含在 Elasticsearch 仓库,因此你可以使用包管理器进行安装。与 Elasticsearch 本身一样,如果你使用的是 Elasticsearch 的开源版本,那么必须将 **-oss** 放到包名最后,订阅版本则不用(两者安装需要匹配): +Kibana 是 Elasticsearch 数据可视化的图形界面。它包含在 Elasticsearch 仓库,因此你可以使用包管理器进行安装。与 Elasticsearch 本身一样,如果你使用的是 Elasticsearch 的开源版本,那么必须将 `-oss` 放到包名最后,订阅版本则不用(两者安装需要匹配): ``` @@ -116,12 +119,11 @@ $ sudo dnf install kibana-oss 在 Ubuntu 或 Debian 上: - ``` $ sudo apt install kibana-oss ``` -Kibana 在端口 5601 上运行,因此打开图形化 Web 浏览器并进入 **localhost:5601** 来开始使用 Kibana,如下所示: +Kibana 在端口 5601 上运行,因此打开图形化 Web 浏览器并进入 `localhost:5601` 来开始使用 Kibana,如下所示: ![Kibana running in Firefox.][8] @@ -129,30 +131,26 @@ Kibana 在端口 5601 上运行,因此打开图形化 Web 浏览器并进入 * 如果在安装 Elasticsearch 时出现错误,请尝试手动安装 Java 环境。在 Fedora、CentOS 和 RHEL 上: - ``` $ sudo dnf install java-openjdk-devel java-openjdk ``` 在 Ubuntu 上: - ``` -`$ sudo apt install default-jdk` +$ sudo apt install default-jdk ``` 如果所有其他方法都失败,请尝试直接从 Elasticsearch 服务器安装 Elasticsearch RPM: - ``` -$ wget -$ shasum -a 512 -c elasticsearch-oss-7.2.0-x86_64.rpm.sha512 && sudo rpm --install elasticsearch-oss-7.2.0-x86_64.rpm +$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.2.0-x86_64.rpm{,.sha512} +$ shasum -a 512 -c elasticsearch-oss-7.2.0-x86_64.rpm.sha512 && sudo rpm --install elasticsearch-oss-7.2.0-x86_64.rpm ``` 在 Ubuntu 或 Debian 上,请使用 DEB 包。 -如果你无法使用 Web 浏览器访问 Elasticsearch 或 Kibana,那么可能是你的防火墙阻止了这些端口。你可以通过调整防火墙设置来允许这些端口上的流量。例如,如果你运行的是 **firewalld**(Fedora 和 RHEL 上的默认值,并且可以在 Debian 和 Ubuntu 上安装),那么你可以使用 **firewall-cmd**: - +如果你无法使用 Web 浏览器访问 Elasticsearch 或 Kibana,那么可能是你的防火墙阻止了这些端口。你可以通过调整防火墙设置来允许这些端口上的流量。例如,如果你运行的是 `firewalld`(Fedora 和 RHEL 上的默认防火墙,并且可以在 Debian 和 Ubuntu 上安装),那么你可以使用 `firewall-cmd`: ``` $ sudo firewall-cmd --add-port=9200/tcp --permanent @@ -169,7 +167,7 @@ via: https://opensource.com/article/19/7/install-elasticsearch-and-kibana-linux 作者:[Seth Kenlon][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 dcf1870bde14e740784f725c779e5383a4829df7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 14:34:08 +0800 Subject: [PATCH 428/951] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi @lujun9972 https://linux.cn/article-11221-1.html 哦对了,这篇还丢了一些内容,不知道是选题还是翻译过程丢的。 --- ...190709 How to install Elasticsearch and Kibana on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190709 How to install Elasticsearch and Kibana on Linux.md (98%) diff --git a/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md b/published/20190709 How to install Elasticsearch and Kibana on Linux.md similarity index 98% rename from translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md rename to published/20190709 How to install Elasticsearch and Kibana on Linux.md index a15d9c8b44..9b0c4c6363 100644 --- a/translated/tech/20190709 How to install Elasticsearch and Kibana on Linux.md +++ b/published/20190709 How to install Elasticsearch and Kibana on Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11221-1.html) [#]: subject: (How to install Elasticsearch and Kibana on Linux) [#]: via: (https://opensource.com/article/19/7/install-elasticsearch-and-kibana-linux) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 6abaccc2cd189d3dc663ff3a71978b08e1f8833f Mon Sep 17 00:00:00 2001 From: 0x996 <52857718+0x996@users.noreply.github.com> Date: Tue, 13 Aug 2019 17:01:06 +1000 Subject: [PATCH 429/951] APL:20190812 How Hexdump works --- sources/tech/20190812 How Hexdump works.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190812 How Hexdump works.md b/sources/tech/20190812 How Hexdump works.md index a8ca95f97c..25907fe05f 100644 --- a/sources/tech/20190812 How Hexdump works.md +++ b/sources/tech/20190812 How Hexdump works.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (0x996) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9fbb627df520c660483c13c85fae5dbdafb2cee1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 23:16:00 +0800 Subject: [PATCH 430/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @martin2011qi 校对也好难,辛苦了。 --- ...hat is POSIX- Richard Stallman explains.md | 117 +++++++++--------- 1 file changed, 56 insertions(+), 61 deletions(-) diff --git a/translated/tech/20190715 What is POSIX- Richard Stallman explains.md b/translated/tech/20190715 What is POSIX- Richard Stallman explains.md index 038541daa1..3f6f80c846 100644 --- a/translated/tech/20190715 What is POSIX- Richard Stallman explains.md +++ b/translated/tech/20190715 What is POSIX- Richard Stallman explains.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (martin2011qi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What is POSIX? Richard Stallman explains) @@ -9,102 +9,103 @@ POSIX 是什么?让我们听听 Richard Stallman 的诠释 ====== -从计算机自由先驱口中探寻操作系统兼容性标准背后的本质。 -![Scissors cutting open access to files][1] +> 从计算机自由先驱的口中探寻操作系统兼容性标准背后的本质。 -[POSIX][2] 是什么?为什么如此重要?你可能在很多的技术类文章中看到这个术语,但往往会在探寻其本质时迷失在技术初始主义techno-initialisms的海洋中或是以 X 结尾的行话jargon-that-ends-in-X中。 +![](https://img.linux.net.cn/data/attachment/album/201908/13/231737robbwoss7p3p7jwo.jpg) -Richard Stallman 认为用 “开源” 和 “闭源” 来归类软件是一种错误的方法。Stallman 将程序分类为 _尊重自由的freedom-respecting_(“自由free” 或 “自由(西语)libre”)和 _践踏自由的freedom-trampling_(“非自由non-free” 或 “专有proprietary”)。开源话语通常会为了(用户)实际得到的优势/便利advantages考虑,而去鼓励某些做法,而非作为道德层面上的约束。 +[POSIX][2] 是什么?为什么如此重要?你可能在很多的技术类文章中看到这个术语,但往往会在探寻其本质时迷失在技术初始主义techno-initialisms的海洋或是以 X 结尾的行话jargon-that-ends-in-X中。我给 [Richard Stallman][3] 博士(在黑客圈里面常称之为 RMS)发了邮件以探寻这个术语的起源及其背后的概念。 -Stallman 在由其本人于 1984 年发起的自由软件运动中表明,不仅仅是这些 _优势/便利advantages_ 受到了威胁。计算机的用户 _理应得到deserve_ 计算机的控制权,因此拒绝被用户控制的程序即是 非正义injustice,理应得到拒绝rejected排斥eliminated。对于用户的控制权,程序应当给予用户 [四项基本自由][4]: +Richard Stallman 认为用 “开源” 和 “闭源” 来归类软件是一种错误的方法。Stallman 将程序分类为 尊重自由的freedom-respecting(“自由free” 或 “自由(西语)libre”)和 践踏自由的freedom-trampling(“非自由non-free” 或 “专有proprietary”)。开源讨论通常会为了(用户)实际得到的优势/便利advantages考虑去鼓励某些做法,而非作为道德层面上的约束。 - * 自由度0:无论用户出于何种目的,必须可以按照用户意愿,自由地运行该软件。 - * 自由度1:用户可以自由地学习并修改该软件,以此来帮助用户完成用户自己的计算。作为前提,用户必须可以访问到该软件的源代码。 - * 自由度2:用户可以自由地分发该软件的拷贝,这样就可以助人。 - * 自由度3:用户可以自由地分发该软件修改后的拷贝。借此,用户可以把改进后的软件分享给整个社区令他人也从中受益。作为前提,用户必须可以访问到该软件的源代码。 +Stallman 在由其本人于 1984 年发起的自由软件运动The free software movement表明,不仅仅是这些 优势/便利advantages 受到了威胁。计算机的用户 理应得到deserve 计算机的控制权,因此拒绝被用户控制的程序即是 非正义injustice,理应被拒绝rejected排斥eliminated。对于用户的控制权,程序应当给予用户 [四项基本自由][4]: + + * 自由度 0:无论用户出于何种目的,必须可以按照用户意愿,自由地运行该软件。 + * 自由度 1:用户可以自由地学习并修改该软件,以便按照自己的意愿进行计算。作为前提,用户必须可以访问到该软件的源代码。 + * 自由度 2:用户可以自由地分发该软件的副本,以便可以帮助他人。 + * 自由度 3:用户可以自由地分发该软件修改后的副本。借此,你可以让整个社区受益于你的改进。作为前提,用户必须可以访问到该软件的源代码。 ### 关于 POSIX -**Seth:** POSIX 标准是由 [IEEE][5] 发布,用于描述 “可移植操作系统” 的文档。只要开发人员编写符合此描述的程序,他们生产的便是符合 POSIX 的程序。在科技行业,我们称之为 “规范specification” 或将其简写为 “spec”。 就技术用语而言,这是可以理解的,但我们不禁要问是什么使操作系统 “可移植”? +**Seth:** POSIX 标准是由 [IEEE][5] 发布,用于描述 “可移植操作系统portable operating system” 的文档。只要开发人员编写符合此描述的程序,他们生产的便是符合 POSIX 的程序。在科技行业,我们称之为 “规范specification” 或将其简写为 “spec”。就技术用语而言,这是可以理解的,但我们不禁要问是什么使操作系统 “可移植”? -**RMS:** 我认为完成这项任务应该是 _接口_, 接口就应该做到可移植(在不同系统中皆然),而不应只支持任何一种 _系统_。实际上,各种各样的系统内部构造虽然不同,但仍会支持一部分 POSIX 接口规范。 +**RMS:** 我认为是接口interface应该(在不同系统之间)是可移植的,而非任何一种*系统*。实际上,内部构造不同的各种系统都支持部分的 POSIX 接口规范。 -**Seth:** 因此,如果两个系统皆具有 POSIX 兼容程序,那么他们便可以相互对对方做出假设,也就使他们知道如何相互 “交谈”。我了解到 “POSIX” 这个简称是你想出来的。那你是怎么想出来的呢?它是如何就被 IEEE 采纳了呢? +**Seth:** 因此,如果两个系统皆具有符合 POSIX 的程序,那么它们便可以彼此假设,从而知道如何相互 “交谈”。我了解到 “POSIX” 这个简称是你想出来的。那你是怎么想出来的呢?它是如何就被 IEEE 采纳了呢? -**RMS:** IEEE 已经完成了规范的开发,但还没为其想好简练的名称。标题上写的是 “便携式操作系统接口”,虽然我已记不清确切的单词。委员倾向于将 “IEEEIX” 作为简称。而我认为那不太好。发音有点怪 - 听起来像恐怖的尖叫,“Ayeee!” - 所以我觉得人们反而会倾向于称之为 “Unix”。 +**RMS:** IEEE 已经完成了规范的开发,但还没为其想好简练的名称。标题类似是 “便携式操作系统接口”,虽然我已记不清确切的单词。委员会倾向于将 “IEEEIX” 作为简称。而我认为那不太好。发音有点怪 - 听起来像恐怖的尖叫,“Ayeee!” - 所以我觉得人们反而会倾向于称之为 “Unix”。 -但是,由于 [GNU 并不是 Unix(GNU's Not Unix)][6],并且它打算取代之,所以我不希望人们将 GNU 称为 “Unix 系统”。因此,我提出了人们在实际使用中会比较好用的简称。那个时候也没有什么灵感,我就用了一个并不是非常聪明的方式创造了这个简称:我使用了 “便携式操作系统portable operating system” 的首字母缩写,并在末尾添加了 “ix” 作为简称。IEEE 也欣然接受了。 +但是,由于 [GNU 并不是 Unix][6]GNU's Not Unix,并且它打算取代之,我不希望人们将 GNU 称为 “Unix 系统”。因此,我提出了人们可能会实际使用的简称。那个时候也没有什么灵感,我就用了一个并不是非常聪明的方式创造了这个简称:我使用了 “便携式操作系统portable operating system” 的首字母缩写,并在末尾添加了 “ix” 作为简称。IEEE 也欣然接受了。 -**Seth:** POSIX 中的 “操作系统” 是仅涉及 Unix 和类 Unix 的系统(如GNU)呢?还是意图包含所有操作系统? +**Seth:** POSIX 缩写中的 “操作系统” 是仅涉及 Unix 和类 Unix 的系统(如 GNU)呢?还是意图包含所有操作系统? -**RMS:** 缩写中的 “操作系统” 一词涵盖的系统并不完全指的是类 Unix 系统,也不是完全要符合 POSIX 规范。但是,该规范适用于大量类 Unix 的系统;也只有这样的系统才会去遵守 POSIX 规范。 +**RMS:** 术语 “操作系统” 抽象地说,涵盖了完全不像 Unix 的系统、完全和 POSIX 规范无关的系统。但是,POSIX 规范适用于大量类 Unix 系统;也只有这样的系统才适合 POSIX 规范。 **Seth:** 你是否参与审核或更新当前版本的 POSIX 标准? **RMS:** 现在不了。 -**Seth:** GNU Autotools 工具链能使应用程序更容易移植,至少在构建和安装的时间上是这样的。所以可以认为 Autotools 是构建便携式基础设施的重要一环吗? +**Seth:** GNU Autotools 工具链可以使应用程序更容易移植,至少在构建和安装时如此。所以可以认为 Autotools 是构建便携式基础设施的重要一环吗? **RMS:** 是的,因为即使在遵循 POSIX 的系统中,也存在着诸多差异。而 Autotools 可以使程序更容易适应这些差异。顺带一提,如果有人想助力 Autotools 的开发,可以发邮件联系我。 -**Seth:** 我认为,是 GNU 首先开始让人们意识到这种可能,一个非 Unix 的系统可以从专有的技术中挣脱出来的可能。关于自由软件如何协作方面,在实现的途中应该有些缺乏明确性地方吧!。 +**Seth:** 我想,当 GNU 刚刚开始让人们意识到一个非 Unix 的系统可以从专有的技术中解放出来的时候,关于自由软件如何协作方面,这其间一定存在一些空白区域吧。 -**RMS:** 我认为没有任何空白或不确定性。我只是简单地照着 BSD 的接口写而已。 +**RMS:** 我不认为有任何空白或不确定性。我只是照着 BSD 的接口写而已。 -**Seth:** 一些 GNU 应用程序符合 POSIX 标准,而另一些 GNU 应用程序则具有不在 POSIX 规范中的或者是缺少规范要求的 GNU 特定功能。对于 GNU 应用程序 POSIX 合规性有多重要? +**Seth:** 一些 GNU 应用程序符合 POSIX 标准,而另一些 GNU 应用程序的 GNU 特定的功能,要么不在 POSIX 规范中,要么缺少该规范要求的功能。对于 GNU 应用程序 POSIX 合规性有多重要? -**RMS:** 遵循标准对于为用户服务的程度很重要。我们不仅将标准视为权威,而且将其作为可能有用的指南来遵循。因此,我们谈论的是遵循following标准而不是“遵守complying”。可以参考 GNU 编码标准中的 [非 GNU 标准][7] 段落。 +**RMS:** 遵循标准对于利于用户的程度很重要。我们不将标准视为权威,而是且将其作为可能有用的指南来遵循。因此,我们谈论的是遵循following标准而不是“遵守complying”。可以参考 GNU 编码标准GNU Coding Standards中的 [非 GNU 标准][7] 段落。 -我们努力在大多数问题上与标准兼容,因为这样做在大多数的问题上能为用户提供最好的服务。但也偶有例外。 +我们努力在大多数问题上与标准兼容,因为在大多数的问题上这最有利于用户。但也偶有例外。 例如,POSIX 指定某些实用程序以 512 字节为单位测量磁盘空间。我要求委员会将其改为 1K,但被拒绝了,说是有个官僚主义的规则bureaucratic rule强迫选用 512。我不记得有多少人试图争辩说,用户会对这个决定感到满意的。 -由于 GNU 的第二优先级,在用户的自由freedom之后即是用户的便利convenience,我们使 GNU 程序以默认 1K 为单位按块测量磁盘空间。 +由于 GNU 在用户的自由freedom之后的第二优先级,是用户的便利convenience,我们使 GNU 程序以默认 1K 为单位按块测量磁盘空间。 -然而,为了防止竞争对手利用这点给 GNU 安上 “不合规noncompliant” 的骂名,我们实现了遵循 POSIX 和 ISO C 的可选模式,这种妥协着实可笑。想要遵循 POSIX,只需设置环境变量 POSIXLY_CORRECT,即可使程序符合以 512 字节为单位的 POSIX 列表磁盘空间。如果有人知道实际使用 POSIXLY_CORRECT 或者 GCC 中的 **\--pedantic** 会为某些用户提供什么实际利益的话,请务必告诉我。 +然而,为了防止竞争对手利用这点给 GNU 安上 “不合规noncompliant” 的骂名,我们实现了遵循 POSIX 和 ISO C 的可选模式,这种妥协着实可笑。想要遵循 POSIX,只需设置环境变量 `POSIXLY_CORRECT`,即可使程序符合 POSIX 以 512 字节为单位列出磁盘空间。如果有人知道实际使用 `POSIXLY_CORRECT` 或者 GCC 中对应的 `--pedantic` 会为某些用户提供什么实际好处的话,请务必告诉我。 **Seth:** 符合 POSIX 标准的自由软件项目是否更容易移植到其他类 Unix 系统? -**RMS:** 我认为是这样,但自 80 年代开始,我决定不再把时间浪费在将软件移植到 GNU 以外的系统上。我开始专注于推进 GNU 系统,使其不必使用任何非自由软件。至于将 GNU 程序移植到非类 GNU 系统就留给想在其他系统上运行它们的人们了。 +**RMS:** 我认为是这样,但自上世纪 80 年代开始,我决定不再把时间浪费在将软件移植到 GNU 以外的系统上。我开始专注于推进 GNU 系统,使其不必使用任何非自由软件。至于将 GNU 程序移植到非类 GNU 系统就留给想在其他系统上运行它们的人们了。 **Seth:** POSIX 对于软件的自由很重要吗? -**RMS:** 本质上说,(遵不遵循 POSIX)其实没有任何区别。但是,POSIX 和 ISO C 的标准化确实使 GNU 系统更容易迁移,这有助于我们更快地实现从非自由软件中解放用户的目标。在 90 年代早期,使用自由软件成功地打造出 Linux,同时也填补了 GNU 中对于内核的空白。 +**RMS:** 本质上说,(遵不遵循 POSIX)其实没有任何区别。但是,POSIX 和 ISO C 的标准化确实使 GNU 系统更容易迁移,这有助于我们更快地实现从非自由软件中解放用户的目标。这个目标于上世纪 90 年代早期达成,当时Linux成为自由软件,同时也填补了 GNU 中内核的空白。 ### POSIX 采纳 GNU 的创新 -我还讯问过 Dr. Stallman,是否有任何 GNU 特定的创新或惯例后来被采纳为 POSIX 标准。他无法回想起具体的例子,但友好地代我向几位开发人员发了邮件。 +我还问过 Stallman 博士,是否有任何 GNU 特定的创新或惯例后来被采纳为 POSIX 标准。他无法回想起具体的例子,但友好地代我向几位开发者发了邮件。 -开发人员 Giacomo Catenazzi,James Youngman,Eric Blake,Arnold Robbins 和 Joshua Judson Rosen 都根据当前版本的 POSIX 以及诸多前回版本做出了回应。POSIX 是一个 “活的living” 标准,因此会不断被行业专业人士更新和评审,许多从事 GNU 项目的开发人员会提出对于 GNU 特性的包容。 +开发者 Giacomo Catenazzi,James Youngman,Eric Blake,Arnold Robbins 和 Joshua Judson Rosen 对以前的 POSIX 迭代以及仍在进行中的 POSIX 迭代做出了回应。POSIX 是一个 “活的living” 标准,因此会不断被行业专业人士更新和评审,许多从事 GNU 项目的开发人员提出了对 GNU 特性的包含。 -为了回顾这些有趣的历史,接下来会罗列一些脍炙人口的已经融入 POSIX 的 GNU 特性。 +为了回顾这些有趣的历史,接下来会罗列一些已经融入 POSIX 的流行的 GNU 特性。 #### Make -一些 GNU **Make** 的特性已经被 POSIX 定义的 **make** 所采用。相关的 [规范][8] 提供了从现有实现中借来特性的详细归属。 +一些 GNU **Make** 的特性已经被 POSIX 的 `make` 定义所采用。相关的 [规范][8] 提供了从现有实现中借来的特性的详细归因。 #### Diff 和 patch -**[diff][9]** 和 **[patch][10]** 命令都直接从这些工具的 GNU 版本中引进了 **-u** 和 **-U** 选项。 +[diff][9] 和 [patch][10] 命令都直接从这些工具的 GNU 版本中引进了 `-u` 和 `-U` 选项。 #### C 库 POSIX 采用了 GNU C 库 **glibc** 的许多特性。血统Lineage一时已难以追溯,但 James Youngman 如是写道: ->“我非常确定 GCC 首创了许多 ISO C 的特性。例如,**_Noreturn** 是 C11 中的新特性,但 GCC-1.35 便具有此功能(使用 **volatile** 作为声明函数的修饰符)。另外尽管我不确定该 GCC-1.35 支持的可变长度数组似乎与现代 C 中的(柔性数组conformant array没有找到准确的翻译,推测是柔性数组)非常相似。“ +> “我非常确定 GCC 首创了许多 ISO C 的特性。例如,**_Noreturn** 是 C11 中的新特性,但 GCC-1.35 便具有此功能(使用 `volatile` 作为声明函数的修饰符)。另外尽管我不确定,GCC-1.35 支持的可变长度数组似乎与现代 C 中的(柔性数组conformant array)非常相似。” -Giacomo Catenazzi 援引 Open Group 的 [文章 **strftime**][11],并指出其归因:“这是基于某版本 GNU libc 的 **strftime()** 的某特性。” +Giacomo Catenazzi 援引 Open Group 的 [strftime][11] 文章,并指出其归因:“这是基于某版本 GNU libc 的 `strftime()` 的特性。” -Eric Blake 指出,对于 **getline()** 和各种基于本地环境的 ***_l()** 函数,GNU 绝对是这方面的先驱。 +Eric Blake 指出,对于 `getline()` 和各种基于语言环境的 `*_l()` 函数,GNU 绝对是这方面的先驱。 -Joshua Judson Rosen 补充道,他对采纳 **getline** 函数的印象深刻,特别是在目睹了全然不同操作系统的代码中和类 GNU 代码相似却又怪异的做法后。 +Joshua Judson Rosen 补充道,他清楚地记得,在全然不同的操作系统的代码中奇怪地目睹了熟悉的 GNU 式的行为后,对 `getline()` 函数的采用给他留下了深刻的印象。 -“等等……那是 GNU 特有的……不是吗?显然已经不再是了。” +“等等……那不是 GNU 特有的吗?哦,显然已经不再是了。” -Rosen 指出的 [**getline** 手册页][12] 中写道: +Rosen 向我指出了 [getline 手册页][12] 中写道: -> **getline()** 和 **getdelim()** 最初都是 GNU 扩展。在 POSIX.1-2008 中被标准化。 +> `getline()` 和 `getdelim()` 最初都是 GNU 扩展。在 POSIX.1-2008 中被标准化。 Eric Blake 向我发送了一份其他扩展的列表,这些扩展可能会在下一个 POSIX 修订版中添加(代号为 Issue 8,大约在 2021 年前后): @@ -114,49 +115,43 @@ Eric Blake 向我发送了一份其他扩展的列表,这些扩展可能会在 * [getlocalename_1][16] * [reallocarray][17] - - ### 关于用户空间的扩展 -POSIX 不仅为开发人员定义函数和特性,还为用户空间定义了标准行为。 +POSIX 不仅为开发人员定义了函数和特性,还为用户空间定义了标准行为。 #### ls -**-A** 选项会排除符号 **.**(代表当前位置)和 **..**(代表上一级目录)这些来自 **ls** 命令的结果。被 POSIX 2008 采纳。 +`-A` 选项会排除来自 `ls` 命令结果中的符号 `.`(代表当前位置)和 `..`(代表上一级目录)。它被 POSIX 2008 采纳。 #### find -The **find** command is a useful tool for ad hoc [**for** loops][18] and as a gateway into [parallel][19] processing. +`find` 命令是一个专门的ad hoc [for 循环][18] 工具,也是 [并行parallel][19] 处理的出入口。 -**find** 命令是一个专门的ad hoc [**for** loops][18] 工具,也是 [并行parallel][19] 处理的出入口。 +一些从 GNU 引入到 POSIX 的便捷操作conveniences,包括 `-path` 和 `-perm` 选项。 -A few conveniences made their way from GNU to POSIX, including the **-path** and **-perm** options. +`-path` 选项帮你过滤与文件系统路径模式匹配的搜索结果,并且从 1996 年(根据 `findutil` 的 Git 仓库中最早的记录)GNU 版本的 `find` 便可使用此选项。James Youngman 指出 [HP-UX][20] 也很早就有这个选项,所以究竟是 GNU 还是 HP-UX 做出的这一创新(抑或两者兼而有之)无法考证。 -一些从 GNU 引入到 POSIX 的便捷操作conveniences,包括 **-path** 和 **-perm** 选项。 +`-perm` 选项帮你按文件权限过滤搜索结果。这在 1996 年 GNU 版本的 `find` 中便已存在,随后被纳入 POSIX 标准 “IEEE Std 1003.1,2004 Edition” 中。 -**-path** 选项帮你过滤与文件系统路径模式匹配的搜索结果,并且 1996 年前 GNU 版本的 **find** (根据 **findutil** 在 Git 仓库中最早的记录)便可使用此选项。James Youngman 指出 [HP-UX][20] 也很早就有这个选项,所以究竟是 GNU 还是 HP-UX 做出的这一创新(抑或两者兼而有之)无法考证。 - -**-perm** 选项帮你按文件权限过滤搜索结果。1996 年 GNU 版本的 **find** 中便已存在,随后被纳入 POSIX 标准 “IEEE Std 1003.1,2004 Edition” 中。 - -**xargs** 命令是 **findutils** 软件包的一部分,1996 年的时候就有一个 **-p** 选项会将 **xargs** 置于交互模式(用户将被提示是否继续),随后被纳入 POSIX 标准 "IEEE Std 1003.1, 2004 Edition." 中。 +`xargs` 命令是 `findutils` 软件包的一部分,1996 年的时候就有一个 `-p` 选项会将 `xargs` 置于交互模式(用户将被提示是否继续),随后被纳入 POSIX 标准 “IEEE Std 1003.1, 2004 Edition” 中。 #### Awk -GNU **awk**(即 **/usr/bin** 目录中的 **gawk** 命令,可能也是符号链接 **awk** 的目标地址)的维护者 Arnold Robbins 说道,**gawk** 和 **mawk**(另一个GPL 的 **awk** 实现)允许使用 **RS** 作为正则表达式,即 **RS** 的长度大于 1 时的情况。这一特性还不是 POSIX 的特性,但有 [迹象表明它即将会是][21]: +GNU awk(即 `/usr/bin` 目录中的 `gawk` 命令,可能也是符号链接 `awk` 的目标地址)的维护者 Arnold Robbins 说道,`gawk` 和 `mawk`(另一个GPL 的 `awk` 实现)允许 `RS`(记录分隔符)是一个正则表达式,即这时 `RS` 的长度会大于 1。这一特性还不是 POSIX 的特性,但有 [迹象表明它即将会是][21]: -> _在扩展正则表达式中未定义的行为将导致 NUL 结果,以支持 GNU gawk 程序未来对于处理二进制数据的扩展。_ +> NUL 在扩展正则表达式中产生的未定义行为允许 GNU `gawk` 程序未来可以扩展以处理二进制数据。 > -> _使用多字符 RS 值的未指定行为是为了支持未来可能基于扩展正则表达式使用记录分隔符的特性。历史实现为采用字符串的第一个字符而忽略其他字符。_ +> 使用多字符 RS 值的未指定行为是为了未来可能的扩展,它是基于用于记录分隔符(RS)的扩展正则表达式的。目前的历史实现为采用该字符串的第一个字符而忽略其他字符。 -这是一个重大的增强,因为 **RS** 符号定义了记录之间的分隔符。可能是逗号、分号、短划线、或者是任何此类字符,但如果它是字符 _序列_,则只会使用第一个字符,除非你使用的是 **gawk** 或 **mawk**。想象一下这种情况,使用省略号(连续的三个点)作为解析 IP 地址文档的分隔记录,只是想获取在每个 IP 地址的每个点处解析的结果。 +这是一个重大的增强,因为 `RS` 符号定义了记录之间的分隔符。可能是逗号、分号、短划线、或者是任何此类字符,但如果它是字符*序列*,则只会使用第一个字符,除非你使用的是 `gawk` 或 `mawk`。想象一下这种情况,使用省略号(连续的三个点)作为解析 IP 地址文档的分隔记录,只是想获取在每个 IP 地址的每个点处解析的结果。 -**[Mawk][22]** 首先支持这个功能,但是几年来没有维护者,留下来的火把由 **gawk** 接过。(**Mawk** 已然获得了一个新的维护者,可以说是大家薪火传承地将这一特性推向共同的预期值。) +[mawk][22] 首先支持这个功能,但是几年来没有维护者,留下来的火把由 `gawk` 接过。(`mawk` 已然获得了一个新的维护者,可以说是大家薪火传承地将这一特性推向共同的预期值。) ### POSIX 规范 -总的来说,Giacomo Catenzzi 指出,“……因为 GNU 的实用程序使用广泛,而且许多其他的选项和行为又对标规范。在 shell 的每次更改中,Bash 都会被用作比较(作为一等公民)。” 当某些东西被纳入 POSIX 规范时,无需提及 GNU 或任何其他影响,你可以简单地认为 POSIX 规范会受到许多方面的影响,GNU 只是其中之一。 +总的来说,Giacomo Catenzzi 指出,“……因为 GNU 的实用程序使用广泛,而且许多其他的选项和行为又对标规范。在 shell 的每次更改中,Bash 都会(作为一等公民)被用作比较。” 当某些东西被纳入 POSIX 规范时,无需提及 GNU 或任何其他影响,你可以简单地认为 POSIX 规范会受到许多方面的影响,GNU 只是其中之一。 -共识是 POSIX 存在的意义所在。一群技术人员共同努力为了实现普世的规范,再分享给数以百计独特的开发人员,经由他们的赋能,从而实现软件的独立性,以及开发人员和用户的自由。 +共识是 POSIX 存在的意义所在。一群技术人员共同努力为了实现共同规范,再分享给数以百计各异的开发人员,经由他们的赋能,从而实现软件的独立性,以及开发人员和用户的自由。 -------------------------------------------------------------------------------- @@ -164,8 +159,8 @@ via: https://opensource.com/article/19/7/what-posix-richard-stallman-explains 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 974967d0b6991e6c68e09a03e402aa07db817099 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Aug 2019 23:17:22 +0800 Subject: [PATCH 431/951] PUB @martin2011qi https://linux.cn/article-11222-1.html --- .../20190715 What is POSIX- Richard Stallman explains.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190715 What is POSIX- Richard Stallman explains.md (99%) diff --git a/translated/tech/20190715 What is POSIX- Richard Stallman explains.md b/published/20190715 What is POSIX- Richard Stallman explains.md similarity index 99% rename from translated/tech/20190715 What is POSIX- Richard Stallman explains.md rename to published/20190715 What is POSIX- Richard Stallman explains.md index 3f6f80c846..849fa742b2 100644 --- a/translated/tech/20190715 What is POSIX- Richard Stallman explains.md +++ b/published/20190715 What is POSIX- Richard Stallman explains.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (martin2011qi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11222-1.html) [#]: subject: (What is POSIX? Richard Stallman explains) [#]: via: (https://opensource.com/article/19/7/what-posix-richard-stallman-explains) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 98bc94c76dbc762eff0075a83960aec9756cae2c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Aug 2019 00:51:53 +0800 Subject: [PATCH 432/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190814=20How=20?= =?UTF-8?q?to=20Reinstall=20Ubuntu=20in=20Dual=20Boot=20or=20Single=20Boot?= =?UTF-8?q?=20Mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md --- ...Ubuntu in Dual Boot or Single Boot Mode.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md diff --git a/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md b/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md new file mode 100644 index 0000000000..39fb04fdcc --- /dev/null +++ b/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md @@ -0,0 +1,105 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Reinstall Ubuntu in Dual Boot or Single Boot Mode) +[#]: via: (https://itsfoss.com/reinstall-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Reinstall Ubuntu in Dual Boot or Single Boot Mode +====== + +If you have messed up your Ubuntu system and after trying numerous ways to fix it, you finally give up and take the easy way out: you reinstall Ubuntu. + +We have all been in a situation when reinstalling Linux seems a better idea than try to troubleshoot and fix the issue for good. Troubleshooting a Linux system teaches you a lot but you cannot always afford to spend more time fixing a broken system. + +There is no Windows like recovery drive system in Ubuntu as far as I know. So, the question then arises: how to reinstall Ubuntu? Let me show you how can you reinstall Ubuntu. + +Warning! + +Playing with disk partitions is always a risky task. I strongly recommend to make a backup of your data on an external disk. + +### How to reinstall Ubuntu Linux + +![][1] + +Here are the steps to follow for reinstalling Ubuntu. + +#### Step 1: Create a live USB + +First, download Ubuntu from its website. You can download [whichever Ubuntu version][2] you want to use. + +[Download Ubuntu][3] + +Once you have got the ISO image, it’s time to create a live USB from it. If your Ubuntu system is still accessible, you can create a live disk using the startup disk creator tool provided by Ubuntu. + +If you cannot access your Ubuntu system, you’ll have to use another system. You can refer to this article to learn [how to create live USB of Ubuntu in Windows][4]. + +#### Step 2: Reinstall Ubuntu + +Once you have got the live USB of Ubuntu, plugin the USB. Reboot your system. At boot time, press F2/10/F12 key to go into the BIOS settings and make sure that you have set Boot from Removable Devices/USB option at the top. Save and exit BIOS. This will allow you to boot into live USB. + +Once you are in the live USB, choose to install Ubuntu. You’ll get the usual option for choosing your language and keyboard layout. You’ll also get the option to download updates etc. + +![Go ahead with regular installation option][5] + +The important steps comes now. You should see an “Installation Type” screen. What you see on your screen here depends heavily on how Ubuntu sees the disk partitioning and installed operating systems on your system. + +[][6] + +Suggested read  How to Update Ubuntu Linux [Beginner's Tip] + +Be very careful in reading the options and its details at this step. Pay attention to what each options says. The screen options may look different in different systems. + +![Reinstall Ubuntu option in dual boot mode][7] + +In my case, it finds that I have Ubuntu 18.04.2 and Windows installed on my system and it gives me a few options. + +The first option here is to erase Ubuntu 18.04.2 and reinstall it. It tells me that it will delete my personal data but it says nothing about deleting all the operating systems (i.e. Windows). + +If you are super lucky or in single boot mode, you may see an option where you can see a “Reinstall Ubuntu”. This option will keep your existing data and even tries to keep the installed software. If you see this option, you should go for it it. + +Attention for Dual Boot System + +If you are dual booting Ubuntu and Windows and during reinstall, your Ubuntu system doesn’t see Windows, you must go for Something else option and install Ubuntu from there. I have described the [process of reinstalling Linux in dual boot in this tutorial][8]. + +For me, there was no reinstall and keep the data option so I went for “Erase Ubuntu and reinstall”option. This will install Ubuntu afresh even if it is in dual boot mode with Windows. + +The reinstalling part is why I recommend using separate partitions for root and home. With that, you can keep your data in home partition safe even if you reinstall Linux. I have already demonstrated it in this video: + +Once you have chosen the reinstall Ubuntu option, the rest of the process is just clicking next. Select your location and when asked, create your user account. + +![Just go on with the installation options][9] + +Once the procedure finishes, you’ll have your Ubuntu reinstalled afresh. + +In this tutorial, I have assumed that you know things because you already has Ubuntu installed before. If you need clarification at any step, please feel free to ask in the comment section. + +[][10] + +Suggested read  How To Fix No Wireless Network In Ubuntu + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/reinstall-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/2019/08/Reinstall-Ubuntu.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/which-ubuntu-install/ +[3]: https://ubuntu.com/download/desktop +[4]: https://itsfoss.com/create-live-usb-of-ubuntu-in-windows/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-1.jpg?resize=800%2C473&ssl=1 +[6]: https://itsfoss.com/update-ubuntu/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-dual-boot.jpg?ssl=1 +[8]: https://itsfoss.com/replace-linux-from-dual-boot/ +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-3.jpg?ssl=1 +[10]: https://itsfoss.com/fix-no-wireless-network-ubuntu/ From d388c5b381bdca8d6973bfcfaea2c44bb31c8907 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Aug 2019 00:53:00 +0800 Subject: [PATCH 433/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190813=20Buildi?= =?UTF-8?q?ng=20a=20non-breaking=20breakpoint=20for=20Python=20debugging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190813 Building a non-breaking breakpoint for Python debugging.md --- ...reaking breakpoint for Python debugging.md | 238 ++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 sources/tech/20190813 Building a non-breaking breakpoint for Python debugging.md diff --git a/sources/tech/20190813 Building a non-breaking breakpoint for Python debugging.md b/sources/tech/20190813 Building a non-breaking breakpoint for Python debugging.md new file mode 100644 index 0000000000..1c33c05a68 --- /dev/null +++ b/sources/tech/20190813 Building a non-breaking breakpoint for Python debugging.md @@ -0,0 +1,238 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Building a non-breaking breakpoint for Python debugging) +[#]: via: (https://opensource.com/article/19/8/debug-python) +[#]: author: (Liran Haimovitch https://opensource.com/users/liranhaimovitch) + +Building a non-breaking breakpoint for Python debugging +====== +Have you ever wondered how to speed up a debugger? Here are some lessons +learned while building one for Python. +![Real python in the graphic jungle][1] + +This is the story of how our team at [Rookout][2] built non-breaking breakpoints for Python and some of the lessons we learned along the way. I'll be presenting all about the nuts and bolts of debugging in Python at [PyBay 2019][3] in San Francisco this month. Let's dig in. + +### The heart of Python debugging: sys.set_trace + +There are many Python debuggers out there. Some of the more popular include: + + * **pdb**, part of the Python standard library + * **PyDev**, the debugger behind the Eclipse and PyCharm IDEs + * **ipdb**, the IPython debugger + + + +Despite the range of choices, almost every Python debugger is based on just one function: **sys.set_trace**. And let me tell you, **[sys.settrace][4]** might just be the most complex function in the Python standard library. + +![set_trace Python 2 docs page][5] + +In simpler terms, **settrace** registers a trace function for the interpreter, which may be called in any of the following cases: + + * Function call + * Line execution + * Function return + * Exception raised + + + +A simple trace function might look like this: + + +``` +def simple_tracer(frame, event, arg): +  co = frame.f_code +  func_name = co.co_name +  line_no = frame.f_lineno +  print("{e} {f} {l}".format( +e=event, f=func_name, l=line_no)) +  return simple_tracer +``` + +When looking at this function, the first things that come to mind are its arguments and return values. The trace function arguments are: + + * **frame** object, which is the full state of the interpreter at the point of the function's execution + * **event** string, which can be **call**, **line**, **return**, or **exception** + * **arg** object, which is optional and depends on the event type + + + +The trace function returns itself because the interpreter keeps track of two kinds of trace functions: + + * **Global trace function (per thread):** This trace function is set for the current thread by **sys.settrace** and is invoked whenever a new **frame** is created by the interpreter (essentially on every function call). While there's no documented way to set the trace function for a different thread, you can call **threading.settrace** to set the trace function for all newly created **threading** module threads. + * **Local trace function (per frame):** This trace function is set by the interpreter to the value returned by the global trace function upon frame creation. There's no documented way to set the local trace function once the frame has been created. + + + +This mechanism is designed to allow the debugger to have more granular control over which frames are traced to reduce performance impact. + +### Building our debugger in three easy steps (or so we thought) + +With all that background, writing your own debugger using a custom trace function looks like a daunting task. Luckily, **pdb**, the standard Python debugger, is built on top of **Bdb**, a base class for building debuggers. + +A naive breakpoints debugger based on **Bdb** might look like this: + + +``` +import bdb +import inspect + +class Debugger(bdb.Bdb): +  def __init__(self): +      Bdb.__init__(self) +      self.breakpoints = dict() +      self.set_trace() + +def set_breakpoint(self, filename, lineno, method): +  self.set_break(filename, lineno) +  try : +      self.breakpoints[(filename, lineno)].add(method) +  except KeyError: +      self.breakpoints[(filename, lineno)] = [method] + +def user_line(self, frame): +  if not self.break_here(frame): +      return + +  # Get filename and lineno from frame +  (filename, lineno, _, _, _) = inspect.getframeinfo(frame) + +  methods = self.breakpoints[(filename, lineno)] +  for method in methods: +      method(frame) +``` + +All this does is: + + 1. Inherits from **Bdb** and write a simple constructor initializing the base class and tracing. + 2. Adds a **set_breakpoint** method that uses **Bdb** to set the breakpoint and keeps track of our breakpoints. + 3. Overrides the **user_line** method that is called by **Bdb** on certain user lines. The function makes sure it is being called for a breakpoint, gets the source location, and invokes the registered breakpoints + + + +### How well did the simple Bdb debugger work? + +Rookout is about bringing a debugger-like user experience to production-grade performance and use cases. So, how well did our naive breakpoint debugger perform? + +To test it and measure the global performance overhead, we wrote two simple test methods and executed each of them 16 million times under multiple scenarios. Keep in mind that no breakpoint was executed in any of the cases. + + +``` +def empty_method(): +   pass + +def simple_method(): +   a = 1 +   b = 2 +   c = 3 +   d = 4 +   e = 5 +   f = 6 +   g = 7 +   h = 8 +   i = 9 +   j = 10 +``` + +Using the debugger takes a shocking amount of time to complete. The bad results make it clear that our naive **Bdb** debugger is not yet production-ready. + +![First Bdb debugger results][6] + +### Optimizing the debugger + +There are three main ways to reduce debugger overhead: + + 1. **Limit local tracing as much as possible:** Local tracing is very costly compared to global tracing due to the much larger number of events per line of code. + 2. **Optimize "call" events and return control to the interpreter faster:** The main work in **call** events is deciding whether or not to trace. + 3. **Optimize "line" events and return control to the interpreter faster:** The main work in **line** events is deciding whether or not we hit a breakpoint. + + + +So we forked **Bdb**, reduced the feature set, simplified the code, optimized for hot code paths, and got impressive results. However, we were still not satisfied. So, we took another stab at it, migrated and optimized our code to **.pyx**, and compiled it using [Cython][7]. The final results (as you can see below) were still not good enough. So, we ended up diving into CPython's source code and realizing we could not make tracing fast enough for production use. + +![Second Bdb debugger results][8] + +### Rejecting Bdb in favor of bytecode manipulation + +After our initial disappointment from the trial-and-error cycles of standard debugging methods, we decided to look into a less obvious option: bytecode manipulation. + +The Python interpreter works in two main stages: + + 1. **Compiling Python source code into Python bytecode:** This unreadable (for humans) format is optimized for efficient execution and is often cached in those **.pyc** files we have all come to love. + 2. **Iterating through the bytecode in the _interpreter loop_:** This executes one instruction at a time. + + + +This is the pattern we chose: use **bytecode manipulation** to set **non-breaking breakpoints** with no global overhead. This is done by finding the bytecode in memory that represents the source line we are interested in and inserting a function call just before the relevant instruction. This way, the interpreter does not have to do any extra work to support our breakpoints. + +This approach is not magic. Here's a quick example. + +We start with a very simple function: + + +``` +def multiply(a, b): +   result = a * b +   return result +``` + +In documentation hidden in the **[inspect][9]** module (which has several useful utilities), we learn we can get the function's bytecode by accessing **multiply.func_code.co_code**: + + +``` +`'|\x00\x00|\x01\x00\x14}\x02\x00|\x02\x00S'` +``` + +This unreadable string can be improved using the **[dis][10]** module in the Python standard library. By calling **dis.dis(multiply.func_code.co_code)**, we get: + + +``` +  4          0 LOAD_FAST               0 (a) +             3 LOAD_FAST               1 (b) +             6 BINARY_MULTIPLY     +             7 STORE_FAST              2 (result) + +  5         10 LOAD_FAST               2 (result) +            13 RETURN_VALUE       +``` + +This gets us closer to understanding what happens behind the scenes of debugging but not to a straightforward solution. Unfortunately, Python does not offer a method for changing a function's bytecode from within the interpreter. You can overwrite the function object, but that's not good enough for the majority of real-world debugging scenarios. You have to go about it in a roundabout way using a native extension. + +### Conclusion + +When building a new tool, you invariably end up learning a lot about how stuff works. It also makes you think out of the box and keep your mind open to unexpected solutions. + +Working on non-breaking breakpoints for Rookout has taught me a lot about compilers, debuggers, server frameworks, concurrency models, and much much more. If you are interested in learning more about bytecode manipulation, Google's open source **[cloud-debug-python][11]** has tools for editing bytecode. + +* * * + +_Liran Haimovitch will present "[Understanding Python’s Debugging Internals][12]" at [PyBay][3], which will be held August 17-18 in San Francisco. Use code [OpenSource35][13] for a discount when you purchase your ticket to let them know you found out about the event from our community._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/debug-python + +作者:[Liran Haimovitch][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/liranhaimovitch +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python_jungle_lead.jpeg?itok=pFKKEvT- (Real python in the graphic jungle) +[2]: https://rookout.com/ +[3]: https://pybay.com/ +[4]: https://docs.python.org/3/library/sys.html#sys.settrace +[5]: https://opensource.com/sites/default/files/uploads/python2docs.png (set_trace Python 2 docs page) +[6]: https://opensource.com/sites/default/files/uploads/debuggerresults1.png (First Bdb debugger results) +[7]: https://cython.org/ +[8]: https://opensource.com/sites/default/files/uploads/debuggerresults2.png (Second Bdb debugger results) +[9]: https://docs.python.org/2/library/inspect.html +[10]: https://docs.python.org/2/library/dis.html +[11]: https://github.com/GoogleCloudPlatform/cloud-debug-python +[12]: https://pybay.com/speaker/liran-haimovitch/ +[13]: https://ti.to/sf-python/pybay2019/discount/OpenSource35 From d89df04a84c2339f813347f8ee149f3c7d7b8cd2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Aug 2019 00:53:22 +0800 Subject: [PATCH 434/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190813=20To=20e?= =?UTF-8?q?quip=20tomorrow's=20cybersecurity=20experts,=20we'll=20need=20a?= =?UTF-8?q?n=20open=20approach?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190813 To equip tomorrow-s cybersecurity experts, we-ll need an open approach.md --- ...ty experts, we-ll need an open approach.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20190813 To equip tomorrow-s cybersecurity experts, we-ll need an open approach.md diff --git a/sources/tech/20190813 To equip tomorrow-s cybersecurity experts, we-ll need an open approach.md b/sources/tech/20190813 To equip tomorrow-s cybersecurity experts, we-ll need an open approach.md new file mode 100644 index 0000000000..8878b7b6c2 --- /dev/null +++ b/sources/tech/20190813 To equip tomorrow-s cybersecurity experts, we-ll need an open approach.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (To equip tomorrow's cybersecurity experts, we'll need an open approach) +[#]: via: (https://opensource.com/open-organization/19/8/open-cybersecurity-education) +[#]: author: (rjoyce https://opensource.com/users/rjoycehttps://opensource.com/users/hypercoyotehttps://opensource.com/users/debbryant) + +To equip tomorrow's cybersecurity experts, we'll need an open approach +====== +An open approach to training the next generation of cybersecurity +experts can fully equip them to combat a constantly shifting threat +landscape. +![Locks and a fingerprint][1] + +Today's world—marked by an increase of Internet-connected devices, digital assets, and information systems infrastructure—demands more cybersecurity professionals. Cybersecurity is the practice of defending these devices, assets, and systems against malicious cyberattacks from both internal and external entities. Often these cyberattacks are linked to cybercrimes, or crimes committed using a computer to generate profit or to affect the integrity, availability, and confidentiality of the data or system. In 2016, cybercrimes [cost the global economy more than $450 billion][2]. + +Developing a robust cybersecurity workforce is therefore essential for mitigating the effects of cybercrime on the global economy. The United States Bureau of Labor Statistics has predicted [a shortage of 1.8 million cybersecurity professionals by the year 2022][3]. The United States has already developed a working group, the National Initiative for Cybersecurity Education (NICE), to promote cybersecurity education. Educators play a critical role helping promote cybersecurity as early as possible in academic organizations. And they should take an open approach to doing it. + +It's critical for students to not only become acquainted with the advantages of open source software but also to develop strong skills working openly, since open source software is not only common in the IT industry in general, but is specifically necessary in the field of cybersecurity. With this approach, students can learn within the safety and guidance of the classroom while also naturally acquiring research and troubleshooting skills by facing challenges that are presented or arise during exercises. + +In this article, we'll explain how experiencing these challenges in the classroom environment is imperative for preparing students for the industry and equipping them to face the unforgiving challenges that await them in the IT industry—especially in the rapidly evolving cybersecurity field. + +### Developing an open approach to cybersecurity education + +Open source software, open source communities, and open source principles have been pivotal in the adoption of computer automation that is so common today. For instance, most smart devices are running a version of the Linux kernel. In the cybersecurity field, it's common to find Linux at the heart of most operating systems that are running on security appliances. But going beyond the operating system, Ansible has taken the management scene by storm, allowing for simplified automation of management tasks that even professionals without programming or scripting experience can quickly grasp and begin to implement. In addition to the benefits of automation, a variety of open source applications provide seemingly limitless capabilities for computer users—such as the ability to create video, music, games, or graphic designs on par with proprietary software. Open source software has often been the creative spark that has enabled countless individuals to pursue goals that would have otherwise been unobtainable. + +Open source has had the same democratizing effect for cybersecurity professionals. Like other open source projects, open source cybersecurity tools receive extensive community support, so they're often some of the most-used security tools in existence today. Such tools include Nmap, OpenVAS, OSSEC, Metasploit Framework, Wireshark, and the Kali Linux distribution, to name a few. These open source tools are an invaluable asset for educators, as they provide an opportunity for students to use the same cybersecurity tools currently being used in industry—but within a safe learning environment, a factor that is critical for student growth in the field. + +Open source software has often been the creative spark that has enabled countless individuals to pursue goals that would have otherwise been unobtainable. + +In Murray State University's Telecommunications Systems Management (TSM) program, we're developing curricula and resources aimed at getting students excited about cybersecurity and motivated to pursue it. But students often enter the program with little or no understanding of open source principles or software, so bringing participants up to speed has been one of our biggest challenges. That's why we've partnered with [Red Hat Academy][4] to supplement our materials and instill fundamental Linux skills and knowledge into our students. This foundation not only prepares students to use the open source security tools that are based on Linux operating systems but also equips them to experiment with a wider variety of Linux-based open source cybersecurity tools, giving them valuable, hands-on experience. And since these tools are freely available, they can continue practicing their skills outside the classroom. + +### Equipping students for a collaborative industry + +As we've said, open source software's ubiquity and ample community support makes it critical to the field of cybersecurity. In the TSM program, our courses incorporate open tools and open practices to simulate the environments students should expect to find if they choose to enter the cybersecurity industry. By creating this type of learning experience in the classroom—a place where instructors can offer immediate guidance and the stakes are low—we're able to help students can gain the critical thinking skills needed for the variety of challenges they'll encounter in the field. + +Chief among these, for example, are the skills associated with seeking, assessing, understanding resources from cybersecurity communities. In our courses, we emphasize the process of researching community forums and reading software documentation. Because no one could ever hope to prepare students for every situation they might encounter in the field, we help students _train themselves_ how to use the tools at their disposal to resolve different situations that may arise. Because open source cybersecurity tools often give rise to engaged and supportive communities, students have the opportunity to develop troubleshooting skills when they encounter challenges by discovering solutions in conversation with people outside the classroom. Developing the ability to quickly and efficiently research problems and solutions is critical for a cybersecurity student, since technology (and the threat landscape) is always evolving. + +### A more authentic operating system experience + +Because no one could ever hope to prepare students for every situation they might encounter in the field, we help students train themselves how to use the tools at their disposal to resolve different situations that may arise. + +Most operating systems courses take a narrow approach focused on proprietary software, which is an injustice to students as it denies them access to the diversity of the operating systems found in the IT industry. For instance, as companies are moving their services to the cloud, they are increasingly running on open source, Linux-based operating systems. Additionally, since open source software enables developers to repackage the software and customize distributions, many are adopting these varying distributions of Linux simply because they are a better fit for a particular application. Still others are moving their servers from proprietary platforms to Linux due to the attraction of the accountability that comes with open source software—especially in light of frustrations that occur when proprietary vendors push updates that cause major issues in their infrastructure. + +In the TSM courses, our students gain a strong understanding of foundational Linux concepts. In particular, the curricula from Red Hat Academy gives students granular experience with many of the foundational commands, and it allows them to gain an understanding of a popular open source system design. Linux has a well-developed community of other users, developers, and tinkerers that provide an excellent forum for students to engage other open source users for help. Having students develop a strong foundational knowledge in Linux is critical as they progress through the TSM program. As students work through their courses, they naturally develop their knowledge and skills, and by obtaining this hand-on experience they also gain a foundation that prepares the student for a variety of careers—becoming traditional security analysts, for example, or pursuing careers in penetration testing using Kali Linux. No matter their path, having a strong Linux background is essential for students. + +### Embracing community-driven development + +One of the major frustrations in the IT field is being forced to use tools that simply do not work or quickly become unusable. Often, software purchased to accomplish some particular task will quickly become obsolete as the vendor offers "upgrades" and "add-ons" to accommodate the changing needs of their customer—at a price. This experience isn't limited to IT experts; end users also experience this frustration. Driving this practice this is, naturally, a desire to maintain long-term profits, as companies must continue to sell software to survive or must lock their users into subscription models. + +The fact that much of the open source software in use today is provided free of charge is enough to draw industry experts to use it. However, open source software is more than just freeware. Because the users of those tools have formed such large communities, they receive proportional support from their communities as well. It's not unusual to see small projects grow into full software suites as users submit feedback to community driven development. This type of feedback often creates products that are superior to their paid counterparts, which do not have such a direct line into the community they seek to serve. This is absolutely true in the case of cybersecurity tools, where the majority of the most popular tools are all open source, community-driven projects. In the TSM program, students are well-versed in tools such as these, thanks to the availability and free distribution model that open source software affords. The result is that through hands-on use, students gain a firm understanding of how to utilize these types of tools. + +### Future proofing + +Open source software provides students, who come from a variety of socio-economic backgrounds, with the opportunity to expand their experience without needing to be employed in a particular field. + +Staying relevant in the IT industry is a constant battle, especially when dealing with the many products and solutions that are always seeking to gain market share. This battle extends as well to the "soldiers on the ground," who may find keeping a diversified toolset difficult when many of the solutions are kept out of their hands due to a price ceiling. + +Open source software provides students, who come from a variety of socio-economic backgrounds, with the opportunity to expand their experience without needing to be employed in a particular field, as the software is readily available to them through open source distribution channels. Similarly, graduates who find jobs in one particular segment of the market still have the opportunity to train their skills in _other_ areas in which they may be interested, thanks to the breadth of open source software commonly used in the IT industry. + +As we train these students how to train themselves, expose them to the variety of tools at their disposal, and educate them on how widely used these tools are, the students are not only equipped to enter the workforce, but are also empowered to stay ahead of the game as well. + +_(This article is part of the_ [Open Organization Guide for Educators][5] _project.)_ + +Working on cybersecurity and looking for support for your project? The Homeland Open Security... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/19/8/open-cybersecurity-education + +作者:[rjoyce][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/rjoycehttps://opensource.com/users/hypercoyotehttps://opensource.com/users/debbryant +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_privacy_lock.png?itok=ZWjrpFzx (Locks and a fingerprint) +[2]: http://www.hiscox.com/cyber-readiness-report.pdf +[3]: https://iamcybersafe.org/wpcontent/uploads/2017/06/Europe-GISWS-Report.pdf +[4]: https://www.redhat.com/en/services/training/red-hat-academy +[5]: https://github.com/open-organization-ambassadors/open-org-educators-guide From 721bf1d1034fdaf6bdec160e3d8ff9b3aaa40c0f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Aug 2019 00:53:43 +0800 Subject: [PATCH 435/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190813=20A=20co?= =?UTF-8?q?mprehensive=20guide=20to=20agile=20project=20management?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190813 A comprehensive guide to agile project management.md --- ...nsive guide to agile project management.md | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sources/tech/20190813 A comprehensive guide to agile project management.md diff --git a/sources/tech/20190813 A comprehensive guide to agile project management.md b/sources/tech/20190813 A comprehensive guide to agile project management.md new file mode 100644 index 0000000000..d26b5ed2a9 --- /dev/null +++ b/sources/tech/20190813 A comprehensive guide to agile project management.md @@ -0,0 +1,143 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A comprehensive guide to agile project management) +[#]: via: (https://opensource.com/article/19/8/guide-agile-project-management) +[#]: author: (Matt ShealyDaniel OhLeigh Griffin https://opensource.com/users/mshealyhttps://opensource.com/users/jkriegerhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/mtakanehttps://opensource.com/users/ahmadnassrihttps://opensource.com/users/agagancarczykhttps://opensource.com/users/lgriffin) + +A comprehensive guide to agile project management +====== +Agile project management's 12 guiding principles can help your team move +faster together. +![A diagram of a branching process][1] + +With a focus on continuous improvements, agile project management upends the traditional linear way of developing products and services. Increasingly, organizations are adopting agile project management because it utilizes a series of shorter development cycles to deliver features and improve continually. This management style allows for rapid development, continuous integration (CI), and continuous delivery (CD). + +Agile project management allows cross-functional teams to work on chunks of projects, solving problems and moving projects forward in shorter phases. This enables them to iterate more quickly and deliver more frequent updates. + +The agile methodology provides a higher level of quality improvements on an incremental basis instead of waiting to distribute finished projects. And agile project management works. For example, PWC reports [agile projects are 28% more successful][2] than traditional project methodologies. + +### Adopting agile methodology + +When agile methodology was introduced, it met skepticism and resistance. With today's rapid pace of innovation, it has become an accepted standard. The Project Management Institute's annual Pulse of the Profession survey finds that [71% of organizations report using an agile approach][3] in project management, whether it is a fully agile project or hybrid model. + +"We cannot afford anymore to have projects taking two to five years to deliver," says Michelin's Phillippe Husser in the Pulse of the Profession report. "During this time, the initial requirements have changed." + +### The 12 agile principles + +While agile project management is very different from traditional project management, it doesn't have to be daunting to make the switch. Agile project management relies on [12 guiding principles][4] that can help your team move faster together. + +#### 1\. Customer-first + +One of the first principles for groups using agile management is that the "highest priority is to [satisfy the customer through early and continuous delivery][5]." This means that above all else, the team works to solve problems for the customer, not to build features and tools that are cool but hard to use. This strategy encourages all product decisions to be data-driven from a customer's perspective. It may mean that many team members regularly interact with end users (including with interviews) or have access to data that shows usage. + +The agile methodology drastically reduces the time from project initiation to customer feedback. As customers' needs or how they interact with the product change, the team is flexible in responding to these needs to build customer-focused technology. This process creates a feedback loop for continuous improvement. + +#### 2\. The only thing constant is change + +While it may seem radical to change requirements, the agile methodology allows for changing requirements, even late into development. + +This principle is closely tied to the first. If the end goal of the team is to serve the end user best, the team must be flexible and able to make changes based on customers' behaviors and needs. Flexibility also allows an organization to capitalize on an emerging technology or new trends and gain competitive advantage. + +#### 3\. Deliver faster + +Instead of annual or semi-annual product updates and patches, agile encourages regular updates when a need is identified or to improve operations. Waiting to do significant releases can bloat the technology and create unforeseen issues, no matter how much it has been tested. + +Agile encourages the team to deliver working software frequently within a short time frame. Smaller, more frequent releases allow for regular updates to the technology without huge risk. If something goes out and doesn't work, it requires a slight pullback. The agile methodology also encourages automation to help push out updates continuously. + +#### 4\. Build cross-functional teams + +Agile methodology believes that the most well-thought-out, usable, and sellable technologies require cross-functional teams working towards a shared goal. DevOps (development and operations) and DevSecOps (development, security, and operations) teams work in concert instead of in a linear progression. This allows the business team, the developers, QA, and other essential teams to work together from start to finish. + +This change in perspective means all teams have skin in the game and makes it harder to push errors or low-quality tech onto the next team. Rather than making excuses, everyone works together on the same goals. + +For cross-functional teams to work, it takes involvement from the top. A third of projects [fail because of a lack of participation from senior management][6]. + +#### 5\. Encourage independent work + +Another tenet of agile management is that individuals can stretch their job and learn new skills while working on projects. Because the teams are cross-functional, individuals are exposed to different abilities, roles, and styles. This exposure creates better-rounded workers who can attack problems from different perspectives. + +Agile teams are typically self-directed. It takes the right team with a focused goal. + +Agile allows managers to (per the Agile Manifesto) "build projects around motivated individuals. Give them the environment and support they need and trust them to get the job done." + +#### 6\. Meet in person + +While this principle may seem strange in the era of increased remote workers, agile management does encourage in-person meetings. This is because many managers believe the most efficient and effective method of conveying information is a face-to-face conversation. + +For non-remote teams, this can mean having different team members sitting close together or even creating war rooms of different groups to communicate more effectively. Co-location means faster interactions. Instead of waiting for an email or call to be returned, talk to each other. + +This goal can still be accomplished for remote teams. By using tools like Slack or Zoom, you can simulate in-person meetings and find the right answers quickly. + +#### 7\. Go live + +Organizations may have several ways to document the plan and measure success against goals. However, one of the best ways to measure a team's success in agile is via working software. Agile teams don't look at future forecasts to see how they are doing. Instead, live code is the primary measure of progress. + +Planning and documentation are great, but without software that does the job, everything else is irrelevant. + +#### 8\. Sustainable development + +While agile development encourages fast releases, it is still vital that the team makes sustainable and scalable code. Because the first principle is to serve the customer, the team must think about creating technology and tools that can be used for the long haul. + +The team should also be managed in a way that supports individuals. While long hours may be required for a short time, maintaining overall work-life balance is essential to avoid burnout. + +#### 9\. Technical excellence + +Agile methodology also believes that every member of the team is responsible for continuous attention to technical excellence. Even those without technical ability should QA work and ensure it is being built in a simple and accessible way. While bells and whistles may be nice, an agile methodology believes that good design enhances agility. + +Additionally, code should improve with each iteration. Everyone is responsible for providing clear code or instructions throughout the process—not just at the end. + +#### 10\. Simplify + +Agile teams believe that simplicity is essential. There's a saying in agile circles: "maximize the amount of work not done." Eliminate and automate anything you can, and build tools that are straightforward for the end user. + +#### 11\. Let teams self-organize + +"The best architectures, requirements, and designs emerge from self-organizing teams," says the Agile Manifesto. While management is needed for oversight, the best agile teams figure out what needs to be done—and how it gets done—themselves. + +#### 12\. Take time to reflect + +At regular intervals, the best teams reflect on how to become more effective, then adjust accordingly. + +Agile teams are introspective and evaluate their efficiency. When they discover a better way, they evolve. + +### Agile evolves with automation + +Agile management has many benefits for the team and the end user. While the basic principles (like the nature of agile) have been established, the strategy is always evolving. Agile project management is evolving now by leveraging different types of automation. + +For example, IT teams are leveraging [IT process automation to manage repetitive tasks][7] that used to take significant human resources. This allows teams to work more efficiently and focus on the bigger picture rather than monitoring, managing, and maintaining the software, hardware, infrastructure, and cloud services. + +The more tasks that can be handled efficiently by your process automation rules, the quicker you will be able to iterate, test, and improve. + +### Getting started + +Overall, agile project management presents many benefits. It provides a faster way for teams to deliver a better product with fewer bugs. It can encourage diverse teams to work together and learn from each other. It fosters better team communication, both in-person and remotely. And it can ultimately create a better experience for the end user. + +Agile, however, has some drawbacks. If a team is still exploring what technology or solutions to build or doesn't have a firm grasp of the target customer, agile may not be the best methodology. Agile may also have too many requirements for very small teams and may be too flexible for extremely large teams. + +Always complete due diligence to identify which management style is best for your team, and consider combining agile with other methodologies to create the best structure for you. + +The open development method is better for business. Scrum is dead. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/guide-agile-project-management + +作者:[Matt ShealyDaniel OhLeigh Griffin][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/mshealyhttps://opensource.com/users/jkriegerhttps://opensource.com/users/daniel-ohhttps://opensource.com/users/mtakanehttps://opensource.com/users/ahmadnassrihttps://opensource.com/users/agagancarczykhttps://opensource.com/users/lgriffin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freesoftwareway_law3.png?itok=wyze_0fV (A diagram of a branching process) +[2]: https://www.pwc.com/gx/en/actuarial-insurance-services/assets/agile-project-delivery-confidence.pdf +[3]: https://www.pmi.org/-/media/pmi/documents/public/pdf/learning/thought-leadership/pulse/pulse-of-the-profession-2017.pdf +[4]: http://agilemanifesto.org/principles.html +[5]: https://heleo.com/ericries-5-reasons-continuously-update-product/5110/ +[6]: https://www.business2community.com/strategy/project-management-statistics-45-stats-you-cant-ignore-02168819 +[7]: https://www.atera.com/blog/it-automation/ From 449a87cdf28ad547a074603fa2570d8f0fa0d9fe Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Aug 2019 00:54:04 +0800 Subject: [PATCH 436/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190813=20Apache?= =?UTF-8?q?=20Hive=20vs.=20Apache=20HBase:=20Which=20is=20the=20query=20pe?= =?UTF-8?q?rformance=20champion=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190813 Apache Hive vs. Apache HBase- Which is the query performance champion.md --- ...Which is the query performance champion.md | 245 ++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 sources/tech/20190813 Apache Hive vs. Apache HBase- Which is the query performance champion.md diff --git a/sources/tech/20190813 Apache Hive vs. Apache HBase- Which is the query performance champion.md b/sources/tech/20190813 Apache Hive vs. Apache HBase- Which is the query performance champion.md new file mode 100644 index 0000000000..585cb2875e --- /dev/null +++ b/sources/tech/20190813 Apache Hive vs. Apache HBase- Which is the query performance champion.md @@ -0,0 +1,245 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Apache Hive vs. Apache HBase: Which is the query performance champion?) +[#]: via: (https://opensource.com/article/19/8/apache-hive-vs-apache-hbase) +[#]: author: (Alex Bekker https://opensource.com/users/egor14https://opensource.com/users/sachinpb) + +Apache Hive vs. Apache HBase: Which is the query performance champion? +====== +Let's look closely at the Apache Hive and Apache HBase to understand +which one can cope better with query performance. +![computer screen ][1] + +It's super easy to get lost in the world of big data technologies. There are so many of them that it seems a day never passes without the advent of a new one. Still, such fast development is only half the trouble. The real problem is that it's difficult to understand the functionality and the intended use of the existing technologies. + +To find out what technology suits their needs, IT managers often contrast them. We've also conducted an academic study to make a clear distinction between Apache Hive and Apache HBase—two important technologies that are frequently used in [Hadoop implementation projects][2]. + +### Data model comparison + +#### Apache Hive's data model + +To understand Apache Hive's data model, you should get familiar with its three main components: a table, a partition, and a bucket. + +Hive's **table** doesn't differ a lot from a relational database table (the main difference is that there are no relations between the tables). Hive's tables can be managed or external. To understand the difference between these two types, let's look at the _load data_ and _drop a table_ operations. When you load data into a **managed table**, you actually move the data from Hadoop Distributed File System's (HDFS) inner data structures into the Hive directory (which is also in HDFS). And when you drop such a table, you delete the data it contains from the directory. In the case of **external tables**, Hive doesn't load the data into the Hive directory but creates a "ghost-table" that indicates where actual data is physically stored in HDFS. So, when you drop an external table, the data is not affected. + +Both managed and external tables can be further broken down to **partitions**. A partition represents the rows of the table grouped together based on a **partition key**. Each partition is stored as a separate folder in the Hive directory. For instance, the table below can be partitioned based on a country, and the rows for each country will be stored together. Of course, this example is simplified. In real life, you'll deal with more than three partitions and much more than four rows in each, and partitioning will help you significantly reduce your partition key query execution time. + +**Customer ID** | **Country** | **State/Province** | **City** | **Gender** | **Family status** | … +---|---|---|---|---|---|--- +00001 | US | Nebraska | Beatrice | F | Single | … +00002 | Canada | Ontario | Toronto | F | Married | … +00003 | Brasil | Para | Belem | M | Married | … +00004 | Canada | Ontario | Toronto | M | Married | … +00005 | US | Nebraska | Aurora | M | Single | … +00006 | US | Arizona | Phoenix | F | Single | … +| | | | | | +00007 | US | Texas | Austin | F | Married | +… | … | | | … | … | … + +You can break your data further into **buckets**, which are even easier to manage and enable faster query execution. Let's take the partition with the US data from our previous example and cluster it into buckets based on the Customer ID column. When you specify the number of buckets, Hive applies a hash function to the chosen column, which assigns a hash value to each row in the partition and then "packs" the rows into a certain number of buckets. So, if we have 10 million Customer IDs in the partition and specify the number of buckets as 50, each bucket will contain about 200,000 rows. As a result, if you need to find the data about a particular customer, Hive will directly go to the relevant bucket to find the info. + +#### Apache HBase's data model + +HBase also stores data in **tables**. The cells in an HBase table are organized by **row keys** and **column families*****.*** Each column family has a set of storage properties (for example, row keys encryption and data compression rules). In addition, there are **column qualifiers** to ease data management. Neither row keys nor column qualifiers have a data type assigned (they are always treated as bytes). + +**Row key** + +**Geography** + +**Demographics** + +**Customer ID** + +**Country** + +**State** + +**City** + +**Gender** + +**Family status** + +… + +00001 + +US + +Texas + +Austin + +F + +Single + +… + +00002 + +Canada + +Ontario + +Toronto + +F + +Married + +… + +00003 + +Brasil + +Para + +Belem + +M + +Married + +… + +00004 + +Canada + +Ontario + +Toronto + +M + +Married + +… + +00005 + +US + +Arizona + +Phoenix + +M + +Single + +… + +00006 + +US + +Nebraska + +Aurora + +F + +Single + +… + +00007 + +US + +Nebraska + +Beatrice + +F + +Married + +  + +  + +… + +  + +  + +… + +… + +… + +Every **cell** has a timestamp, or, in other words, bears the mark of when it was created. This info is crucial during the read operations, as it allows identifying the most recent (and therefore more up-to-date) data versions. You can specify a timestamp during a write operation, otherwise, HBase gives the cell a current timestamp automatically. + +Data in a table is **lexicographically sorted based on row keys**, and to store closely related data together, a developer needs to design a good algorithm for row key composition. + +_As to_ **partitioning**, HBase does it automatically based on the row keys. Still, you can manage the process by changing the start and end row keys for each partition. + +#### Key takeaways on data models + + 1. Both Hive and HBase are capable of organizing data in a way to enable quick access to the required data and reduce query execution time (though their approach to partitioning is different). + 2. Both Hive and HBase act as data management agents. When somebody says that Hive or HBase stores data, it really means the data is stored in a data store (usually in HDFS). This means the success of your Hadoop endeavor goes beyond either/or technology choices and strongly depends on other [important factors][3], such as calculating the required cluster size correctly and integrating all the architectural components seamlessly. + + + +### Query performance + +#### Hive as an analytical query engine + +Hive is specifically designed to enable data analytics. To successfully perform this task, it uses its dedicated **Hive Query Language** (HiveQL), which is very similar to analytics-tuned SQL. + +Initially, Hive converted HiveQL queries into Hadoop MapReduce jobs, simplifying the lives of developers who could bypass more complicated MapReduce code. Running queries in Hive usually took some time, since Hive scanned all the available data sets, if not specified otherwise. It was possible to limit the volume of scanned data by specifying the partitions and buckets that Hive had to address. Anyway, that was batch processing. Nowadays, Apache Hive is also able to convert queries into Apache Tez or Apache Spark jobs. + +The earliest versions of Hive did not provide **record-level updates, inserts, and deletes**, which was one of the most serious limitations in Hive. This functionality appeared only in version 0.14.0 (though with some [constraints][4]: for example, your table's file format should be [ORC][5]). + +#### HBase as a data manager that supports queries + +Being a data manager, HBase alone is not intended for analytical queries. It doesn't have a dedicated query language. To run CRUD (create, read, update, and delete) and search queries, it has a JRuby-based shell, which offers **simple data manipulation possibilities**, such as Get, Put, and Scan. For the first two operations, you should specify the row key, while scans run over a whole range of rows. + +HBase's primary purpose is to offer a random data input/output for HDFS. At the same time, one can surely say that HBase contributes to fast analytics by enabling consistent reads. This is possible due to the fact that HBase writes data to only one server, which doesn't require comparing multiple data versions from different nodes. Besides, HBase **handles append operations very well.** It also enables **updates and deletes**, but copes with these two not so perfectly. + +#### Indexing + +In Hive 3.0.0, indexing was removed. Prior to that, it was possible to create indexes on columns, though the advantages of faster queries should have been weighted against the cost of indexing during write operations and extra space for storing the indexes. Anyway, Hive's data model, with its ability to group data into buckets (which can be created for any column, not only for the keyed one), offers an approach similar to the one that indexing provides. + +HBase enables multi-layered indexing. But again, you have to think about the trade-off between gaining read query response vs. slower writes and the costs associated with storing indexes. + +#### Key takeaways on query performance + + 1. Running analytical queries is exactly the task for Hive. HBase's initial task is to ingest data as well as run CRUD and search queries. + 2. While HBase handles row-level updates, deletes, and inserts well, the Hive community is working to eliminate this stumbling block. + + + +### To sum it up + +There are many similarities between Hive and HBase. Both are data management agents, and both are strongly interconnected with HDFS. The main difference between these two is that HBase is tailored to perform CRUD and search queries while Hive does analytical ones. These two technologies complement each other and are frequently used together in Hadoop consulting projects so businesses can make the most of both applications' strengths. + +Introduction to Apache Hadoop, an open source software framework for storage and large scale... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/apache-hive-vs-apache-hbase + +作者:[Alex Bekker][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/egor14https://opensource.com/users/sachinpb +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/features_solutions_command_data.png?itok=4_VQN3RK (computer screen ) +[2]: https://www.scnsoft.com/services/big-data/hadoop +[3]: https://www.scnsoft.com/blog/hadoop-implementation-milestones +[4]: http://community.cloudera.com/t5/Batch-SQL-Apache-Hive/Update-and-Delete-are-not-working-in-Hive/td-p/57358/page/3 +[5]: https://orc.apache.org/ From 35d86083dbb3ad5a49ff9019d749b5cc1d7ef0bd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Aug 2019 00:55:34 +0800 Subject: [PATCH 437/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190807=20WAN=20?= =?UTF-8?q?Transformation:=20It=E2=80=99s=20More=20Than=20SD-WAN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190807 WAN Transformation- It-s More Than SD-WAN.md --- ...N Transformation- It-s More Than SD-WAN.md | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sources/talk/20190807 WAN Transformation- It-s More Than SD-WAN.md diff --git a/sources/talk/20190807 WAN Transformation- It-s More Than SD-WAN.md b/sources/talk/20190807 WAN Transformation- It-s More Than SD-WAN.md new file mode 100644 index 0000000000..7e0a58de50 --- /dev/null +++ b/sources/talk/20190807 WAN Transformation- It-s More Than SD-WAN.md @@ -0,0 +1,103 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (WAN Transformation: It’s More Than SD-WAN) +[#]: via: (https://www.networkworld.com/article/3430638/wan-transformation-it-s-more-than-sd-wan.html) +[#]: author: (Cato Networks https://www.networkworld.com/author/Matt-Conran/) + +WAN Transformation: It’s More Than SD-WAN +====== +Tomorrow’s networking challenges will extend beyond the capabilities of SD-WAN alone. Here’s why and how you can prepare your network. +![metamorworks][1] + +As an IT leader, you’re expected to be the technology vanguard of your organization. It is you who must deflate technology hype and devise the technology plan to keep the organization competitive. + +Addressing the WAN is, of course, essential to that plan. The high costs and limited agility of legacy MPLS-based networks are well known. What’s less clear is how to transform the enterprise network in a way that will remain agile and efficient for decades to come. + +Many mistakenly assume [SD-WAN][2] to be that transformation. After all, SD-WAN brings agility, scalability, and cost efficiencies lacking in telco-managed MPLS services.  But while a critical step, SD-WAN alone is insufficient to address the networking challenges you’re likely to face today — and tomorrow. Here’s why. + +### SD-WAN Cannot Fix the Unpredictability of the Global Internet + +Enterprise networks are nothing but predictable. Yet to realize their benefits, SD-WANs must rely on the unpredictable public Internet, a crapshoot, meeting enterprise requirements one day, wildly amiss the next. There’s simply no way to anticipate [exceptional Internet events][3]. And with global Internet connections, you don’t even need to wait for unusual. At Cato, we routinely see [how latency across our private backbone can halve the latency of similar Internet routes][4], a fact confirmed by numerous third-party sources. + +![][5] + +SD-WAN Lacks Security, Yet Security is Required _Everywhere_Is it any wonder [SD-WAN vendors][6] partner with legacy telcos? But telcos too often come with a last-mile agenda, locking you into specific providers. Cost and support models are also designed for the legacy business, not the digital one. + +It’s no secret that with Internet access you need the advanced security protection of a next-generation firewall, IPS, and the rest of today’s security stack. It's also no secret SD-WAN lacks advanced security. How, then, will you provide branch locations with [secure Direct Internet Access (DIA)?][7] + +Deploying branch security appliances will complicate the network, running counter to your goal of creating a leaner, more agile infrastructure. Appliances, whether physical or virtual ([VNFs in an NFV architecture][8]), must be maintained. New software patches must be tested, staged, and deployed. As traffic loads grow or compute-intensive features are enabled, such as TLS inspection, the security appliance’s compute requirements increase, ultimately forcing unplanned hardware upgrades.   + +Cloud security services can avoid those problems. But too often they only inspect Internet traffic, not site-to-site traffic, forcing IT to maintain and coordinate separate security policies, complicating troubleshooting and deployment. + +### SD-WAN Does Not Extend Well to the Cloud, Mobile Users, or the Tools of Tomorrow + +Then there’s the problem of the new tenants of the enterprise. SD-WAN is an MPLS replacement; it doesn’t extend naturally to the cloud, today’s destination for most enterprise traffic. And mobile users are completely beyond SD-WAN’s scope, requiring separate connectivity and security infrastructure that too often disrupts the mobile experience and fragments visibility, complicating troubleshooting and management. + +Just over the horizon are IoT devices, not to mention the developments we can’t even foresee.  In many cases, installing appliances won’t be possible. How will your SD-WAN accommodate these developments without compromising on the operational agility and efficiencies demanded by the digital business? + +### It’s Time to Evolve the Network Architecture + +Continuing to solve network challenges in parts —MPLS service here, remote access VPN there, and a sprinkling of cloud access solutions, routers, firewalls, WAN optimizers, and sensors — only persists in complicating the enterprise network, ultimately restricting how much cost can be saved or operational efficiency gained. SD-WAN-only solutions are symptomatic of this segmented thinking, solving only a small part of the enterprise’s far bigger networking challenge. + +What’s needed isn’t another point appliance or another network. What’s needed is **one network** that connects **and** secures **all** company resources worldwide without compromising on cost or performance. This is an architectural issue, one that can’t be solved by repackaging multiple appliances as a network service. Such approaches lead to inconsistent services, poor manageability, and high latency — a fact that Gartner notes in its recent [Hype Cycle for Enterprise Networking][9].  + +# Picture the Network of the Future + +What might this architecture look like? At its basis, think of collapsing MPLS, VPN, and all other networks with **one** global, private, managed backbone available from anywhere to anywhere. Such as network would connect all edges — sites, cloud resources, and mobile devices — with far better performance than the Internet at far lower cost than MPLS services. + +Such a vision is possible today, in fact, due to two trends — the massive investment in global IP capacity and advancements in high-performance, commercial off-the-shelf (COTS) hardware.  + +#### Connect + +The Points of Presence (PoPs) comprising such a backbone would interconnect using SLA-backed IP connections across multiple provider networks. By connecting PoPs across multiple networks, the backbone would offer better performance and resiliency than any one underlying network. It would, in effect, bring the power of SD-WAN to the backbone core. + +The cloud-native software would execute all major networking and security functions normally running in edge appliances. WAN optimization, dynamic path selection, policy-based routing, and more would move to the cloud. The PoPs would also monitor the real-time conditions of the underlying networks, routing traffic, including cloud traffic, along the optimum path to the PoP closest to the destination.  + +With most processing done by the PoP, connecting any type of “edge” — site, cloud resources, mobile devices, IoT devices, and more — would become simple. All that’s needed is a small client, primarily to establish an encrypted tunnel across an Internet connection to the nearest PoP.  By colocating PoP and cloud IXPs in the same physical data centers, cloud resources would implicitly become part of your new optimized, corporate network. All without deploying additional software or hardware. + +#### Secure + +To ensure security, all traffic would only reach an “edge” after security inspection that runs as part of the cloud-native software. Security services would include next-generation firewall, secure web gateway, and advanced threat protection. By running in the PoPs, security services benefit from scalability and elasticity of the cloud, which was never available as appliances. + +With the provider running the security stack, IT would be freed from its security burden. Security services would always be current without the operational overhead of appliances or investing in specialized security skills. Inspecting all enterprise traffic by one platform means IT needs only one set of security policies to protect all users. Overall, security is made simpler, and mobile users and cloud resources no longer need to remain second-class citizens. + +#### Run + +Without deploying tons of specialized appliances, the network would be much easier to run and manage. A single pane of glass would give the IT manager end-to-end visibility across networking and security domains without the myriads of sensors, agents, normalization tools, and more needed today for that kind of capability. + +### One Architecture Many Benefits + +Such an approach addresses the gamut of networking challenges facing today’s enterprises. Connectivity costs would be slashed. Latency would rival those of global MPLS but with far better throughput thanks to built-in network optimization, which would be available inside — and outside — sites. Security would be pervasive, easy to maintain, and effective. + +This architecture isn’t just a pipe dream. Hundreds of companies across the globe today realize these benefits every day by relying on such a platform from [Cato Networks][10]. It’s a secure, global, managed SD-WAN service powered by the scalability, self-service, and agility of the cloud. + +### The Time is Now + +WAN transformation is a rare opportunity for IT leaders to profoundly impact the business’ ability to do business better tomorrow and for decades to come. SD-WAN is a piece of that vision, but only a piece.  Addressing the entire network challenge (not just a part of it) to accommodate the needs you can anticipate — and the ones you can’t -- will go a long way towards measuring the effectiveness of your IT leadership. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3430638/wan-transformation-it-s-more-than-sd-wan.html + +作者:[Cato Networks][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/Matt-Conran/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/08/istock-1127447341-100807620-large.jpg +[2]: https://www.catonetworks.com/glossary-use-cases/sd-wan?utm_source=IDG&utm_campaign=IDG +[3]: https://arstechnica.com/information-technology/2019/07/facebook-cloudflare-microsoft-and-twitter-suffer-outages/ +[4]: https://www.catonetworks.com/blog/the-internet-is-broken-heres-why?utm_source=IDG&utm_campaign=IDG +[5]: https://images.idgesg.net/images/article/2019/08/capture-100807619-large.jpg +[6]: https://www.topsdwanvendors.com?utm_source=IDG&utm_campaign=IDG +[7]: https://www.catonetworks.com/glossary-use-cases/secure-direct-internet-access?utm_source=IDG&utm_campaign=IDG +[8]: https://www.catonetworks.com/blog/the-pains-and-problems-of-nfv?utm_source=IDG&utm_campaign=IDG +[9]: https://www.gartner.com/en/documents/3947237/hype-cycle-for-enterprise-networking-2019 +[10]: https://www.catonetworks.com?utm_source=IDG&utm_campaign=IDG From 93a21dec0576d81e6fff0ce5beaa34f6f2ec3cb3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 14 Aug 2019 08:44:33 +0800 Subject: [PATCH 438/951] translating --- ...0190808 How to manipulate PDFs on Linux.md | 93 ------------------- ...0190808 How to manipulate PDFs on Linux.md | 87 +++++++++++++++++ 2 files changed, 87 insertions(+), 93 deletions(-) delete mode 100644 sources/tech/20190808 How to manipulate PDFs on Linux.md create mode 100644 translated/tech/20190808 How to manipulate PDFs on Linux.md diff --git a/sources/tech/20190808 How to manipulate PDFs on Linux.md b/sources/tech/20190808 How to manipulate PDFs on Linux.md deleted file mode 100644 index c2af8547ff..0000000000 --- a/sources/tech/20190808 How to manipulate PDFs on Linux.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to manipulate PDFs on Linux) -[#]: via: (https://www.networkworld.com/article/3430781/how-to-manipulate-pdfs-on-linux.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -How to manipulate PDFs on Linux -====== -The pdftk command provides many options for working with PDFs, including merging pages, encrypting files, applying watermarks, compressing files, and even repairing PDFs -- easily and on the command line. -![Toshiyuki IMAI \(CC BY-SA 2.0\)][1] - -While PDFs are generally regarded as fairly stable files, there’s a lot you can do with them on both Linux and other systems. This includes merging, splitting, rotating, breaking into single pages, encrypting and decrypting, applying watermarks, compressing and uncompressing, and even repairing. The **pdftk** command does all this and more. - -The name “pdftk” stands for “PDF tool kit,” and the command is surprisingly easy to use and does a good job of manipulating PDFs. For example, to pull separate files into a single PDF file, you would use a command like this: - -``` -$ pdftk pg1.pdf pg2.pdf pg3.pdf pg4.pdf pg5.pdf cat output OneDoc.pdf -``` - -That OneDoc.pdf file will contain all five of the documents shown and the command will run in a matter of seconds. Note that the **cat** option directs the files to be joined together and the **output** option specifies the name of the new file. - -**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** - -You can also pull select pages from a PDF to create a separate PDF file. For example, if you wanted to create a new PDF with only pages 1, 2, 3, and 5 of the document created above, you could do this: - -``` -$ pdftk OneDoc.pdf cat 1-3 5 output 4pgs.pdf -``` - -If, on the other hand, you wanted pages 1, 3, 4, and 5, we might use this syntax instead: - -``` -$ pdftk OneDoc.pdf cat 1 3-end output 4pgs.pdf -``` - -You have the option of specifying all individual pages or using page ranges as shown in the examples above. - -This next command will create a collated document from one that contains the odd pages (1, 3, etc.) and one that contains the even pages (2, 4, etc.): - -``` -$ pdftk A=odd.pdf B=even.pdf shuffle A B output collated.pdf -``` - -Notice that the **shuffle** option make this collation possible and dictates the order in which the documents are used. Note also: While the odd/even pages example might suggest otherwise, you are not restricted to using only two input files. - -If you want to create an encrypted PDF that can only be opened by a recipient who knows the password, you could use a command like this one: - -``` -$ pdftk prep.pdf output report.pdf user_pw AsK4n0thingGeTn0thing -``` - -The options provide for 40 (**encrypt_40bit**) and 128 (**encrypt_128bit**) bit encryption. The 128 bit encryption is used by default. - -You can also break a PDF file into individual pages using the **burst** option: - -``` -$ pdftk allpgs.pdf burst -$ ls -ltr *.pdf | tail -5 --rw-rw-r-- 1 shs shs 22933 Aug 8 08:18 pg_0001.pdf --rw-rw-r-- 1 shs shs 23773 Aug 8 08:18 pg_0002.pdf --rw-rw-r-- 1 shs shs 23260 Aug 8 08:18 pg_0003.pdf --rw-rw-r-- 1 shs shs 23435 Aug 8 08:18 pg_0004.pdf --rw-rw-r-- 1 shs shs 23136 Aug 8 08:18 pg_0005.pdf -``` - -The **pdftk** command makes pulling together, tearing apart, rebuilding and encrypting PDF files surprisingly easy. To learn more about its many options, I check out the examples page from [PDF Labs][3]. - -**[ Also see: [Invaluable tips and tricks for troubleshooting Linux][4] ]** - -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/3430781/how-to-manipulate-pdfs-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://images.idgesg.net/images/article/2019/08/book-pages-100807709-large.jpg -[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua -[3]: https://www.pdflabs.com/docs/pdftk-cli-examples/ -[4]: https://www.networkworld.com/article/3242170/linux/invaluable-tips-and-tricks-for-troubleshooting-linux.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/translated/tech/20190808 How to manipulate PDFs on Linux.md b/translated/tech/20190808 How to manipulate PDFs on Linux.md new file mode 100644 index 0000000000..67e50bd0bf --- /dev/null +++ b/translated/tech/20190808 How to manipulate PDFs on Linux.md @@ -0,0 +1,87 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to manipulate PDFs on Linux) +[#]: via: (https://www.networkworld.com/article/3430781/how-to-manipulate-pdfs-on-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +如何在 Linux 上操作 PDF +====== +pdftk 命令提供了许多命令行处理 PDF 的操作,包括合并页面、加密文件、添加水印、压缩文件,甚至还有修复 PDF 。 +![Toshiyuki IMAI \(CC BY-SA 2.0\)][1] + +虽然 PDF 通常被认为是相当稳定的文件,但在 Linux 和其他系统上你可以做很多处理。包括合并、拆分、旋转、拆分单页、加密和解密、添加水印、压缩和解压缩,甚至还有修复。 **pdftk** 命令能执行所有甚至更多操作。 + +“pdftk” 代表 “PDF 工具包”(PDF tool kit),这个命令非常易于使用,并且可以很好地操作 PDF。例如,要将独立的文件合并成一个文件,你可以使用以下命令: + +``` +$ pdftk pg1.pdf pg2.pdf pg3.pdf pg4.pdf pg5.pdf cat output OneDoc.pdf +``` + +OneDoc.pdf 将包含上面显示的所有五个文档,命令将在几秒钟内运行完毕。请注意,**cat** 选项表示将文件连接在一起,**output** 选项指定新文件的名称。 + +你还可以从 PDF 中提取选定页面来创建单独的 PDF 文件。例如,如果要创建仅包含上面创建的文档的第 1、2、3 和 5 页的新 PDF,那么可以执行以下操作: + +``` +$ pdftk OneDoc.pdf cat 1-3 5 output 4pgs.pdf +``` + +另外,如果你想要第 1、3、4 和 5 页,我们可以使用以下命令: + +``` +$ pdftk OneDoc.pdf cat 1 3-end output 4pgs.pdf +``` + +你可以选择单独页面或者页面范围,如上例所示。 + +下一个命令将创建一个包含奇数页(1、3等)和一个包含偶数页(2、4等)的整合文档: + +``` +$ pdftk A=odd.pdf B=even.pdf shuffle A B output collated.pdf +``` + +请注意,**shuffle** 选项使得能够完成整合,并指示文档的使用顺序。另请注意:虽然上面建议用的是奇数/偶数页,但你不限于仅使用两个文件。 + +如果要创建只能由知道密码的收件人打开的加密 PDF,可以使用如下命令: + +``` +$ pdftk prep.pdf output report.pdf user_pw AsK4n0thingGeTn0thing +``` + +选项提供 40(**encrypt_40bit**)和 128(**encrypt_128bit**)位加密。默认情况下使用 128 位加密。 + +你还可以使用 **burst** 选项将 PDF 文件分成单个页面: + +``` +$ pdftk allpgs.pdf burst +$ ls -ltr *.pdf | tail -5 +-rw-rw-r-- 1 shs shs 22933 Aug 8 08:18 pg_0001.pdf +-rw-rw-r-- 1 shs shs 23773 Aug 8 08:18 pg_0002.pdf +-rw-rw-r-- 1 shs shs 23260 Aug 8 08:18 pg_0003.pdf +-rw-rw-r-- 1 shs shs 23435 Aug 8 08:18 pg_0004.pdf +-rw-rw-r-- 1 shs shs 23136 Aug 8 08:18 pg_0005.pdf +``` + +**pdftk** 命令使得合并、拆分、重建、加密 PDF 文件非常容易。要了解更多选项,请查看 [PDF 实验室][3]中的示例页面 + +在 [Facebook][5] 和 [LinkedIn][6] 上加入 Network World 社区,发表你对热门主题的评论。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3430781/how-to-manipulate-pdfs-on-linux.html + +作者:[Sandra Henry-Stocker][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/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/08/book-pages-100807709-large.jpg +[3]: https://www.pdflabs.com/docs/pdftk-cli-examples/ +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 93d9076390251085bcf0361d18289b736943ab21 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 14 Aug 2019 08:51:14 +0800 Subject: [PATCH 439/951] translating --- ... Find Out How Long Does it Take To Boot Your Linux System.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md b/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md index 26d5e394a6..36ecd58b93 100644 --- a/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md +++ b/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 6ab8509bc5fe191c2824791f7c39d895ff7822de Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Aug 2019 10:24:02 +0800 Subject: [PATCH 440/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @qfzy1233 翻译的很棒,明天头条发吧~ --- .../tech/20190611 What is a Linux user.md | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/translated/tech/20190611 What is a Linux user.md b/translated/tech/20190611 What is a Linux user.md index 7d521431dd..77f6373f7b 100644 --- a/translated/tech/20190611 What is a Linux user.md +++ b/translated/tech/20190611 What is a Linux user.md @@ -1,6 +1,6 @@ [#]: collector: "lujun9972" [#]: translator: "qfzy1233 " -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "What is a Linux user?" @@ -10,40 +10,34 @@ 何谓 Linux 用户? ====== -“Linux 用户”这一定义已经拓展到了更大的范围,同时也发生了巨大的改变。 +> “Linux 用户”这一定义已经拓展到了更大的范围,同时也发生了巨大的改变。 ![][1] -> _编者按: 本文更新于2019年6月11日下午1:15:19更新,以更准确地反映作者对Linux社区中开放和包容的社区性的看法_ +*编者按: 本文更新于 2019 年 6 月 11 日下午 1:15:19,以更准确地反映作者对 Linux 社区中开放和包容的社区性的看法。* +再有不到两年,Linux 内核就要迎来它 30 岁的生日了。让我们回想一下!1991 年的时候你在哪里?你出生了吗?那年我 13 岁!在 1991 到 1993 年间只推出了少数几款 Linux 发行版,至少它们中的三个:Slackware、Debian 和 Red Hat 为 Linux 运动发展提供了[支柱][2]。 +当年获得 Linux 发行版的副本,并在笔记本或服务器上进行安装和配置,和今天相比是很不一样的。当时是十分艰难的!也是令人沮丧的!如果你让能让它运行起来,就是一个了不起的成就!我们不得不与不兼容的硬件、设备上的配置跳线、BIOS 问题以及许多其他问题作斗争。甚至即使硬件是兼容的,很多时候,你仍然需要编译内核、模块和驱动程序才能让它们在你的系统上工作。 -再过两年,Linux 内核就要迎来它30岁的生日了。让我们回想一下!1991年的时候你在哪里?你出生了吗?那年我13岁!在1991到1993年间只推出了极少数的 Linux 发行版,且至少有三款—Slackware, Debian, 和 Red Hat–支持[backbone][2] 这也使得 Linux 运动得以发展。 +如果你当时经过过那些,你可能会表示赞同。有些读者甚至称它们为“美好的过往”,因为选择使用 Linux 意味着仅仅是为了让操作系统继续运行,你就必须学习操作系统、计算机体系架构、系统管理、网络,甚至编程。但我并不赞同他们的说法,窃以为:Linux 在 IT 行业带给我们的最让人惊讶的改变就是,它成为了我们每个人技术能力的基础组成部分! -当年获得Linux发行版的副本,并在笔记本或服务器上进行安装和配置,和今天相比是很不一样的。当时是十分艰难的!也是令人沮丧的!如果你让能让它运行起来,就是一个了不起的成就!我们不得不与不兼容的硬件、设备上的配置跳线、BIOS 问题以及许多其他问题作斗争。即使硬件是兼容的,很多时候,你仍然需要编译内核、模块和驱动程序才能让它们在你的系统上工作。 +将近 30 年过去了,无论是桌面和服务器领域 Linux 系统都有了脱胎换骨的变换。你可以在汽车上,在飞机上,家用电器上,智能手机上……几乎任何地方发现 Linux 的影子!你甚至可以购买预装 Linux 的笔记本电脑、台式机和服务器。如果你考虑云计算,企业甚至个人都可以一键部署 Linux 虚拟机,由此可见 Linux 的应用已经变得多么普遍了。 -如果你当时在场,你可能会点头。有些读者甚至称它们为“美好的过往”,因为选择使用 Linux 意味着仅仅是为了让操作系统继续运行,你就必须学习操作系统、计算机体系架构、系统管理、网络,甚至编程。但我并不赞同他们的说法,窃以为: Linux 在 IT 行业带给我们的最让人惊讶的改变就是,它成为了我们每个人技术能力的基础组成部分! +考虑到这些,我想问你的问题是:**这个时代如何定义“Linux 用户”?** -将近30年过去了,无论是桌面和服务器领域 Linux 系统都有了脱胎换骨的变换。你可以在汽车上,在飞机上,家用电器上,智能手机上……几乎任何地方发现 Linux 的影子!你甚至可以购买预装 Linux 的笔记本电脑、台式机和服务器。如果你考虑云计算,企业甚至个人都可以一键部署 Linux 虚拟机,由此可见 Linux 的应用已经变得多么普遍了。 +如果你从 System76 或 Dell 为你的父母或祖父母购买一台 Linux 笔记本电脑,为其登录好他们的社交媒体和电子邮件,并告诉他们经常单击“系统升级”,那么他们现在就是 Linux 用户了。如果你是在 Windows 或 MacOS 机器上进行以上操作,那么他们就是 Windows 或 MacOS 用户。令人难以置信的是,与 90 年代不同,现在的 Linux 任何人都可以轻易上手。 -考虑到这些,我想问你的问题是: **这个时代如何定义“Linux用户”** +由于种种原因,这也归因于 web 浏览器成为了桌面计算机上的“杀手级应用程序”。现在,许多用户并不关心他们使用的是什么操作系统,只要他们能够访问到他们的应用程序或服务。 -如果你从 System76 或 Dell 为你的父母或祖父母购买一台 Linux 笔记本电脑,为其登录好他们的社交媒体和电子邮件,并告诉他们经常单击“系统升级”,那么他们现在就是 Linux 用户了。如果你是在 Windows 或MacOS 机器上进行以上操作,那么他们就是 Windows 或 MacOS 用户。令人难以置信的是,与90年代不同,现在的 Linux 任何人都可以轻易上手。 - -由于种种原因,这也归因于web浏览器成为了桌面计算机上的“杀手级应用程序”。现在,许多用户并不关心他们使用的是什么操作系统,只要他们能够访问到他们的应用程序或服务。 - -你知道有多少人经常使用他们的电话、桌面或笔记本电脑,但无法管理他们系统上的文件、目录和驱动程序?又有多少人不会通过二进制文件安装“应用程序商店”没有收录的程序?更不要提从头编译应用程序,对我来说,几乎没有人。这正是成熟的开源软件和相应的生态对于易用性的改进的动人之处。 - -今天的 Linux 用户不需要像90年代或21世纪初的 Linux 用户那样了解、学习甚至查询信息,这并不是一件坏事。过去那种认为Linux只适合工科男使用的想法已经一去不复返了。 - -对于那些对计算机、操作系统以及在自由软件上创建、使用和协作的想法感兴趣、好奇、着迷的Linux用户来说,Liunx 依旧有研究的空间。如今在 Windows 和 MacOS 上也有同样多的空间留给创造性的开源贡献者。今天,成为Linux用户就是成为一名与 Linux 系统同行的人。这是一件很棒的事情。 +你知道有多少人经常使用他们的电话、桌面或笔记本电脑,但不会管理他们系统上的文件、目录和驱动程序?又有多少人不会安装“应用程序商店”没有收录的二进制文件程序?更不要提从头编译应用程序,对我来说,几乎全是这样的。这正是成熟的开源软件和相应的生态对于易用性的改进的动人之处。 +今天的 Linux 用户不需要像上世纪 90 年代或 21 世纪初的 Linux 用户那样了解、学习甚至查询信息,这并不是一件坏事。过去那种认为 Linux 只适合工科男使用的想法已经一去不复返了。 +对于那些对计算机、操作系统以及在自由软件上创建、使用和协作的想法感兴趣、好奇、着迷的 Linux 用户来说,Liunx 依旧有研究的空间。如今在 Windows 和 MacOS 上也有同样多的空间留给创造性的开源贡献者。今天,成为 Linux 用户就是成为一名与 Linux 系统同行的人。这是一件很棒的事情。 ### Linux 用户定义的转变 -当我开始使用Linux时,作为一个 Linux 用户意味着知道操作系统如何以各种方式、形态和形式运行。Linux 在某种程度上已经成熟,这使得“Linux用户”的定义可以包含更广泛的领域及那些领域里的人们。这可能是显而易见的一点,但重要的还是要说清楚:任何Linux 用户皆“生”而平等。 - - +当我开始使用 Linux 时,作为一个 Linux 用户意味着知道操作系统如何以各种方式、形态和形式运行。Linux 在某种程度上已经成熟,这使得“Linux 用户”的定义可以包含更广泛的领域及那些领域里的人们。这可能是显而易见的一点,但重要的还是要说清楚:任何 Linux 用户皆“生”而平等。 -------------------------------------------------------------------------------- @@ -52,7 +46,7 @@ via: https://opensource.com/article/19/6/what-linux-user 作者:[Anderson Silva][a] 选题:[lujun9972][b] 译者:[qfzy1233](https://github.com/qfzy1233) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0e331557defdf9aedb76039e1f879f03579090b5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Aug 2019 10:36:07 +0800 Subject: [PATCH 441/951] PRF @MjSeven --- ...ix to get email from your Fedora system.md | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/translated/tech/20190802 Use Postfix to get email from your Fedora system.md b/translated/tech/20190802 Use Postfix to get email from your Fedora system.md index b0438adb76..f28ad1c8b5 100644 --- a/translated/tech/20190802 Use Postfix to get email from your Fedora system.md +++ b/translated/tech/20190802 Use Postfix to get email from your Fedora system.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Use Postfix to get email from your Fedora system) @@ -12,17 +12,18 @@ ![][1] -交流是非常重要的。你的电脑可能正试图告诉你一些重要的事情。但是,如果你没有正确配置邮件传输代理([MTA][2]),那么你可能不会收到通知。Postfix 是一个[易于配置且以强大的安全记录而闻名][3]的 MTA。遵循以下步骤,以确保从本地服务发送的电子邮件通知将通过 Postfix MTA 路由到你的 Internet 电子邮件账户中。 +交流是非常重要的。你的电脑可能正试图告诉你一些重要的事情。但是,如果你没有正确配置邮件传输代理([MTA][2]),那么你可能不会收到通知。Postfix 是一个[易于配置且以强大的安全记录而闻名][3]的 MTA。遵循以下步骤,以确保从本地服务发送的电子邮件通知将通过 Postfix MTA 路由到你的互联网电子邮件账户中。 ### 安装软件包 -使用 _dnf_ 来安装一些必须软件包([你应该配置了][4] _[sudo][4]_[,对吧?][4]): +使用 `dnf` 来安装一些必须软件包([你应该配置了 sudo,对吧?][4]): + ``` $ sudo -i # dnf install postfix mailx ``` -如果以前配置了不同的 MTA,那么你可能需要将 Postfix 设置为系统默认。使用 _alternatives_ 命令设置系统默认 MTA: +如果以前配置了不同的 MTA,那么你可能需要将 Postfix 设置为系统默认。使用 `alternatives` 命令设置系统默认 MTA: ``` $ sudo alternatives --config mta @@ -33,7 +34,7 @@ There are 2 programs which provide 'mta'. Enter to keep the current selection[+], or type selection number: 2 ``` -### 创建一个 _密码映射_ 文件 +### 创建一个 password_maps 文件 你需要创建一个 Postfix 查询表条目,其中包含你要用于发送电子邮件账户的地址和密码: @@ -50,16 +51,18 @@ Enter to keep the current selection[+], or type selection number: 2 如果你使用的是 Gmail 账户,那么你需要为 Postfix 配置一个“应用程序密码”而不是使用你的 Gmail 密码。有关配置应用程序密码的说明,参阅“[使用应用程序密码登录][5]”。 -接下来,你必须对 Postfix 查询表运行 _postmap_ 命令,以创建或更新 Postfix 实际使用的文件的散列版本: +接下来,你必须对 Postfix 查询表运行 `postmap` 命令,以创建或更新 Postfix 实际使用的文件的散列版本: + ``` # postmap /etc/postfix/password_maps ``` -散列后的版本将具有相同的文件名,但后缀为 _.db_。 +散列后的版本将具有相同的文件名,但后缀为 `.db`。 -### 更新 _main.cf_ 文件 +### 更新 main.cf 文件 + +更新 Postfix 的 `main.cf` 配置文件,以引用刚刚创建 Postfix 查询表。编辑该文件并添加以下行: -更新 Postfix 的 _main.cf_ 配置文件,以引用刚刚创建 Postfix 查询表。编辑文件并添加以下行: ``` relayhost = smtp.gmail.com:587 smtp_tls_security_level = verify @@ -70,21 +73,23 @@ smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/password_maps ``` -假设你使用 Gmail 作为 _relayhost_ 设置,但是你可以用正确的主机名和端口替换系统应该将邮件发送到的邮件主机。 +这里假设你使用 Gmail 作为 `relayhost` 设置,但是你可以用正确的主机名和端口替换系统应该将邮件发送到的邮件主机。 有关上述配置选项的最新详细信息,参考 man 帮助: + ``` $ man postconf.5 ``` -### 启用,启动和测试 Postfix +### 启用、启动和测试 Postfix + +更新 `main.cf` 文件后,启用并启动 Postfix 服务: -更新 main.cf 文件后,启用并启动 Postfix 服务: ``` # systemctl enable --now postfix.service ``` -然后,你可以使用 _exit_ 命令或 **Ctrl+D** 以 root 身份退出 _sudo_ 会话。你现在应该能够使用 _mail_ 命令测试你的配置: +然后,你可以使用 `exit` 命令或 `Ctrl+D` 以 root 身份退出 `sudo` 会话。你现在应该能够使用 `mail` 命令测试你的配置: ``` $ echo 'It worked!' | mail -s "Test: $(date)" glb@gmail.com @@ -94,54 +99,52 @@ $ echo 'It worked!' | mail -s "Test: $(date)" glb@gmail.com 如果你安装了像 [logwatch][6]、[mdadm][7]、[fail2ban][8]、[apcupsd][9] 或 [certwatch][10] 这样的服务,你现在可以更新它们的配置,以便它们的电子邮件通知转到你的 Internet 电子邮件地址。 -另外,你可能希望将发送到本地系统 root 账户的所有电子邮件都转到 Internet 电子邮件地址中,将以下行添加到系统的 _/etc/alises_ 文件中(你需要使用 _sudo_ 编辑此文件,或首先切换到 _root_ 账户): +另外,你可能希望将发送到本地系统 root 账户的所有电子邮件都转到互联网电子邮件地址中,将以下行添加到系统的 `/etc/alises` 文件中(你需要使用 `sudo` 编辑此文件,或首先切换到 `root` 账户): + ``` root: glb+root@gmail.com ``` 现在运行此命令重新读取别名: + ``` # newaliases ``` - * 提示: 如果你使用的是 Gmail,那么你可以在用户名和 **@** 符号之间[添加字母数字标记][11],如上所示,以便更轻松地识别和过滤从计算机收到的电子邮件。 - - +* 提示: 如果你使用的是 Gmail,那么你可以在用户名和 `@` 符号之间[添加字母数字标记][11],如上所示,以便更轻松地识别和过滤从计算机收到的电子邮件。 ### 常用命令 -**查看邮件队列** +**查看邮件队列:** + ``` $ mailq ``` **清除队列中的所有电子邮件:** + ``` # postsuper -d ALL ``` -**过滤设置,以获得感兴趣的值** +**过滤设置,以获得感兴趣的值:** ``` $ postconf | grep "^relayhost\|^smtp_" ``` -**查看 _postfix/smtp_ 日志:** +**查看 `postfix/smtp` 日志:** ``` $ journalctl --no-pager -t postfix/smtp ``` -**进行配置更改后重新加载 _postfix_:** +**进行配置更改后重新加载 postfix:** ``` $ systemctl reload postfix ``` -* * * - -_照片由 _[_Sharon McCutcheon_][12]_ 在 [Unsplash][13] 提供_。 - -------------------------------------------------------------------------------- via: https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/ @@ -149,7 +152,7 @@ via: https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system 作者:[Gregory Bartholomew][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 b83b74451cbfa41f4e787b926009c01f812d1154 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Aug 2019 10:36:38 +0800 Subject: [PATCH 442/951] PUB @MjSeven https://linux.cn/article-11224-1.html --- ...190802 Use Postfix to get email from your Fedora system.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190802 Use Postfix to get email from your Fedora system.md (98%) diff --git a/translated/tech/20190802 Use Postfix to get email from your Fedora system.md b/published/20190802 Use Postfix to get email from your Fedora system.md similarity index 98% rename from translated/tech/20190802 Use Postfix to get email from your Fedora system.md rename to published/20190802 Use Postfix to get email from your Fedora system.md index f28ad1c8b5..f6dce46a4d 100644 --- a/translated/tech/20190802 Use Postfix to get email from your Fedora system.md +++ b/published/20190802 Use Postfix to get email from your Fedora system.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11224-1.html) [#]: subject: (Use Postfix to get email from your Fedora system) [#]: via: (https://fedoramagazine.org/use-postfix-to-get-email-from-your-fedora-system/) [#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) From acf4babb2b244f85a2e2c234b012502e58e43bd8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Aug 2019 10:43:13 +0800 Subject: [PATCH 443/951] PUB @wxy https://linux.cn/article-11225-1.html --- ...- A Terminal File Manager Based On An Old DOS Application.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md (99%) diff --git a/translated/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md b/published/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md similarity index 99% rename from translated/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md rename to published/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md index d4cab1b4c9..0c15bde2ea 100644 --- a/translated/tech/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md +++ b/published/20181029 DF-SHOW - A Terminal File Manager Based On An Old DOS Application.md @@ -78,7 +78,7 @@ $ show dfshow * `PgUp` / `PgDn` - 一次移动一页, * `F3` / `F4` - 立即转到列表的顶部和底部, * `F5` - 刷新, -* `F6` - 标记/取消标记文件(标记的文件将在它们前面用 `*`表示), +* `F6` - 标记/取消标记文件(标记的文件将在它们前面用 `*` 表示), * `F7` / `F8` - 一次性标记/取消标记所有文件, * `F9` - 按以下顺序对列表排序 - 日期和时间、名称、大小。 From 32ae29e87b924a806bedc69cef0a5dd37fd732cd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Aug 2019 16:00:49 +0800 Subject: [PATCH 444/951] PRF @martin2011qi --- .../20190715 What is POSIX- Richard Stallman explains.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/published/20190715 What is POSIX- Richard Stallman explains.md b/published/20190715 What is POSIX- Richard Stallman explains.md index 849fa742b2..916fb50757 100644 --- a/published/20190715 What is POSIX- Richard Stallman explains.md +++ b/published/20190715 What is POSIX- Richard Stallman explains.md @@ -33,9 +33,9 @@ Stallman 在由其本人于 1984 年发起的自由软件运动The fre **Seth:** 因此,如果两个系统皆具有符合 POSIX 的程序,那么它们便可以彼此假设,从而知道如何相互 “交谈”。我了解到 “POSIX” 这个简称是你想出来的。那你是怎么想出来的呢?它是如何就被 IEEE 采纳了呢? -**RMS:** IEEE 已经完成了规范的开发,但还没为其想好简练的名称。标题类似是 “便携式操作系统接口”,虽然我已记不清确切的单词。委员会倾向于将 “IEEEIX” 作为简称。而我认为那不太好。发音有点怪 - 听起来像恐怖的尖叫,“Ayeee!” - 所以我觉得人们反而会倾向于称之为 “Unix”。 +**RMS:** IEEE 已经完成了规范的开发,但还没为其想好简练的名称。标题类似是 “可移植操作系统接口”,虽然我已记不清确切的单词。委员会倾向于将 “IEEEIX” 作为简称。而我认为那不太好。发音有点怪 - 听起来像恐怖的尖叫,“Ayeee!” - 所以我觉得人们反而会倾向于称之为 “Unix”。 -但是,由于 [GNU 并不是 Unix][6]GNU's Not Unix,并且它打算取代之,我不希望人们将 GNU 称为 “Unix 系统”。因此,我提出了人们可能会实际使用的简称。那个时候也没有什么灵感,我就用了一个并不是非常聪明的方式创造了这个简称:我使用了 “便携式操作系统portable operating system” 的首字母缩写,并在末尾添加了 “ix” 作为简称。IEEE 也欣然接受了。 +但是,由于 [GNU 并不是 Unix][6]GNU's Not Unix,并且它打算取代之,我不希望人们将 GNU 称为 “Unix 系统”。因此,我提出了人们可能会实际使用的简称。那个时候也没有什么灵感,我就用了一个并不是非常聪明的方式创造了这个简称:我使用了 “可移植操作系统portable operating system” 的首字母缩写,并在末尾添加了 “ix” 作为简称。IEEE 也欣然接受了。 **Seth:** POSIX 缩写中的 “操作系统” 是仅涉及 Unix 和类 Unix 的系统(如 GNU)呢?还是意图包含所有操作系统? @@ -45,7 +45,7 @@ Stallman 在由其本人于 1984 年发起的自由软件运动The fre **RMS:** 现在不了。 -**Seth:** GNU Autotools 工具链可以使应用程序更容易移植,至少在构建和安装时如此。所以可以认为 Autotools 是构建便携式基础设施的重要一环吗? +**Seth:** GNU Autotools 工具链可以使应用程序更容易移植,至少在构建和安装时如此。所以可以认为 Autotools 是构建可移植基础设施的重要一环吗? **RMS:** 是的,因为即使在遵循 POSIX 的系统中,也存在着诸多差异。而 Autotools 可以使程序更容易适应这些差异。顺带一提,如果有人想助力 Autotools 的开发,可以发邮件联系我。 @@ -125,7 +125,7 @@ POSIX 不仅为开发人员定义了函数和特性,还为用户空间定义 #### find -`find` 命令是一个专门的ad hoc [for 循环][18] 工具,也是 [并行parallel][19] 处理的出入口。 +`find` 命令是一个特别的ad hoc [for 循环][18] 工具,也是 [并行parallel][19] 处理的出入口。 一些从 GNU 引入到 POSIX 的便捷操作conveniences,包括 `-path` 和 `-perm` 选项。 From c28c09fb373db0adb48d886af5e64f21413434bf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Aug 2019 16:35:14 +0800 Subject: [PATCH 445/951] APL --- ...Exploring the Linux kernel- The secrets of Kconfig-kbuild.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md b/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md index 8ee4f34897..d43f990e2b 100644 --- a/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md +++ b/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md @@ -1,3 +1,5 @@ +wxy applied + Exploring the Linux kernel: The secrets of Kconfig/kbuild ====== Dive into understanding how the Linux config/build system works. From dd9f67ff950a9f97af37510eac49b9f4b7bceca0 Mon Sep 17 00:00:00 2001 From: Scvoet Date: Wed, 14 Aug 2019 22:18:33 +0800 Subject: [PATCH 446/951] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87?= =?UTF-8?q?=EF=BC=9ALinux=20Smartphone=20Librem=205=20is=20Available=20for?= =?UTF-8?q?=20Preorder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...hone Librem 5 is Available for Preorder.md | 91 ------------------ ...hone Librem 5 is Available for Preorder.md | 92 +++++++++++++++++++ 2 files changed, 92 insertions(+), 91 deletions(-) delete mode 100644 sources/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md create mode 100644 translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md diff --git a/sources/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md b/sources/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md deleted file mode 100644 index de4e87cf2f..0000000000 --- a/sources/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Smartphone Librem 5 is Available for Preorder) -[#]: via: (https://itsfoss.com/librem-5-available/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Linux Smartphone Librem 5 is Available for Preorder -====== - -Purism recently [announced][1] the final specs for its [Librem 5 smartphone][2]. This is not based on Android or iOS – but built on [PureOS][3], which is an [open-source alternative to Android][4]. - -Along with the announcement, the Librem 5 is also available for [pre-orders for $649][5] (as an early bird offer till 31st July) and it will go up by $50 following the date. It will start shipping from Q3 of 2019. - -![][6] - -Here’s what Purism mentioned about Librem 5 in its blog post: - -_**We believe phones should not track you nor exploit your digital life.**_ - -_The Librem 5 represents the opportunity for you to take back control and protect your private information, your digital life through free and open source software, open governance, and transparency. The Librem 5 is_ **_a phone built on_ [_PureOS_][3]**_, a fully free, ethical and open-source operating system that is_ _**not based on Android or iOS**_ _(learn more about [why this is important][7])._ - -_We have successfully crossed our crowdfunding goals and will be delivering on our promise. The Librem 5’s hardware and software development is advancing [at a steady pace][8], and is scheduled for an initial release in Q3 2019. You can preorder the phone at $649 until shipping begins and regular pricing comes into effect. Kits with an external monitor, keyboard and mouse, are also available for preorder._ - -### Librem 5 Specifications - -From what it looks like, Librem 5 definitely aims to provide better privacy and security. In addition to this, it tries to avoid using anything from Google or Apple. - -While the idea is good enough – how does it hold up as a commercial smartphone under $700? - -![Librem 5 Smartphone][9] - -Let us take a look at the tech specs: - -![Librem 5][10] - -On paper the tech specs seems to be good enough. Not too great – not too bad. But, what about the performance? The user experience? - -Well, we can’t be too sure about it – unless we use it. So, if you are pre-ordering it – take that into consideration. - -[][11] - -Suggested read  Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve's New Compiler - -### Lifetime software updates for Librem 5 - -Of course, the specs aren’t very pretty when compared to the smartphones available at this price range. - -However, with the promise of lifetime software updates – it does look like a decent offering for open source enthusiasts. - -### Other Key Features - -Purism also highlights the fact that Librem 5 will be the first-ever [Matrix][12]-powered smartphone. This means that it will support end-to-end decentralized encrypted communications for messaging and calling. - -In addition to all these, the presence of headphone jack and a user-replaceable battery makes it a pretty solid deal. - -### Wrapping Up - -Even though it is tough to compete with the likes of Android/iOS smartphones, having an alternative is always good. Librem 5 may not prove to be an ideal smartphone for every user – but if you are an open-source enthusiast and looking for a simple smartphone that respects privacy and security without utilizing Google/Apple services, this is for you. - -Also the fact that it will receive lifetime software updates – makes it an interesting smartphone. - -What do you think about Librem 5? Are you thinking to pre-order it? Let us know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/librem-5-available/ - -作者:[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://puri.sm/posts/librem-5-smartphone-final-specs-announced/ -[2]: https://itsfoss.com/librem-linux-phone/ -[3]: https://pureos.net/ -[4]: https://itsfoss.com/open-source-alternatives-android/ -[5]: https://shop.puri.sm/shop/librem-5/ -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/librem-5-linux-smartphone.jpg?resize=800%2C450&ssl=1 -[7]: https://puri.sm/products/librem-5/pureos-mobile/ -[8]: https://puri.sm/posts/tag/phones -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/librem-5-smartphone.jpg?ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/librem-5-specs.png?ssl=1 -[11]: https://itsfoss.com/linux-games-performance-boost-amd-gpu/ -[12]: http://matrix.org diff --git a/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md b/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md new file mode 100644 index 0000000000..b49e0e3d8d --- /dev/null +++ b/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md @@ -0,0 +1,92 @@ +[#]: collector: (lujun9972) +[#]: translator: (scvoet) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux Smartphone Librem 5 is Available for Preorder) +[#]: via: (https://itsfoss.com/librem-5-available/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +基于 Linux 的智能手机 Librem 5 开启预售 +====== + +Purism 近期[宣布][1]了 [Librem 5 智能手机][2]的最终规格。这不再是基于 Android 或 iOS 了,它基于 [Android 的开源替代品][4]--[PureOS][3]上。 + +随着这一消息的宣布,Librem 5 也正式[以 649 美元的价格开启预售][5](7 月 31 日前可以享受早鸟价),在那以后价格将会上涨 5 美元,产品将会于 2019 年第三季度发货。 + +![][6] + +以下是 Purism 博客文章中关于 Librem 5 的信息: + +_**我们认为手机不应该跟踪你,也不应该利用你的数字生活。**_ + +_Librem 5 表示您将会有机会收回对私人信息的管理权和控制权,通过免费的开源软件,开放、透明地治理你的数字生活。Librem 5 是_ **_一个基于_ [_PureOS_][3] 的手机**_,一个完全免费、符合道德的_**不基于 Androidd 或 iOS**_ 的开源操作系统(了解更多关于[为什么这很重要]的信息[7])。_ + +_我们已成功超过了众筹计划,我们将会一一去实现我们的承诺。Librem 5 的硬件和软件开发正在[稳步前进][8],它计划在 2019 年的第三季度发行初始版本。您可以用 649 美元的价格预购直到产品出仓或确定正式价格和时间。现在附赠外接显示器、键盘和鼠标的套餐也可以预购了。_ + +### Librem 5 说明书 + +从它的预览来看,Librem 5 旨在提供更好的隐私保护和安全性。除此之外,它试图拒绝使用 Google 或 Apple 的服务。 + +虽然这个想法够好,它是如何成为一款低于 700 美元的商用智能手机? + +![Librem 5 智能手机][9] + +让我们来看一下它的配置: + +![Librem 5][10] + +从数据上讲它的配置已经足够高了。不是特别好,也不是特别坏。但是,性能呢?用户体验呢? + +我们并不能够确切地了解到它的信息,除非我们正在使用它。所以,如果你打算预购,应该要考虑到这一点。 + +[][11] + +推荐阅读 Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve's New Compiler + +### Librem 5 提供终身软件更新支持 + +当然,和同价位的智能手机相比,它的这些配置并不是很优秀。 + +然而,随着他们做出终身软件更新支持的承诺后,它看起来确实像被开源爱好者所钟情的一个好产品。不。 + +### 其他关键特性 + +Purism 还强调 Librem 5 将成为有史以来第一款以 [Matrix][12] 为动力的智能手机。这意味着它将支持短信、电话的端到端、分布式的加密交流。 + +除了这些,耳机接口和用户可以自行更换电池使它成为一个可靠的产品。 + +### Wrapping Up + +虽然它很难与 Android 或 iOS 智能手机竞争,但多一种选择方式总是好的。 Librem 5 不可能成为每个用户都喜欢的智能手机,但如果您是一个开源爱好者,而且正在寻找一款尊重隐私和安全,不使用 Google 和 Apple 服务的简单智能手机,那么这就很适合您。 + +另外,它提供终身的软件更新支持,这让它成为了一个优秀的智能手机。 + +您如何看待 Librem 5?你有在考虑预购吗?请在下方的评论中将您的想法告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/librem-5-available/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[Scvoet][c] +校对:[校对者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 +[c]: https://github.com/scvoet +[1]: https://puri.sm/posts/librem-5-smartphone-final-specs-announced/ +[2]: https://itsfoss.com/librem-linux-phone/ +[3]: https://pureos.net/ +[4]: https://itsfoss.com/open-source-alternatives-android/ +[5]: https://shop.puri.sm/shop/librem-5/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/librem-5-linux-smartphone.jpg?resize=800%2C450&ssl=1 +[7]: https://puri.sm/products/librem-5/pureos-mobile/ +[8]: https://puri.sm/posts/tag/phones +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/librem-5-smartphone.jpg?ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/librem-5-specs.png?ssl=1 +[11]: https://itsfoss.com/linux-games-performance-boost-amd-gpu/ +[12]: http://matrix.org From 6706cb22bc4dd44acef20dbe1fec9f1ed87a0889 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Aug 2019 23:35:40 +0800 Subject: [PATCH 447/951] TSL --- ...x kernel- The secrets of Kconfig-kbuild.md | 259 ------------------ ...x kernel- The secrets of Kconfig-kbuild.md | 258 +++++++++++++++++ 2 files changed, 258 insertions(+), 259 deletions(-) delete mode 100644 sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md create mode 100644 translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md diff --git a/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md b/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md deleted file mode 100644 index d43f990e2b..0000000000 --- a/sources/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md +++ /dev/null @@ -1,259 +0,0 @@ -wxy applied - -Exploring the Linux kernel: The secrets of Kconfig/kbuild -====== -Dive into understanding how the Linux config/build system works. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/compass_map_explore_adventure.jpg?itok=ecCoVTrZ) - -The Linux kernel config/build system, also known as Kconfig/kbuild, has been around for a long time, ever since the Linux kernel code migrated to Git. As supporting infrastructure, however, it is seldom in the spotlight; even kernel developers who use it in their daily work never really think about it. - -To explore how the Linux kernel is compiled, this article will dive into the Kconfig/kbuild internal process, explain how the .config file and the vmlinux/bzImage files are produced, and introduce a smart trick for dependency tracking. - -### Kconfig - -The first step in building a kernel is always configuration. Kconfig helps make the Linux kernel highly modular and customizable. Kconfig offers the user many config targets: -| config | Update current config utilizing a line-oriented program | -| nconfig | Update current config utilizing a ncurses menu-based program | -| menuconfig | Update current config utilizing a menu-based program | -| xconfig | Update current config utilizing a Qt-based frontend | -| gconfig | Update current config utilizing a GTK+ based frontend | -| oldconfig | Update current config utilizing a provided .config as base | -| localmodconfig | Update current config disabling modules not loaded | -| localyesconfig | Update current config converting local mods to core | -| defconfig | New config with default from Arch-supplied defconfig | -| savedefconfig | Save current config as ./defconfig (minimal config) | -| allnoconfig | New config where all options are answered with 'no' | -| allyesconfig | New config where all options are accepted with 'yes' | -| allmodconfig | New config selecting modules when possible | -| alldefconfig | New config with all symbols set to default | -| randconfig | New config with a random answer to all options | -| listnewconfig | List new options | -| olddefconfig | Same as oldconfig but sets new symbols to their default value without prompting | -| kvmconfig | Enable additional options for KVM guest kernel support | -| xenconfig | Enable additional options for xen dom0 and guest kernel support | -| tinyconfig | Configure the tiniest possible kernel | - -I think **menuconfig** is the most popular of these targets. The targets are processed by different host programs, which are provided by the kernel and built during kernel building. Some targets have a GUI (for the user's convenience) while most don't. Kconfig-related tools and source code reside mainly under **scripts/kconfig/** in the kernel source. As we can see from **scripts/kconfig/Makefile** , there are several host programs, including **conf** , **mconf** , and **nconf**. Except for **conf** , each of them is responsible for one of the GUI-based config targets, so, **conf** deals with most of them. - -Logically, Kconfig's infrastructure has two parts: one implements a [new language][1] to define the configuration items (see the Kconfig files under the kernel source), and the other parses the Kconfig language and deals with configuration actions. - -Most of the config targets have roughly the same internal process (shown below): - -![](https://opensource.com/sites/default/files/uploads/kconfig_process.png) - -Note that all configuration items have a default value. - -The first step reads the Kconfig file under source root to construct an initial configuration database; then it updates the initial database by reading an existing configuration file according to this priority: - -> .config -> /lib/modules/$(shell,uname -r)/.config -> /etc/kernel-config -> /boot/config-$(shell,uname -r) -> ARCH_DEFCONFIG -> arch/$(ARCH)/defconfig - -If you are doing GUI-based configuration via **menuconfig** or command-line-based configuration via **oldconfig** , the database is updated according to your customization. Finally, the configuration database is dumped into the .config file. - -But the .config file is not the final fodder for kernel building; this is why the **syncconfig** target exists. **syncconfig** used to be a config target called **silentoldconfig** , but it doesn't do what the old name says, so it was renamed. Also, because it is for internal use (not for users), it was dropped from the list. - -Here is an illustration of what **syncconfig** does: - -![](https://opensource.com/sites/default/files/uploads/syncconfig.png) - -**syncconfig** takes .config as input and outputs many other files, which fall into three categories: - - * **auto.conf & tristate.conf** are used for makefile text processing. For example, you may see statements like this in a component's makefile: - -``` - obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o -``` - - * **autoconf.h** is used in C-language source files. - - * Empty header files under **include/config/** are used for configuration-dependency tracking during kbuild, which is explained below. - - - - -After configuration, we will know which files and code pieces are not compiled. - -### kbuild - -Component-wise building, called _recursive make_ , is a common way for GNU `make` to manage a large project. Kbuild is a good example of recursive make. By dividing source files into different modules/components, each component is managed by its own makefile. When you start building, a top makefile invokes each component's makefile in the proper order, builds the components, and collects them into the final executive. - -Kbuild refers to different kinds of makefiles: - - * **Makefile** is the top makefile located in source root. - * **.config** is the kernel configuration file. - * **arch/$(ARCH)/Makefile** is the arch makefile, which is the supplement to the top makefile. - * **scripts/Makefile.*** describes common rules for all kbuild makefiles. - * Finally, there are about 500 **kbuild makefiles**. - - - -The top makefile includes the arch makefile, reads the .config file, descends into subdirectories, invokes **make** on each component's makefile with the help of routines defined in **scripts/Makefile.*** , builds up each intermediate object, and links all the intermediate objects into vmlinux. Kernel document [Documentation/kbuild/makefiles.txt][2] describes all aspects of these makefiles. - -As an example, let's look at how vmlinux is produced on x86-64: - -![vmlinux overview][4] - -(The illustration is based on Richard Y. Steven's [blog][5]. It was updated and is used with the author's permission.) - -All the **.o** files that go into vmlinux first go into their own **built-in.a** , which is indicated via variables **KBUILD_VMLINUX_INIT** , **KBUILD_VMLINUX_MAIN** , **KBUILD_VMLINUX_LIBS** , then are collected into the vmlinux file. - -Take a look at how recursive make is implemented in the Linux kernel, with the help of simplified makefile code: - -``` - # In top Makefile - vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) -                 +$(call if_changed,link-vmlinux) - - # Variable assignments - vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS) - - export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) - export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-y) - export KBUILD_VMLINUX_LIBS := $(libs-y1) - export KBUILD_LDS          := arch/$(SRCARCH)/kernel/vmlinux.lds - - init-y          := init/ - drivers-y       := drivers/ sound/ firmware/ - net-y           := net/ - libs-y          := lib/ - core-y          := usr/ - virt-y          := virt/ - - # Transform to corresponding built-in.a - init-y          := $(patsubst %/, %/built-in.a, $(init-y)) - core-y          := $(patsubst %/, %/built-in.a, $(core-y)) - drivers-y       := $(patsubst %/, %/built-in.a, $(drivers-y)) - net-y           := $(patsubst %/, %/built-in.a, $(net-y)) - libs-y1         := $(patsubst %/, %/lib.a, $(libs-y)) - libs-y2         := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) - virt-y          := $(patsubst %/, %/built-in.a, $(virt-y)) - - # Setup the dependency. vmlinux-deps are all intermediate objects, vmlinux-dirs - # are phony targets, so every time comes to this rule, the recipe of vmlinux-dirs - # will be executed. Refer "4.6 Phony Targets" of `info make` - $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; - - # Variable vmlinux-dirs is the directory part of each built-in.a - vmlinux-dirs    := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ -                      $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ -                      $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y))) - - # The entry of recursive make - $(vmlinux-dirs): -                 $(Q)$(MAKE) $(build)=$@ need-builtin=1 -``` - -The recursive make recipe is expanded, for example: - -``` - make -f scripts/Makefile.build obj=init need-builtin=1 -``` - -This means **make** will go into **scripts/Makefile.build** to continue the work of building each **built-in.a**. With the help of **scripts/link-vmlinux.sh** , the vmlinux file is finally under source root. - -#### Understanding vmlinux vs. bzImage - -Many Linux kernel developers may not be clear about the relationship between vmlinux and bzImage. For example, here is their relationship in x86-64: - -![](https://opensource.com/sites/default/files/uploads/vmlinux-bzimage.png) - -The source root vmlinux is stripped, compressed, put into **piggy.S** , then linked with other peer objects into **arch/x86/boot/compressed/vmlinux**. Meanwhile, a file called setup.bin is produced under **arch/x86/boot**. There may be an optional third file that has relocation info, depending on the configuration of **CONFIG_X86_NEED_RELOCS**. - -A host program called **build** , provided by the kernel, builds these two (or three) parts into the final bzImage file. - -#### Dependency tracking - -Kbuild tracks three kinds of dependencies: - - 1. All prerequisite files (both * **.c** and * **.h** ) - 2. **CONFIG_** options used in all prerequisite files - 3. Command-line dependencies used to compile the target - - - -The first one is easy to understand, but what about the second and third? Kernel developers often see code pieces like this: - -``` - #ifdef CONFIG_SMP - __boot_cpu_id = cpu; - #endif -``` - -When **CONFIG_SMP** changes, this piece of code should be recompiled. The command line for compiling a source file also matters, because different command lines may result in different object files. - -When a **.c** file uses a header file via a **#include** directive, you need write a rule like this: - -``` - main.o: defs.h -         recipe... -``` - -When managing a large project, you need a lot of these kinds of rules; writing them all would be tedious and boring. Fortunately, most modern C compilers can write these rules for you by looking at the **#include** lines in the source file. For the GNU Compiler Collection (GCC), it is just a matter of adding a command-line parameter: **-MD depfile** - -``` - # In scripts/Makefile.lib - c_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \ -                  -include $(srctree)/include/linux/compiler_types.h       \ -                  $(__c_flags) $(modkern_cflags)                           \ -                  $(basename_flags) $(modname_flags) -``` - -This would generate a **.d** file with content like: - -``` - init_task.o: init/init_task.c include/linux/kconfig.h \ -  include/generated/autoconf.h include/linux/init_task.h \ -  include/linux/rcupdate.h include/linux/types.h \ -  ... -``` - -Then the host program **[fixdep][6]** takes care of the other two dependencies by taking the **depfile** and command line as input, then outputting a **. .cmd** file in makefile syntax, which records the command line and all the prerequisites (including the configuration) for a target. It looks like this: - -``` - # The command line used to compile the target - cmd_init/init_task.o := gcc -Wp,-MD,init/.init_task.o.d  -nostdinc ... - ... - # The dependency files - deps_init/init_task.o := \ - $(wildcard include/config/posix/timers.h) \ - $(wildcard include/config/arch/task/struct/on/stack.h) \ - $(wildcard include/config/thread/info/in/task.h) \ - ... -   include/uapi/linux/types.h \ -   arch/x86/include/uapi/asm/types.h \ -   include/uapi/asm-generic/types.h \ -   ... -``` - -A **. .cmd** file will be included during recursive make, providing all the dependency info and helping to decide whether to rebuild a target or not. - -The secret behind this is that **fixdep** will parse the **depfile** ( **.d** file), then parse all the dependency files inside, search the text for all the **CONFIG_** strings, convert them to the corresponding empty header file, and add them to the target's prerequisites. Every time the configuration changes, the corresponding empty header file will be updated, too, so kbuild can detect that change and rebuild the target that depends on it. Because the command line is also recorded, it is easy to compare the last and current compiling parameters. - -### Looking ahead - -Kconfig/kbuild remained the same for a long time until the new maintainer, Masahiro Yamada, joined in early 2017, and now kbuild is under active development again. Don't be surprised if you soon see something different from what's in this article. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/10/kbuild-and-kconfig - -作者:[Cao Jin][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/pinocchio -[b]: https://github.com/lujun9972 -[1]: https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-language.txt -[2]: https://www.mjmwired.net/kernel/Documentation/kbuild/makefiles.txt -[3]: https://opensource.com/file/411516 -[4]: https://opensource.com/sites/default/files/uploads/vmlinux_generation_process.png (vmlinux overview) -[5]: https://blog.csdn.net/richardysteven/article/details/52502734 -[6]: https://github.com/torvalds/linux/blob/master/scripts/basic/fixdep.c diff --git a/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md b/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md new file mode 100644 index 0000000000..df5741f88c --- /dev/null +++ b/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md @@ -0,0 +1,258 @@ +探索 Linux 内核:Kconfig/kbuild 的秘密 +====== + +> 深入理解 Linux 配置/构建系统是如何工作的。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/compass_map_explore_adventure.jpg?itok=ecCoVTrZ) + +自从 Linux 内核代码迁移到 Git 以来,Linux 内核配置/构建系统(也称为 Kconfig/kbuild)已存在很长时间了。然而,作为支持基础设施,它很少成为人们关注的焦点;甚至在日常工作中使用它的内核开发人员也从未真正思考过它。 + +为了探索如何编译 Linux 内核,本文将深入介绍 Kconfig/kbuild 内部的过程,解释如何生成 `.config` 文件和 `vmlinux`/`bzImage` 文件,并介绍依赖性跟踪的巧妙的技巧。 + +### Kconfig + +构建内核的第一步始终是配置。Kconfig 有助于使 Linux 内核高度模块化和可定制。Kconfig 为用户提供了许多配置目标: + + +| 配置目标 | 解释 | +| ---------------- | --------------------------------------------------------- | +| `config` | 利用命令行程序更新当前配置 | +| `nconfig` | 利用基于 ncurses 菜单的程序更新当前配置 | +| `menuconfig` | 利用基于菜单的程序更新当前配置 | +| `xconfig` | 利用基于 Qt 的前端程序更新当前配置 | +| `gconfig` | 利用基于 GTK+ 的前端程序更新当前配置 | +| `oldconfig` | 基于提供的 `.config` 更新当前配置 | +| `localmodconfig` | 更新当前配置,禁用没有载入的模块 | +| `localyesconfig` | 更新当前配置,转换本地模块到核心 | +| `defconfig` | 带有来自架构提供的 `defconcig` 默认值的新配置 | +| `savedefconfig` | 保存当前配置为 `./defconfig`(极简配置) | +| `allnoconfig` | 所有选项回答为 `no` 的新配置 | +| `allyesconfig` | 所有选项回答为 `yes` 的新配置 | +| `allmodconfig` | 尽可能选择所有模块的新配置 | +| `alldefconfig` | 所有符号设置为默认值的新配置 | +| `randconfig` | 所有选项随机选择的新配置 | +| `listnewconfig` | 列出新选项 | +| `olddefconfig` | 同 `oldconfig` 一样,但设置新符号为其默认值而无须提问 | +| `kvmconfig` | 启用支持 KVM 访客模块的附加选项 | +| `xenconfig` | 启用支持 xen 的 dom0 和 访客模块的附加选项 | +| `tinyconfig` | 配置尽可能小的内核 | + +我认为 `menuconfig` 是这些目标中最受欢迎的。这些目标由不同的主程序处理,这些程序由内核提供并在内核构建期间构建。一些目标有 GUI(为了方便用户),而大多数没有。与 Kconfig 相关的工具和源代码主要位于内核源代码中的 `scripts/kconfig/` 下。从 `scripts/kconfig/Makefile` 中可以看到,这里有几个主程序,包括 `conf`、`mconf` 和 `nconf`。除了 `conf` 之外,每个都负责一个基于 GUI 的配置目标,因此,`conf` 处理大多数。 + +从逻辑上讲,Kconfig 的基础结构有两部分:一部分实现一种[新语言][1]来定义配置项(参见内核源代码下的 Kconfig 文件),另一部分解析 Kconfig 语言并处理配置操作。 + +大多数配置目标具有大致相同的内部过程(如下所示): + +![](https://opensource.com/sites/default/files/uploads/kconfig_process.png) + +请注意,所有配置项都具有默认值。 + +第一步读取源根目录下的 Kconfig 文件,构建初始配置数据库;然后它根据此优先级读取现有配置文件来更新初始数据库: + +``` +.config +/lib/modules/$(shell,uname -r)/.config +/etc/kernel-config +/boot/config-$(shell,uname -r) +ARCH_DEFCONFIG +arch/$(ARCH)/defconfig +``` + +如果你通过 `menuconfig` 进行基于 GUI 的配置或通过 `oldconfig` 进行基于命令行的配置,则根据你的自定义更新数据库。最后,配置数据库被转储到 `.config` 文件中。 + +但 `.config` 文件不是内核构建的最终素材;这就是 `syncconfig` 目标存在的原因。`syncconfig`曾经是一个名为 `silentoldconfig` 的配置目标,但它没有做到其旧名称所说的工作,所以它被重命名。此外,因为它是供内部使用(不适用于用户),所以它已从上述列表中删除。 + +以下是 `syncconfig` 的作用: + +![](https://opensource.com/sites/default/files/uploads/syncconfig.png) + +`syncconfig` 将 `.config` 作为输入并输出许多其他文件,这些文件分为三类: + +* `auto.conf` & `tristate.conf` 用于 makefile 文本处理。例如,你可以在组件的 makefile 中看到这样的语句: + + ``` + obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o +``` +* `autoconf.h` 用于 C 语言的源文件。 +* `include/config/` 下空的头文件用于 kbuild 期间的配置依赖性跟踪,如下所述。 + +配置完成后,我们将知道哪些文件和代码片段未编译。 + +### kbuild + +组件式构建,称为*递归 make*,是 GNU `make` 管理大型项目的常用方法。Kbuild 是递归 make 的一个很好的例子。通过将源文件划分为不同的模块/组件,每个组件都由其自己的 makefile 管理。当你开始构建时,顶级 makefile 以正确的顺序调用每个组件的 makefile、构建组件,并将它们收集到最终的执行程序中。 + +kbuild 指向到不同类型的 makefile: + +* `Makefile` 位于源代码根目录的顶级 makefile。 +* `.config` 是内核配置文件。 +* `arch/$(ARCH)/Makefile` 是架构的 makefile,它用于补充顶级 makefile。 +* `scripts/Makefile.*` 描述所有的 kbuild makefile 的通用规则。 +* 最后,大约有 500 个 kbuild makefile。 + +顶级 makefile 会包含架构 makefile,读取 `.config` 文件,下到子目录,在 `scripts/ Makefile.*` 中定义的例程的帮助下,在每个组件的 makefile 上调用`make`,构建每个中间对象,并将所有的中间对象链接为 `vmlinux`。内核文档 [Documentation/kbuild/makefiles.txt][2] 描述了这些 makefile 的方方面面。 + +作为一个例子,让我们看看如何在 x86-64 上生成 `vmlinux`: + +![vmlinux overview][4] + + +(插图基于 Richard Y. Steven 的[博客][5]。有过更新,并在作者允许的情况下使用。) + +进入 `vmlinux` 的所有 `.o` 文件首先进入它们自己的 `built-in.a`,它通过变量`KBUILD_VMLINUX_INIT`、`KBUILD_VMLINUX_MAIN`、`KBUILD_VMLINUX_LIBS` 表示,然后被收集到 `vmlinux` 文件中。 + +在下面这个简化的 makefile 代码的帮助下,了解如何在 Linux 内核中实现递归 make: + +``` +# In top Makefile +vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) +                +$(call if_changed,link-vmlinux) + +# Variable assignments +vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS) + +export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) +export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-y) +export KBUILD_VMLINUX_LIBS := $(libs-y1) +export KBUILD_LDS          := arch/$(SRCARCH)/kernel/vmlinux.lds + +init-y          := init/ +drivers-y       := drivers/ sound/ firmware/ +net-y           := net/ +libs-y          := lib/ +core-y          := usr/ +virt-y          := virt/ + +# Transform to corresponding built-in.a +init-y          := $(patsubst %/, %/built-in.a, $(init-y)) +core-y          := $(patsubst %/, %/built-in.a, $(core-y)) +drivers-y       := $(patsubst %/, %/built-in.a, $(drivers-y)) +net-y           := $(patsubst %/, %/built-in.a, $(net-y)) +libs-y1         := $(patsubst %/, %/lib.a, $(libs-y)) +libs-y2         := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) +virt-y          := $(patsubst %/, %/built-in.a, $(virt-y)) + +# Setup the dependency. vmlinux-deps are all intermediate objects, vmlinux-dirs +# are phony targets, so every time comes to this rule, the recipe of vmlinux-dirs +# will be executed. Refer "4.6 Phony Targets" of `info make` +$(sort $(vmlinux-deps)): $(vmlinux-dirs) ; + +# Variable vmlinux-dirs is the directory part of each built-in.a +vmlinux-dirs    := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ +                     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ +                     $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y))) + +# The entry of recursive make +$(vmlinux-dirs): +                $(Q)$(MAKE) $(build)=$@ need-builtin=1 +``` + +递归 make 的配方recipe被扩展开是这样的: + +The recursive make recipe is expanded, for example: + +``` +make -f scripts/Makefile.build obj=init need-builtin=1 +``` + +这意味着 `make` 将进入 `scripts/Makefile.build` 以继续构建每个 `built-in.a` 的工作。在`scripts/link-vmlinux.sh` 的帮助下,`vmlinux` 文件最终位于源根目录下。 + +#### vmlinux 与 bzImage 对比 + +许多 Linux 内核开发人员可能不清楚 `vmlinux` 和 `bzImage` 之间的关系。例如,这是他们在 x86-64 中的关系: + +![](https://opensource.com/sites/default/files/uploads/vmlinux-bzimage.png) + +源代码根目录下的 `vmlinux` 被剥离、压缩后,放入 `piggy.S`,然后与其他对等对象链接到 `arch/x86/boot/compressed/vmlinux`。同时,在 `arch/x86/boot` 下生成一个名为 `setup.bin` 的文件。可能有一个可选的第三个文件,它具有重定位信息,具体取决于 `CONFIG_X86_NEED_RELOCS` 的配置。 + +由内核提供的称为 `build` 的宿主程序将这两个(或三个)部分构建到最终的 `bzImage` 文件中。 + +#### 依赖跟踪 + +kbuild 跟踪三种依赖关系: + +1. 所有必备文件(`*.c` 和 `*.h`) +2. 所有必备文件中使用的 `CONFIG_` 选项 +3. 用于编译该目标的命令行依赖项 + +第一个很容易理解,但第二个和第三个呢? 内核开发人员经常会看到如下代码: + +``` +#ifdef CONFIG_SMP +__boot_cpu_id = cpu; +#endif +``` + +当 `CONFIG_SMP` 改变时,这段代码应该重新编译。编译源文件的命令行也很重要,因为不同的命令行可能会导致不同的目标文件。 + +当 `.c` 文件通过 `#include` 指令使用头文件时,你需要编写如下规则: + +``` +main.o: defs.h +        recipe... +``` + +管理大型项目时,需要大量的这些规则;把它们全部写下来会很乏味无聊。幸运的是,大多数现代 C 编译器都可以通过查看源文件中的 `#include` 行来为你编写这些规则。对于 GNU 编译器集合(GCC),只需添加一个命令行参数:`-MD depfile` + +``` +# In scripts/Makefile.lib +c_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \ +                 -include $(srctree)/include/linux/compiler_types.h       \ +                 $(__c_flags) $(modkern_cflags)                           \ +                 $(basename_flags) $(modname_flags) +``` + +这将生成一个 `.d` 文件,内容如下: + +``` +init_task.o: init/init_task.c include/linux/kconfig.h \ +  include/generated/autoconf.h include/linux/init_task.h \ +  include/linux/rcupdate.h include/linux/types.h \ +  ... +``` + +然后主程序 [fixdep][6] 通过将 depfile 和命令行作为输入来处理其他两个依赖项,然后以 makefile 格式输出一个 `..cmd` 文件,它记录命令行和目标的所有先决条件(包括配置)。 它看起来像这样: + +``` +# The command line used to compile the target +cmd_init/init_task.o := gcc -Wp,-MD,init/.init_task.o.d  -nostdinc ... +... +# The dependency files +deps_init/init_task.o := \ + $(wildcard include/config/posix/timers.h) \ + $(wildcard include/config/arch/task/struct/on/stack.h) \ + $(wildcard include/config/thread/info/in/task.h) \ + ... + include/uapi/linux/types.h \ + arch/x86/include/uapi/asm/types.h \ + include/uapi/asm-generic/types.h \ + ... +``` + +在递归 make 中,`..cmd` 文件将被包括,以提供所有依赖关系信息并帮助决定是否重建目标。 + +这背后的秘密是 `fixdep` 将解析 depfile(`.d` 文件),然后解析里面的所有依赖文件,搜索所有 `CONFIG_` 字符串的文本,将它们转换为相应的空的头文件,并将它们添加到目标的先决条件。每次配置更改时,相应的空的头文件也将更新,因此 kbuild 可以检测到该更改并重建依赖于它的目标。因为还记录了命令行,所以很容易比较最后和当前的编译参数。 + +### 展望未来 + +Kconfig/kbuild 在很长一段时间内没有什么变化,直到新的维护者 Masahiro Yamada 于 2017 年初加入,现在 kbuild 再次正在积极开发中。如果你不久后看到与本文中的内容不同的内容,请不要感到惊讶。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/10/kbuild-and-kconfig + +作者:[Cao Jin][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/pinocchio +[b]: https://github.com/lujun9972 +[1]: https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-language.txt +[2]: https://www.mjmwired.net/kernel/Documentation/kbuild/makefiles.txt +[3]: https://opensource.com/file/411516 +[4]: https://opensource.com/sites/default/files/uploads/vmlinux_generation_process.png (vmlinux overview) +[5]: https://blog.csdn.net/richardysteven/article/details/52502734 +[6]: https://github.com/torvalds/linux/blob/master/scripts/basic/fixdep.c From f758cbe9a0d5c397c38dab0d018db0ca5c2309ef Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Aug 2019 00:52:23 +0800 Subject: [PATCH 448/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20How=20?= =?UTF-8?q?To=20Set=20up=20Automatic=20Security=20Update=20(Unattended=20U?= =?UTF-8?q?pgrades)=20on=20Debian/Ubuntu=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md --- ... (Unattended Upgrades) on Debian-Ubuntu.md | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md diff --git a/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md b/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md new file mode 100644 index 0000000000..226856f31c --- /dev/null +++ b/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md @@ -0,0 +1,168 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Set up Automatic Security Update (Unattended Upgrades) on Debian/Ubuntu?) +[#]: via: (https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubuntu-debian/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +How To Set up Automatic Security Update (Unattended Upgrades) on Debian/Ubuntu? +====== + +One of an important task for Linux admins to make the system up-to-date. + +It’s keep your system more stable and avoid unwanted access and attack. + +Installing a package in Linux is a piece of cake. + +In the similar way we can update security patches as well. + +This is a simple tutorial that will show you to configure your system to receive automatic security updates. + +There are some security risks involved when you running an automatic security package upgrades without inspection, but there are also benefits. + +If you don’t want to miss security patches and would like to stay up-to-date with the latest security patches. + +Then you should set up an automatic security update with help of unattended upgrades utility. + +You can **[manually install Security Updates on Debian & Ubuntu systems][1]** if you don’t want to go for automatic security update. + +There are many ways that we can automate this. However, we are going with an official method and later we will cover other ways too. + +### How to Install unattended-upgrades package in Debian/Ubuntu? + +By default unattended-upgrades package should be installed on your system. But in case if it’s not installed use the following command to install it. + +Use **[APT-GET Command][2]** or **[APT Command][3]** to install unattended-upgrades package. + +``` +$ sudo apt-get install unattended-upgrades +``` + +The below two files are allows you to customize this utility. + +``` +/etc/apt/apt.conf.d/50unattended-upgrades +/etc/apt/apt.conf.d/20auto-upgrades +``` + +### Make necessary changes in 50unattended-upgrades file + +By default only minimal required options were enabled for security updates. It’s not limited and you can configure many option in this to make this utility more useful. + +I have trimmed the file and added only the enabled lines for better clarifications. + +``` +# vi /etc/apt/apt.conf.d/50unattended-upgrades + +Unattended-Upgrade::Allowed-Origins { + "${distro_id}:${distro_codename}"; + "${distro_id}:${distro_codename}-security"; + "${distro_id}ESM:${distro_codename}"; + }; +Unattended-Upgrade::DevRelease "false"; +``` + +There are three origins are enabled and the details are below. + + * **`${distro_id}:${distro_codename}:`**` ` It is necessary because security updates may pull in new dependencies from non-security sources. + * **`${distro_id}:${distro_codename}-security:`**` ` It is used to get a security updates from sources. + * **`${distro_id}ESM:${distro_codename}:`**` ` It is used to get a security updates for ESM (Extended Security Maintenance) users. + + + +**Enable Email Notification:** If you would like to receive email notifications after every security update, then modify the following line (uncomment it and add your email id). + +From: + +``` +//Unattended-Upgrade::Mail "root"; +``` + +To: + +``` +Unattended-Upgrade::Mail "[email protected]"; +``` + +**Auto Remove Unused Dependencies:** You may need to run “sudo apt autoremove” command after every update to remove unused dependencies from the system. + +We can automate this task by making the changes in the following line (uncomment it and change “false” to “true”). + +From: + +``` +//Unattended-Upgrade::Remove-Unused-Dependencies "false"; +``` + +To: + +``` +Unattended-Upgrade::Remove-Unused-Dependencies "true"; +``` + +**Enable Automatic Reboot:** You may need to reboot your system when a security updates installed for kernel. To do so, make the following changes in the following line. + +From: + +``` +//Unattended-Upgrade::Automatic-Reboot "false"; +``` + +To: Uncomment it and change “false” to “true” to enable automatic reboot. + +``` +Unattended-Upgrade::Automatic-Reboot "true"; +``` + +**Enable Automatic Reboot at The Specific Time:** If automatic reboot is enabled and you would like to perform the reboot at the specific time, then make the following changes. + +From: + +``` +//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; +``` + +To: Uncomment it and change the time as per your requirement. I set it to reboot at 5 AM. + +``` +Unattended-Upgrade::Automatic-Reboot-Time "05:00"; +``` + +### How to Enable Automatic Security Update? + +Now, we have configured the necessary options. Once you are done. + +Open the following file and verify it, both the values are set up correctly or not? It should not be a zero’s. (1=enabled, 0=disabled). + +``` +# vi /etc/apt/apt.conf.d/20auto-upgrades + +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "1"; +``` + +**Details:** + + * The first line makes apt to perform “apt-get update” automatically every day. + * The second line makes apt to install security updates automatically every day. + + + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubuntu-debian/ + +作者:[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/manually-install-security-updates-ubuntu-debian/ +[2]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ +[3]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ From 5e05e9fecb26453c8ca189b769f655717c3e1261 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Aug 2019 00:53:27 +0800 Subject: [PATCH 449/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190814=20Taz=20?= =?UTF-8?q?Brown:=20How=20Do=20You=20Fedora=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190814 Taz Brown- How Do You Fedora.md --- .../20190814 Taz Brown- How Do You Fedora.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/tech/20190814 Taz Brown- How Do You Fedora.md diff --git a/sources/tech/20190814 Taz Brown- How Do You Fedora.md b/sources/tech/20190814 Taz Brown- How Do You Fedora.md new file mode 100644 index 0000000000..4de9ec93c5 --- /dev/null +++ b/sources/tech/20190814 Taz Brown- How Do You Fedora.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Taz Brown: How Do You Fedora?) +[#]: via: (https://fedoramagazine.org/taz-brown-how-do-you-fedora/) +[#]: author: (Charles Profitt https://fedoramagazine.org/author/cprofitt/) + +Taz Brown: How Do You Fedora? +====== + +![Taz Brown: How Do You Fedora?][1] + +We recently interviewed Taz Brown on how she uses Fedora. This is part of a series on the Fedora Magazine. The series profiles Fedora users and how they use Fedora to get things done. Contact us on the [feedback][2] form to express your interest in becoming a interviewee. + +Taz Brown is a seasoned IT professional with over 15 years of experience. “I have worked as a systems administrator, senior Linux administrator, DevOps engineer and I now work as a senior Ansible automation consultant at Red Hat with the Automation Practice Team.” Originally Taz started using Ubuntu, but she started using CentOS, Red Hat Enterprise Linux and Fedora as a Linux administrator in the IT industry. + +Taz is relatively new to contributing to open source, but she found that code was not the only way to contribute. “I prefer to contribute through documentation as I am not a software developer or engineer. I found that there was more than one way to contribute to open source than just through code.” + +### All about Taz + +Her childhood hero is Wonder Woman. Her favorite movie is Hackers. “My favorite scene is the beginning of the movie,” Taz tells the Magazine. “The movie starts with a group of special agents breaking into a house to catch the infamous hacker, Zero Cool. We soon discover that Zero Cool is actually 11-year-old Dade Murphy, who managed to crash 1,507 computer systems in one day. He is charged for his crimes and his family is fined $45,000. Additionally, he is banned from using computers or touch-tone telephones until he is 18.” + +Her favorite character in the movie is Paul Cook. “Paul Cook, Lord Nikon, played by Laurence Mason was my favorite character. One of the main reasons is that I never really saw a hacker movie that had characters that looked like me so I was fascinated by his portrayal. He was enigmatic. It was refreshing to see and it made me real proud that I was passionate about IT and that I was a geek of sorts.” + +Taz is an amateur photographer and uses a Nikon D3500. “I definitely like vintage things so I am looking to add a new one to my collection soon.” She also enjoys 3D printing, and drawing. “I use open source tools in my hobbies such as Wekan, which is an open-source kanban utility.” + +![][3] + +### The Fedora community + +Taz first started using Linux about 8 years ago. “I started using Ubuntu and then graduated to Fedora and its community and I was hooked. I have been using Fedora now for about 5 years.” + +When she became a Linux Administrator, Linux turned into a passion. “I was trying to find my way in terms of contributing to open source. I didn’t know where to go so I wondered if I could truly be an open source enthusiast and influencer because the community is so vast, but once I found a few people who embraced my interests and could show me the way, I was able to open up and ask questions and learn from the community.” + +Taz first became involved with the Fedora community through her work as a Linux systems engineer while working at Mastercard. “My first impressions of the Fedora community was one of true collaboration, respect and sharing.” + +When Brown talked about the Fedora Project she gave an excellent analogy. “America is an melting pot and that’s how I see open source projects like the Fedora Project. There is plenty of room for diverse contributions to the Fedora Project. There are so many ways in which to get and stay involved and there is also room for new ideas.” + +When we asked Brown about what she would like to see improved in the Fedora community, she commented on making others more aware of the opportunities. “I wish those who are typically underrepresented in tech were more aware of the amazing commitment that the Fedora Project has to diversity and inclusion in open source and in the Fedora community.” + +Next Taz had some advice for people looking to join the Fedora Community. “It’s a great decision and one that you likely will not regret joining. Fedora is a project with a very large supportive community and if you’re new to open source, it’s definitely a great place to start. There is a lot of cool stuff in Fedora. I believe there are limitless opportunities for The Fedora Project.” + +### What hardware? + +Taz uses an Lenovo Thinkserver TS140 with 64 GB of ram, 4 1 TB SSDs and a 1 TB HD for data storage. The server is currently running Fedora 30. She also has a Synology NAS with 164 TB of storage using a RAID 5 configuration. Taz also has a Logitech MX Master and MX Master 2S. “For my keyboard, I use a Kinesis Advantage 2.” She also uses two 38 inch LG ultrawide curved monitors and a single 34 inch LG ultrawide monitor. + +She owns a System76 laptop. “I use the 16.1-inch Oryx Pro by System76 with IPS Display with i7 processor with 6 cores and 12 threads.” It has 6 GB GDDR6 RTX 2060 w/ 1920 CUDA Cores and also 64 GB of DDR4 RAM and a total of 4 TB of SSD storage. “I love the way Fedora handles my peripherals and like my mouse and keyboard. Everything works seamlessly. Plug and play works as it should and performance never suffers.” + +![][4] + +### What software? + +Brown is currently running Fedora 30. She has a variety of software in her everyday work flow. “I use Wekan, which is an open-source kanban, which I use to manage my engagements and projects. My favorite editor is [Atom][5], though I use to use Sublime at one point in time.” + +And as for terminals? “I use Terminator as my go-to terminal because of grid arrangement as well as it’s many keyboard shortcuts and its tab formation.” Taz continues, “I love using neofetch which comes up with a nifty fedora logo and system information every time I log in to the terminal. I also have my terminal pimped out using [powerline][6] and powerlevel9k and vim-powerline as well.” + +![][7] + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/taz-brown-how-do-you-fedora/ + +作者:[Charles Profitt][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/cprofitt/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/header-use-this-816x345.png +[2]: https://fedoramag.wpengine.com/submit-an-idea-or-tip/ +[3]: https://fedoramagazine.org/wp-content/uploads/2019/08/Image-1.png +[4]: https://fedoramagazine.org/wp-content/uploads/2019/08/20190517_171809-1-1024x768.jpg +[5]: https://fedoramagazine.org/install-atom-fedora/ +[6]: https://fedoramagazine.org/add-power-terminal-powerline/ +[7]: https://fedoramagazine.org/wp-content/uploads/2019/08/screens-1024x421.jpg From dc5774504d6a7059d4780fb5edaca3d4b97d1647 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Aug 2019 00:55:41 +0800 Subject: [PATCH 450/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20Clemen?= =?UTF-8?q?tine=20Music=20Player=20for=20All=20Your=20Audio=20Needs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 Clementine Music Player for All Your Audio Needs.md --- ...e Music Player for All Your Audio Needs.md | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 sources/tech/20190815 Clementine Music Player for All Your Audio Needs.md diff --git a/sources/tech/20190815 Clementine Music Player for All Your Audio Needs.md b/sources/tech/20190815 Clementine Music Player for All Your Audio Needs.md new file mode 100644 index 0000000000..f2f90a1ca6 --- /dev/null +++ b/sources/tech/20190815 Clementine Music Player for All Your Audio Needs.md @@ -0,0 +1,140 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Clementine Music Player for All Your Audio Needs) +[#]: via: (https://itsfoss.com/clementine-music-player/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +Clementine Music Player for All Your Audio Needs +====== + +[VLC][1] is a mainstay for most fans of FOSS technology and most Linux distros. It’s a great little player, don’t get me wrong, but if you have a large library of audio files, some times you need something more powerful. + +The [Clementine Music Player][2] is a full-service audio player with all the tools you need to keep track of your audio library. According to the [project’s website][3], Clementine “inspired by Amarok 1.4, focusing on a fast and easy-to-use interface for searching and playing your music.” + +![Clementine Music Player][4] + +Clementine contains the following features: + + * Search and play your local music library + * Listen to internet radio from Spotify, Grooveshark, SomaFM, Magnatune, Jamendo, SKY.fm, Digitally Imported, JAZZRADIO.com, Soundcloud, Icecast and Subsonic servers + * Search and play songs you’ve uploaded to Box, Dropbox, Google Drive, and OneDrive + * Create smart playlists and dynamic playlists + * Tabbed playlists, import and export M3U, XSPF, PLS and ASX + * CUE sheet support + * Play audio CDs + * Visualizations from projectM. + * Lyrics and artist biographies and photos + * Transcode music into MP3, Ogg Vorbis, Ogg Speex, FLAC or AAC + * Edit tags on MP3 and OGG files, organize your music + * Fetch missing tags from MusicBrainz + * Discover and download Podcasts + * Download missing album cover art from Last.fm and Amazon + * Cross-platform – works on Windows, Mac OS X and Linux + * Native desktop notifications on Linux (libnotify) and Mac OS X (Growl) + * Remote control using an [Android device][5], a Wii Remote, MPRIS or the command-line + * Copy music to your iPod, iPhone, MTP or mass-storage USB player. Queue manager + + + +Clementine is released under the GPL v3. The most recent version of Clementine (1.3.1) was released in April of 2016. + +### Installing Clementine music player in Linux + +Now let’s take a look at how you can install Clementine on your system. Clementine is a popular application and is available in almost all major Linux distributions. + +You can search for it on your distribution’s software center: + +![Clementine in Ubuntu Software Center][6] + +If you are feeling a little geeky, you can always hop on the terminal train and use your distribution’s package manger to install Clementine. + +[][7] + +Suggested read  Clementine Version 1.3 Released After 2 Years + +In Ubuntu, Clementine is available in the [Universe repository][8]. You can [use the apt command][9] in this fashion: + +``` +sudo apt install clementine +``` + +In Fedora, you can use this command: + +``` +sudo dnf clementine +``` + +In Manjaro or other Arch-based distributions, you can use: + +``` +sudo pacman -S clementine +``` + +You can find a list of Linux distros that have Clementine in their repos [here][10]. You can also download packages directly from the [Clementine site][11]. + +If you have a Windows system, you can download a .exe from the [project’s download page][11]. + +### Experience with Clementine music player + +I have installed Clementine on multiple Linux and Windows systems. I have a large collection of Old Time Radio shows, audio drama, and some music. Clementine does a good job of keeping it all organized. + +![Clementine Library][12] + +I also used it to download and listen to podcasts. It worked well for that. However, I did not use that part very much. + +I didn’t use the cloud options because I don’t trust the cloud with my audio stuff. + +![Clementine Cloud Settings][13] + +### Final Thoughts on Clementine + +I like Clementine. I installed it on multiple systems. I only used a small portion of the wide range of tools it offers and they worked great. + +The only thing that concerns me is that the developers haven’t updated the project in three years. The [project’s GitHub page][14] has almost 2,000 open issues and 40 pending pull requests. I can understand that the developers might think that the project is stable and mature, but it looks like some users are having issues that are not being addressed. + +I guess this is the reason why Clementine has been forked into [Strawberry music player][15]. + +If you are looking for an audio management program that is updated regularly, you may check out [Sayonara music player][16]. + +Have you ever used Clementine? What is your favorite music player/manager? Please let us know in the comments below. + +If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][17]. + +[][18] + +Suggested read  UberWriter: Uber Cool Markdown Editor for Linux + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/clementine-music-player/ + +作者:[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://itsfoss.com/install-latest-vlc/ +[2]: https://www.clementine-player.org/ +[3]: https://www.clementine-player.org/about +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/clementine-music-player.jpg?ssl=1 +[5]: https://play.google.com/store/apps/details?id=de.qspool.clementineremote +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/08/clementine-ubuntu-software-center.jpg?resize=800%2C391&ssl=1 +[7]: https://itsfoss.com/clementine-version-1-3-released/ +[8]: https://itsfoss.com/ubuntu-repositories/ +[9]: https://itsfoss.com/apt-command-guide/ +[10]: https://repology.org/project/clementine-player/versions +[11]: https://www.clementine-player.org/downloads +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/clementine-library.png?resize=800%2C579&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/clementine-cloud-settings.png?resize=800%2C488&ssl=1 +[14]: https://github.com/clementine-player/Clementine +[15]: https://itsfoss.com/strawberry-music-player/ +[16]: https://itsfoss.com/sayonara-music-player/ +[17]: http://reddit.com/r/linuxusersgroup +[18]: https://itsfoss.com/uberwriter/ From 2f981af4d397bdeab3696f301e51b0965b76924c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Aug 2019 00:56:38 +0800 Subject: [PATCH 451/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190814=209=20op?= =?UTF-8?q?en=20source=20cloud=20native=20projects=20to=20consider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190814 9 open source cloud native projects to consider.md --- ...ource cloud native projects to consider.md | 266 ++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 sources/tech/20190814 9 open source cloud native projects to consider.md 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 new file mode 100644 index 0000000000..8f95262799 --- /dev/null +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -0,0 +1,266 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: 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 open source cloud native projects to consider +====== +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]: + +> "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: + + 1. Container + 2. Microservice + 3. 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. + +![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. + +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." + +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 project maturity levels][7] + +CNCF project maturity levels + +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. + +### 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. + +### 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 +> + + +### 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. +> + + +## 9 projects to consider + +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. + +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 + +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.) + +### 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. + +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]. + +To get started, visit the [Kubernetes GitHub repository][9], and access its documentation and learning resources from the [Kubernetes documentation][20] page. + +### 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’ architecture][21] + +Prometheus’ architecture + +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. + +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]. + +### 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. + +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. + +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 + + + +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. + +## Incubating projects + +Following are six of the most popular open source CNCF Incubating projects. + +### 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 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]. + +### 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: + + * 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. + +### 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 + + + +You can read more about it on [Linkerd’s website][32] and access its source code on [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]. + +### 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 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: + +You can learn more in [etcd’s documentation][36] and access its [source code][16] on GitHub. + +### 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 provides plenty of [documentation][37], including guides, tutorials, articles, and even podcasts, and you can also access its [GitHub page][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) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) +[2]: https://opensource.com/article/18/7/what-are-cloud-native-apps +[3]: https://thenewstack.io/10-key-attributes-of-cloud-native-applications/ +[4]: https://www.cncf.io +[5]: https://opensource.com/sites/default/files/uploads/cncf_1.jpg (Cloud-Native Computing Foundation applications ecosystem) +[6]: https://www.opencontainers.org +[7]: https://opensource.com/sites/default/files/uploads/cncf_2.jpg (CNCF project maturity levels) +[8]: https://github.com/cncf/toc/blob/master/process/graduation_criteria.adoc +[9]: https://github.com/kubernetes/kubernetes +[10]: https://github.com/prometheus/prometheus +[11]: https://github.com/envoyproxy/envoy +[12]: https://github.com/rkt/rkt +[13]: https://github.com/jaegertracing/jaeger +[14]: https://github.com/linkerd/linkerd +[15]: https://github.com/helm/helm +[16]: https://github.com/etcd-io/etcd +[17]: https://github.com/cri-o/cri-o +[18]: https://www.okd.io/ +[19]: https://www.openshift.com +[20]: https://kubernetes.io/docs/home +[21]: https://opensource.com/sites/default/files/uploads/cncf_3.jpg (Prometheus’ architecture) +[22]: https://grafana.com +[23]: https://prometheus.io/docs/introduction/overview +[24]: https://linkerd.io/ +[25]: https://istio.io/ +[26]: https://istio.io/docs/reference/config/networking/v1alpha3/sidecar +[27]: https://istio.io/docs/reference/config/policy-and-telemetry +[28]: https://www.envoyproxy.io/docs/envoy/latest +[29]: https://podman.io +[30]: https://coreos.com/rkt/docs/latest +[31]: https://www.jaegertracing.io/docs/1.13 +[32]: https://linkerd.io/2/overview +[33]: https://coreos.com/operators +[34]: https://helm.sh/docs +[35]: https://github.com/coreos/etcd-operator +[36]: https://etcd.io/docs/v3.3.12 +[37]: https://github.com/cri-o/cri-o/blob/master/awesome.md From e3c4439c2946b3c67fa68fb1413e7be8b302391b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Aug 2019 00:57:01 +0800 Subject: [PATCH 452/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190814=204=20mi?= =?UTF-8?q?sconceptions=20about=20ethics=20and=20bias=20in=20AI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190814 4 misconceptions about ethics and bias in AI.md --- ...conceptions about ethics and bias in AI.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20190814 4 misconceptions about ethics and bias in AI.md diff --git a/sources/tech/20190814 4 misconceptions about ethics and bias in AI.md b/sources/tech/20190814 4 misconceptions about ethics and bias in AI.md new file mode 100644 index 0000000000..d7710fc765 --- /dev/null +++ b/sources/tech/20190814 4 misconceptions about ethics and bias in AI.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 misconceptions about ethics and bias in AI) +[#]: via: (https://opensource.com/article/19/8/4-misconceptions-ethics-and-bias-ai) +[#]: author: (Rachel Thomas https://opensource.com/users/rachel-thomas) + +4 misconceptions about ethics and bias in AI +====== +As artificial intelligence increasingly affects our lives, we must +consider how algorithms affect real people. Join us at PyBay 2019 to +continue the conversation. +![A brain design in a head][1] + +At [PyBay 2019][2] in August, I will continue a conversation I started at PyBay 2018 about the importance of ethics in the artificial intelligence (AI) we're developing, especially as it gains more and more influence in our everyday lives. In last year's keynote, I dug into how we're overlooking the essential role humans play in AI's future. + +Ethical discussions around technology are more and more common, and I come to them from my first love, math. Math usually gives us a sense of certainty, but I have found that the more challenging, human parts of my work offer me the greatest potential to improve the world. If you're curious about the more technical side, here's a list of resources I put together: + +> Deep Learning: +> NLP: +> Comp Linear Algebra: +> Bias, Ethics, & AI: +> Debunk Pipeline Myth: +> AI Needs You:   +> 67 Questions: +> +> — Rachel Thomas (@math_rachel) [July 9, 2019][3] + +Misconceptions about the impact of all types and parts of technology have been common for a long time, but they are hitting home ever harder as AI systems gain increasing popularity and influence over our everyday lives. In this article, I'll walk through some common misconceptions about AI ethics then offer some healthy principles we can use to make AI work with us toward a better future. + +### 1\. Misconception: Engineers are only responsible for the code + +There is an idea that engineers are only responsible for their code, not how the code is used nor the quality of the outcomes it produces. The problem is that in complicated, real-world systems, which involve a mixture of software and various administrative processes, often nobody feels responsible for the outcome.  For example, a software program that had bugs decreased essential healthcare services to people with serious disabilities, including cerebral palsy and diabetes, as reported in [The Verge][4].  In this case, the creator of the algorithm blamed state officials for their process, and state officials could blame the team that implemented the software, and so on, with nobody taking responsibility. + +Systems where nobody feels responsible and there is no accountability do not lead to good outcomes. I don't bring up responsibility in order to point fingers, but because I want to help ensure good outcomes. Our code often interacts with very messy, real-world systems and can accidentally amplify those problems in an undesirable way. + +### 2\. Misconception: Humans and computers are interchangeable + +People often talk about human and computer decision makers as though they are plug-and-play interchangeable, or have the mindset of building machines to replicate exactly what humans do.  However, humans and computers are typically used in different ways in practice. + +One powerful example pertains to AI's value proposition—the idea that companies could scale services with AI that would be unaffordable if humans did all the work. Whether it's faster health insurance signups or recommending items on consumer sites, AI is meant to make life simpler for us and cheaper for service providers. The Trojan horse hiding here is that algorithms may be implemented in such a way that the outcome is a dead end with no appeals process and no way to catch or address mistakes. This can be incredibly harmful if a person is [fired from a job][5] or [denied needed healthcare][4] based on an algorithm without explanation or recourse.  + +People remain at risk even when we add humans back into the equation. Studies show that when given an option to override a harmful AI conclusion, people are likely to assume the code is objective or error-free and are reluctant to override "the system."  In many cases, AI is being used because it is cheap, not because it is more accurate or leads to better outcomes. As [Cathy O'Neil][6] puts it, we are creating a world where "the privileged are processed by people; the poor are processed by algorithms." + +> The privileged are processed by people; the poor are processed by algorithms. - [@mathbabedotorg][7] [pic.twitter.com/ZMEDTEPOvK][8] +> +> — Rachel Thomas (@math_rachel) [December 16, 2016][9] + +Another angle posits that humans and computers are at odds with one another. That's fun in a story like competing in chess or Go, but the better issue is figuring out how machines can augment and complement human goals. Ultimately, algorithms are designed by human beings with human ends in mind. + +### 3\. Misconception: We can't regulate the tech industry + +I regularly hear that the tech industry is too hard to regulate and regulation won't be effective. It reminds me of a [99% Invisible podcast episode][10] about the early days of the automobile. When cars came out, there were no speed limits, licenses, or drunk driving laws, and they were made with a lot of sharp metal and shatterable glass. At the time, the idea of making cars safer was a tough conversation. People would argue that cars are inherently dangerous because the people driving them were dangerous, and that danger had nothing to do with the vehicle. At the time, the idea of making cars safer was a tough conversation, and car companies were strongly resistent to anyone discussing safety. People argued that cars were inherently dangerous because the people driving them were dangerous, and that the danger had nothing to do with the vehicle. Consumer safety advocates worked for decades to change the mindset and laws around car safety, addressing many of these previous issues. + +Consider a case study on what is effective at spurring action: people warned executives of a large social media company for years (beginning as early as 2013) of how their platform was being used to incite ethnic violence in Myanmar, and executives took little action. After the UN determined in 2018 that the site had played a "determining role" in the Myanmar genocide, the company said they would hire "dozens" of additional moderators. Contrast this to when Germany passed a hate speech law with significant finacial penalties, and that same social media site hired 1,200 moderators in under a year to avoid being fined. The different orders of magnitude in response to [a potential fine vs a genocide][11] may provide insight into the potential effectiveness of regulation. + +### 4\. Misconception: Tech is only about optimizing metrics + +It can be easy to think of our job in tech being to optimize metrics and respond to consumer demand.  + +> _"Recommendation systems and collaborative filtering are never neutral; they are always ranking one video, pin, or group against another when they're deciding what to show you."_ +> –Renee Diresta, _[Wired][12]_ + +Metrics are just a proxy for the things we truly care about, and over-emphasizing metrics can lead to unintended consequences. When optimizing for viewing time, a popular video site was found to be pushing the most controversial, conspiracy-centric videos because they were the ones people on the site watched for the longest time. That metrics-only perspective resulted, for example, in people interested in lawnmower reviews being recommended extremist, white supremacist conspiracy theories. + +We can choose to not just optimize for metrics, but also to consider desired outcomes. [Evan Estola][13] discussed what that looked like for his team at [Meetup.com][14], in his 2016 Machine Learning Conference presentation [When Recommendations Systems Go Bad][15]. Meetup's data showed that fewer women than men were going to technology-focused meetups. There was a risk that they could create an algorithm that recommended fewer tech meetups to women, which would cause fewer women to find out about tech meetups, decreasing attendance further, and then recommending even fewer tech meetups to women. That feedback loop would result in even fewer women going to tech events. Meetup decided to short-circuit that feedback loop before it was created. + +Technology impacts the world and exposes us to new ideas. We need to think more about the values we stand for and the broader systems we want to build rather than solely optimizing for metrics. + +### Better principles for AI + +I share these misconceptions so we can move past them and make the world a better place. We can improve our world through the ethical use of AI.Keep the following ideas in mind to create a better future with AI: + + * We have a responsibility to think about the whole system. + * We need to work with domain experts and with those impacted by AI. + * We have to find ways to leverage the strengths of computers and humans and bring them together for the best outcomes. + * We must acknowledge regulation is both possible and has been impactful in the past. + * We can't be afraid of hard and messy problems. + * We can choose to optimize for impact on the world, not just for metrics. + + + +By internalizing these concepts in our work and our daily lives, we can make the future a better place for everyone. + +* * * + +_Rachel Thomas will present [Getting Specific About Algorithmic Bias][16] at [PyBay 2019][17] August 17–18 in San Francisco. Use the [OpenSource35][18] discount code when purchasing tickets._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/4-misconceptions-ethics-and-bias-ai + +作者:[Rachel Thomas][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/rachel-thomas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW_patents4abstract_B.png?itok=6RHeRaYh (A brain design in a head) +[2]: http://pybay.com/ +[3]: https://twitter.com/math_rachel/status/1148385754982363136?ref_src=twsrc%5Etfw +[4]: https://www.theverge.com/2018/3/21/17144260/healthcare-medicaid-algorithm-arkansas-cerebral-palsy +[5]: https://www.washingtonpost.com/local/education/creative--motivating-and-fired/2012/02/04/gIQAwzZpvR_story.html +[6]: https://twitter.com/math_rachel/status/809810694065385472 +[7]: https://twitter.com/mathbabedotorg?ref_src=twsrc%5Etfw +[8]: https://t.co/ZMEDTEPOvK +[9]: https://twitter.com/math_rachel/status/809810694065385472?ref_src=twsrc%5Etfw +[10]: https://99percentinvisible.org/episode/nut-behind-wheel/ +[11]: https://www.fast.ai/2018/04/19/facebook/#myanmar +[12]: https://www.wired.com/story/creating-ethical-recommendation-engines/ +[13]: https://mlconf.com/speakers/evan-estola/ +[14]: http://meetup.com/ +[15]: https://mlconf.com/sessions/when-recommendations-systems-go-bad-machine-learn/ +[16]: https://pybay.com/speaker/rachel-thomas/ +[17]: https://pybay.com/ +[18]: https://ti.to/sf-python/pybay2019/discount/OpenSource35 From 23fc3d17dd888a450c074e098d502b3eb4d46faf Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Aug 2019 00:57:57 +0800 Subject: [PATCH 453/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190814=20How=20?= =?UTF-8?q?to=20install=20Python=20on=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190814 How to install Python on Windows.md --- ...190814 How to install Python on Windows.md | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 sources/tech/20190814 How to install Python on Windows.md diff --git a/sources/tech/20190814 How to install Python on Windows.md b/sources/tech/20190814 How to install Python on Windows.md new file mode 100644 index 0000000000..a3b7ea2454 --- /dev/null +++ b/sources/tech/20190814 How to install Python on Windows.md @@ -0,0 +1,203 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Python on Windows) +[#]: via: (https://opensource.com/article/19/8/how-install-python-windows) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/greg-p) + +How to install Python on Windows +====== +Install Python, run an IDE, and start coding right from your Microsoft +Windows desktop. +![Hands programming][1] + +So you want to learn to program? One of the most common languages to start with is [Python][2], popular for its unique blend of [object-oriented][3] structure and simple syntax. Python is also an _interpreted_ _language_, meaning you don't need to learn how to compile code into machine language: Python does that for you, allowing you to test your programs sometimes instantly and, in a way, while you write your code. + +Just because Python is easy to learn doesn't mean you should underestimate its potential power. Python is used by [movie][4] [studios][5], financial institutions, IT houses, video game studios, makers, hobbyists, [artists][6], teachers, and many others. + +On the other hand, Python is also a serious programming language, and learning it takes dedication and practice. Then again, you don't have to commit to anything just yet. You can install and try Python on nearly any computing platform, so if you're on Windows, this article is for you. + +If you want to try Python on a completely open source operating system, you can [install Linux][7] and then [try Python][8]. + +### Get Python + +Python is available from its website, [Python.org][9]. Once there, hover your mouse over the **Downloads** menu, then over the **Windows** option, and then click the button to download the latest release. + +![Downloading Python on Windows][10] + +Alternatively, you can click the **Downloads** menu button and select a specific version from the downloads page. + +### Install Python + +Once the package is downloaded, open it to start the installer. + +It is safe to accept the default install location, and it's vital to add Python to PATH. If you don't add Python to your PATH, then Python applications won't know where to find Python (which they require in order to run). This is _not_ selected by default, so activate it at the bottom of the install window before continuing! + +![Select "Add Python 3 to PATH"][11] + +Before Windows allows you to install an application from a publisher other than Microsoft, you must give your approval. Click the **Yes** button when prompted by the **User Account Control** system. + +![Windows UAC][12] + +Wait patiently for Windows to distribute the files from the Python package into the appropriate locations, and when it's finished, you're done installing Python. + +Time to play. + +### Install an IDE + +To write programs in Python, all you really need is a text editor, but it's convenient to have an integrated development environment (IDE). An IDE integrates a text editor with some friendly and helpful Python features. IDLE 3 and NINJA-IDE are two options to consider. + +#### IDLE 3 + +Python comes with an IDE called IDLE. You can write code in any text editor, but using an IDE provides you with keyword highlighting to help detect typos, a **Run** button to test code quickly and easily, and other code-specific features that a plain text editor like [Notepad++][13] normally doesn't have. + +To start IDLE, click the **Start** (or **Window**) menu and type **python** for matches. You may find a few matches, since Python provides more than one interface, so make sure you launch IDLE. + +![IDLE 3 IDE][14] + +If you don't see Python in the Start menu, launch the Windows command prompt by typing **cmd** in the Start menu, then type: + + +``` +`C:\Windows\py.exe` +``` + +If that doesn't work, try reinstalling Python. Be sure to select **Add Python to PATH** in the install wizard. Refer to the [Python docs][15] for detailed instructions. + +#### Ninja-IDE + +If you already have some coding experience and IDLE seems too simple for you, try [Ninja-IDE][16]. Ninja-IDE is an excellent Python IDE. It has keyword highlighting to help detect typos, quotation and parenthesis completion to avoid syntax errors, line numbers (helpful when debugging), indentation markers, and a **Run** button to test code quickly and easily. + +![Ninja-IDE][17] + +To install it, visit the Ninja-IDE website and [download the Windows installer][18]. The process is the same as with Python: start the installer, allow Windows to install a non-Microsoft application, and wait for the installer to finish. + +Once Ninja-IDE is installed, double-click the Ninja-IDE icon on your desktop or select it from the Start menu. + +### Tell Python what to do + +Keywords tell Python what you want it to do. In either IDLE or Ninja-IDE, go to the File menu and create a new file. + +Ninja users: Do not create a new project, just a new file. + +In your new, empty file, type this into IDLE or Ninja-IDE: + + +``` +`print("Hello world.")` +``` + + * If you are using IDLE, go to the Run menu and select the Run Module option. + * If you are using Ninja, click the Run File button in the left button bar. + + + +![Running code in Ninja-IDE][19] + +Any time you run code, your IDE prompts you to save the file you're working on. Do that before continuing. + +The keyword **print** tells Python to print out whatever text you give it in parentheses and quotes. + +That's not very exciting, though. At its core, Python has access to only basic keywords like **print** and **help**, basic math functions, and so on. + +Use the **import** keyword to load more keywords. Start a new file in IDLE or Ninja and name it **pen.py**. + +**Warning**: Do not call your file **turtle.py**, because **turtle.py** is the name of the file that contains the turtle program you are controlling. Naming your file **turtle.py** confuses Python because it thinks you want to import your own file. + +Type this code into your file and run it: + + +``` +`import turtle` +``` + +[Turtle][20] is a fun module to use. Add this code to your file: + + +``` +turtle.begin_fill() +turtle.forward(100) +turtle.left(90) +turtle.forward(100) +turtle.left(90) +turtle.forward(100) +turtle.left(90) +turtle.forward(100) +turtle.end_fill() +``` + +See what shapes you can draw with the turtle module. + +To clear your turtle drawing area, use the **turtle.clear()** keyword. What do you think the keyword **turtle.color("blue")** does? + +Try more complex code: + + +``` +import turtle as t +import time + +t.color("blue") +t.begin_fill() + +counter = 0 + +while counter < 4: +    t.forward(100) +    t.left(90) +    counter = counter+1 + +t.end_fill() +time.sleep(2) +``` + +As a challenge, try changing your script to get this result: + +![Example Python turtle output][21] + +Once you complete that script, you're ready to move on to more exciting modules. A good place to start is this [introductory dice game][22]. + +### Stay Pythonic + +Python is a fun language with modules for practically anything you can think to do with it. As you can see, it's easy to get started with Python, and as long as you're patient with yourself, you may find yourself understanding and writing Python code with the same fluidity as you write your native language. Work through some [Python articles][23] here on Opensource.com, try scripting some small tasks for yourself, and see where Python takes you. To really integrate Python with your daily workflow, you might even try Linux, which is natively scriptable in ways no other operating system is. You might find yourself, given enough time, using the applications you create! + +Good luck, and stay Pythonic. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/how-install-python-windows + +作者:[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/sethhttps://opensource.com/users/greg-p +[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://www.python.org/ +[3]: https://opensource.com/article/19/7/get-modular-python-classes +[4]: https://github.com/edniemeyer/weta_python_db +[5]: https://www.python.org/about/success/ilm/ +[6]: https://opensource.com/article/19/7/rgb-cube-python-scribus +[7]: https://opensource.com/article/19/7/ways-get-started-linux +[8]: https://opensource.com/article/17/10/python-101 +[9]: https://www.python.org/downloads/ +[10]: https://opensource.com/sites/default/files/uploads/win-python-install.jpg (Downloading Python on Windows) +[11]: https://opensource.com/sites/default/files/uploads/win-python-path.jpg (Select "Add Python 3 to PATH") +[12]: https://opensource.com/sites/default/files/uploads/win-python-publisher.jpg (Windows UAC) +[13]: https://notepad-plus-plus.org/ +[14]: https://opensource.com/sites/default/files/uploads/idle3.png (IDLE 3 IDE) +[15]: http://docs.python.org/3/using/windows.html +[16]: http://ninja-ide.org/ +[17]: https://opensource.com/sites/default/files/uploads/win-python-ninja.jpg (Ninja-IDE) +[18]: http://ninja-ide.org/downloads/ +[19]: https://opensource.com/sites/default/files/uploads/ninja_run.png (Running code in Ninja-IDE) +[20]: https://opensource.com/life/15/8/python-turtle-graphics +[21]: https://opensource.com/sites/default/files/uploads/win-python-idle-turtle.jpg (Example Python turtle output) +[22]: https://opensource.com/article/17/10/python-101#python-101-dice-game +[23]: https://opensource.com/sitewide-search?search_api_views_fulltext=Python From e293b016974ea1bcb492ef1680da2edc2f00c397 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Wed, 14 Aug 2019 17:00:44 +0000 Subject: [PATCH 454/951] Revert "Update 20190218 Talk, then code.md" This reverts commit 55e7228a438c3df1a08f7abad324a27ec1b8ae5c. --- sources/tech/20190218 Talk, then code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190218 Talk, then code.md b/sources/tech/20190218 Talk, then code.md index a4352ffdbf..18ed81e43c 100644 --- a/sources/tech/20190218 Talk, then code.md +++ b/sources/tech/20190218 Talk, then code.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (zianglei) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b0948b7f9e0eddacc3269fa5a9c7f2e5a6d4a28c Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Wed, 14 Aug 2019 17:00:58 +0000 Subject: [PATCH 455/951] =?UTF-8?q?Revert=20"=E7=94=B3=E8=AF=B7=E7=BF=BB?= =?UTF-8?q?=E8=AF=91"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ec4c7339a0f2c1ca6e15ad1fe099348ef050a24e. --- sources/tech/20190703 6 open source web browser alternatives.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190703 6 open source web browser alternatives.md b/sources/tech/20190703 6 open source web browser alternatives.md index e569277b1e..3a965cc74c 100644 --- a/sources/tech/20190703 6 open source web browser alternatives.md +++ b/sources/tech/20190703 6 open source web browser alternatives.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (zmaster-zhang) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9010a2758f40b47c668ee49497a2e766702ca2d6 Mon Sep 17 00:00:00 2001 From: Scvoet Date: Thu, 15 Aug 2019 08:31:04 +0800 Subject: [PATCH 456/951] =?UTF-8?q?=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87:Ho?= =?UTF-8?q?w=20To=20Add=20=E2=80=98New=20Document-=20Option=20In=20Right?= =?UTF-8?q?=20Click=20Context=20Menu=20In=20Ubuntu=2018.04.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ocument- Option In Right Click Context Menu In Ubuntu 18.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md b/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md index 53fb5a5906..75d62900a6 100644 --- a/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md +++ b/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (scvoet) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 81e7b8942aff2b7f2e2239deb1d825ff8f187d44 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Aug 2019 08:46:20 +0800 Subject: [PATCH 457/951] translated --- ...et Linux Kernel 5.0 in Ubuntu 18.04 LTS.md | 91 ------------------- ...et Linux Kernel 5.0 in Ubuntu 18.04 LTS.md | 86 ++++++++++++++++++ 2 files changed, 86 insertions(+), 91 deletions(-) delete mode 100644 sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md create mode 100644 translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md diff --git a/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md b/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md deleted file mode 100644 index 18ecf1d97b..0000000000 --- a/sources/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS) -[#]: via: (https://itsfoss.com/ubuntu-hwe-kernel/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS -====== - -_**The recently released Ubuntu 18.04.3 includes Linux Kernel 5.0 among several new features and improvements but you won’t get it by default. This tutorial demonstrates how to get Linux Kernel 5 in Ubuntu 18.04 LTS.**_ - -[Subscribe to It’s FOSS YouTube Channel for More Videos][1] - -The [third point release of Ubuntu 18.04 is here][2] and it brings new stable versions of GNOME component, livepatch desktop integration and kernel 5.0. - -But wait! What is a point release? Let me explain it to you first. - -### Ubuntu LTS point release - -Ubuntu 18.04 was released in April 2018 and since it’s a long term support (LTS) release, it will be supported till 2023. There have been a number of bug fixes, security updates and software upgrades since then. If you download Ubuntu 18.04 today, you’ll have to install all those updates as one of the first [things to do after installing Ubuntu 18.04][3]. - -That, of course, is not an ideal situation. This is why Ubuntu provides these “point releases”. A point release consists of all the feature and security updates along with the bug fixes that has been added since the initial release of the LTS version. If you download Ubuntu today, you’ll get Ubuntu 18.04.3 instead of Ubuntu 18.04. This saves the trouble of downloading and installing hundreds of updates on a newly installed Ubuntu system. - -Okay! So now you know the concept of point release. How do you upgrade to these point releases? The answer is simple. Just [update your Ubuntu system][4] like you normally do and you’ll be already on the latest point release. - -You can [check Ubuntu version][5] to see which point release you are using. I did a check and since I was on Ubuntu 18.04.3, I assumed that I would have gotten Linux kernel 5 as well. When I [check the Linux kernel version][6], it was still the base kernel 4.15. - -![Ubuntu Version And Linux Kernel Version Check][7] - -Why is that? If Ubuntu 18.04.3 has Linux kernel 5.0 then why does it still have Linux Kernel 4.15? It’s because you have to manually ask for installing the new kernel in Ubuntu LTS by opting for LTS Enablement Stack popularly known as HWE. - -[][8] - -Suggested read  Canonical Announces Ubuntu Edge! - -### Get Linux Kernel 5.0 in Ubuntu 18.04 with Hardware Enablement Stack - -By default, Ubuntu LTS release stay on the same Linux kernel they were released with. The [hardware enablement stack][9] (HWE) provides newer kernel and xorg support for existing Ubuntu LTS release. - -Things have been changed recently. If you downloaded Ubuntu 18.04.2 or newer desktop version, HWE is enabled for you and you’ll get the new kernel along with the regular updates by default. - -For server versions and people who downloaded 18.04 and 18.04.1, you’ll have to install the HWE kernel. Once you do that, you’ll get the newer kernel releases provided by Ubuntu to the LTS version. - -To install HWE kernel in Ubuntu desktop along with newer xorg, you can use this command in the terminal: - -``` -sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04 -``` - -If you are using Ubuntu Server edition, you won’t have the xorg option. So just install the HWE kernel in Ubutnu server: - -``` -sudo apt-get install --install-recommends linux-generic-hwe-18.04 -``` - -Once you finish installing the HWE kernel, restart your system. Now you should have the newer Linux kernel. - -**Are you getting kernel 5.0 in Ubuntu 18.04?** - -Do note that HWE is enabled for people who downloaded and installed Ubuntu 18.04.2. So these users will get Kernel 5.0 without any trouble. - -Should you go by the trouble of enabling HWE kernel in Ubuntu? It’s entirely up to you. [Linux Kernel 5.0][10] has several performance improvement and better hardware support. You’ll get the benefit of the new kernel. - -What do you think? Will you install kernel 5.0 or will you rather stay on the kernel 4.15? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ubuntu-hwe-kernel/ - -作者:[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.youtube.com/channel/UCEU9D6KIShdLeTRyH3IdSvw -[2]: https://ubuntu.com/blog/enhanced-livepatch-desktop-integration-available-with-ubuntu-18-04-3-lts -[3]: https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/ -[4]: https://itsfoss.com/update-ubuntu/ -[5]: https://itsfoss.com/how-to-know-ubuntu-unity-version/ -[6]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/ubuntu-version-and-kernel-version-check.png?resize=800%2C300&ssl=1 -[8]: https://itsfoss.com/canonical-announces-ubuntu-edge/ -[9]: https://wiki.ubuntu.com/Kernel/LTSEnablementStack -[10]: https://itsfoss.com/linux-kernel-5/ diff --git a/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md b/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md new file mode 100644 index 0000000000..541253750b --- /dev/null +++ b/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS) +[#]: via: (https://itsfoss.com/ubuntu-hwe-kernel/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在 Ubuntu 18.04 LTS 中获取 Linux 5.0 内核 +====== + +_ **最近发布的 Ubuntu 18.04.3 包括 Linux 5.0 内核中的几个新功能和改进,但默认情况下没有安装。本教程演示了如何在 Ubuntu 18.04 LTS 中获取 Linux 5 内核。** _ + +[Subscribe to It’s FOSS YouTube Channel for More Videos][1] + +[Ubuntu 18.04 的第三个“点发布版”在这里][2],它带来了新的稳定版本的 GNOME 组件、livepatch 桌面集成和内核 5.0。 + +可是等等!什么是“点发布版”(point release)?让我先解释一下。 + +### Ubuntu LTS 点发布版 + +Ubuntu 18.04 于 2018 年 4 月发布,由于它是一个长期支持 (LTS) 版本,它将一直支持到 2023 年。从那时起,已经有许多 bug 修复,安全更新和软件升级。如果你今天下载 Ubuntu 18.04,你需要在[在安装 Ubuntu 后首先安装这些更新][3]。 + +当然,这不是一种理想情况。这就是 Ubuntu 提供这些“点发布版”的原因。点发布版包含所有功能和安全更新以及自 LTS 版本首次发布以来添加的 bug 修复。如果你今天下载 Ubuntu,你会得到 Ubuntu 18.04.3 而不是 Ubuntu 18.04。这节省了在新安装的 Ubuntu 系统上下载和安装数百个更新的麻烦。 + +好了!现在你知道“点发布版”的概念了。你如何升级到这些点发布版?答案很简单。只需要像平时一样[更新你的 Ubuntu 系统][4],这样你将在最新的点发布版上了。 + +你可以[查看 Ubuntu 版本][5]来了解正在使用的版本。我检查了一下,因为我用的是 Ubuntu 18.04.3,我以为我的内核会是 5。当我[查看 Linux 内核版本][6]时,它仍然是基本内核 4.15。 + +![Ubuntu Version And Linux Kernel Version Check][7] + +这是为什么?如果 Ubuntu 18.04.3 有 Linux 5.0 内核,为什么它仍然使用 Linux 4.15 内核?这是因为你必须通过选择 LTS 支持栈(通常称为 HWE)手动请求在 Ubuntu LTS 中安装新内核。 + +### 使用 HWE 在Ubuntu 18.04 中获取 Linux 5.0 内核 + +默认情况下,Ubuntu LTS 将保持在最初发布的 Linux 内核上。 [硬件支持栈][9](HWE)为现有的 Ubuntu LTS 版本提供了更新的内核和 xorg 支持。 + +最近发生了一些变化。如果你下载了 Ubuntu 18.04.2 或更新的桌面版本,那么就会为你启用 HWE,默认情况下你将获得新内核以及常规更新。 + +对于服务器版本以及下载了 18.04 和 18.04.1 的人员,你需要安装 HWE 内核。完成后,你将获得 Ubuntu 提供的更新的 LTS 版本内核。 + +要在 Ubuntu 桌面上安装 HWE 内核以及更新的 xorg,你可以在终端中使用此命令: + +``` +sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04 +``` + +如果你使用的是 Ubuntu 服务器版,那么就不会有 xorg 选项。所以只需在 Ubutnu 服务器版中安装 HWE 内核: + +``` +sudo apt-get install --install-recommends linux-generic-hwe-18.04 +``` + +完成 HWE 内核的安装后,重启系统。现在你应该拥有更新的 Linux 内核了。 + +**你在 Ubuntu 18.04 中获取 5.0 内核了么?** + +请注意,下载并安装了 Ubuntu 18.04.2 的用户已经启用了 HWE。所以这些用户将能轻松获取 5.0 内核。 + +在 Ubuntu 中启用 HWE 内核遇到困难了么?这完全取决于你。[Linux 5.0 内核][10]有几项性能改进和更好的硬件支持。你将从新内核获益。 + +你怎么看?你会安装 5.0 内核还是宁愿留在 4.15 内核上? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-hwe-kernel/ + +作者:[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.youtube.com/channel/UCEU9D6KIShdLeTRyH3IdSvw +[2]: https://ubuntu.com/blog/enhanced-livepatch-desktop-integration-available-with-ubuntu-18-04-3-lts +[3]: https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/ +[4]: https://itsfoss.com/update-ubuntu/ +[5]: https://itsfoss.com/how-to-know-ubuntu-unity-version/ +[6]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/ubuntu-version-and-kernel-version-check.png?resize=800%2C300&ssl=1 +[9]: https://wiki.ubuntu.com/Kernel/LTSEnablementStack +[10]: https://itsfoss.com/linux-kernel-5/ From 91b0ccdd8ea686aa06a5d499556648f887e87eda Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Aug 2019 08:53:05 +0800 Subject: [PATCH 458/951] translating --- ...n On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md b/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md index ce667a1dff..d8c8878c82 100644 --- a/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md +++ b/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7adc4bd71aadc64e471d78e29f4a79e60b549459 Mon Sep 17 00:00:00 2001 From: Scvoet Date: Thu, 15 Aug 2019 09:33:29 +0800 Subject: [PATCH 459/951] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87:?= =?UTF-8?q?=2020190805=20How=20To=20Add=20=E2=80=98New=20Document-=20Optio?= =?UTF-8?q?n=20In=20Right=20Click=20Context=20Menu=20In=20Ubuntu=2018.04.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Right Click Context Menu In Ubuntu 18.04.md | 109 ----------------- ...In Right Click Context Menu In Ubuntu 18.04.md | 110 ++++++++++++++++++ 2 files changed, 110 insertions(+), 109 deletions(-) delete mode 100644 sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md create mode 100644 翻译/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md diff --git a/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md b/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md deleted file mode 100644 index 75d62900a6..0000000000 --- a/sources/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md +++ /dev/null @@ -1,109 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (scvoet) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04) -[#]: via: (https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04 -====== - -![Add 'New Document' Option In Right Click Context Menu In Ubuntu 18.04 GNOME desktop][1] - -The other day, I was collecting reference notes for [**Linux package managers**][2] on various online sources. When I tried to create a text file to save those notes, I noticed that the ‘New document’ option is missing in my Ubuntu 18.04 LTS desktop. I thought somehow the option is gone in my system. After googling a bit, It turns out to be the “new document” option is not included in Ubuntu GNOME editions. Luckily, I have found an easy solution to add ‘New Document’ option in right click context menu in Ubuntu 18.04 LTS desktop. - -As you can see in the following screenshot, the “New Doucment” option is missing in the right-click context menu of Nautilus file manager. - -![][3] - -new document option is missing in right-click context menu ubuntu 18.04 - -If you want to add this option, just follow the steps given below. - -### Add ‘New Document’ Option In Right Click Context Menu In Ubuntu - -First, make sure you have **~/Templates** directory in your system. If it is not available create one like below. - -``` -$ mkdir ~/Templates -``` - -Next open the Terminal application and cd into the **~/Templates** folder using command: - -``` -$ cd ~/Templates -``` - -Create an empty file: - -``` -$ touch Empty\ Document -``` - -Or, - -``` -$ touch "Empty Document" -``` - -![][4] - -Now open your Nautilus file manager and check if “New Doucment” option is added in context menu. - -![][5] - -Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04 - -As you can see in the above screenshot, the “New Document” option is back again. - -You can also additionally add options for different files types like below. - -``` -$ cd ~/Templates - -$ touch New\ Word\ Document.docx -$ touch New\ PDF\ Document.pdf -$ touch New\ Text\ Document.txt -$ touch New\ PyScript.py -``` - -![][6] - -Add options for different files types in New Document sub-menu - -Please note that all files should be created inside the **~/Templates** directory. - -Now, open the Nautilus and check if the newly created file types are present in “New Document” sub-menu. - -![][7] - -If you want to remove any file type from the sub-menu, simply remove the appropriate file from the Templates directory. - -``` -$ rm ~/Templates/New\ Word\ Document.docx -``` - -I am wondering why this option has been removed in recent Ubuntu GNOME editions. I use it frequently. However, it is easy to re-enable this option in couple minutes. - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-1-720x340.png -[2]: https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/ -[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/new-document-option-missing.png -[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Create-empty-document-in-Templates-directory.png -[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-In-Ubuntu.png -[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-options-for-different-files-types.png -[7]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu.png diff --git a/翻译/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md b/翻译/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md new file mode 100644 index 0000000000..83415b18d1 --- /dev/null +++ b/翻译/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md @@ -0,0 +1,110 @@ +[#]: collector: (lujun9972) +[#]: translator: (Scvoet) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04) +[#]: via: ((https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +如何在 Ubuntu 18.04 的右键单击菜单中添加“新建文档”按钮 +====== + +![Add 'New Document' Option In Right Click Context Menu In Ubuntu 18.04 GNOME desktop][1] + +前几天,我在各种在线资源站点上收集关于 [**Linux 包管理**][2] 的参考资料。在我想创建一个用于保存笔记的文件,我突然发现我的 Ubuntu 18.04 LTS 桌面并没有“创建文件”的按钮了,它好像离奇失踪了。在谷歌一下后,我发现原来“新建文档”按钮不再被集成在 Ubuntu GNOME 版本中了。庆幸的是,我找到了一个在 Ubuntu 18.04 LTS 桌面的右键单击菜单中添加“新建文档”按钮的简易解决方案。 + +就像你在下方截图中看到的一样,Nautilus 文件管理器的右键单击菜单中并没有“新建文件”按钮。 + +![][3] + +Ubuntu 18.04 移除了右键点击菜单中的“新建文件”的选项。 + +如果你想添加此一按钮,请按照以下步骤进行操作。 + +### 在 Ubuntu 的右键单击菜单中添加“新建文件”按钮 + +首先,你需要确保您的系统中有 **~/Templates** 文件夹。如果没有的话,可以按照下面的命令进行创建。 + +``` +$ mkdir ~/Templates +``` + +然后打开终端应用并使用 cd 命令进入 **~/Templates** 文件夹: + +``` +$ cd ~/Templates +``` + +创建一个空文件: + +``` +$ touch Empty\ Document +``` + +或 + +``` +$ touch "Empty Document" +``` + +![][4] + +新开一个 Nautilus 文件管理器,然后检查一下右键单击菜单中是否成功添加了“新建文档”按钮。 + +![][5] + +在 Ubuntu 18.04 的右键单击菜单中添加“新建文件”按钮 + +如上图所示,我们重新启用了“新建文件”的按钮。 + +你还可以为不同文件类型添加按钮。 + +``` +$ cd ~/Templates + +$ touch New\ Word\ Document.docx +$ touch New\ PDF\ Document.pdf +$ touch New\ Text\ Document.txt +$ touch New\ PyScript.py +``` + +![][6] + +在“新建文件”子菜单中给不同的文件类型添加按钮 + +注意,所有文件都应该创建在 **~/Templates** 文件夹下。 + +现在,打开 Nautilus 并检查“新建文件” 菜单中是否有相应的新建文件按钮。 + +![][7] + +如果你要从子菜单中删除任一文件类型,只需在 Templates 目录中移除相应的文件即可。 + +``` +$ rm ~/Templates/New\ Word\ Document.docx +``` + +我十分好奇为什么最新的 Ubuntu GNOME 版本将这个常用选项移除了。不过,重新启用这个按钮也十分简单,只需要几分钟。 + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID][c] +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[c]: https://github.com/scvoet +[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-1-720x340.png +[2]: https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/ +[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/new-document-option-missing.png +[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Create-empty-document-in-Templates-directory.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-In-Ubuntu.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-options-for-different-files-types.png +[7]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu.png From 241abdcfc7148d575c2d1ade2adffb247e89417a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 09:40:25 +0800 Subject: [PATCH 460/951] PRF @wxy --- ...x kernel- The secrets of Kconfig-kbuild.md | 65 ++++++++----------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md b/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md index df5741f88c..86f0c467f3 100644 --- a/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md +++ b/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md @@ -3,11 +3,11 @@ > 深入理解 Linux 配置/构建系统是如何工作的。 -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/compass_map_explore_adventure.jpg?itok=ecCoVTrZ) +![](https://img.linux.net.cn/data/attachment/album/201908/15/093935dvyk5znoaooaooba.jpg) 自从 Linux 内核代码迁移到 Git 以来,Linux 内核配置/构建系统(也称为 Kconfig/kbuild)已存在很长时间了。然而,作为支持基础设施,它很少成为人们关注的焦点;甚至在日常工作中使用它的内核开发人员也从未真正思考过它。 -为了探索如何编译 Linux 内核,本文将深入介绍 Kconfig/kbuild 内部的过程,解释如何生成 `.config` 文件和 `vmlinux`/`bzImage` 文件,并介绍依赖性跟踪的巧妙的技巧。 +为了探索如何编译 Linux 内核,本文将深入介绍 Kconfig/kbuild 内部的过程,解释如何生成 `.config` 文件和 `vmlinux`/`bzImage` 文件,并介绍一个巧妙的依赖性跟踪技巧。 ### Kconfig @@ -25,19 +25,19 @@ | `localmodconfig` | 更新当前配置,禁用没有载入的模块 | | `localyesconfig` | 更新当前配置,转换本地模块到核心 | | `defconfig` | 带有来自架构提供的 `defconcig` 默认值的新配置 | -| `savedefconfig` | 保存当前配置为 `./defconfig`(极简配置) | +| `savedefconfig` | 保存当前配置为 `./defconfig`(最小配置) | | `allnoconfig` | 所有选项回答为 `no` 的新配置 | | `allyesconfig` | 所有选项回答为 `yes` 的新配置 | | `allmodconfig` | 尽可能选择所有模块的新配置 | -| `alldefconfig` | 所有符号设置为默认值的新配置 | +| `alldefconfig` | 所有符号(选项)设置为默认值的新配置 | | `randconfig` | 所有选项随机选择的新配置 | | `listnewconfig` | 列出新选项 | -| `olddefconfig` | 同 `oldconfig` 一样,但设置新符号为其默认值而无须提问 | -| `kvmconfig` | 启用支持 KVM 访客模块的附加选项 | -| `xenconfig` | 启用支持 xen 的 dom0 和 访客模块的附加选项 | +| `olddefconfig` | 同 `oldconfig` 一样,但设置新符号(选项)为其默认值而无须提问 | +| `kvmconfig` | 启用支持 KVM 访客内核模块的附加选项 | +| `xenconfig` | 启用支持 xen 的 dom0 和 访客内核模块的附加选项 | | `tinyconfig` | 配置尽可能小的内核 | -我认为 `menuconfig` 是这些目标中最受欢迎的。这些目标由不同的主程序处理,这些程序由内核提供并在内核构建期间构建。一些目标有 GUI(为了方便用户),而大多数没有。与 Kconfig 相关的工具和源代码主要位于内核源代码中的 `scripts/kconfig/` 下。从 `scripts/kconfig/Makefile` 中可以看到,这里有几个主程序,包括 `conf`、`mconf` 和 `nconf`。除了 `conf` 之外,每个都负责一个基于 GUI 的配置目标,因此,`conf` 处理大多数。 +我认为 `menuconfig` 是这些目标中最受欢迎的。这些目标由不同的主程序host program处理,这些程序由内核提供并在内核构建期间构建。一些目标有 GUI(为了方便用户),而大多数没有。与 Kconfig 相关的工具和源代码主要位于内核源代码中的 `scripts/kconfig/` 下。从 `scripts/kconfig/Makefile` 中可以看到,这里有几个主程序,包括 `conf`、`mconf` 和 `nconf`。除了 `conf` 之外,每个都负责一个基于 GUI 的配置目标,因此,`conf` 处理大多数目标。 从逻辑上讲,Kconfig 的基础结构有两部分:一部分实现一种[新语言][1]来定义配置项(参见内核源代码下的 Kconfig 文件),另一部分解析 Kconfig 语言并处理配置操作。 @@ -47,20 +47,18 @@ 请注意,所有配置项都具有默认值。 -第一步读取源根目录下的 Kconfig 文件,构建初始配置数据库;然后它根据此优先级读取现有配置文件来更新初始数据库: +第一步读取源代码根目录下的 Kconfig 文件,构建初始配置数据库;然后它根据如下优先级读取现有配置文件来更新初始数据库: -``` -.config -/lib/modules/$(shell,uname -r)/.config -/etc/kernel-config -/boot/config-$(shell,uname -r) -ARCH_DEFCONFIG -arch/$(ARCH)/defconfig -``` +1. `.config` +2. `/lib/modules/$(shell,uname -r)/.config` +3. `/etc/kernel-config` +4. `/boot/config-$(shell,uname -r)` +5. `ARCH_DEFCONFIG` +6. `arch/$(ARCH)/defconfig` -如果你通过 `menuconfig` 进行基于 GUI 的配置或通过 `oldconfig` 进行基于命令行的配置,则根据你的自定义更新数据库。最后,配置数据库被转储到 `.config` 文件中。 +如果你通过 `menuconfig` 进行基于 GUI 的配置或通过 `oldconfig` 进行基于命令行的配置,则根据你的自定义更新数据库。最后,该配置数据库被转储到 `.config` 文件中。 -但 `.config` 文件不是内核构建的最终素材;这就是 `syncconfig` 目标存在的原因。`syncconfig`曾经是一个名为 `silentoldconfig` 的配置目标,但它没有做到其旧名称所说的工作,所以它被重命名。此外,因为它是供内部使用(不适用于用户),所以它已从上述列表中删除。 +但 `.config` 文件不是内核构建的最终素材;这就是 `syncconfig` 目标存在的原因。`syncconfig`曾经是一个名为 `silentoldconfig` 的配置目标,但它没有做到其旧名称所说的工作,所以它被重命名。此外,因为它是供内部使用的(不适用于用户),所以它已从上述列表中删除。 以下是 `syncconfig` 的作用: @@ -68,19 +66,15 @@ arch/$(ARCH)/defconfig `syncconfig` 将 `.config` 作为输入并输出许多其他文件,这些文件分为三类: -* `auto.conf` & `tristate.conf` 用于 makefile 文本处理。例如,你可以在组件的 makefile 中看到这样的语句: - - ``` - obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o -``` +* `auto.conf` & `tristate.conf` 用于 makefile 文本处理。例如,你可以在组件的 makefile 中看到这样的语句:`obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o`。 * `autoconf.h` 用于 C 语言的源文件。 -* `include/config/` 下空的头文件用于 kbuild 期间的配置依赖性跟踪,如下所述。 +* `include/config/` 下空的头文件用于 kbuild 期间的配置依赖性跟踪。下面会解释。 配置完成后,我们将知道哪些文件和代码片段未编译。 ### kbuild -组件式构建,称为*递归 make*,是 GNU `make` 管理大型项目的常用方法。Kbuild 是递归 make 的一个很好的例子。通过将源文件划分为不同的模块/组件,每个组件都由其自己的 makefile 管理。当你开始构建时,顶级 makefile 以正确的顺序调用每个组件的 makefile、构建组件,并将它们收集到最终的执行程序中。 +组件式构建,称为*递归 make*,是 GNU `make` 管理大型项目的常用方法。kbuild 是递归 make 的一个很好的例子。通过将源文件划分为不同的模块/组件,每个组件都由其自己的 makefile 管理。当你开始构建时,顶级 makefile 以正确的顺序调用每个组件的 makefile、构建组件,并将它们收集到最终的执行程序中。 kbuild 指向到不同类型的 makefile: @@ -90,14 +84,13 @@ kbuild 指向到不同类型的 makefile: * `scripts/Makefile.*` 描述所有的 kbuild makefile 的通用规则。 * 最后,大约有 500 个 kbuild makefile。 -顶级 makefile 会包含架构 makefile,读取 `.config` 文件,下到子目录,在 `scripts/ Makefile.*` 中定义的例程的帮助下,在每个组件的 makefile 上调用`make`,构建每个中间对象,并将所有的中间对象链接为 `vmlinux`。内核文档 [Documentation/kbuild/makefiles.txt][2] 描述了这些 makefile 的方方面面。 +顶级 makefile 会将架构 makefile 包含进去,读取 `.config` 文件,下到子目录,在 `scripts/ Makefile.*` 中定义的例程的帮助下,在每个组件的 makefile 上调用 `make`,构建每个中间对象,并将所有的中间对象链接为 `vmlinux`。内核文档 [Documentation/kbuild/makefiles.txt][2] 描述了这些 makefile 的方方面面。 作为一个例子,让我们看看如何在 x86-64 上生成 `vmlinux`: ![vmlinux overview][4] - -(插图基于 Richard Y. Steven 的[博客][5]。有过更新,并在作者允许的情况下使用。) +(此插图基于 Richard Y. Steven 的[博客][5]。有过更新,并在作者允许的情况下使用。) 进入 `vmlinux` 的所有 `.o` 文件首先进入它们自己的 `built-in.a`,它通过变量`KBUILD_VMLINUX_INIT`、`KBUILD_VMLINUX_MAIN`、`KBUILD_VMLINUX_LIBS` 表示,然后被收集到 `vmlinux` 文件中。 @@ -149,13 +142,11 @@ $(vmlinux-dirs): 递归 make 的配方recipe被扩展开是这样的: -The recursive make recipe is expanded, for example: - ``` make -f scripts/Makefile.build obj=init need-builtin=1 ``` -这意味着 `make` 将进入 `scripts/Makefile.build` 以继续构建每个 `built-in.a` 的工作。在`scripts/link-vmlinux.sh` 的帮助下,`vmlinux` 文件最终位于源根目录下。 +这意味着 `make` 将进入 `scripts/Makefile.build` 以继续构建每个 `built-in.a`。在`scripts/link-vmlinux.sh` 的帮助下,`vmlinux` 文件最终位于源根目录下。 #### vmlinux 与 bzImage 对比 @@ -163,7 +154,7 @@ make -f scripts/Makefile.build obj=init need-builtin=1 ![](https://opensource.com/sites/default/files/uploads/vmlinux-bzimage.png) -源代码根目录下的 `vmlinux` 被剥离、压缩后,放入 `piggy.S`,然后与其他对等对象链接到 `arch/x86/boot/compressed/vmlinux`。同时,在 `arch/x86/boot` 下生成一个名为 `setup.bin` 的文件。可能有一个可选的第三个文件,它具有重定位信息,具体取决于 `CONFIG_X86_NEED_RELOCS` 的配置。 +源代码根目录下的 `vmlinux` 被剥离、压缩后,放入 `piggy.S`,然后与其他对等对象链接到 `arch/x86/boot/compressed/vmlinux`。同时,在 `arch/x86/boot` 下生成一个名为 `setup.bin` 的文件。可能有一个可选的第三个文件,它带有重定位信息,具体取决于 `CONFIG_X86_NEED_RELOCS` 的配置。 由内核提供的称为 `build` 的宿主程序将这两个(或三个)部分构建到最终的 `bzImage` 文件中。 @@ -211,7 +202,7 @@ init_task.o: init/init_task.c include/linux/kconfig.h \  ... ``` -然后主程序 [fixdep][6] 通过将 depfile 和命令行作为输入来处理其他两个依赖项,然后以 makefile 格式输出一个 `..cmd` 文件,它记录命令行和目标的所有先决条件(包括配置)。 它看起来像这样: +然后主程序 [fixdep][6] 通过将 depfile 文件和命令行作为输入来处理其他两个依赖项,然后以 makefile 格式输出一个 `..cmd` 文件,它记录命令行和目标的所有先决条件(包括配置)。 它看起来像这样: ``` # The command line used to compile the target @@ -229,13 +220,13 @@ deps_init/init_task.o := \ ... ``` -在递归 make 中,`..cmd` 文件将被包括,以提供所有依赖关系信息并帮助决定是否重建目标。 +在递归 make 中,`..cmd` 文件将被包含,以提供所有依赖关系信息并帮助决定是否重建目标。 这背后的秘密是 `fixdep` 将解析 depfile(`.d` 文件),然后解析里面的所有依赖文件,搜索所有 `CONFIG_` 字符串的文本,将它们转换为相应的空的头文件,并将它们添加到目标的先决条件。每次配置更改时,相应的空的头文件也将更新,因此 kbuild 可以检测到该更改并重建依赖于它的目标。因为还记录了命令行,所以很容易比较最后和当前的编译参数。 ### 展望未来 -Kconfig/kbuild 在很长一段时间内没有什么变化,直到新的维护者 Masahiro Yamada 于 2017 年初加入,现在 kbuild 再次正在积极开发中。如果你不久后看到与本文中的内容不同的内容,请不要感到惊讶。 +Kconfig/kbuild 在很长一段时间内没有什么变化,直到新的维护者 Masahiro Yamada 于 2017 年初加入,现在 kbuild 正在再次积极开发中。如果你不久后看到与本文中的内容不同的内容,请不要感到惊讶。 -------------------------------------------------------------------------------- @@ -244,7 +235,7 @@ via: https://opensource.com/article/18/10/kbuild-and-kconfig 作者:[Cao Jin][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 2b42f5cbf3bb089a123153115aeb7a66dea7a687 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 09:40:48 +0800 Subject: [PATCH 461/951] PUB @wxy https://linux.cn/article-11227-1.html --- ...1 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md (100%) diff --git a/translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md b/published/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md similarity index 100% rename from translated/tech/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md rename to published/20181011 Exploring the Linux kernel- The secrets of Kconfig-kbuild.md From 6ee800b9aa0c6fbc795aaf43e2db2cb5178672c2 Mon Sep 17 00:00:00 2001 From: Scvoet Date: Thu, 15 Aug 2019 09:45:41 +0800 Subject: [PATCH 462/951] =?UTF-8?q?Rename=20=E7=BF=BB=E8=AF=91/tech/201908?= =?UTF-8?q?05=20How=20To=20Add=20=E2=80=98New=20Document-=20Option=20In=20?= =?UTF-8?q?Right=20Click=20Context=20Menu=20In=20Ubuntu=2018.04.md=20to=20?= =?UTF-8?q?translated/tech/20190805=20How=20To=20Add=20=E2=80=98New=20Docu?= =?UTF-8?q?ment-=20Option=20In=20Right=20Click=20Context=20Menu=20In=20Ubu?= =?UTF-8?q?ntu=2018.04.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ew Document- Option In Right Click Context Menu In Ubuntu 18.04.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {翻译 => translated}/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md (100%) diff --git a/翻译/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md b/translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md similarity index 100% rename from 翻译/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md rename to translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md From 7bd2c30954fe126b93ce4634fd3499496252cc06 Mon Sep 17 00:00:00 2001 From: hopefully2333 <787016457@qq.com> Date: Thu, 15 Aug 2019 10:29:38 +0800 Subject: [PATCH 463/951] translating by hopefully2333 translating by hopefully2333 --- ... your enterprise software committing security malpractice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190805 Is your enterprise software committing security malpractice.md b/sources/talk/20190805 Is your enterprise software committing security malpractice.md index 7170e5a486..9ab039b6e9 100644 --- a/sources/talk/20190805 Is your enterprise software committing security malpractice.md +++ b/sources/talk/20190805 Is your enterprise software committing security malpractice.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (hopefully2333) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 95454aef2938f0704c324bf2ae3e465126f1951a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 10:44:36 +0800 Subject: [PATCH 464/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @scvoet 恭喜你完成了第一篇翻译! --- ...hone Librem 5 is Available for Preorder.md | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md b/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md index b49e0e3d8d..ff16361630 100644 --- a/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md +++ b/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (scvoet) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Linux Smartphone Librem 5 is Available for Preorder) @@ -10,23 +10,23 @@ 基于 Linux 的智能手机 Librem 5 开启预售 ====== -Purism 近期[宣布][1]了 [Librem 5 智能手机][2]的最终规格。这不再是基于 Android 或 iOS 了,它基于 [Android 的开源替代品][4]--[PureOS][3]上。 +Purism 近期[宣布][1]了 [Librem 5 智能手机][2]的最终规格。它不是基于 Android 或 iOS 的,而是基于 [Android 的开源替代品][4]--[PureOS][3]。 -随着这一消息的宣布,Librem 5 也正式[以 649 美元的价格开启预售][5](7 月 31 日前可以享受早鸟价),在那以后价格将会上涨 5 美元,产品将会于 2019 年第三季度发货。 +随着这一消息的宣布,Librem 5 也正式[以 649 美元的价格开启预售][5](这是 7 月 31 日前的早鸟价),在那以后价格将会上涨 50 美元,产品将会于 2019 年第三季度发货。 ![][6] 以下是 Purism 博客文章中关于 Librem 5 的信息: -_**我们认为手机不应该跟踪你,也不应该利用你的数字生活。**_ +> 我们认为手机不应该跟踪你,也不应该利用你的数字生活。 -_Librem 5 表示您将会有机会收回对私人信息的管理权和控制权,通过免费的开源软件,开放、透明地治理你的数字生活。Librem 5 是_ **_一个基于_ [_PureOS_][3] 的手机**_,一个完全免费、符合道德的_**不基于 Androidd 或 iOS**_ 的开源操作系统(了解更多关于[为什么这很重要]的信息[7])。_ +> Librem 5 意味着你有机会通过自由开源软件、开放式治理和透明度来收回和保护你的私人信息和数字生活。Librem 5 是一个**基于 [PureOS][3] 的手机**,这是一个完全免费、符合道德的**不基于 Android 或 iOS** 的开源操作系统(了解更多关于[为什么这很重要][7]的信息)。 -_我们已成功超过了众筹计划,我们将会一一去实现我们的承诺。Librem 5 的硬件和软件开发正在[稳步前进][8],它计划在 2019 年的第三季度发行初始版本。您可以用 649 美元的价格预购直到产品出仓或确定正式价格和时间。现在附赠外接显示器、键盘和鼠标的套餐也可以预购了。_ +> 我们已成功超额完成了众筹计划,我们将会一一去实现我们的承诺。Librem 5 的硬件和软件开发正在[稳步前进][8],它计划在 2019 年的第三季度发行初始版本。你可以用 649 美元的价格预购直到产品发货或正式价格生效。现在附赠外接显示器、键盘和鼠标的套餐也可以预购了。 -### Librem 5 说明书 +### Librem 5 的配置 -从它的预览来看,Librem 5 旨在提供更好的隐私保护和安全性。除此之外,它试图拒绝使用 Google 或 Apple 的服务。 +从它的预览来看,Librem 5 旨在提供更好的隐私保护和安全性。除此之外,它试图避免使用 Google 或 Apple 的服务。 虽然这个想法够好,它是如何成为一款低于 700 美元的商用智能手机? @@ -36,33 +36,29 @@ _我们已成功超过了众筹计划,我们将会一一去实现我们的承 ![Librem 5][10] -从数据上讲它的配置已经足够高了。不是特别好,也不是特别坏。但是,性能呢?用户体验呢? +从数据上讲它的配置已经足够高了。不是很好,也不是很差。但是,性能呢?用户体验呢? -我们并不能够确切地了解到它的信息,除非我们正在使用它。所以,如果你打算预购,应该要考虑到这一点。 - -[][11] - -推荐阅读 Linux Games Get A Performance Boost for AMD GPUs Thanks to Valve's New Compiler +我们并不能够确切地了解到它的信息,除非我们用过它。所以,如果你打算预购,应该要考虑到这一点。 ### Librem 5 提供终身软件更新支持 当然,和同价位的智能手机相比,它的这些配置并不是很优秀。 -然而,随着他们做出终身软件更新支持的承诺后,它看起来确实像被开源爱好者所钟情的一个好产品。不。 +然而,随着他们做出终身软件更新支持的承诺后,它看起来确实像被开源爱好者所钟情的一个好产品。 ### 其他关键特性 -Purism 还强调 Librem 5 将成为有史以来第一款以 [Matrix][12] 为动力的智能手机。这意味着它将支持短信、电话的端到端、分布式的加密交流。 +Purism 还强调 Librem 5 将成为有史以来第一款以 [Matrix][12] 提供支持的智能手机。这意味着它将支持端到端的分布式加密通讯的短信、电话。 除了这些,耳机接口和用户可以自行更换电池使它成为一个可靠的产品。 -### Wrapping Up +### 总结 -虽然它很难与 Android 或 iOS 智能手机竞争,但多一种选择方式总是好的。 Librem 5 不可能成为每个用户都喜欢的智能手机,但如果您是一个开源爱好者,而且正在寻找一款尊重隐私和安全,不使用 Google 和 Apple 服务的简单智能手机,那么这就很适合您。 +即使它很难与 Android 或 iOS 智能手机竞争,但多一种选择方式总是好的。Librem 5 不可能成为每个用户都喜欢的智能手机,但如果你是一个开源爱好者,而且正在寻找一款尊重隐私和安全,不使用 Google 和 Apple 服务的简单智能手机,那么这就很适合你。 另外,它提供终身的软件更新支持,这让它成为了一个优秀的智能手机。 -您如何看待 Librem 5?你有在考虑预购吗?请在下方的评论中将您的想法告诉我们。 +你如何看待 Librem 5?有在考虑预购吗?请在下方的评论中将你的想法告诉我们。 -------------------------------------------------------------------------------- @@ -71,7 +67,7 @@ via: https://itsfoss.com/librem-5-available/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[Scvoet][c] -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4907c1f26294b951f932a0a6815915c508121d49 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 10:45:39 +0800 Subject: [PATCH 465/951] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @scvoet 本文首发地址: https://linux.cn/article-11229-1.html 你的 LCTT 专页地址: https://linux.cn/lctt/scvoet 请注册领取 LCCN: https://lctt.linux.cn/ --- ...802 Linux Smartphone Librem 5 is Available for Preorder.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20190802 Linux Smartphone Librem 5 is Available for Preorder.md (98%) diff --git a/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md b/published/20190802 Linux Smartphone Librem 5 is Available for Preorder.md similarity index 98% rename from translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md rename to published/20190802 Linux Smartphone Librem 5 is Available for Preorder.md index ff16361630..3c9cc4e7f0 100644 --- a/translated/news/20190802 Linux Smartphone Librem 5 is Available for Preorder.md +++ b/published/20190802 Linux Smartphone Librem 5 is Available for Preorder.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (scvoet) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11229-1.html) [#]: subject: (Linux Smartphone Librem 5 is Available for Preorder) [#]: via: (https://itsfoss.com/librem-5-available/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 0077b9caa742df20588f28ca353efdfe0bad12c5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 11:01:47 +0800 Subject: [PATCH 466/951] PRF @geekpi --- ...0190808 How to manipulate PDFs on Linux.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/20190808 How to manipulate PDFs on Linux.md b/translated/tech/20190808 How to manipulate PDFs on Linux.md index 67e50bd0bf..d7c3f06a8c 100644 --- a/translated/tech/20190808 How to manipulate PDFs on Linux.md +++ b/translated/tech/20190808 How to manipulate PDFs on Linux.md @@ -1,18 +1,20 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to manipulate PDFs on Linux) [#]: via: (https://www.networkworld.com/article/3430781/how-to-manipulate-pdfs-on-linux.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) -如何在 Linux 上操作 PDF +如何在 Linux 命令行操作 PDF ====== -pdftk 命令提供了许多命令行处理 PDF 的操作,包括合并页面、加密文件、添加水印、压缩文件,甚至还有修复 PDF 。 -![Toshiyuki IMAI \(CC BY-SA 2.0\)][1] -虽然 PDF 通常被认为是相当稳定的文件,但在 Linux 和其他系统上你可以做很多处理。包括合并、拆分、旋转、拆分单页、加密和解密、添加水印、压缩和解压缩,甚至还有修复。 **pdftk** 命令能执行所有甚至更多操作。 +> pdftk 命令提供了许多处理 PDF 的命令行操作,包括合并页面、加密文件、添加水印、压缩文件,甚至还有修复 PDF。 + +![](https://img.linux.net.cn/data/attachment/album/201908/15/110119x6sjnjs6s22srnje.jpg) + +虽然 PDF 通常被认为是相当稳定的文件,但在 Linux 和其他系统上你可以做很多处理。包括合并、拆分、旋转、拆分成单页、加密和解密、添加水印、压缩和解压缩,甚至还有修复。 `pdftk` 命令能执行所有甚至更多操作。 “pdftk” 代表 “PDF 工具包”(PDF tool kit),这个命令非常易于使用,并且可以很好地操作 PDF。例如,要将独立的文件合并成一个文件,你可以使用以下命令: @@ -20,7 +22,7 @@ pdftk 命令提供了许多命令行处理 PDF 的操作,包括合并页面、 $ pdftk pg1.pdf pg2.pdf pg3.pdf pg4.pdf pg5.pdf cat output OneDoc.pdf ``` -OneDoc.pdf 将包含上面显示的所有五个文档,命令将在几秒钟内运行完毕。请注意,**cat** 选项表示将文件连接在一起,**output** 选项指定新文件的名称。 +`OneDoc.pdf` 将包含上面显示的所有五个文档,命令将在几秒钟内运行完毕。请注意,`cat` 选项表示将文件连接在一起,`output` 选项指定新文件的名称。 你还可以从 PDF 中提取选定页面来创建单独的 PDF 文件。例如,如果要创建仅包含上面创建的文档的第 1、2、3 和 5 页的新 PDF,那么可以执行以下操作: @@ -28,7 +30,7 @@ OneDoc.pdf 将包含上面显示的所有五个文档,命令将在几秒钟内 $ pdftk OneDoc.pdf cat 1-3 5 output 4pgs.pdf ``` -另外,如果你想要第 1、3、4 和 5 页,我们可以使用以下命令: +另外,如果你想要第 1、3、4 和 5 页(总计 5 页),我们可以使用以下命令: ``` $ pdftk OneDoc.pdf cat 1 3-end output 4pgs.pdf @@ -36,13 +38,13 @@ $ pdftk OneDoc.pdf cat 1 3-end output 4pgs.pdf 你可以选择单独页面或者页面范围,如上例所示。 -下一个命令将创建一个包含奇数页(1、3等)和一个包含偶数页(2、4等)的整合文档: +下一个命令将从一个包含奇数页(1、3 等)的文件和一个包含偶数页(2、4 等)的文件创建一个整合文档: ``` $ pdftk A=odd.pdf B=even.pdf shuffle A B output collated.pdf ``` -请注意,**shuffle** 选项使得能够完成整合,并指示文档的使用顺序。另请注意:虽然上面建议用的是奇数/偶数页,但你不限于仅使用两个文件。 +请注意,`shuffle` 选项使得能够完成整合,并指示文档的使用顺序。另请注意:虽然上面建议用的是奇数/偶数页,但你不限于仅使用两个文件。 如果要创建只能由知道密码的收件人打开的加密 PDF,可以使用如下命令: @@ -50,9 +52,9 @@ $ pdftk A=odd.pdf B=even.pdf shuffle A B output collated.pdf $ pdftk prep.pdf output report.pdf user_pw AsK4n0thingGeTn0thing ``` -选项提供 40(**encrypt_40bit**)和 128(**encrypt_128bit**)位加密。默认情况下使用 128 位加密。 +选项提供 40(`encrypt_40bit`)和 128(`encrypt_128bit`)位加密。默认情况下使用 128 位加密。 -你还可以使用 **burst** 选项将 PDF 文件分成单个页面: +你还可以使用 `burst` 选项将 PDF 文件分成单个页面: ``` $ pdftk allpgs.pdf burst @@ -64,9 +66,7 @@ $ ls -ltr *.pdf | tail -5 -rw-rw-r-- 1 shs shs 23136 Aug 8 08:18 pg_0005.pdf ``` -**pdftk** 命令使得合并、拆分、重建、加密 PDF 文件非常容易。要了解更多选项,请查看 [PDF 实验室][3]中的示例页面 - -在 [Facebook][5] 和 [LinkedIn][6] 上加入 Network World 社区,发表你对热门主题的评论。 +`pdftk` 命令使得合并、拆分、重建、加密 PDF 文件非常容易。要了解更多选项,请查看 [PDF 实验室][3]中的示例页面。 -------------------------------------------------------------------------------- @@ -75,7 +75,7 @@ via: https://www.networkworld.com/article/3430781/how-to-manipulate-pdfs-on-linu 作者:[Sandra Henry-Stocker][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 6a8d90745067d63cfc82ab0a61efe1770233f177 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 11:02:13 +0800 Subject: [PATCH 467/951] PUB @geekpi https://linux.cn/article-11230-1.html --- .../20190808 How to manipulate PDFs on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190808 How to manipulate PDFs on Linux.md (98%) diff --git a/translated/tech/20190808 How to manipulate PDFs on Linux.md b/published/20190808 How to manipulate PDFs on Linux.md similarity index 98% rename from translated/tech/20190808 How to manipulate PDFs on Linux.md rename to published/20190808 How to manipulate PDFs on Linux.md index d7c3f06a8c..3357b5581c 100644 --- a/translated/tech/20190808 How to manipulate PDFs on Linux.md +++ b/published/20190808 How to manipulate PDFs on Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11230-1.html) [#]: subject: (How to manipulate PDFs on Linux) [#]: via: (https://www.networkworld.com/article/3430781/how-to-manipulate-pdfs-on-linux.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) From 78b8138962a5df272837b272c53c21294de01198 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 12:56:30 +0800 Subject: [PATCH 468/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20SSLH?= =?UTF-8?q?=20=E2=80=93=20Share=20A=20Same=20Port=20For=20HTTPS=20And=20SS?= =?UTF-8?q?H?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md --- ...H - Share A Same Port For HTTPS And SSH.md | 227 ++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md diff --git a/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md b/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md new file mode 100644 index 0000000000..f7cc8ef1f3 --- /dev/null +++ b/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md @@ -0,0 +1,227 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (SSLH – Share A Same Port For HTTPS And SSH) +[#]: via: (https://www.ostechnix.com/sslh-share-port-https-ssh/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +SSLH – Share A Same Port For HTTPS And SSH +====== + +![SSLH - Share A Same Port For HTTPS And SSH][1] + +Some Internet service providers and corporate companies might have blocked most of the ports, and allowed only a few specific ports such as port 80 and 443 to tighten their security. In such cases, we have no choice, but use a same port for multiple programs, say the HTTPS Port **443** , which is rarely blocked. Here is where **SSLH** , a SSL/SSH multiplexer, comes in help. It will listen for incoming connections on a port 443. To put this more simply, SSLH allows us to run several programs/services on port 443 on a Linux system. So, you can use both SSL and SSH using a same port at the same time. If you ever been in a situation where most ports are blocked by the firewalls, you can use SSLH to access your remote server. This brief tutorial describes how to share a same port for https, ssh using SSLH in Unix-like operating systems. + +### SSLH – Share A Same Port For HTTPS, SSH, And OpenVPN + +##### Install SSLH + +SSLH is packaged for most Linux distributions, so you can install it using the default package managers. + +On **Debian** , **Ubuntu** , and derivatives, run: + +``` +$ sudo apt-get install sslh +``` + +While installing SSLH, you will prompted whether you want to run sslh as a service from inetd, or as a standalone server. Each choice has its own benefits. With only a few connection per day, it is probably better to run sslh from inetd in order to save resources. On the other hand, with many connections, sslh should run as a standalone server to avoid spawning a new process for each incoming connection. + +![][2] + +Install sslh + +On **Arch Linux** and derivatives like Antergos, Manjaro Linux, install it using Pacman as shown below. + +``` +$ sudo pacman -S sslh +``` + +On **RHEL** , **CentOS** , you need to add **EPEL** repository and then install SSLH as shown below. + +``` +$ sudo yum install epel-release + +$ sudo yum install sslh +``` + +On **Fedora** : + +``` +$ sudo dnf install sslh +``` + +If it is not available on default repositories, you can manually compile and install SSLH as described [**here**][3]. + +##### Configure Apache or Nginx webservers + +As you already know, Apache and Nginx webservers will listen on all network interfaces (i.e **0.0.0.0:443** ) by default. We need to change this setting to tell the webserver to listen on the localhost interface only (i.e **127.0.0.1:443 **or **localhost:443** ). + +To do so, edit the webserver (nginx or apache) configuration file and find the following line: + +``` +listen 443 ssl; +``` + +And, change it to: + +``` +listen 127.0.0.1:443 ssl; +``` + +If you’re using Virutalhosts in Apache, make sure you have changed that it too. + +``` +VirtualHost 127.0.0.1:443 +``` + +Save and close the config files. Do not restart the services. We haven’t finished yet. + +##### Configure SSLH + +Once you have made the webservers to listen on local interface only, edit SSLH config file: + +``` +$ sudo vi /etc/default/sslh +``` + +Find the following line: + +``` +Run=no +``` + +And, change it to: + +``` +Run=yes +``` + +Then, scroll a little bit down and modify the following line to allow SSLH to listen on port 443 on all available interfaces (Eg. 0.0.0.0:443). + +``` +DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:443 --pidfile /var/run/sslh/sslh.pid" +``` + +Where, + + * –user sslh : Requires to run under this specified username. + * –listen 0.0.0.0:443 : SSLH is listening on port 443 on all available interfaces. + * –sshs 127.0.0.1:22 : Route SSH traffic to port 22 on the localhost. + * –ssl 127.0.0.1:443 : Route HTTPS/SSL traffic to port 443 on the localhost. + + + +Save and close the file. + +Finally, enable and start sslh service to update the changes. + +``` +$ sudo systemctl enable sslh + +$ sudo systemctl start sslh +``` + +##### Testing + +Check if the SSLH daemon is listening to 443. + +``` +$ ps -ef | grep sslh +sslh 2746 1 0 15:51 ? 00:00:00 /usr/sbin/sslh --foreground --user sslh --listen 0.0.0.0 443 --ssh 127.0.0.1 22 --ssl 127.0.0.1 443 --pidfile /var/run/sslh/sslh.pid +sslh 2747 2746 0 15:51 ? 00:00:00 /usr/sbin/sslh --foreground --user sslh --listen 0.0.0.0 443 --ssh 127.0.0.1 22 --ssl 127.0.0.1 443 --pidfile /var/run/sslh/sslh.pid +sk 2754 1432 0 15:51 pts/0 00:00:00 grep --color=auto sslh +``` + +Now, you can access your remote server via SSH using port 443: + +``` +$ ssh -p 443 [email protected] +``` + +**Sample output:** + +``` +[email protected]'s password: +Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-55-generic x86_64) + +* Documentation: https://help.ubuntu.com +* Management: https://landscape.canonical.com +* Support: https://ubuntu.com/advantage + +System information as of Wed Aug 14 13:11:04 IST 2019 + +System load: 0.23 Processes: 101 +Usage of /: 53.5% of 19.56GB Users logged in: 0 +Memory usage: 9% IP address for enp0s3: 192.168.225.50 +Swap usage: 0% IP address for enp0s8: 192.168.225.51 + +* Keen to learn Istio? It's included in the single-package MicroK8s. + +https://snapcraft.io/microk8s + +61 packages can be updated. +22 updates are security updates. + + +Last login: Wed Aug 14 13:10:33 2019 from 127.0.0.1 +``` + +![][4] + +Access remote systems via SSH using port 443 + +See? I can now be able to access the remote server via SSH even if the default SSH port 22 is blocked. As you see in the above example, I have used the https port 443 for SSH connection. Also, we can use the same port 443 for openVPN connections too. + +* * * + +**Suggested read:** + + * [**How To SSH Into A Particular Directory On Linux**][5] + * [**How To Create SSH Alias In Linux**][6] + * [**How To Configure SSH Key-based Authentication In Linux**][7] + * [**How To Stop SSH Session From Disconnecting In Linux**][8] + * [**Allow Or Deny SSH Access To A Particular User Or Group In Linux**][9] + * [**4 Ways To Keep A Command Running After You Log Out Of The SSH Session**][10] + * [**ScanSSH – Fast SSH Server And Open Proxy Scanner**][11] + + + +* * * + +I tested SSLH on my Ubuntu 18.04 LTS server and it worked just fine as described above. I tested SSLH in a protected local area network, so I am not aware of the security issues. If you’re using it in production, let us know the advantages and disadvantages of using SSLH in the comment section below. + +For more details, check the official GitHub page given below. + +**Resource:** + + * [**SSLH GitHub Repository**][12] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/sslh-share-port-https-ssh/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2017/08/SSLH-Share-A-Same-Port-For-HTTPS-And-SSH-1-720x340.jpg +[2]: https://www.ostechnix.com/wp-content/uploads/2017/08/install-sslh.png +[3]: https://github.com/yrutschle/sslh/blob/master/doc/INSTALL.md +[4]: https://www.ostechnix.com/wp-content/uploads/2017/08/Access-remote-systems-via-SSH-using-port-443.png +[5]: https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/ +[6]: https://www.ostechnix.com/how-to-create-ssh-alias-in-linux/ +[7]: https://www.ostechnix.com/configure-ssh-key-based-authentication-linux/ +[8]: https://www.ostechnix.com/how-to-stop-ssh-session-from-disconnecting-in-linux/ +[9]: https://www.ostechnix.com/allow-deny-ssh-access-particular-user-group-linux/ +[10]: https://www.ostechnix.com/4-ways-keep-command-running-log-ssh-session/ +[11]: https://www.ostechnix.com/scanssh-fast-ssh-server-open-proxy-scanner/ +[12]: https://github.com/yrutschle/sslh From de24a030be28f081e823665e889f46f42801c9f0 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 12:58:21 +0800 Subject: [PATCH 469/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20Fix=20?= =?UTF-8?q?=E2=80=98E:=20The=20package=20cache=20file=20is=20corrupted,=20?= =?UTF-8?q?it=20has=20the=20wrong=20hash=E2=80=99=20Error=20In=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md --- ...d, it has the wrong hash- Error In Ubuntu.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md diff --git a/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md b/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md new file mode 100644 index 0000000000..f9abbacfd7 --- /dev/null +++ b/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu) +[#]: via: (https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu +====== + +Today, I tried to update the repository lists in my Ubuntu 18.04 LTS desktop and got an error that says – **E: The package cache file is corrupted, it has the wrong hash**. Here is what I run from the Terminal and its output: + +``` +$ sudo apt update +``` + +Sample output: + +``` +Hit:1 http://it-mirrors.evowise.com/ubuntu bionic InRelease +Hit:2 http://it-mirrors.evowise.com/ubuntu bionic-updates InRelease +Hit:3 http://it-mirrors.evowise.com/ubuntu bionic-backports InRelease +Hit:4 http://it-mirrors.evowise.com/ubuntu bionic-security InRelease +Hit:5 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease +Hit:7 http://ppa.launchpad.net/leaeasy/dde/ubuntu bionic InRelease +Hit:8 http://ppa.launchpad.net/rvm/smplayer/ubuntu bionic InRelease +Ign:6 https://dl.bintray.com/etcher/debian stable InRelease +Get:9 https://dl.bintray.com/etcher/debian stable Release [3,674 B] +Fetched 3,674 B in 3s (1,196 B/s) +Reading package lists... Done +E: The package cache file is corrupted, it has the wrong hash +``` + +![][2] + +“The package cache file is corrupted, it has the wrong hash” Error In Ubuntu + +After couple Google searches, I found a workaround to fix this error. + +If you ever encountered with this error, don’t panic. Just run the following commands to fix it. + +Before running the following command, **double check you have added “*” at the end**. It is very important to add ***** at the end of this command. If you don’t add it, it will delete **/var/lib/apt/lists/** directory and there is no way to bring it back. You have been warned! + +``` +$ sudo rm -rf /var/lib/apt/lists/* +``` + +Now I tried again to update the system using command: + +``` +$ sudo apt update +``` + +![][3] + +This time it works!! Hope this helps. + +* * * + +**Suggested read:** + + * [**How To Fix Broken Ubuntu OS Without Reinstalling It**][4] + * [**How to fix “Package operation failed” Error in Ubuntu**][5] + * [**Fix “dpkg: error: parsing file ‘/var/lib/dpkg/updates/0014′” Error In Ubuntu**][6] + * [**How To Fix “Kernel driver not installed (rc=-1908)” VirtualBox Error In Ubuntu**][7] + * [**How to fix ‘Failed to install the Extension pack’ error in Ubuntu**][8] + + + +* * * + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/08/The-package-cache-file-is-corrupted.png +[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/apt-update-command-output-in-Ubuntu.png +[4]: https://www.ostechnix.com/how-to-fix-broken-ubuntu-os-without-reinstalling-it/ +[5]: https://www.ostechnix.com/how-to-fix-package-operation-failed-error-in-ubuntu/ +[6]: https://www.ostechnix.com/fix-dpkg-error-parsing-file-var-lib-dpkg-updates-0014-error-in-ubuntu/ +[7]: https://www.ostechnix.com/how-to-fix-kernel-driver-not-installed-rc-1908-virtualbox-error-in-ubuntu/ +[8]: https://www.ostechnix.com/some-softwares-are-not-working-after-uninstall-moksha-desktop-from-ubuntu-14-04-lts/ From 0ca91e0a5788580e4aa0f848b9200764c4df0a13 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 12:59:40 +0800 Subject: [PATCH 470/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20How=20?= =?UTF-8?q?To=20Change=20Linux=20Console=20Font=20Type=20And=20Size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 How To Change Linux Console Font Type And Size.md --- ...Change Linux Console Font Type And Size.md | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sources/tech/20190815 How To Change Linux Console Font Type And Size.md diff --git a/sources/tech/20190815 How To Change Linux Console Font Type And Size.md b/sources/tech/20190815 How To Change Linux Console Font Type And Size.md new file mode 100644 index 0000000000..1a12a0fccf --- /dev/null +++ b/sources/tech/20190815 How To Change Linux Console Font Type And Size.md @@ -0,0 +1,143 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Change Linux Console Font Type And Size) +[#]: via: (https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Change Linux Console Font Type And Size +====== + +It is quite easy to change the text font type and its size if you have graphical desktop environment. How would you do that in an Ubuntu headless server that doesn’t have a graphical environment? No worries! This brief guide describes how to change Linux console font and size. This can be useful for those who don’t like the default font type/size or who prefer different fonts in general. + +### Change Linux Console Font Type And Size + +Just in case you don’t know yet, this is how a headless Ubuntu Linux server console looks like. + +![][2] + +Ubuntu Linux console + +As far as I know, we can [**list the installed fonts**][3], but there is no option to change the font type or its size from Linux console as we do in the Terminal emulators in GUI desktop. + +But that doesn’t mean that we can’t change it. We still can change the console fonts. + +If you’re using Debian, Ubuntu and other DEB-based systems, you can use **“console-setup”** configuration file for **setupcon** which is used to configure font and keyboard layout for the console. The standard location of the console-setup configuration file is **/etc/default/console- setup**. + +Now, run the following command to setup font for your Linux console. + +``` +$ sudo dpkg-reconfigure console-setup +``` + +Choose the encoding to use on your Linux console. Just leave the default values, choose OK and hit ENTER to continue. + +![][4] + +Choose encoding to set on the console in Ubuntu + +Next choose the character set that should be supported by the console font from the list. By default, it was the the last option i.e. **Guess optimal character set** in my system. Just leave it as default and hit ENTER key. + +![][5] + +Choose character set in Ubuntu + +Next choose the font for your console and hit ENTER key. Here, I am choosing “TerminusBold”. + +![][6] + +Choose font for your Linux console + +In this step, we choose the desired font size for our Linux console. + +![][7] + +Choose font size for your Linux console + +After a few seconds, the selected font with size will applied for your Linux console. + +This is how console fonts looked like in my Ubuntu 18.04 LTS server before changing the font type and size. + +![][8] + +This is after changing the font type and size. + +![][9] + +As you can see, the text size is much bigger, better and the font type is different that default one. + +You can also directly edit **/etc/default/console-setup** file and set the font type and size as you wish. As per the following example, my Linux console font type is “Terminus Bold” and font size is 32. + +``` +ACTIVE_CONSOLES="/dev/tty[1-6]" +CHARMAP="UTF-8" +CODESET="guess" +FONTFACE="TerminusBold" +FONTSIZE="16x32" +``` + +* * * + +**Suggested read:** + + * [**How To Switch Between TTYs Without Using Function Keys In Linux**][10] + + + +* * * + +##### Display Console fonts + +To show your console font, simply type: + +``` +$ showconsolefont +``` + +This command will show a table of glyphs or letters of a font. + +![][11] + +Show console fonts + +If your Linux distribution does not have “console-setup”, you can get it from [**here**][12]. + +On Linux distributions that uses **Systemd** , you can change the console font by editing **“/etc/vconsole.conf”** file. + +Here is an example configuration for German keyboard. + +``` +$ vi /etc/vconsole.conf + +KEYMAP=de-latin1 +FONT=Lat2-Terminus16 +``` + +Hope you find this useful. + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/08/Ubuntu-Linux-console.png +[3]: https://www.ostechnix.com/find-installed-fonts-commandline-linux/ +[4]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-encoding-to-set-on-the-console.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-character-set-in-Ubuntu.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-font-for-Linux-console.png +[7]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-font-size-for-Linux-console.png +[8]: https://www.ostechnix.com/wp-content/uploads/2019/08/Linux-console-tty-ubuntu-1.png +[9]: https://www.ostechnix.com/wp-content/uploads/2019/08/Ubuntu-Linux-TTY-console.png +[10]: https://www.ostechnix.com/how-to-switch-between-ttys-without-using-function-keys-in-linux/ +[11]: https://www.ostechnix.com/wp-content/uploads/2019/08/show-console-fonts.png +[12]: https://software.opensuse.org/package/console-setup From c8f5c983f5a0d7cc8f3b6f3126dcc9c1fbe34636 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 13:00:35 +0800 Subject: [PATCH 471/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20How=20?= =?UTF-8?q?To=20Fix=20=E2=80=9CKernel=20driver=20not=20installed=20(rc=3D-?= =?UTF-8?q?1908)=E2=80=9D=20VirtualBox=20Error=20In=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md --- ... (rc--1908)- VirtualBox Error In Ubuntu.md | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md diff --git a/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md b/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md new file mode 100644 index 0000000000..db2cf67506 --- /dev/null +++ b/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md @@ -0,0 +1,103 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Fix “Kernel driver not installed (rc=-1908)” VirtualBox Error In Ubuntu) +[#]: via: (https://www.ostechnix.com/how-to-fix-kernel-driver-not-installed-rc-1908-virtualbox-error-in-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Fix “Kernel driver not installed (rc=-1908)” VirtualBox Error In Ubuntu +====== + +I use Oracle VirtualBox to test various Linux and Unix distributions. I’ve tested hundred of virtual machines in VirtualBox so far. Today, I started Ubuntu 18.04 server VM in my Ubuntu 18.04 desktop and I got the following error. + +``` +Kernel driver not installed (rc=-1908) + +The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall virtualbox-dkms package and load the kernel module by executing + +'modprobe vboxdrv' + +as root. + +where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. +``` + +![][2] + +“Kernel driver not installed (rc=-1908)” Error in Ubuntu + +I clicked OK to close the message box and and I saw another one in the background. + +``` +Failed to open a session for the virtual machine Ubuntu 18.04 LTS Server. + +The virtual machine 'Ubuntu 18.04 LTS Server' has terminated unexpectedly during startup with exit code 1 (0x1). + +Result Code: +NS_ERROR_FAILURE (0x80004005) +Component: +MachineWrap +Interface: +IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89} +``` + +![][3] + +The virtual machine has terminated unexpectedly during startup with exit code 1 (0x1) + +I didn’t know what to do first. I ran the following command to check if it helps. + +``` +$ sudo modprobe vboxdrv +``` + +And, I got this error. + +``` +modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.0.0-23-generic +``` + +After carefully reading the both error messages, I realized that I should update the Virtualbox application. + +If you ever run into this error in Ubuntu and its variants like Linux Mint, all you have to do is just reinstall or update the **“virtualbox-dkms”** package using command: + +``` +$ sudo apt install virtualbox-dkms +``` + +Or, it is much better to update the whole system: + +``` +$ sudo apt upgrade +``` + +Now the error has gone and I could start VMs from VirtualBox without any issues. + +* * * + +**Related read:** + + * [**Solve “Result Code: NS_ERROR_FAILURE (0x80004005)” VirtualBox Error In Arch Linux**][4] + + + +* * * + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-fix-kernel-driver-not-installed-rc-1908-virtualbox-error-in-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/08/Kernel-driver-not-installed-virtualbox-ubuntu.png +[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/The-virtual-machine-has-terminated-unexpectedly-during-startup-with-exit-code-1-0x1.png +[4]: https://www.ostechnix.com/solve-result-code-ns_error_failure-0x80004005-virtualbox-error-arch-linux/ From 3f31c26c8cc0c34ade1aa6e9d6131853b26b9393 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 13:01:38 +0800 Subject: [PATCH 472/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20How=20?= =?UTF-8?q?To=20Setup=20Multilingual=20Input=20Method=20On=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md --- ...tup Multilingual Input Method On Ubuntu.md | 184 ++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md diff --git a/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md b/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md new file mode 100644 index 0000000000..cc3596630b --- /dev/null +++ b/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md @@ -0,0 +1,184 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Setup Multilingual Input Method On Ubuntu) +[#]: via: (https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Setup Multilingual Input Method On Ubuntu +====== + +For those who don’t know, there are hundreds of spoken languages in India and 22 languages are listed as official languages in Indian constitution. I am not a native English speaker, so I often use **Google translate** if I ever needed to type and/or translate something from English to my native language, which is Tamil. Well, I guess I don’t need to rely on Google translate anymore. I just found way to type in Indian languages on Ubuntu. This guide explains how to setup multilingual input method. It has been exclusively written for Ubuntu 18.04 LTS, however it might work on other Ubuntu variants like Linux mint, Elementary OS. + +### Setup Multilingual Input Method On Ubuntu Linux + +With the help of **IBus** , we can easily setup multilingual input method on Ubuntu and its derivatives. Ibus, stands for **I** ntelligent **I** nput **Bus** , is an input method framework for multilingual input in Unix-like operating systems. It allows us to type in our native language in most GUI applications, for example LibreOffice. + +##### Install IBus On Ubuntu + +To install IBus package on Ubuntu, run: + +``` +$ sudo apt install ibus-m17n +``` + +The Ibus-m17n package provides a lot of Indian and other countries languages including amharic, arabic, armenian, assamese, athapascan languages, belarusian, bengali, burmese, central khmer, chamic languages, chinese, cree, croatian, czech, danish, divehi, dhivehi, maldivian, esperanto, french, georgian, ancient and modern greek, gujarati, hebrew, hindi, inuktitut, japanese, kannada, kashmiri, kazakh, korean, lao, malayalam, marathi, nepali, ojibwa, oriya, panjabi, punjabi, persian, pushto, pashto, russian, sanskrit, serbian, sichuan yi, nuosu, siksika, sindhi, sinhala, sinhalese, slovak, swedish, tai languages, tamil, telugu, thai, tibetan, uighur, uyghur, urdu, uzbek, vietnamese, as well as yiddish. + +##### Add input languages + +We can add languages in System **Settings** section. Click the drop down arrow on the top right corner of your Ubuntu desktop and choose Settings icon in the bottom left corner. + +![][2] + +Launch System’s settings from top panel + +From the Settings section, click on **Region & Language** option in the left pane. Then click the **+** (plus) sign button on the right side under **Input Sources** tab. + +![][3] + +Region & language section in Settings section + +In the next window, click on the **three vertical dots** button. + +![][4] + +Add input source in Ubuntu + +Search and choose the input language you’d like to add from the list. + +![][5] + +Add input language + +For the purpose of this guide, I am going to add **Tamil** language. After choosing the language, click **Add** button. + +![][6] + +Add Input Source + +Now you will see the selected input source has been added. You will see it in Region & Language section under Input Sources tab. + +![][7] + +Input sources section in Ubuntu + +Click the “Manage Installed Languages” button under Input Sources tab. + +![][8] + +Manage Installed Languages In Ubuntu + +Next you will be asked whether you want to install translation packs for the chosen language. You can install them if you want. Or, simply choose “Remind Me Later” button. You will be notified when you open this next time. + +![][9] + +The language support is not installed completely + +Once the translation packs are installed, Click **Install / Remove Languages** button. Also make sure IBus is selected in Keyboard input method system. + +![][10] + +Install / Remove Languages In Ubuntu + +Choose your desired language from the list and click Apply button. + +![][11] + +Choose input language + +That’s it. That’s we have successfully setup multilingual input method on Ubuntu 18.04 desktop. Similarly, add as many as input languages you want. + +After adding all language sources, log out and log in back. + +##### Type In Indian languages and/or your preferred languages + +Once you have added all languages, you will see them from the drop download on the top bar of your Ubuntu desktop. + +![][12] + +Choose input language from top bar in Ubuntu desktop + +Alternatively, you can use **SUPER+SPACE** keys from the Keyboard to switch between input languages. + +![][13] + +Choose input language using Super+Space keys in Ubuntu + +Open any GUI text editors/apps and start typing! + +![][14] + +Type in Indian languages in Ubuntu + +##### Add IBus to startup applications + +We need let IBus to start automatically on every reboot, so you need not to start it manually whenever you want to type in your preferred language. + +To do so, simply type “startup applications” in the dash and click on Startup Applications option. + +![][15] + +Launch startup applications in Ubuntu + +In the next window, click Add, type “Ibus” in the name field and “ibus-daemon” in the Command field and then click Add button. + +![][16] + +Add Ibus to startup applications on Ubuntu + +From now IBus will automatically start on system startup. + +* * * + +**Suggested read:** + + * [**How To Use Google Translate From Commandline In Linux**][17] + * [**How To Type Indian Rupee Sign (₹) In Linux**][18] + * [**How To Setup Japanese Language Environment In Arch Linux**][19] + + + +* * * + +So, it is your turn now. What application/tool you’re using to type in local Indian languages? Let us know them in the comment section below. + +**Reference:** + + * [**IBus – Ubuntu Community Wiki**][20] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-system-settings.png +[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/Region-language-in-Settings-ubuntu.png +[4]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-input-source-in-Ubuntu.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-input-language.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-Input-Source-Ubuntu.png +[7]: https://www.ostechnix.com/wp-content/uploads/2019/08/Input-sources-Ubuntu.png +[8]: https://www.ostechnix.com/wp-content/uploads/2019/08/Manage-Installed-Languages.png +[9]: https://www.ostechnix.com/wp-content/uploads/2019/08/The-language-support-is-not-installed-completely.png +[10]: https://www.ostechnix.com/wp-content/uploads/2019/08/Install-Remove-languages.png +[11]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-language.png +[12]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-input-language-from-top-bar-in-Ubuntu.png +[13]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-input-language-using-SuperSpace-keys.png +[14]: https://www.ostechnix.com/wp-content/uploads/2019/08/Setup-Multilingual-Input-Method-On-Ubuntu.png +[15]: https://www.ostechnix.com/wp-content/uploads/2019/08/Launch-startup-applications-in-ubuntu.png +[16]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-Ibus-to-startup-applications-on-Ubuntu.png +[17]: https://www.ostechnix.com/use-google-translate-commandline-linux/ +[18]: https://www.ostechnix.com/type-indian-rupee-sign-%e2%82%b9-linux/ +[19]: https://www.ostechnix.com/setup-japanese-language-environment-arch-linux/ +[20]: https://help.ubuntu.com/community/ibus From 2cdd80f4770a61037f7b3c9a04464a27dda11fc7 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 13:02:21 +0800 Subject: [PATCH 473/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20How=20?= =?UTF-8?q?To=20Type=20Indian=20Rupee=20Sign=20(=E2=82=B9)=20In=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 How To Type Indian Rupee Sign (-) In Linux.md --- ... To Type Indian Rupee Sign (-) In Linux.md | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sources/tech/20190815 How To Type Indian Rupee Sign (-) In Linux.md diff --git a/sources/tech/20190815 How To Type Indian Rupee Sign (-) In Linux.md b/sources/tech/20190815 How To Type Indian Rupee Sign (-) In Linux.md new file mode 100644 index 0000000000..be51ea65ae --- /dev/null +++ b/sources/tech/20190815 How To Type Indian Rupee Sign (-) In Linux.md @@ -0,0 +1,143 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Type Indian Rupee Sign (₹) In Linux) +[#]: via: (https://www.ostechnix.com/type-indian-rupee-sign-%e2%82%b9-linux/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +How To Type Indian Rupee Sign (₹) In Linux +====== + +This brief guide explains how to type Indian Rupee sign in Unix-like operating systems. The other day, I wanted to type **“Indian Rupee Sign (₹)”**. My keyboard has rupee symbol on it, but I didn’t know how to type it. After a few google searches, I found a way to do this. If you ever wondered how to type rupee symbol in Linux, follow the steps given below. + +### Type Indian Rupee Sign In Linux + +The default keyboard layout in most GNU/Linux and other operating systems is **English (US)**. To type Indian rupee symbol, you need to change the Keyboard layout to **English (India, with rupee)**. I have given the steps to do this in three Desktop environments – **GNOME** , **MATE** and **KDE Plasma**. However, the steps are same for other DEs and other operating systems as well. Just find where the Keyboard layout settings is and change the layout to English (India, with rupee sign). + +##### In GNOME Desktop Environment: + +I tested this on Ubuntu 18.04 LTS desktop. This may work on other Linux distros with GNOME DE. + +Click the drop down arrow on the top right corner of your Ubuntu desktop and choose **Settings** icon in the bottom left corner. + +![][2] + +Launch System’s settings from top panel + +From the Settings section, click on **Region & Language** option in the left pane. Then click the **+** (plus) sign button on the right side under **Input Sources** tab. + +![][3] + +Region & language section in Settings section + +In the next window, click on the **three vertical dots** button and choose the input language you’d like to add from the list. + +![][4] + +Add input source in Ubuntu + +Scroll down a bit and search for **English (India)**. Click on it and then select **English (India, with rupee)** from list and finally click Add button. + +![][5] + +Choose “English (India, with rupee)” option + +You will see it under Input Sources tab. If you want to make it as default, just choose it and click “UP” arrow button. + +Close the Settings window and Log off and Log in back once. + +Now choose the “English (India, with rupee)” from the language drop down box on the top bar of your Ubuntu desktop. + +![][6] + +Choose “English (India, with rupee)” option + +Alternatively, you can use **SUPER+SPACE** keys from the Keyboard to choose it. + +![][7] + +Choose “English (India, with rupee)” option using super+space keys + +Now, you can be able to type Indian rupee symbol by pressing **“Right ALT+4”**. + +If your keyboard has the **AltGr key** on it, then press **AltGr+4** to type Indian rupee symbol. + +Alternatively, you can use the key combination **“CTRL+SHIFT+u+20b9”** to type rupee symbol (Just hold CTRL+SHIFT keys and type **u20b9** letters and leave the keys). This will work everywhere. + +##### In MATE Desktop Environment: + +If you use MATE DE, go to **System - > Preferences -> Hardware -> Keyboard** from the Menu. Then, click on **Layouts** tab and click **Add** button to add a Indian keyboard layout. + +![][8] + +Add Keyboard layout in Keyboard preferences + +Choose **India** from Country drop-down box and **Indian English (India, with rupee)** from Variants drop-down box. Click Add to add the chosen layout. + +![][9] + +Choose Indian English (India, with rupee) option + +The Indian layout will be added to the Keyboard layout section. Choose it and click “Move up” to make it as default. Then, click “Options” button to choose the Keyboard layout options. + +![][10] + +From the Keyboard layout options windows, click on “Key to choose the 3rd level” and choose a key of your choice to apply for rupee symbol. I have chosen **“Any Alt”** key (So, I can use either left or right ALT keys). + +![][11] + +Close the keyboard preferences window. + +Now, you can be able to type Indian rupee symbol by pressing **“ALT+4”**. Alternatively, you can use the key combination **“CTRL+SHIFT+u+20b9”** to type rupee symbol (Just hold CTRL+SHIFT keys and type **u20b9** letters and leave the keys). This will work everywhere. + +Please note that this will work, only if your keyboard has **₹** symbol on **4**. If your keyboard doesn’t has this symbol or very old, it won’t work. + +##### On KDE Plasma desktop environment: + +If you use KDE Plasma, go to **Application Launcher - > System Settings -> Hardware -> Input Devices -> Keyboard -> Layouts**. + +Check the box “Configure Layouts” and click “Add”. + +![][12] + +Choose “Indian” from Layout drop-down box and “English (India, rupee sign”) from Variant drop-down box. + +![][13] + +The chosen layout will be added to Layouts section. Choose it and click “Move up” to make it as default keyboard layout. + +Then, click **Advanced** and click **“Key to choose the 3rd level”** and choose a key of your choice to apply for rupee symbol. I have chosen **“Any Alt”** key. Finally, click **“Apply”**. + +![][14] + +Now, you can be able to type Indian rupee symbol by pressing **“ALT+4”**. This procedure is same for all other DEs. All you have to do is find where keyboard layout is and change the layout to **English (India, rupee sign)**. + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/type-indian-rupee-sign-%e2%82%b9-linux/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-system-settings.png +[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/Region-language-in-Settings-ubuntu.png +[4]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-input-source-in-Ubuntu.png +[5]: https://www.ostechnix.com/wp-content/uploads/2017/08/English-India-with-rupee-option.png +[6]: https://www.ostechnix.com/wp-content/uploads/2017/08/Choose-English-India-with-rupee-option-from-language-bar.png +[7]: https://www.ostechnix.com/wp-content/uploads/2017/08/Choose-English-India-with-rupee-option-using-superspace-keys.png +[8]: https://www.ostechnix.com/wp-content/uploads/2017/08/Keyboard-Preferences_001.png +[9]: https://www.ostechnix.com/wp-content/uploads/2017/08/Choose-a-Layout_002.png +[10]: https://www.ostechnix.com/wp-content/uploads/2017/08/Keyboard-Preferences_003-1.png +[11]: https://www.ostechnix.com/wp-content/uploads/2017/08/Keyboard-Layout-Options_004.png +[12]: https://www.ostechnix.com/wp-content/uploads/2017/08/Keyboard-%E2%80%94-System-Settings_001.png +[13]: https://www.ostechnix.com/wp-content/uploads/2017/08/Add-Layout-%E2%80%94-System-Settings_002.png +[14]: https://www.ostechnix.com/wp-content/uploads/2017/08/Keyboard-layout-settings.png From 0fcb65dc6e0e11b617aee1b449dffc1c7622e0fd Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 20:47:18 +0800 Subject: [PATCH 474/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020180116=20Comman?= =?UTF-8?q?d=20Line=20Heroes:=20Season=201:=20OS=20Wars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md --- ... Command Line Heroes- Season 1- OS Wars.md | 317 ++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md new file mode 100644 index 0000000000..6d67c80971 --- /dev/null +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -0,0 +1,317 @@ +[#]: collector: (lujun9972) +[#]: translator: (lujun9972) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command Line Heroes: Season 1: OS Wars) +[#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) +[#]: author: (redhat https://www.redhat.com) + +Command Line Heroes: Season 1: OS Wars +====== +Saron Yitbarek: + +Some stories are so epic, with such high stakes , that in my head, it's like that crawling text at the start of a Star Wars movie. You know, like- + +Voice Actor: + +Episode One, The OS Wars. + +Saron Yitbarek: + +Yeah, like that. + +Voice Actor: + +[00:00:30] + +It is a period of mounting tensions. The empires of Bill Gates and Steve Jobs careen toward an inevitable battle over proprietary software. Gates has formed a powerful alliance with IBM, while Jobs refuses to license his hardware or operating system. Their battle for dominance threatens to engulf the galaxy in an OS war. Meanwhile, in distant lands, and unbeknownst to the emperors, open source rebels have begun to gather. + +Saron Yitbarek: + +[00:01:00] + +Okay. Maybe that's a bit dramatic, but when we're talking about the OS wars of the 1980s, '90s, and 2000s, it's hard to overstate things. There really was an epic battle for dominance. Steve Jobs and Bill Gates really did hold the fate of billions in their hands. Control the operating system, and you control how the vast majority of people use computers, how we communicate with each other, how we source information. I could go on, but you know all this. Control the OS, and you would be an emperor. + +[00:01:30] + +[00:02:00] + +I'm Saron Yitbarek [00:01:24], and you're listening to Command Line Heroes, an original podcast from Red Hat. What is a Command Line Hero, you ask? Well, if you would rather make something than just use it, if you believe developers have the power to build a better future, if you want a world where we all get a say in how our technologies shape our lives, then you, my friend, are a command line hero. In this series, we bring you stories from the developers among us who are transforming tech from the command line up. And who am I to be guiding you on this trek? Who is Saron Yitbarek? Well, actually I'm guessing I'm a lot like you. I'm a developer for starters, and everything I do depends on open source software. It's my world. The stories we tell on this podcast are a way for me to get above the daily grind of my work, and see that big picture. I hope it does the same thing for you , too. + +[00:02:30] + +[00:03:00] + +What I wanted to know right off the bat was, where did open source technology even come from? I mean, I know a fair bit about Linus Torvalds and the glories of L inux ® , as I'm sure you do , too, but really, there was life before open source, right? And if I want to truly appreciate the latest and greatest of things like DevOps and containers, and on and on, well, I feel like I owe it to all those earlier developers to know where this stuff came from. So, let's take a short break from worrying about memory leaks and buffer overflows. Our journey begins with the OS wars, the epic battle for control of the desktop. It was like nothing the world had ever seen, and I'll tell you why. First, in the age of computing, you've got exponentially scaling advantages for the big fish ; and second, there's never been such a battle for control on ground that's constantly shifting. Bill Gates and Steve Jobs? They don't know it yet, but by the time this story is halfway done, everything they're fighting for is going to change, evolve, and even ascend into the cloud. + +[00:03:30] + +[00:04:00] + +Okay, it's the fall of 1983. I was negative six years old. Ronald Reagan was president, and the U . S . and the Soviet Union are threatening to drag the planet into nuclear war. Over at the Civic Center in Honolulu, it's the annual Apple sales conference. An exclusive bunch of Apple employees are waiting for Steve Jobs to get onstage. He's this super bright-eyed 28-year-old, and he's looking pretty confident. In a very serious voice, Jobs speaks into the mic and says that he's invited three industry experts to have a panel discussion on software. But the next thing that happens is not what you'd expect. Super cheesy '80s music fills the room. A bunch of multi-colored tube lights light up the stage, and then an announcer voice says- + +Voice Actor: + +And now, ladies and gentlemen, the Macintosh software dating game. + +Saron Yitbarek: + +[00:04:30] + +[00:05:00] + +Jobs has this big grin on his face as he reveals that the three CEOs on stage have to take turns wooing him. It's essentially an '80s version of The Bachelor, but for tech love. Two of the software bigwigs say their bit, and then it's over to contestant number three. Is that? Yup. A fresh - faced Bill Gates with large square glasses that cover half his face. He proclaims that during 1984, half of Microsoft's revenue is going to come from Macintosh software. The audience loves it, and gives him a big round of applause. What they don't know is that one month after this event, Bill Gates will announce his plans to release Windows 1.0. You'd never guess Jobs is flirting with someone who'd end up as Apple's biggest rival. But Microsoft and Apple are about to live through the worst marriage in tech history. They're going to betray each other, they're going to try and destroy each other, and they're going to be deeply, painfully bound to each other. + +James Allworth: + +[00:05:30] + +I guess philosophically, one was more idealistic and focused on the user experience above all else, and was an integrated organization, whereas Microsoft much more pragmatic, a modular focus- + +Saron Yitbarek: + +That's James Allworth. He's a prolific tech writer who worked inside the corporate team of Apple Retail. Notice that definition of Apple he gives. An integrated organization. That sense of a company beholden only to itself. A company that doesn't want to rely on others. That's key. + +James Allworth: + +[00:06:00] + +Apple was the integrated player, and it wanted to focus on a delightful user experience, and that meant that it wanted to control the entire stack and everything that was delivered, from the hardware to the operating system, to even some of the applications that ran on top of the operating system. That always served it well in periods where new innovations, important innovations, were coming to market where you needed to be across both hardware and software, and where being able to change the hardware based on what you wanted to do and what t was new in software was an advantage. For example- + +[00:06:30] + +Saron Yitbarek: + +[00:07:00] + +A lot of people loved that integration, and became die hard Apple fans. Plenty of others stuck with Microsoft. Back to that sales conference in Honolulu. At that very same event, Jobs gave his audience a sneak peek at the Superbowl ad he was about to release. You might have seen it for yourself. Think George Orwell's 1984. In this cold and gray world, mindless automatons are shuffling along under a dictator's projected gaze. They represent IBM users. Then, beautiful, athletic Anya Major, representing Apple, comes running through the hall in full color. She hurls her sledgehammer at Big Brother's screen, smashing it to bits. Big Brother's spell is broken, and a booming voice tells us that Apple is about to introduce the Macintosh. + +Voice Actor: + +And you'll see why 1984 will not be like 1984. + +Saron Yitbarek: + +[00:07:30] + +And yeah, looking back at that commercial, the idea that Apple was a freedom fighter working to set the masses free is a bit much. But the thing hit a nerve. Ken Segal worked at the advertising firm that made the commercial for Apple. He was Steve Jobs' advertising guy for more than a decade in the early days. + +Ken Segal: + +[00:08:00] + +Well, the 1984 commercial came with a lot of risk. In fact, it was so risky that Apple didn't want to run it when they saw it. You've probably heard stories that Steve liked it, but the Apple board did not like it. In fact, they were so outraged that so much money had been spent on such a thing that they wanted to fire the ad agency. Steve was the one sticking up for the agency. + +Saron Yitbarek: + +Jobs, as usual, knew a good mythology when he saw one. + +Ken Segal: + +That commercial struck such a chord within the company, within the industry, that it became this thing for Apple. Whether or not people were buying computers that day, it had a sort of an aura that stayed around for years and years and years, and helped define the character of the company. We're the rebels. We're the guys with the sledgehammer. + +[00:08:30] + +Saron Yitbarek: + +So in their battle for the hearts and minds of literally billions of potential consumers, the emperors of Apple and Microsoft were learning to frame themselves as redeemers. As singular heroes. As lifestyle choices. But Bill Gates knew something that Apple had trouble understanding. This idea that in a wired world, nobody, not even an emperor, can really go it alone. + +[00:09:00] + +[00:09:30] + +June 25th, 1985. Gates sends a memo to Apple's then CEO John Scully. This was during the wilderness years. Jobs had just been excommunicated, and wouldn't return to Apple until 1996. Maybe it was because Jobs was out that Gates felt confident enough to write what he wrote. In the memo, he encourages Apple to license their OS to clone makers. I want to read a bit from the end of the memo, just to give you a sense of how perceptive it was. Gates writes, "It is now impossible for Apple to create a standard out of their innovative technology without support from other personal computer manufacturers. Apple must open the Macintosh architecture to have the independent support required to gain momentum and establish a standard." In other words, no more operating in a silo, you guys. You've got to be willing to partner with others. You have to work with developers. + +[00:10:00] + +[00:10:30] + +You see this philosophy years later, when Microsoft CEO Steve Ballmer gets up on stage to give a keynote and he starts shouting, "Developers, developers, developers, developers, developers, developers. Developers, developers, developers, developers, developers, developers, developers, developers." You get the idea. Microsoft likes developers. Now, they're not about to share source code with them, but they do want to build this whole ecosystem of partners. And when Bill Gates suggests that Apple do the same, as you might have guessed, the idea is tossed out the window. Apple had drawn a line in the sand, and five months after they trashed Gates' memo, Microsoft released Windows 1.0. The war was on. + +Developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers. + +[00:11:00] + +You're listening to Command Line Heroes, an original podcast from Red Hat. In this inaugural episode, we go back in time to relive the epic story of the OS wars, and we're going to find out, how did a war between tech giants clear the way for the open source world we all live in today? + +[00:11:30] + +Okay, a little backstory. Forgive me if you've heard this one, but it's a classic. It's 1979, and Steve Jobs drives up to the Xerox Park research center in Palo Alto. The engineers there have been developing this whole fleet of elements for what they call a graphical user interface. Maybe you've heard of it. They've got menus, they've got scroll bars, they've got buttons and folders and overlapping windows. It was a beautiful new vision of what a computer interface could look like. And nobody had any of this stuff. Author and journalist Steven Levy talks about its potential. + +Steven Levy: + +[00:12:00] + +There was a lot of excitement about this new interface that was going to be much friendlier than what we had before, which used what was called the command line, where there was really no interaction between you and the computer in the way you'd interact with something in real life. The mouse and the graphics on the computer gave you a way to do that, to point to something just like you'd point to something in real life. It made it a lot easier. You didn't have to memorize all these codes. + +Saron Yitbarek: + +[00:12:30] + +[00:13:00] + +Except, the Xerox executives did not get that they were sitting on top of a platinum mine. The engineers were more aware than the execs. Typical. So those engineers were, yeah, a little stressed out that they were instructed to show Jobs how everything worked. But the executives were calling the shots. Jobs felt, quote, "The product genius that brought them to that monopolistic position gets rotted out by people running these companies that have no conception of a good product versus a bad product." That's sort of harsh, but hey, Jobs walked out of that meeting with a truckload of ideas that Xerox executives had missed. Pretty much everything he needed to revolutionize the desktop computing experience. Apple releases the Lisa in 1983, and then the Mac in 1984. These devices are made by the ideas swiped from Xerox. + +[00:13:30] + +What's interesting to me is Jobs' reaction to the claim that he stole the GUI. He's pretty philosophical about it. He quotes Picasso, saying, "Good artists copy, great artists steal." He tells one reporter, "We have always been shameless about stealing great ideas." Great artists steal. Okay. I mean, we're not talking about stealing in a hard sense. Nobody's obtaining proprietary source code and blatantly incorporating it into their operating system. This is softer, more like idea borrowing. And that's much more difficult to control, as Jobs himself was about to learn. Legendary software wizard, and true command line hero, Andy Hertzfeld, was an original member of the Macintosh development team. + +[00:14:00] + +Andy Hertzfeld: + +[00:14:30] + +[00:15:00] + +Yeah, Microsoft was our first software partner with the Macintosh. At the time, we didn't really consider them a competitor. They were the very first company outside of Apple that we gave Macintosh prototypes to. I talked with the technical lead at Microsoft usually once a week. They were the first outside party trying out the software that we wrote. They gave us very important feedback, and in general I would say the relationship was pretty good. But I also noticed in my conversations with the technical lead, he started asking questions that he didn't really need to know about how the system was implemented, and I got the idea that they were trying to copy the Macintosh. I t old Steve Jobs about it pretty early on, but it really came to a head in the fall of 1983. We discovered that they actually, without telling us ahead of time, they announced Windows at the COMDEX in November 1983 and Steve Jobs hit the roof. He really considered that a betrayal. + +Saron Yitbarek: + +[00:15:30] + +[00:16:00] + +As newer versions of Windows were released, it became pretty clear that Microsoft had lifted from Apple all the ideas that Apple had lifted from Xerox. Jobs was apoplectic. His Picasso line about how great artists steal. Yeah. That goes out the window. Though maybe Gates was using it now. Reportedly, when Jobs screamed at Gates that he'd stolen from them, Gates responded, "Well Steve, I think it's more like we both had this rich neighbor named Xerox, and I broke into his house to steal the TV set, and found out that you'd already stolen it." Apple ends up suing Microsoft for stealing the look and feel of their GUI. The case goes on for years, but in 1993, a judge from the 9th Circuit Court of Appeals finally sides with Microsoft. Judge Vaughn Walker declares that look and feel are not covered by copyright. This is super important. That decision prevented Apple from creating a monopoly with the interface that would dominate desktop computing. Soon enough, Apple's brief lead had vanished. Here's Steven Levy's take. + +Steven Levy: + +[00:16:30] + +[00:17:00] + +They lost the lead not because of intellectual property theft on Microsoft's part, but because they were unable to consolidate their advantage in having a better operating system during the 1980s. They overcharged for their computers, quite frankly. So Microsoft had been developing Windows, starting with the mid-1980s, but it wasn't until Windows 3 in 1990, I believe, where they really came across with a version that was ready for prime time. Ready for masses of people to use. At that point is where Microsoft was able to migrate huge numbers of people, hundreds of millions, over to the graphical interface in a way that Apple had not been able to do. Even though they had a really good operating system, they used it since 1984. + +Saron Yitbarek: + +[00:17:30] + +[00:18:00] + +Microsoft now dominated the OS battlefield. They held 90% of the market, and standardized their OS across a whole variety of PCs. The future of the OS looked like it'd be controlled by Microsoft. And then? Well, at the 1997 Macworld Expo in Boston, you have an almost bankrupt Apple. A more humble Steve Jobs gets on stage, and starts talking about the importance of partnerships, and one in particular, he says, has become very, very meaningful. Their new partnership with Microsoft. Steve Jobs is calling for a détente, a ceasefire. Microsoft could have their enormous market share. If we didn't know better, we might think we were entering a period of peace in the kingdom. But when stakes are this high, it's never that simple. Just as Apple and Microsoft were finally retreating to their corners, pretty bruised from decades of fighting, along came a 21-year-old Finnish computer science student who, almost by accident, changed absolutely everything. + +I'm Saron Yitbarek, and this is Command Line Heroes. + +[00:18:30] + +While certain tech giants were busy bashing each other over proprietary software, there were new champions of free and open source software popping up like mushrooms. One of these champions was Richard Stallman. You're probably familiar with his work. He wanted free software and a free society. That's free as in free speech, not free as in free beer. Back in the '80s, Stallman saw that there was no viable alternative to pricey, proprietary OSs, like UNIX . So, he decided to make his own. Stallman's Free Software Foundation developed GNU, which stood for GNU's not UNIX , of course. It'd be an OS like UNIX, but free of all UNIX code, and free for users to share. + +[00:19:00] + +[00:19:30] + +Just to give you a sense of how important that idea of free software was in the 1980s, the companies that owned the UNIX code at different points, AT&T Bell Laboratories and then UNIX System Laboratories, they threatened lawsuits on anyone making their own OS after looking at UNIX source code. These guys were next - level proprietary. All those programmers were, in the words of the two companies, "mentally contaminated," because they'd seen UNIX code. In a famous court case between UNIX System Laboratories and Berkeley Software Design, it was argued that any functionally similar system, even though it didn't use the UNIX code itself, was a bre a ch of copyright. Paul Jones was a developer at that time. He's now the director of the digital library ibiblio.org. + +Paul Jones: + +[00:20:00] + +Anyone who has seen any of the code is mentally contaminated was their argument. That would have made almost anyone who had worked on a computer operating system that involved UNIX , in any computer science department, was mentally contaminated. So in one year at USENIX, we all got little white bar pin s with red letters that say mentally contaminated, and we all wear those around to our own great pleasure, to show that we were sticking it to Bell because we were mentally contaminated. + +[00:20:30] + +Saron Yitbarek: + +[00:21:00] + +The whole world was getting mentally contaminated. Staying pure, keeping things nice and proprietary, that old philosophy was getting less and less realistic. It was into this contaminated reality that one of history's biggest command line heroes was born, a boy in Finland named Linus Torvalds. If this is Star Wars, then Linus Torvalds is our Luke Skywalker. He was a mild-mannered grad student at the University of Helsinki. Talented, but lacking in grand visions. The classic reluctant hero. And, like any young hero, he was also frustrated. He wanted to incorporate the 386 processor into his new PC's functions. He wasn't impressed by the MS-DOS running on his IBM clone, and he couldn't afford the $5,000 price tag on the UNIX software that would have given him some programming freedom. The solution, which Torvalds crafted on MINIX in the spring of 1991, was an OS kernel called Linux. The kernel of an OS of his very own. + +[00:21:30] + +Steven Vaughan-Nichols: + +Linus Torvalds really just wanted to have something to play with. + +Saron Yitbarek: + +Steven Vaughan-Nichols is a contributing editor at ZDNet.com, and he's been writing about the business of technology since there was a business of technology. + +Steven Vaughan-Nichols: + +[00:22:00] + +[00:22:30] + +There were a couple of operating systems like it at the time. The main one that he was concerned about was called MINIX. That was an operating system that was meant for students to learn how to build operating systems. Linus looked at that, and thought that it was interesting, but he wanted to build his own. So it really started as a do-it-yourself project at Helsinki. That's how it all started, is just basically a big kid playing around and learning how to do things. But what was different in his case is that he was both bright enough and persistent enough, and also friendly enough to get all these other people working on it, and then he started seeing the project through. 27 years later, it is much, much bigger than he ever dreamed it would be. + +Saron Yitbarek: + +[00:23:00] + +By the fall of 1991, Torvalds releases 10,000 lines of code, and people around the world start offering comments, then tweaks, additions, edits. That might seem totally normal to you as a developer today, but remember, at that time, open collaboration like that was a moral affront to the whole proprietary system that Microsoft, Apple, and IBM had done so well by. Then that openness gets enshrined. Torvalds places Linux under the GNU general public license. The license that had kept Stallman's GNU system free was now going to keep Linux free , too. The importance of that move to incorporate GPL, basically preserving the freedom and openness of the software forever, cannot be overstated. Vaughan-Nichols explains. + +[00:23:30] + +Steven Vaughan-Nichols: + +In fact, by the license that it's under, which is called GPL version 2, you have to share the code if you're going to try to sell it or present it to the world, so that if you make an improvement, it's not enough just to give someone the improvement. You actually have to share with them the nuts and bolts of all those changes. Then they are adapted into Linux if they're good enough. + +Saron Yitbarek: + +[00:24:00] + +That public approach proved massively attractive. Eric Raymond, one of the early evangelists of the movement wrote in his famous essay that, "Corporations like Microsoft and Apple have been trying to build software cathedrals, while Linux and its kind were offering a great babbling bazaar of different agendas and approaches. The bazaar was a lot more fun than the cathedral." + +Stormy Peters: + +I think at the time, what attracted people is that they were going to be in control of their own world. + +Saron Yitbarek: + +Stormy Peters is an industry analyst, and an advocate for free and open source software. + +[00:24:30] + +Stormy Peters: + +[00:25:00] + +When open source software first came out, the OS was all proprietary. You couldn't even add a printer without going through proprietary software. You couldn't add a headset. You couldn't develop a small hardware device of your own, and make it work with your laptop. You couldn't even put in a DVD and copy it, because you couldn't change the software. Even if you owned the DVD, you couldn't copy it. You had no control over this hardware/software system that you'd bought. You couldn't create anything new and bigger and better out of it. That's why an open source operating system was so important at the beginning. We needed an open source collaborative environment where we could build bigger and better things. + +Saron Yitbarek: + +[00:25:30] + +Mind you, Linux isn't a purely egalitarian utopia. Linus Torvalds doesn't approve everything that goes into the kernel, but he does preside over its changes. He's installed a dozen or so people below him to manage different parts of the kernel. They, in turn, trust people under themselves, and so on, in a pyramid of trust. Changes might come from anywhere, but they're all judged and curated. + +[00:26:00] + +It is amazing, though, to think how humble, and kind of random, Linus' DIY project was to begin with. He didn't have a clue he was the Luke Skywalker figure in all this. He was just 21, and had been programming half his life. But this was the first time the silo opened up, and people started giving him feedback. Dozens, then hundreds, and thousands of contributors. With crowdsourcing like that, it doesn't take long before Linux starts growing. Really growing. It even finally gets noticed by Microsoft. Their CEO, Steve Ballmer, called Linux, and I quote, "A cancer that attaches itself in an intellectual property sense to everything it touches." Steven Levy describes where Ballmer was coming from. + +Steven Levy: + +[00:26:30] + +Once Microsoft really solidified its monopoly, and indeed it was judged in federal court as a monopoly, anything that could be a threat to that, they reacted very strongly to. So of course, the idea that free software would be emerging, when they were charging for software, they saw as a cancer. They tried to come up with an intellectual property theory about why this was going to be bad for consumers. + +Saron Yitbarek: + +[00:27:00] + +Linux was spreading, and Microsoft was worried. By 2006, Linux would become the second most widely used operating system after Windows, with about 5,000 developers working on it worldwide. Five thousand. Remember that memo that Bill Gates sent to Apple, the one where he's lecturing them about the importance of partnering with other people? Turns out, open source would take that idea of partnerships to a whole new level, in a way Bill Gates would have never foreseen. + +[00:27:30] + +[00:28:00] + +We've been talking about these huge battles for the OS, but so far, the unsung heroes, the developers, haven't fully made it onto the battlefield. That changes next time, on Command Line Heroes. In episode two, part two of the OS wars, it's the rise of Linux. Businesses wake up, and realize the importance of developers. These open source rebels grow stronger, and the battlefield shifts from the desktop to the server room. There's corporate espionage, new heroes, and the unlikeliest change of heart in tech history. It all comes to a head in the concluding half of the OS wars. + +[00:28:30] + +To get new episodes of Command Line Heroes delivered automatically for free, make sure you hit subscribe on Apple podcasts, Spotify, Google Play, or however you get your podcasts. Over the rest of the season, we're visiting the latest battlefields, the up-for-grab territories where the next generation of Command Line Heroes are making their mark. For more info, check us out at redhat.com/commandlineheroes. I'm Saron Yitbarek. Until next time, keep on coding. + + +-------------------------------------------------------------------------------- + +via: https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1 + +作者:[redhat][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.redhat.com +[b]: https://github.com/lujun9972 From a1ef0b1176e32731f18f45b6e8a4a183edb9f456 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 21:18:16 +0800 Subject: [PATCH 475/951] PUB @qfzy1233 https://linux.cn/article-11231-1.html --- .../tech => published}/20190611 What is a Linux user.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190611 What is a Linux user.md (97%) diff --git a/translated/tech/20190611 What is a Linux user.md b/published/20190611 What is a Linux user.md similarity index 97% rename from translated/tech/20190611 What is a Linux user.md rename to published/20190611 What is a Linux user.md index 77f6373f7b..e3cd069b2b 100644 --- a/translated/tech/20190611 What is a Linux user.md +++ b/published/20190611 What is a Linux user.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "qfzy1233 " [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-11231-1.html" [#]: subject: "What is a Linux user?" [#]: via: "https://opensource.com/article/19/6/what-linux-user" [#]: author: "Anderson Silva https://opensource.com/users/ansilva/users/petercheer/users/ansilva/users/greg-p/users/ansilva/users/ansilva/users/bcotton/users/ansilva/users/seth/users/ansilva/users/don-watkins/users/ansilva/users/seth" @@ -11,7 +11,8 @@ ====== > “Linux 用户”这一定义已经拓展到了更大的范围,同时也发生了巨大的改变。 -![][1] + +![](https://img.linux.net.cn/data/attachment/album/201908/15/211706trkbzp8juhbzifia.jpg) *编者按: 本文更新于 2019 年 6 月 11 日下午 1:15:19,以更准确地反映作者对 Linux 社区中开放和包容的社区性的看法。* From 64d619f0b50180bb142bae47454e203adfa327c0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Aug 2019 21:41:12 +0800 Subject: [PATCH 476/951] APL --- ...811 How to measure the health of an open source community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190811 How to measure the health of an open source community.md b/sources/tech/20190811 How to measure the health of an open source community.md index 2c9b90ada3..443a269535 100644 --- a/sources/tech/20190811 How to measure the health of an open source community.md +++ b/sources/tech/20190811 How to measure the health of an open source community.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3acbac15cebc12828c270f51fb6a43b2c1e229e9 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 15 Aug 2019 22:54:14 +0800 Subject: [PATCH 477/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2015=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E5=9B=9B=2022:54:14=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Command Line Heroes- Season 1- OS Wars.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index 6d67c80971..5111e9ea31 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -11,49 +11,50 @@ Command Line Heroes: Season 1: OS Wars ====== Saron Yitbarek: -Some stories are so epic, with such high stakes , that in my head, it's like that crawling text at the start of a Star Wars movie. You know, like- +有些故事如史诗般,惊险万分, 在我脑海中似乎出现了星球大战电影开头的爬行文字. 你知道的, 就像- Voice Actor: -Episode One, The OS Wars. +第一集, 操作系统大战. Saron Yitbarek: -Yeah, like that. +是的, 就像那样子. Voice Actor: [00:00:30] -It is a period of mounting tensions. The empires of Bill Gates and Steve Jobs careen toward an inevitable battle over proprietary software. Gates has formed a powerful alliance with IBM, while Jobs refuses to license his hardware or operating system. Their battle for dominance threatens to engulf the galaxy in an OS war. Meanwhile, in distant lands, and unbeknownst to the emperors, open source rebels have begun to gather. +当前形势比较紧张. Bill Gates 与 Steve Jobs 的帝国发起了一场无可避免的专有软件之战. Gates 与 IBM 结成了强大的联盟, 而 Jobs 拒绝对它的硬件和操作系统开放授权. 他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时, 在偏远之地, 帝王所不知道的是, 开源的反叛者们开始集聚. Saron Yitbarek: [00:01:00] -Okay. Maybe that's a bit dramatic, but when we're talking about the OS wars of the 1980s, '90s, and 2000s, it's hard to overstate things. There really was an epic battle for dominance. Steve Jobs and Bill Gates really did hold the fate of billions in their hands. Control the operating system, and you control how the vast majority of people use computers, how we communicate with each other, how we source information. I could go on, but you know all this. Control the OS, and you would be an emperor. +好吧. 这也许有点戏剧性, 但当我们谈论80年代,90年代和00年代的操作系统之争时, 这也不算言过其实. 确实曾经发生过一场史诗级的通知之战. Steve Jobs 和 Bill Gates 确实掌握着数十亿美元的命运. 掌控了操作系统, 你就掌握了绝大多数人使用计算机的方式, 我们互相通讯的方式, 我们获取信息的方式. 我可以一直罗列下去, 不过你知道我的意思. 掌握了操作系统, 你就是帝王. [00:01:30] +我是 Saron Yitbarek, 你现在收听的是代码英雄, 一款红帽公司原创的博客节目. 你问,什么是代码英雄? 嗯, 如果你创造而不仅仅是使用, 如果你相信开发者拥有构建美好未来的能力, 如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界, 那么你, 我的朋友, 就是代码英雄. 在本系列节目中, 我们将为你带来那些从命令行转型的程序员故事. 那么我是谁,凭什么指导你踏上这段艰苦的旅程? Saron Yitbarek是哪根葱? 嗯, 事实上我觉得我跟你差不多. 我是一名面向初学者的开发人员, 我做的任何事都依赖于开源软件. 这是我的世界. 通过在博客中讲故事,我可以跳出无聊的日常工作,看清大局. 希望它对你也一样有用. + [00:02:00] -I'm Saron Yitbarek [00:01:24], and you're listening to Command Line Heroes, an original podcast from Red Hat. What is a Command Line Hero, you ask? Well, if you would rather make something than just use it, if you believe developers have the power to build a better future, if you want a world where we all get a say in how our technologies shape our lives, then you, my friend, are a command line hero. In this series, we bring you stories from the developers among us who are transforming tech from the command line up. And who am I to be guiding you on this trek? Who is Saron Yitbarek? Well, actually I'm guessing I'm a lot like you. I'm a developer for starters, and everything I do depends on open source software. It's my world. The stories we tell on this podcast are a way for me to get above the daily grind of my work, and see that big picture. I hope it does the same thing for you , too. [00:02:30] [00:03:00] -What I wanted to know right off the bat was, where did open source technology even come from? I mean, I know a fair bit about Linus Torvalds and the glories of L inux ® , as I'm sure you do , too, but really, there was life before open source, right? And if I want to truly appreciate the latest and greatest of things like DevOps and containers, and on and on, well, I feel like I owe it to all those earlier developers to know where this stuff came from. So, let's take a short break from worrying about memory leaks and buffer overflows. Our journey begins with the OS wars, the epic battle for control of the desktop. It was like nothing the world had ever seen, and I'll tell you why. First, in the age of computing, you've got exponentially scaling advantages for the big fish ; and second, there's never been such a battle for control on ground that's constantly shifting. Bill Gates and Steve Jobs? They don't know it yet, but by the time this story is halfway done, everything they're fighting for is going to change, evolve, and even ascend into the cloud. +我迫不及待地想直到,开源技术从何而来? 我的意思时, 我对 Linus Torvalds 和 Linux ® 的荣耀有一些了解, 我相信你也一样, 但是说真的, 开源并不是一开始就有的对吗? 如果我像发至内心的感激最新最棒的技术,比如 DevOps 和 containers 之类的, 我感觉我对那些早期的开发者有所亏欠,我有必要了解这些东西来自何处. 所以, 让我们暂时先不用担心内存泄露和缓冲溢出. 我们的旅程从操作系统之战开始, 这是一场波澜壮阔的桌面控制之战. 这场战争亘古未有,因为. 首先, 在计算机时代, 大公司拥有指数级的规模优势; 其次, 从未有过这么一场控制争夺战是如此变化多端. Bill Gates 和 Steve Jobs? 他们也不知道结果会如何, 但是到目前为止,这个故事进行到一半的时候, 他们所争夺的所有东西都将发声改变, 进化,最终上升到云端. [00:03:30] [00:04:00] -Okay, it's the fall of 1983. I was negative six years old. Ronald Reagan was president, and the U . S . and the Soviet Union are threatening to drag the planet into nuclear war. Over at the Civic Center in Honolulu, it's the annual Apple sales conference. An exclusive bunch of Apple employees are waiting for Steve Jobs to get onstage. He's this super bright-eyed 28-year-old, and he's looking pretty confident. In a very serious voice, Jobs speaks into the mic and says that he's invited three industry experts to have a panel discussion on software. But the next thing that happens is not what you'd expect. Super cheesy '80s music fills the room. A bunch of multi-colored tube lights light up the stage, and then an announcer voice says- +好的, 让我们回到1983年的秋季. 还有六年我才出生. 那时候的总统还是 Ronald Reagan, 美国和苏联扬言要把星球拖入核战争中. 在 Honolulu 的公民中心正在举办一年一度的苹果公司销售会议. 一群苹果公司的员工正在等待 Steve Jobs 上台. 他 28 岁,热情洋溢, 看起来非常自信. Jobs 很严肃地对着麦克风说他邀请了三个行业专家来软件进行了一次小组讨论. 然而随后发生的事情你肯定想不到. 超级俗气的80年代音乐响彻整个房间. 一堆多彩灯管照亮了舞台, 然后一个播音员的声音响起- Voice Actor: -And now, ladies and gentlemen, the Macintosh software dating game. +女士们,先生们, 现在向你们展示的是 Macintosh 软件约会游戏. Saron Yitbarek: From d4fe6de5bc21ad7b37cea29a20830259761e970b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 00:20:21 +0800 Subject: [PATCH 478/951] TSL --- ... the health of an open source community.md | 202 ------------------ ... the health of an open source community.md | 164 ++++++++++++++ 2 files changed, 164 insertions(+), 202 deletions(-) delete mode 100644 sources/tech/20190811 How to measure the health of an open source community.md create mode 100644 translated/tech/20190811 How to measure the health of an open source community.md diff --git a/sources/tech/20190811 How to measure the health of an open source community.md b/sources/tech/20190811 How to measure the health of an open source community.md deleted file mode 100644 index 443a269535..0000000000 --- a/sources/tech/20190811 How to measure the health of an open source community.md +++ /dev/null @@ -1,202 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to measure the health of an open source community) -[#]: via: (https://opensource.com/article/19/8/measure-project) -[#]: author: (Jon Lawrence https://opensource.com/users/the3rdlaw) - -How to measure the health of an open source community -====== -It's complicated. -![metrics and data shown on a computer screen][1] - -As a person who normally manages software development teams, over the years I’ve come to care about metrics quite a bit. Time after time, I’ve found myself leading teams using one project platform or another (Jira, GitLab, and Rally, for example) generating an awful lot of measurable data. From there, I’ve promptly invested significant amounts of time to pull useful metrics out of the platform-of-record and into a format where we could make sense of them, and then use the metrics to make better choices about many aspects of development. - -Earlier this year, I had the good fortune of coming across a project at the [Linux Foundation][2] called [Community Health Analytics for Open Source Software][3], or CHAOSS. This project focuses on collecting and enriching metrics from a wide range of sources so that stakeholders in open source communities can measure the health of their projects. - -### What is CHAOSS? - -As I grew familiar with the project’s underlying metrics and objectives, one question kept turning over in my head. What is a "healthy" open source project, and by whose definition? - -What’s considered healthy by someone in a particular role may not be viewed that way by someone in another role. It seemed there was an opportunity to back out from the granular data that CHAOSS collects and do a market segmentation exercise, focusing on what might be the most meaningful contextual questions for a given role, and what metrics CHAOSS collects that might help answer those questions. - -This exercise was made possible by the fact that the CHAOSS project creates and maintains a suite of open source applications and metric definitions, including: - - * A number of server-based applications for gathering, aggregating, and enriching metrics (such as Augur and GrimoireLab). - * The open source versions of ElasticSearch, Kibana, and Logstash (ELK). - * Identity services, data analysis services, and a wide range of integration libraries. - - - -In one of my past programs, where half a dozen teams were working on projects of varying complexity, we found a neat tool which allowed us to create any kind of metric we wanted from a simple (or complex) JQL statement, and then develop calculations against and between those metrics. Before we knew it, we were pulling over 400 metrics from Jira alone, and more from manual sources. - -By the end of the project, we decided that out of the 400-ish metrics, most of them didn’t really matter when it came to making decisions _in our roles_. At the end of the day, there were only three that really mattered to us: "Defect Removal Efficiency," "Points completed vs. Points committed," and "Work-in-Progress per Developer." Those three metrics mattered most because they were promises we made to ourselves, to our clients, and to our team members, and were, therefore, the most meaningful. - -Drawing from the lessons learned through that experience and the question of what is a healthy open source project?, I jumped into the CHAOSS community and started building a set of personas to offer a constructive approach to answering that question from a role-based lens. - -CHAOSS is an open source project and we try to operate using democratic consensus. So, I decided that instead of stakeholders, I’d use the word _constituent_, because it aligns better with the responsibility we have as open source contributors to create a more symbiotic value chain. - -While the exercise of creating this constituent model takes a particular goal-question-metric approach, there are many ways to segment. CHAOSS contributors have developed great models that segment by vectors, like project profiles (for example, individual, corporate, or coalition) and "Tolerance to Failure." Every model provides constructive influence when developing metric definitions for CHAOSS. - -Based on all of this, I set out to build a model of who might care about CHAOSS metrics, and what questions each constituent might care about most in each of CHAOSS’ four focus areas: - - * [Diversity and Inclusion][4] - * [Evolution][5] - * [Risk][6] - * [Value][7] - - - -Before we dive in, it’s important to note that the CHAOSS project expressly leaves contextual judgments to teams implementing the metrics. What’s "meaningful" and the answer to "What is healthy?" is expected to vary by team and by project. The CHAOSS software’s ready-made dashboards focus on objective metrics as much as possible. In this article, we focus on project founders, project maintainers, and contributors. - -### Project constituents - -While this is by no means an exhaustive list of questions these constituents might feel are important, these choices felt like a good place to start. Each of the Goal-Question-Metric segments below is directly tied to metrics that the CHAOSS project is collecting and aggregating. - -Now, on to Part 1 of the analysis! - -#### Project founders - -As a **project founder**, I care **most** about: - - * Is my project **useful to others?** Measured as a function of: - - * How many forks over time? -**Metric:** Repository forks. - - * How many contributors over time? -**Metric:** Contributor count. - - * Net quality of contributions. -**Metric:** Bugs filed over time. -**Metric:** Regressions over time. - - * Financial health of my project. -**Metric:** Donations/Revenue over time. -**Metric:** Expenses over time. - - * How **visible** is my project to others? - - * Does anyone know about my project? Do others think it’s neat? -**Metric:** Social media mentions, shares, likes, and subscriptions. - - * Does anyone with influence know about my project? -**Metric:** Social reach of contributors. - - * What are people saying about the project in public spaces? Is it positive or negative? -**Metric:** Sentiment (keyword or NLP) analysis across social media channels. - - * How **viable** is my project? - - * Do we have enough maintainers? Is the number rising or falling over time? -**Metric:** Number of maintainers. - - * Do we have enough contributors? Is the number rising or falling over time? -**Metric:** Number of contributors. - - * How is velocity changing over time? -**Metric:** Percent change of code over time. -**Metric:** Time between pull request, code review, and merge. - - * How [**diverse & inclusive**][4] is my project? - - * Do we have a valid, public, Code of Conduct (CoC)? -**Metric:** CoC repository file check. - - * Are events associated with my project actively inclusive? -**Metric:** Manual reporting on event ticketing policies and event inclusion activities. - - * Does our project do a good job of being accessible? -**Metric:** Validation of typed meeting minutes being posted. -**Metric:** Validation of closed captioning used during meetings. -**Metric:** Validation of color-blind-accessible materials in presentations and in project front-end designs. - - * How much [**value**][7] does my project represent? - - * How can I help organizations understand how much time and money using our project would save them (labor investment) -**Metric:** Repo count of issues, commits, pull requests, and the estimated labor rate. - - * How can I understand the amount of downstream value my project creates and how vital (or not) it is to the wider community to maintain my project? -**Metric:** Repo count of how many other projects rely on my project. - - * How much opportunity is there for those contributing to my project to use what they learn working on it to land good jobs and at what organizations (aka living wage)? -**Metric:** Count of organizations using or contributing to this library. -**Metric:** Averages of salaries for developers working with this kind of project. -**Metric:** Count of job postings with keywords that match this project. - - - - -### Project maintainers - -As a **Project Maintainer,** I care **most** about: - - * Am I an **efficient** maintainer? -**Metric:** Time PR’s wait before a code review. -**Metric:** Time between code review and subsequent PR’s. -**Metric:** How many of my code reviews are approvals? -**Metric:** How many of my code reviews are rejections/rework requests? -**Metric:** Sentiment analysis of code review comments. - - * How do I get **more people** to help me maintain this thing? -**Metric:** Count of social reach of project contributors. - - * Is our **code quality** getting better or worse over time? -**Metric:** Count how many regressions are being introduced over time. -**Metric:** Count how many bugs are being introduced over time. -**Metric:** Time between bug filing, pull request, review, merge, and release. - - - - -### Project developers and contributors - -As a **project developer or contributor**, I care most about: - - * What things of value can I gain from contributing to this project and how long might it take to realize that value? -**Metric:** Downstream value. -**Metric:** Time between commits, code reviews, and merges. - - * Are there good prospects for using what I learn by contributing to increase my job opportunities? -**Metric:** Living wage. - - * How popular is this project? -**Metric:** Counts of social media posts, shares, and favorites. - - * Do community influencers know about my project? -**Metric:** Social reach of founders, maintainers, and contributors. - - - - -By creating this list, we’ve just begun to put meat on the contextual bones of CHAOSS, and with the first release of metrics in the project this summer, I can’t wait to see what other great ideas the broader open source community may have to contribute and what else we can all learn (and measure!) from those contributions. - -### Other roles - -Next, you need to learn more about goal-question-metric sets for other roles (such as foundations, corporate open source program offices, business risk and legal teams, human resources, and others) as well as end users, who have a distinctly different set of things they care about when it comes to open source. - -If you’re an open source contributor or constituent, we invite you to [come check out the project][8] and get engaged in the community! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/measure-project - -作者:[Jon Lawrence][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/the3rdlaw -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) -[2]: https://www.linuxfoundation.org/ -[3]: https://chaoss.community/ -[4]: https://github.com/chaoss/wg-diversity-inclusion -[5]: https://github.com/chaoss/wg-evolution -[6]: https://github.com/chaoss/wg-risk -[7]: https://github.com/chaoss/wg-value -[8]: https://github.com/chaoss/ diff --git a/translated/tech/20190811 How to measure the health of an open source community.md b/translated/tech/20190811 How to measure the health of an open source community.md new file mode 100644 index 0000000000..ad315d0f91 --- /dev/null +++ b/translated/tech/20190811 How to measure the health of an open source community.md @@ -0,0 +1,164 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to measure the health of an open source community) +[#]: via: (https://opensource.com/article/19/8/measure-project) +[#]: author: (Jon Lawrence https://opensource.com/users/the3rdlaw) + +如何衡量一个开源社区的健康度 +====== + +> 这比较复杂。 + +![metrics and data shown on a computer screen][1] + +作为一个经常管理软件开发团队的人,多年来我一直关注度量指标。一次又一次,我发现自己领导团队使用一个又一个的项目平台(例如 Jira、GitLab 和 Rally)生成了大量可测量的数据。从那时起,我已经及时投入了大量时间从记录平台中提取有用的指标,并采用我们可以理解它们的格式,然后使用这些指标对开发的许多方面做出更好的选择。 + +今年早些时候,我有幸遇到了 [Linux 基金会][2]的一个名为[开源软件社区健康分析][3]Community Health Analytics for Open Source Software(CHAOSS)的项目。该项目侧重于从各种来源收集和丰富指标,以便开源社区的利益相关者可以衡量他们项目的健康状况。 + +### CHAOSS 介绍 + +随着我对该项目的基本指标和目标越来越熟悉,一个问题在我的脑海中不断翻滚。什么是“健康”的开源项目,由谁来定义? + +特定角色的人认为健康的东西可能另一个角色的人就不会这样认为。似乎有机会拿到 CHAOSS 收集的细粒度数据并进行市场细分实验,重点关注对特定角色可能最有意义的背景问题,以及 CHAOSS 收集哪些指标可能有助于回答这些问题。 + +使得这个实验具有可能性的是,CHAOSS 项目创建并维护了一套开源应用程序和度量标准定义,包括: + +* 许多基于服务器的应用程序,用于收集、聚合和丰富度量标准(例如 Augur 和 GrimoireLab)。 +* ElasticSearch、Kibana 和 Logstash(ELK)的开源版本。 +* 身份服务、数据分析服务和各种集成库。 + +在我过去的一个程序中,有六个团队从事于不同复杂程度的项目,我们找到了一个简洁的工具,它允许我们从简单(或复杂)的 JQL 语句中创建我们想要的任何类型的度量,然后针对这些指标开发计算。在我们知道它之前,我们仅从 Jira 中就提取了400多个指标,而且还有更多指标来自手动来源。 + +在项目结束时,我们认定这 400 个指标中,大多数指标在*以我们的角色*做出决策时并不重要。最终,只有三个对我们非常重要:“缺陷去除效率”、“已完成点数与已提交点数”,以及“每个开发人员的工作进度”。这三个指标最重要,因为它们是我们对自己、客户和团队成员所做出的承诺,因此是最有意义的。 + +带着这些通过经验得到的教训和对什么是健康的开源项目的问题,我跳进了 CHAOSS 社区,开始建立一套角色,以提供一种建设性的方法,从基于角色的角度回答这个问题。 + +CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此,我决定使用*组成分子*这个词而不是利益相关者,因为它更符合我们作为开源贡献者的责任,以创建更具共生性的价值链。 + +虽然创建此组成模型的过程采用了特定的目标-问题-度量方法,但有许多方法可以进行细分。CHAOSS 贡献者已经开发了很好的模型,可以按照矢量进行细分,例如项目属性(例如,个人、公司或联盟)和“容忍失败”。在为 CHAOSS 开发度量定义时,每个模型都会提供建设性的影响。 + +基于这一切,我开始构建一个可能关心 CHAOSS 指标的模型,以及每个组成分子在 CHAOSS 的四个重点领域中最关心的问题: + +* [多样性和包容性][4] +* [进化][5] +* [风险][6] +* [价值][7] + +在我们深入研究之前,重要的是要注意 CHAOSS 项目明确地给实施指标的团队留下了背景判断。什么是“有意义的”和“什么是健康的?”的答案预计会因团队和项目而异。CHAOSS 软件的现成仪表板尽可能地关注客观指标。在本文中,我们关注项目创始人、项目维护者和贡献者。 + +### 项目组成分子 + +虽然这绝不是这些组成分子可能认为重要的问题的详尽清单,但这些选择感觉是一个好的起点。以下每个目标-问题-度量标准部分与 CHAOSS 项目正在收集和汇总的指标直接相关。 + +现在,进入分析的第 1 部分! + +#### 项目创始人 + +作为**项目创始人**,我**最**关心: + +* 我的项目**对其他人有用吗?**作为以下函数测量: + * 随着时间推移有多少复刻? + * **指标:**存储库复刻数。 + * 随着时间的推移有多少贡献者? + * **指标:**贡献者数量。 + * 贡献净质量。 + * **指标:**随着时间的推移提交的错误。 + * **指标:**随时间的回归。 + * 项目的财务状况。 + * **指标:**随着时间的推移的捐赠/收入。 + * **指标:**随着时间的推移的费用。 +* 我的项目对其它人的**可见**程度? + * 有谁知道我的项目?别人认为它很整洁吗? + * **指标:**社交媒体上的提及、分享、喜欢和订阅的数量。 + * 有影响力的人是否了解我的项目? + * **指标:**贡献者的社交范围。 + * 人们在公共场所对项目有何评价?是正面还是负面? + * **指标:**跨社交媒体渠道的情感(关键字或 NLP)分析。 +* 我的项目**可行**程度? + * 我们有足够的维护者吗?该数字是随着时间的推移而上升还是下降? + * **指标:**维护者数量。 + * 改变速度如何随时间变化? + * **指标:**代码随时间的变化百分比。 + * **指标:**拉取请求、代码审查和合并之间的时间。 +* 我的项目的[多样化 & 包容性][4]如何? + * 我们是否拥有有效的公开行为准则(CoC)? + * **度量标准:** 检查存储库中的 CoC 文件。 + * 与我的项目相关的活动是否积极包容? + * **指标:**关于活动的票务政策和活动包容性活动的手动报告。 + * 我们的项目在可访问性上做的如好不好? + * **指标:**验证发布的文字会议纪要。 + * **指标:**验证会议期间使用的隐藏式字幕。 + * **指标:**验证在演示文稿和项目前端设计中色盲可访问的素材。 +* 我的项目代表了多少[价值][7]? + * 我如何帮助组织了解使用我们的项目将节省多少时间和金钱(劳动力投资) + * **指标:**仓库的议题书、提交书、拉取请求书和估计人工费率。 + * 我如何理解项目创建的下游价值的数量以及维护我的项目对更广泛的社区的重要性(或不重要)? + * **指标:**依赖我的项目的其他项目数。 + * 为我的项目做出贡献的人有多少机会使用他们学到的东西来找到合适的工作岗位以及在哪些组织(即生活工资)? + * **指标:**使用或贡献此库的组织数量。 + * **指标:**使用此类项目的开发人员的平均工资。 + * **指标:**与该项目匹配的关键字的职位发布计数。 + +### 项目维护者 + +作为**项目维护者**,我**最**关心: + +* 我是**高效的**维护者吗? + * **指标:**拉取请求在代码审查之前等待的时间。 + * **指标:**代码审查和后续拉取请求之间的时间。 + * **指标:**我的代码审核中有多少被批准? + * **指标:**我的代码评论中有多少被拒绝或返工? + * **指标:**代码审查的评论的情感分析。 +* 我如何让**更多人**帮助我维护这件事? + * **指标:**项目贡献者的社交覆盖面数。 +* 我们的**代码质量**随着时间的推移变得越来越好吗? + * **指标:**计算随着时间的推移引入的回归数量。 + * **指标:**计算随着时间推移引入的错误数量。 + * **指标:**错误归档、拉取请求、代码审查、合并和发布之间的时间。 + +### 项目开发者和贡献者 + +作为**项目开发者或贡献者**,我**最**关心: + +* 我可以从为这个项目做出贡献中获得哪些有价值的东西,以及实现这个价值需要多长时间? + * **指标:**下游价值。 + * **指标:**提交、代码审查和合并之间的时间。 +* 通过使用我在贡献中学到的东西来增加工作机是否有良好的前景? + * **指标:**生活工资。 +* 这个项目有多受欢迎? + * **指标:**社交媒体帖子、分享和收藏的数量。 +* 社区有影响力的人知道我的项目吗? + * **指标:**创始人、维护者和贡献者的社交范围。 + +通过创建这个列表,我们刚刚开始对 CHAOSS 的上下文进行抨击,并且在今年夏天项目中首次发布该指标时,我迫不及待地想看看广泛的开源社区可能有什么其他伟大的想法,以及我们还可以从这些贡献中学到什么(并衡量!)。 + +### 其它角色 + +接下来,你需要了解有关其他角色(例如基金会、企业开源计划办公室、业务风险和法律团队、人力资源等)以及最终用户的目标问题度量集的更多信息。他们关心开源的不同事物。 + +如果你是开源贡献者或组成分子,我们邀请你[来看看这个项目][8]并参与社区活动! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/measure-project + +作者:[Jon Lawrence][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/the3rdlaw +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://www.linuxfoundation.org/ +[3]: https://chaoss.community/ +[4]: https://github.com/chaoss/wg-diversity-inclusion +[5]: https://github.com/chaoss/wg-evolution +[6]: https://github.com/chaoss/wg-risk +[7]: https://github.com/chaoss/wg-value +[8]: https://github.com/chaoss/ From 260969e6313e6e4cda34ec82e2fdc7b8b2444796 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Thu, 15 Aug 2019 17:00:17 +0000 Subject: [PATCH 479/951] Revert "bestony is translating." This reverts commit b37cf2203e1f90f81b00966c1d48f19beb68502e. --- ...ith Kotlin Coroutines and Android Architecture Components.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/tech/20171006 Create a Clean-Code App with Kotlin Coroutines and Android Architecture Components.md b/sources/tech/20171006 Create a Clean-Code App with Kotlin Coroutines and Android Architecture Components.md index 190bf5775e..0ff40cdd6e 100644 --- a/sources/tech/20171006 Create a Clean-Code App with Kotlin Coroutines and Android Architecture Components.md +++ b/sources/tech/20171006 Create a Clean-Code App with Kotlin Coroutines and Android Architecture Components.md @@ -1,5 +1,3 @@ -bestony is translating. - Create a Clean-Code App with Kotlin Coroutines and Android Architecture Components ============================================================ From e10eeb04cf7d078645964f830c5226f56b1cfa96 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Thu, 15 Aug 2019 17:00:32 +0000 Subject: [PATCH 480/951] Revert "translating by Flowsnow" This reverts commit 98d2ed55fa5a179d080fcd443ec53c5867e9393f. --- sources/tech/20190612 Why use GraphQL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190612 Why use GraphQL.md b/sources/tech/20190612 Why use GraphQL.md index f9210b02e4..ad0d3a0056 100644 --- a/sources/tech/20190612 Why use GraphQL.md +++ b/sources/tech/20190612 Why use GraphQL.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (Flowsnow) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 6e0ddee4a41f6e253884a08611db34a3f7ee942f Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 16 Aug 2019 07:46:58 +0800 Subject: [PATCH 481/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2016=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E4=BA=94=2007:46:56=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20180116 Command Line Heroes- Season 1- OS Wars.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index 5111e9ea31..bc7d25aee3 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -25,7 +25,7 @@ Voice Actor: [00:00:30] -当前形势比较紧张. Bill Gates 与 Steve Jobs 的帝国发起了一场无可避免的专有软件之战. Gates 与 IBM 结成了强大的联盟, 而 Jobs 拒绝对它的硬件和操作系统开放授权. 他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时, 在偏远之地, 帝王所不知道的是, 开源的反叛者们开始集聚. +当前形势比较紧张. Bill Gates 与 Steve Jobs 的帝国发起了一场无可避免的专有软件之战. Gates 与 IBM 结成了强大的联盟, 而 Jobs 拒绝对它的硬件和操作系统开放授权. 他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时, 帝王所不知道的是, 在偏远之地, 开源的反叛者们开始集聚. Saron Yitbarek: @@ -35,7 +35,7 @@ Saron Yitbarek: [00:01:30] -我是 Saron Yitbarek, 你现在收听的是代码英雄, 一款红帽公司原创的博客节目. 你问,什么是代码英雄? 嗯, 如果你创造而不仅仅是使用, 如果你相信开发者拥有构建美好未来的能力, 如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界, 那么你, 我的朋友, 就是代码英雄. 在本系列节目中, 我们将为你带来那些从命令行转型的程序员故事. 那么我是谁,凭什么指导你踏上这段艰苦的旅程? Saron Yitbarek是哪根葱? 嗯, 事实上我觉得我跟你差不多. 我是一名面向初学者的开发人员, 我做的任何事都依赖于开源软件. 这是我的世界. 通过在博客中讲故事,我可以跳出无聊的日常工作,看清大局. 希望它对你也一样有用. +我是 Saron Yitbarek, 你现在收听的是代码英雄, 一款红帽公司原创的博客节目. 你问,什么是代码英雄? 嗯, 如果你创造而不仅仅是使用, 如果你相信开发者拥有构建美好未来的能力, 如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界, 那么你, 我的朋友, 就是代码英雄. 在本系列节目中, 我们将为你带来那些"白码起家(原文是from the command line up,应该是改编自from the ground up)"改变技术的程序员故事. 那么我是谁,凭什么指导你踏上这段艰苦的旅程? Saron Yitbarek是哪根葱? 嗯, 事实上我觉得我跟你差不多. 我是一名面向初学者的开发人员, 我做的任何事都依赖于开源软件. 这是我的世界. 通过在博客中讲故事,我可以跳出无聊的日常工作,看清大局. 希望它对你也一样有用. [00:02:00] @@ -62,13 +62,13 @@ Saron Yitbarek: [00:05:00] -Jobs has this big grin on his face as he reveals that the three CEOs on stage have to take turns wooing him. It's essentially an '80s version of The Bachelor, but for tech love. Two of the software bigwigs say their bit, and then it's over to contestant number three. Is that? Yup. A fresh - faced Bill Gates with large square glasses that cover half his face. He proclaims that during 1984, half of Microsoft's revenue is going to come from Macintosh software. The audience loves it, and gives him a big round of applause. What they don't know is that one month after this event, Bill Gates will announce his plans to release Windows 1.0. You'd never guess Jobs is flirting with someone who'd end up as Apple's biggest rival. But Microsoft and Apple are about to live through the worst marriage in tech history. They're going to betray each other, they're going to try and destroy each other, and they're going to be deeply, painfully bound to each other. +Jobs 的脸上露出一个大大的笑容,台上有三个CEO都需要轮流向他示好. 这基本上就是80年代科技界的钻石王老五. 两个软件大佬讲完话后, 然后就轮到第三个人讲话了. 仅此而已不是吗? 是得. 新面孔 Bill Gates 带着一个大大的方框眼镜遮住了半个脸. 他宣称在 1984 年, 微软的一半收入将来至于 Macintosh 软件. 他的这番话引来了观众热情的掌声. 但是他们不知道的是,在一个月后, Bill Gates 将会宣布发布 Windows 1.0 的计划. 你永远也猜不到 Jobs 正在跟未来苹果最大的敌人打情骂俏. 但微软和苹果即将经历科技史上最糟糕的婚礼. 他们会彼此背叛, 相互毁灭, 但又深深地、痛苦地捆绑在一起. James Allworth: [00:05:30] -I guess philosophically, one was more idealistic and focused on the user experience above all else, and was an integrated organization, whereas Microsoft much more pragmatic, a modular focus- +我猜从哲学上来讲, 一个更理想化,注重用户体验高于一切, 是一个综合性的组织, 而微软则更务实,更模块化- Saron Yitbarek: From f0aaa2a662abb974b81c80a44c685c29b42e36a8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 16 Aug 2019 08:51:08 +0800 Subject: [PATCH 482/951] translated --- ... Does it Take To Boot Your Linux System.md | 118 ------------------ ... Does it Take To Boot Your Linux System.md | 113 +++++++++++++++++ 2 files changed, 113 insertions(+), 118 deletions(-) delete mode 100644 sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md create mode 100644 translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md diff --git a/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md b/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md deleted file mode 100644 index 36ecd58b93..0000000000 --- a/sources/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Find Out How Long Does it Take To Boot Your Linux System) -[#]: via: (https://itsfoss.com/check-boot-time-linux/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Find Out How Long Does it Take To Boot Your Linux System -====== - -When you power on your system, you wait for the manufacturer’s logo to come up, a few messages on the screen perhaps (booting in insecure mode), [Grub][1] screen, operating system loading screen and finally the login screen. - -Did you check how long did it take? Perhaps not. Unless you really need to know, you won’t bother with the boot time details. - -But what if you are curious to know long long your Linux system takes to boot? Running a stopwatch is one way to find that but in Linux, you have better and easier ways to find out your system’s start up time. - -### Checking boot time in Linux with systemd-analyze - -![][2] - -Like it or not, [systemd][3] is running on most of the popular Linux distributions. The systemd has a number of utilities to manage your Linux system. One of those utilities is systemd-analyze. - -The systemd-analyze command gives you a detail of how many services ran at the last start up and how long they took. - -If you run the following command in the terminal: - -``` -systemd-analyze -``` - -You’ll get the total boot time along with the time taken by firmware, boot loader, kernel and the userspace: - -``` -Startup finished in 7.275s (firmware) + 13.136s (loader) + 2.803s (kernel) + 12.488s (userspace) = 35.704s - -graphical.target reached after 12.408s in userspace -``` - -As you can see in the output above, it took about 35 seconds for my system to reach the screen where I could enter my password. I am using Dell XPS Ubuntu edition. It uses SSD storage and despite of that it takes this much time to start. - -Not that impressive, is it? Why don’t you share your system’s boot time? Let’s compare. - -You can further breakdown the boot time into each unit with the following command: - -``` -systemd-analyze blame -``` - -This will produce a huge output with all the services listed in the descending order of the time taken. - -``` -7.347s plymouth-quit-wait.service -6.198s NetworkManager-wait-online.service -3.602s plymouth-start.service -3.271s plymouth-read-write.service -2.120s apparmor.service -1.503s [email protected] -1.213s motd-news.service - 908ms snapd.service - 861ms keyboard-setup.service - 739ms fwupd.service - 702ms bolt.service - 672ms dev-nvme0n1p3.device - 608ms [email protected]:intel_backlight.service - 539ms snap-core-7270.mount - 504ms snap-midori-451.mount - 463ms snap-screencloud-1.mount - 446ms snapd.seeded.service - 440ms snap-gtk\x2dcommon\x2dthemes-1313.mount - 420ms snap-core18-1066.mount - 416ms snap-scrcpy-133.mount - 412ms snap-gnome\x2dcharacters-296.mount -``` - -#### Bonus Tip: Improving boot time - -If you look at this output, you can see that both network manager and [plymouth][4] take a huge bunch of boot time. - -[][5] - -Suggested read  How To Fix: No Unity, No Launcher, No Dash In Ubuntu Linux - -Plymouth is responsible for that boot splash screen you see before the login screen in Ubuntu and other distributions. Network manager is responsible for the internet connection and may be turned off to speed up boot time. Don’t worry, once you log in, you’ll have wifi working normally. - -``` -sudo systemctl disable NetworkManager-wait-online.service -``` - -If you want to revert the change, you can use this command: - -``` -sudo systemctl enable NetworkManager-wait-online.service -``` - -Now, please don’t go disabling various services on your own without knowing what it is used for. It may have dangerous consequences. - -_**Now that you know how to check the boot time of your Linux system, why not share your system’s boot time in the comment section?**_ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/check-boot-time-linux/ - -作者:[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.gnu.org/software/grub/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-boot-time.jpg?resize=800%2C450&ssl=1 -[3]: https://en.wikipedia.org/wiki/Systemd -[4]: https://wiki.archlinux.org/index.php/Plymouth -[5]: https://itsfoss.com/how-to-fix-no-unity-no-launcher-no-dash-in-ubuntu-12-10-quick-tip/ diff --git a/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md b/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md new file mode 100644 index 0000000000..2d3bb561fc --- /dev/null +++ b/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md @@ -0,0 +1,113 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Find Out How Long Does it Take To Boot Your Linux System) +[#]: via: (https://itsfoss.com/check-boot-time-linux/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +了解你的 Linux 系统的启动时间 +====== + +当你打开系统电源时,你会等待制造商的 logo 出现,屏幕上可能会显示一些消息(以非安全模式启动),[Grub][1] 页面,操作系统加载页面以及最后的登录页面。 + +你检查过这花费了多长时间么?也许没有。除非你真的需要知道,否则你不会在意开机时间。 + +但是如果你很想知道你的 Linux 系统需要很长时间才能启动呢?使用秒表是一种方法,但在 Linux 中,你有一种更好、更轻松地了解系统启动时间的方法。 + +### 在 Linux 中使用 systemd-analyze 检查启动时间 + +![][2] + +无论你是否喜欢,[systemd][3] 运行在大多数流行的 Linux 发行版中。systemd 有许多管理 Linux 系统的工具。其中一个就是 systemd-analyze。 + +systemd-analyze 命令为你提供上次启动时运行的服务数量以及消耗时间的详细信息。 + +如果在终端中运行以下命令: + +``` +systemd-analyze +``` + +你将获得总启动时间以及固件、引导加载程序、内核和用户空间所消耗的时间: + +``` +Startup finished in 7.275s (firmware) + 13.136s (loader) + 2.803s (kernel) + 12.488s (userspace) = 35.704s + +graphical.target reached after 12.408s in userspace +``` + +正如你在上面的输出中所看到的,我的系统花了大约 35 秒才进入可以输入密码的页面。我正在使用戴尔 XPS Ubuntu。它使用 SSD 存储,尽管如此,它还需要很长时间才能启动。 + +不是那么令人印象深刻,是吗?为什么不共享你们系统的启动时间?我们来比较吧。 + +你可以使用以下命令将启动时间进一步细分为每个单元: + +``` +systemd-analyze blame +``` + +这将生成大量输出,所有服务按所用时间的降序列出。 + +``` +7.347s plymouth-quit-wait.service +6.198s NetworkManager-wait-online.service +3.602s plymouth-start.service +3.271s plymouth-read-write.service +2.120s apparmor.service +1.503s [email protected] +1.213s motd-news.service + 908ms snapd.service + 861ms keyboard-setup.service + 739ms fwupd.service + 702ms bolt.service + 672ms dev-nvme0n1p3.device + 608ms [email protected]:intel_backlight.service + 539ms snap-core-7270.mount + 504ms snap-midori-451.mount + 463ms snap-screencloud-1.mount + 446ms snapd.seeded.service + 440ms snap-gtk\x2dcommon\x2dthemes-1313.mount + 420ms snap-core18-1066.mount + 416ms snap-scrcpy-133.mount + 412ms snap-gnome\x2dcharacters-296.mount +``` + +#### 额外提示:改善启动时间 + +如果查看此输出,你可以看到网络管理器和 [plymouth][4] 都消耗了大量的启动时间。 + +Plymouth 负责你在 Ubuntu 和其他发行版中在登录页面出现之前的引导页面。网络管理器负责互联网连接,可以关闭它来加快启动时间。不要担心,在你登录后,你可以正常使用 wifi。 + +``` +sudo systemctl disable NetworkManager-wait-online.service +``` + +如果要还原更改,可以使用以下命令: + +``` +sudo systemctl enable NetworkManager-wait-online.service +``` + +现在,请不要在不知道用途的情况下自行禁用各种服务。这可能会产生危险的后果。 + +_ **现在你知道了如何检查 Linux 系统的启动时间,为什么不在评论栏分享你的系统的启动时间?** _ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/check-boot-time-linux/ + +作者:[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.gnu.org/software/grub/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/linux-boot-time.jpg?resize=800%2C450&ssl=1 +[3]: https://en.wikipedia.org/wiki/Systemd +[4]: https://wiki.archlinux.org/index.php/Plymouth From aa7cd73b900ef1ef1ab2bf9ef5b9b79d15f9b772 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 16 Aug 2019 08:58:56 +0800 Subject: [PATCH 483/951] translating --- ...e file is corrupted, it has the wrong hash- Error In Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md b/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md index f9abbacfd7..71ec68f8bd 100644 --- a/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md +++ b/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From af25590b54ec267f1d5baf7f0da44a9325d9c7de Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 09:27:31 +0800 Subject: [PATCH 484/951] PRF @scvoet --- ... Right Click Context Menu In Ubuntu 18.04.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md b/translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md index 83415b18d1..46b36e6030 100644 --- a/translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md +++ b/translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) -[#]: translator: (Scvoet) -[#]: reviewer: ( ) +[#]: translator: (scvoet) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04) @@ -12,25 +12,25 @@ ![Add 'New Document' Option In Right Click Context Menu In Ubuntu 18.04 GNOME desktop][1] -前几天,我在各种在线资源站点上收集关于 [**Linux 包管理**][2] 的参考资料。在我想创建一个用于保存笔记的文件,我突然发现我的 Ubuntu 18.04 LTS 桌面并没有“创建文件”的按钮了,它好像离奇失踪了。在谷歌一下后,我发现原来“新建文档”按钮不再被集成在 Ubuntu GNOME 版本中了。庆幸的是,我找到了一个在 Ubuntu 18.04 LTS 桌面的右键单击菜单中添加“新建文档”按钮的简易解决方案。 +前几天,我在各种在线资源站点上收集关于 [Linux 包管理器][2] 的参考资料。在我想创建一个用于保存笔记的文件,我突然发现我的 Ubuntu 18.04 LTS 桌面并没有“新建文件”的按钮了,它好像离奇失踪了。在谷歌一下后,我发现原来“新建文档”按钮不再被集成在 Ubuntu GNOME 版本中了。庆幸的是,我找到了一个在 Ubuntu 18.04 LTS 桌面的右键单击菜单中添加“新建文档”按钮的简易解决方案。 就像你在下方截图中看到的一样,Nautilus 文件管理器的右键单击菜单中并没有“新建文件”按钮。 ![][3] -Ubuntu 18.04 移除了右键点击菜单中的“新建文件”的选项。 +*Ubuntu 18.04 移除了右键点击菜单中的“新建文件”的选项。* -如果你想添加此一按钮,请按照以下步骤进行操作。 +如果你想添加此按钮,请按照以下步骤进行操作。 ### 在 Ubuntu 的右键单击菜单中添加“新建文件”按钮 -首先,你需要确保您的系统中有 **~/Templates** 文件夹。如果没有的话,可以按照下面的命令进行创建。 +首先,你需要确保你的系统中有 `~/Templates` 文件夹。如果没有的话,可以按照下面的命令进行创建。 ``` $ mkdir ~/Templates ``` -然后打开终端应用并使用 cd 命令进入 **~/Templates** 文件夹: +然后打开终端应用并使用 `cd` 命令进入 `~/Templates` 文件夹: ``` $ cd ~/Templates @@ -50,11 +50,11 @@ $ touch "Empty Document" ![][4] -新开一个 Nautilus 文件管理器,然后检查一下右键单击菜单中是否成功添加了“新建文档”按钮。 +新打开一个 Nautilus 文件管理器,然后检查一下右键单击菜单中是否成功添加了“新建文档”按钮。 ![][5] -在 Ubuntu 18.04 的右键单击菜单中添加“新建文件”按钮 +*在 Ubuntu 18.04 的右键单击菜单中添加“新建文件”按钮* 如上图所示,我们重新启用了“新建文件”的按钮。 @@ -73,7 +73,7 @@ $ touch New\ PyScript.py 在“新建文件”子菜单中给不同的文件类型添加按钮 -注意,所有文件都应该创建在 **~/Templates** 文件夹下。 +注意,所有文件都应该创建在 `~/Templates` 文件夹下。 现在,打开 Nautilus 并检查“新建文件” 菜单中是否有相应的新建文件按钮。 @@ -93,14 +93,13 @@ via: https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-con 作者:[sk][a] 选题:[lujun9972][b] -译者:[译者ID][c] -校对:[校对者ID](https://github.com/校对者ID) +译者:[scvoet](https://github.com/scvoet) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 [a]: https://www.ostechnix.com/author/sk/ [b]: https://github.com/lujun9972 -[c]: https://github.com/scvoet [1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-1-720x340.png [2]: https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/ [3]: https://www.ostechnix.com/wp-content/uploads/2019/07/new-document-option-missing.png From d425cf7c2a82e588e6fe10f16e5576a78d154ae1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 09:28:24 +0800 Subject: [PATCH 485/951] PUB @scvoet https://linux.cn/article-11232-1.html --- ...ument- Option In Right Click Context Menu In Ubuntu 18.04.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md (98%) diff --git a/translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md b/published/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md similarity index 98% rename from translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md rename to published/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md index 46b36e6030..bc993a7595 100644 --- a/translated/tech/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md +++ b/published/20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (scvoet) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11232-1.html) [#]: subject: (How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04) [#]: via: ((https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From 29aa09cfe8f30b69c0c84dc7707f6ebc1b6ecdb6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 09:37:03 +0800 Subject: [PATCH 486/951] APL --- sources/tech/20181220 Getting started with Prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20181220 Getting started with Prometheus.md b/sources/tech/20181220 Getting started with Prometheus.md index 79704addb7..9f3cc06fbf 100644 --- a/sources/tech/20181220 Getting started with Prometheus.md +++ b/sources/tech/20181220 Getting started with Prometheus.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 45ed386f3ed8ca5ae5784208b36d9a31eca3a680 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 11:37:55 +0800 Subject: [PATCH 487/951] TSL&PRF @wxy --- ...0181220 Getting started with Prometheus.md | 166 ----------------- ...0181220 Getting started with Prometheus.md | 167 ++++++++++++++++++ 2 files changed, 167 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/20181220 Getting started with Prometheus.md create mode 100644 translated/tech/20181220 Getting started with Prometheus.md diff --git a/sources/tech/20181220 Getting started with Prometheus.md b/sources/tech/20181220 Getting started with Prometheus.md deleted file mode 100644 index 9f3cc06fbf..0000000000 --- a/sources/tech/20181220 Getting started with Prometheus.md +++ /dev/null @@ -1,166 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with Prometheus) -[#]: via: (https://opensource.com/article/18/12/introduction-prometheus) -[#]: author: (Michael Zamot https://opensource.com/users/mzamot) - -Getting started with Prometheus -====== -Learn to install and write queries for the Prometheus monitoring and alerting system. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_sysadmin_cloud.png?itok=sUciG0Cn) - -[Prometheus][1] is an open source monitoring and alerting system that directly scrapes metrics from agents running on the target hosts and stores the collected samples centrally on its server. Metrics can also be pushed using plugins like **collectd_exporter** —although this is not Promethius' default behavior, it may be useful in some environments where hosts are behind a firewall or prohibited from opening ports by security policy. - -Prometheus, a project of the [Cloud Native Computing Foundation][2], scales up using a federation model, which enables one Prometheus server to scrape another Prometheus server. This allows creation of a hierarchical topology, where a central system or higher-level Prometheus server can scrape aggregated data already collected from subordinate instances. - -Besides the Prometheus server, its most common components are its [Alertmanager][3] and its exporters. - -Alerting rules can be created within Prometheus and configured to send custom alerts to Alertmanager. Alertmanager then processes and handles these alerts, including sending notifications through different mechanisms like email or third-party services like [PagerDuty][4]. - -Prometheus' exporters can be libraries, processes, devices, or anything else that exposes the metrics that will be scraped by Prometheus. The metrics are available at the endpoint **/metrics** , which allows Prometheus to scrape them directly without needing an agent. The tutorial in this article uses **node_exporter** to expose the target hosts' hardware and operating system metrics. Exporters' outputs are plaintext and highly readable, which is one of Prometheus' strengths. - -In addition, you can configure [Grafana][5] to use Prometheus as a backend to provide data visualization and dashboarding functions. - -### Making sense of Prometheus' configuration file - -The number of seconds between when **/metrics** is scraped controls the granularity of the time-series database. This is defined in the configuration file as the **scrape_interval** parameter, which by default is set to 60 seconds. - -Targets are set for each scrape job in the **scrape_configs** section. Each job has its own name and a set of labels that can help filter, categorize, and make it easier to identify the target. One job can have many targets. - -### Installing Prometheus - -In this tutorial, for simplicity, we will install a Prometheus server and **node_exporter** with docker. Docker should already be installed and configured properly on your system. For a more in-depth, automated method, I recommend Steve Ovens' article [How to use Ansible to set up system monitoring with Prometheus][6]. - -Before starting, create the Prometheus configuration file **prometheus.yml** in your work directory as follows: - -``` -global: -  scrape_interval:      15s -  evaluation_interval: 15s - -scrape_configs: -  - job_name: 'prometheus' - -        static_configs: -        - targets: ['localhost:9090'] - -  - job_name: 'webservers' - -        static_configs: -        - targets: [':9100'] -``` - -Start Prometheus with Docker by running the following command: - -``` -$ sudo docker run -d -p 9090:9090 -v -/path/to/prometheus.yml:/etc/prometheus/prometheus.yml -prom/prometheus -``` - -By default, the Prometheus server will use port 9090. If this port is already in use, you can change it by adding the parameter **\--web.listen-address=" :"** at the end of the previous command. - -In the machine you want to monitor, download and run the **node_exporter** container by using the following command: - -``` -$ sudo docker run -d -v "/proc:/host/proc" -v "/sys:/host/sys" -v -"/:/rootfs" --net="host" prom/node-exporter --path.procfs -/host/proc --path.sysfs /host/sys --collector.filesystem.ignored- -mount-points "^/(sys|proc|dev|host|etc)($|/)" -``` - -For the purposes of this learning exercise, you can install **node_exporter** and Prometheus on the same machine. Please note that it's not wise to run **node_exporter** under Docker in production—this is for testing purposes only. - -To verify that **node_exporter** is running, open your browser and navigate to **http:// :9100/metrics**. All the metrics collected will be displayed; these are the same metrics Prometheus will scrape. - -![](https://opensource.com/sites/default/files/uploads/check-node_exporter.png) - -To verify the Prometheus server installation, open your browser and navigate to . - -You should see the Prometheus interface. Click on **Status** and then **Targets**. Under State, you should see your machines listed as **UP**. - -![](https://opensource.com/sites/default/files/uploads/targets-up.png) - -### Using Prometheus queries - -It's time to get familiar with [PromQL][7], Prometheus' query syntax, and its graphing web interface. Go to **** on your Prometheus server. You will see a query editor and two tabs: Graph and Console. - -Prometheus stores all data as time series, identifying each one with a metric name. For example, the metric **node_filesystem_avail_bytes** shows the available filesystem space. The metric's name can be used in the expression box to select all of the time series with this name and produce an instant vector. If desired, these time series can be filtered using selectors and labels—a set of key-value pairs—for example: - -``` -node_filesystem_avail_bytes{fstype="ext4"} -``` - -When filtering, you can match "exactly equal" ( **=** ), "not equal" ( **!=** ), "regex-match" ( **=~** ), and "do not regex-match" ( **!~** ). The following examples illustrate this: - -To filter **node_filesystem_avail_bytes** to show both ext4 and XFS filesystems: - -``` -node_filesystem_avail_bytes{fstype=~"ext4|xfs"} -``` - -To exclude a match: - -``` -node_filesystem_avail_bytes{fstype!="xfs"} -``` - -You can also get a range of samples back from the current time by using square brackets. You can use **s** to represent seconds, **m** for minutes, **h** for hours, **d** for days, **w** for weeks, and **y** for years. When using time ranges, the vector returned will be a range vector. - -For example, the following command produces the samples from five minutes to the present: - -``` -node_memory_MemAvailable_bytes[5m] -``` - -Prometheus also includes functions to allow advanced queries, such as this: - -``` -100 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated (1 - avg by(instance)(irate(node_cpu_seconds_total{job='webservers',mode='idle'}[5m]))) -``` - -Notice how the labels are used to filter the job and the mode. The metric **node_cpu_seconds_total** returns a counter, and the **irate()** function calculates the per-second rate of change based on the last two data points of the range interval (meaning the range can be smaller than five minutes). To calculate the overall CPU usage, you can use the idle mode of the **node_cpu_seconds_total** metric. The idle percent of a processor is the opposite of a busy processor, so the **irate** value is subtracted from 1. To make it a percentage, multiply it by 100. - -![](https://opensource.com/sites/default/files/uploads/cpu-usage.png) - -### Learn more - -Prometheus is a powerful, scalable, lightweight, and easy to use and deploy monitoring tool that is indispensable for every system administrator and developer. For these and other reasons, many companies are implementing Prometheus as part of their infrastructure. - -To learn more about Prometheus and its functions, I recommend the following resources: - -+ About [PromQL][8] -+ What [node_exporters collects][9] -+ [Prometheus functions][10] -+ [4 open source monitoring tools][11] -+ [Now available: The open source guide to DevOps monitoring tools][12] - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/12/introduction-prometheus - -作者:[Michael Zamot][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/mzamot -[b]: https://github.com/lujun9972 -[1]: https://prometheus.io/ -[2]: https://www.cncf.io/ -[3]: https://prometheus.io/docs/alerting/alertmanager/ -[4]: https://en.wikipedia.org/wiki/PagerDuty -[5]: https://grafana.com/ -[6]: https://opensource.com/article/18/3/how-use-ansible-set-system-monitoring-prometheus -[7]: https://prometheus.io/docs/prometheus/latest/querying/basics/ -[8]: https://prometheus.io/docs/prometheus/latest/querying/basics/ -[9]: https://github.com/prometheus/node_exporter#collectors -[10]: https://prometheus.io/docs/prometheus/latest/querying/functions/ -[11]: https://opensource.com/article/18/8/open-source-monitoring-tools -[12]: https://opensource.com/article/18/8/now-available-open-source-guide-devops-monitoring-tools diff --git a/translated/tech/20181220 Getting started with Prometheus.md b/translated/tech/20181220 Getting started with Prometheus.md new file mode 100644 index 0000000000..4c8b7b0ab4 --- /dev/null +++ b/translated/tech/20181220 Getting started with Prometheus.md @@ -0,0 +1,167 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with Prometheus) +[#]: via: (https://opensource.com/article/18/12/introduction-prometheus) +[#]: author: (Michael Zamot https://opensource.com/users/mzamot) + +Prometheus 入门 +====== + +> 学习安装 Prometheus 监控和警报系统并编写它的查询。 + +![](https://img.linux.net.cn/data/attachment/album/201908/16/113724zqe12khkdye2mesy.jpg) + +[Prometheus][1] 是一个开源的监控和警报系统,它直接从目标主机上运行的代理程序中抓取指标,并将收集的样本集中存储在其服务器上。也可以使用像 `collectd_exporter` 这样的插件推送指标,尽管这不是 Promethius 的默认行为,但在主机位于防火墙后面或位于安全策略禁止打开端口的某些环境中它可能很有用。 + +Prometheus 是[云原生计算基金会(CNCF)][2]的一个项目。它使用联合模型federation model进行扩展,该模型使得一个 Prometheus 服务器能够抓取另一个 Prometheus 服务器的数据。这允许创建分层拓扑,其中中央系统或更高级别的 Prometheus 服务器可以抓取已从下级实例收集的聚合数据。 + +除 Prometheus 服务器外,其最常见的组件是[警报管理器][3]及其输出器。 + +警报规则可以在 Prometheus 中创建,并配置为向警报管理器发送自定义警报。然后,警报管理器处理和管理这些警报,包括通过电子邮件或第三方服务(如 [PagerDuty][4])等不同机制发送通知。 + +Prometheus 的输出器可以是库、进程、设备或任何其他能将 Prometheus 抓取的指标公开出去的东西。 这些指标可在端点 `/metrics` 中获得,它允许 Prometheus 无需代理直接抓取它们。本文中的教程使用 `node_exporter` 来公开目标主机的硬件和操作系统指标。输出器的输出是明文的、高度可读的,这是 Prometheus 的优势之一。 + +此外,你可以将 Prometheus 作为后端,配置 [Grafana][5] 来提供数据可视化和仪表板功能。 + +### 理解 Prometheus 的配置文件 + +抓取 `/metrics` 的间隔秒数控制了时间序列数据库的粒度。这在配置文件中定义为 `scrape_interval` 参数,默认情况下设置为 60 秒。 + +在 `scrape_configs` 部分中为每个抓取作业设置了目标。每个作业都有自己的名称和一组标签,可以帮助你过滤、分类并更轻松地识别目标。一项作业可以有很多目标。 + +### 安装 Prometheus + +在本教程中,为简单起见,我们将使用 Docker 安装 Prometheus 服务器和 `node_exporter`。Docker 应该已经在你的系统上正确安装和配置。对于更深入、自动化的方法,我推荐 Steve Ovens 的文章《[如何使用 Ansible 与 Prometheus 建立系统监控][6]》。 + +在开始之前,在工作目录中创建 Prometheus 配置文件 `prometheus.yml`,如下所示: + +``` +global: + scrape_interval: 15s + evaluation_interval: 15s + +scrape_configs: + - job_name: 'prometheus' + + static_configs: + - targets: ['localhost:9090'] + + - job_name: 'webservers' + + static_configs: + - targets: [':9100'] +``` + +通过运行以下命令用 Docker 启动 Prometheus: + +``` +$ sudo docker run -d -p 9090:9090 -v +/path/to/prometheus.yml:/etc/prometheus/prometheus.yml +prom/prometheus +``` + +默认情况下,Prometheus 服务器将使用端口 9090。如果此端口已在使用,你可以通过在上一个命令的后面添加参数 `--web.listen-address=":"` 来更改它。 + +在要监视的计算机中,使用以下命令下载并运行 `node_exporter` 容器: + +``` +$ sudo docker run -d -v "/proc:/host/proc" -v "/sys:/host/sys" -v +"/:/rootfs" --net="host" prom/node-exporter --path.procfs +/host/proc --path.sysfs /host/sys --collector.filesystem.ignored- +mount-points "^/(sys|proc|dev|host|etc)($|/)" +``` + +出于本文练习的目的,你可以在同一台机器上安装 `node_exporter` 和 Prometheus。请注意,生产环境中在 Docker 下运行 `node_exporter` 是不明智的 —— 这仅用于测试目的。 + +要验证 `node_exporter` 是否正在运行,请打开浏览器并导航到 `http://:9100/metrics`,这将显示收集到的所有指标;也即是 Prometheus 将要抓取的相同指标。 + +![](https://opensource.com/sites/default/files/uploads/check-node_exporter.png) + +要确认 Prometheus 服务器安装成功,打开浏览器并导航至:。 + +你应该看到了 Prometheus 的界面。单击“Status”,然后单击“Targets”。在 “Status” 下,你应该看到你的机器被列为 “UP”。 + +![](https://opensource.com/sites/default/files/uploads/targets-up.png) + +### 使用 Prometheus 查询 + +现在是时候熟悉一下 [PromQL][7](Prometheus 的查询语法)及其图形化 Web 界面了。转到 Prometheus 服务器上的 `http://localhost:9090/graph`。你将看到一个查询编辑器和两个选项卡:“Graph” 和 “Console”。 + +Prometheus 将所有数据存储为时间序列,使用指标名称标识每个数据。例如,指标 `node_filesystem_avail_bytes` 显示可用的文件系统空间。指标的名称可以在表达式框中使用,以选择具有此名称的所有时间序列并生成即时向量。如果需要,可以使用选择器和标签(一组键值对)过滤这些时间序列,例如: + +``` +node_filesystem_avail_bytes{fstype="ext4"} +``` + +过滤时,你可以匹配“完全相等”(`=`)、“不等于”(`!=`),“正则匹配”(`=~`)和“正则排除匹配”(`!~`)。以下示例说明了这一点: + +要过滤 `node_filesystem_avail_bytes` 以显示 ext4 和 XFS 文件系统: + +``` +node_filesystem_avail_bytes{fstype=~"ext4|xfs"} +``` + +要排除匹配: + +``` +node_filesystem_avail_bytes{fstype!="xfs"} +``` + +你还可以使用方括号得到从当前时间往回的一系列样本。你可以使用 `s` 表示秒,`m` 表示分钟,`h` 表示小时,`d` 表示天,`w` 表示周,而 `y` 表示年。使用时间范围时,返回的向量将是范围向量。 + +例如,以下命令生成从五分钟前到现在的样本: + +``` +node_memory_MemAvailable_bytes[5m] +``` + +Prometheus 还包括了高级查询的功能,例如: + +``` +100 * (1 - avg by(instance)(irate(node_cpu_seconds_total{job='webservers',mode='idle'}[5m]))) +``` + +请注意标签如何用于过滤作业和模式。指标 `node_cpu_seconds_total` 返回一个计数器,`irate()`函数根据范围间隔的最后两个数据点计算每秒的变化率(意味着该范围可以小于五分钟)。要计算 CPU 总体使用率,可以使用 `node_cpu_seconds_total` 指标的空闲(`idle`)模式。处理器的空闲比例与繁忙比例相反,因此从 1 中减去 `irate` 值。要使其为百分比,请将其乘以 100。 + +![](https://opensource.com/sites/default/files/uploads/cpu-usage.png) + +### 了解更多 + +Prometheus 是一个功能强大、可扩展、轻量级、易于使用和部署的监视工具,对于每个系统管理员和开发人员来说都是必不可少的。出于这些原因和其他原因,许多公司正在将 Prometheus 作为其基础设施的一部分。 + +要了解有关 Prometheus 及其功能的更多信息,我建议使用以下资源: + ++ 关于 [PromQL][8] ++ 什么是 [node_exporters 集合][9] ++ [Prometheus 函数][10] ++ [4 个开源监控工具] [11] ++ [现已推出:DevOps 监控工具的开源指南] [12] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/12/introduction-prometheus + +作者:[Michael Zamot][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://opensource.com/users/mzamot +[b]: https://github.com/lujun9972 +[1]: https://prometheus.io/ +[2]: https://www.cncf.io/ +[3]: https://prometheus.io/docs/alerting/alertmanager/ +[4]: https://en.wikipedia.org/wiki/PagerDuty +[5]: https://grafana.com/ +[6]: https://opensource.com/article/18/3/how-use-ansible-set-system-monitoring-prometheus +[7]: https://prometheus.io/docs/prometheus/latest/querying/basics/ +[8]: https://prometheus.io/docs/prometheus/latest/querying/basics/ +[9]: https://github.com/prometheus/node_exporter#collectors +[10]: https://prometheus.io/docs/prometheus/latest/querying/functions/ +[11]: https://opensource.com/article/18/8/open-source-monitoring-tools +[12]: https://opensource.com/article/18/8/now-available-open-source-guide-devops-monitoring-tools From ec5699faef32e680a19d2f5630d05225bdb70023 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 12:00:46 +0800 Subject: [PATCH 488/951] PUB @wxy https://linux.cn/article-11234-1.html --- .../20181220 Getting started with Prometheus.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181220 Getting started with Prometheus.md (99%) diff --git a/translated/tech/20181220 Getting started with Prometheus.md b/published/20181220 Getting started with Prometheus.md similarity index 99% rename from translated/tech/20181220 Getting started with Prometheus.md rename to published/20181220 Getting started with Prometheus.md index 4c8b7b0ab4..47a9160dab 100644 --- a/translated/tech/20181220 Getting started with Prometheus.md +++ b/published/20181220 Getting started with Prometheus.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11234-1.html) [#]: subject: (Getting started with Prometheus) [#]: via: (https://opensource.com/article/18/12/introduction-prometheus) [#]: author: (Michael Zamot https://opensource.com/users/mzamot) From bee0624400683e664e075f4b17abaa7c526d1bae Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 17:11:51 +0800 Subject: [PATCH 489/951] APL --- sources/tech/20190318 Let-s try dwm - dynamic window manager.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190318 Let-s try dwm - dynamic window manager.md b/sources/tech/20190318 Let-s try dwm - dynamic window manager.md index 48f44a33cb..850742bc62 100644 --- a/sources/tech/20190318 Let-s try dwm - dynamic window manager.md +++ b/sources/tech/20190318 Let-s try dwm - dynamic window manager.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From adcdd54b725bc19e0da469efe73f380b5b42e158 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 18:27:26 +0800 Subject: [PATCH 490/951] TSL&PRF @wxy --- ... Let-s try dwm - dynamic window manager.md | 150 ------------------ ... Let-s try dwm - dynamic window manager.md | 150 ++++++++++++++++++ 2 files changed, 150 insertions(+), 150 deletions(-) delete mode 100644 sources/tech/20190318 Let-s try dwm - dynamic window manager.md create mode 100644 translated/tech/20190318 Let-s try dwm - dynamic window manager.md diff --git a/sources/tech/20190318 Let-s try dwm - dynamic window manager.md b/sources/tech/20190318 Let-s try dwm - dynamic window manager.md deleted file mode 100644 index 850742bc62..0000000000 --- a/sources/tech/20190318 Let-s try dwm - dynamic window manager.md +++ /dev/null @@ -1,150 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Let’s try dwm — dynamic window manager) -[#]: via: (https://fedoramagazine.org/lets-try-dwm-dynamic-window-manger/) -[#]: author: (Adam Šamalík https://fedoramagazine.org/author/asamalik/) - -Let’s try dwm — dynamic window manager -====== - -![][1] - -If you like efficiency and minimalism, and are looking for a new window manager for your Linux desktop, you should try _dwm_ — dynamic window manager. Written in under 2000 standard lines of code, dwm is extremely fast yet powerful and highly customizable window manager. - -You can dynamically choose between tiling, monocle and floating layouts, organize your windows into multiple workspaces using tags, and quickly navigate through using keyboard shortcuts. This article helps you get started using dwm. - -## **Installation** - -To install dwm on Fedora, run: - -``` -$ sudo dnf install dwm dwm-user -``` - -The _dwm_ package installs the window manager itself, and the _dwm-user_ package significantly simplifies configuration which will be explained later in this article. - -Additionally, to be able to lock the screen when needed, we’ll also install _slock_ — a simple X display locker. - -``` -$ sudo dnf install slock -``` - -However, you can use a different one based on your personal preference. - -## **Quick start** - -To start dwm, choose the _dwm-user_ option on the login screen. - -![][2] - -After you log in, you’ll see a very simple desktop. In fact, the only thing there will be a bar at the top listing our nine tags that represent workspaces and a _[]=_ symbol that represents the layout of your windows. - -### Launching applications - -Before looking into the layouts, first launch some applications so you can play with the layouts as you go. Apps can be started by pressing _Alt+p_ and typing the name of the app followed by _Enter_. There’s also a shortcut _Alt+Shift+Enter_ for opening a terminal. - -Now that some apps are running, have a look at the layouts. - -### Layouts - -There are three layouts available by default: the tiling layout, the monocle layout, and the floating layout. - -The tiling layout, represented by _[]=_ on the bar, organizes windows into two main areas: master on the left, and stack on the right. You can activate the tiling layout by pressing _Alt+t._ - -![][3] - -The idea behind the tiling layout is that you have your primary window in the master area while still seeing the other ones in the stack. You can quickly switch between them as needed. - -To swap windows between the two areas, hover your mouse over one in the stack area and press _Alt+Enter_ to swap it with the one in the master area. - -![][4] - -The monocle layout, represented by _[N]_ on the top bar, makes your primary window take the whole screen. You can switch to it by pressing _Alt+m_. - -Finally, the floating layout lets you move and resize your windows freely. The shortcut for it is _Alt+f_ and the symbol on the top bar is _> <>_. - -### Workspaces and tags - -Each window is assigned to a tag (1-9) listed at the top bar. To view a specific tag, either click on its number using your mouse or press _Alt+1..9._ You can even view multiple tags at once by clicking on their number using the secondary mouse button. - -Windows can be moved between different tags by highlighting them using your mouse, and pressing _Alt+Shift+1..9._ - -## **Configuration** - -To make dwm as minimalistic as possible, it doesn’t use typical configuration files. Instead, you modify a C header file representing the configuration, and recompile it. But don’t worry, in Fedora it’s as simple as just editing one file in your home directory and everything else happens in the background thanks to the _dwm-user_ package provided by the maintainer in Fedora. - -First, you need to copy the file into your home directory using a command similar to the following: - -``` -$ mkdir ~/.dwm -$ cp /usr/src/dwm-VERSION-RELEASE/config.def.h ~/.dwm/config.h -``` - -You can get the exact path by running _man dwm-start._ - -Second, just edit the _~/.dwm/config.h_ file. As an example, let’s configure a new shortcut to lock the screen by pressing _Alt+Shift+L_. - -Considering we’ve installed the _slock_ package mentioned earlier in this post, we need to add the following two lines into the file to make it work: - -Under the _/* commands */_ comment, add: - -``` -static const char *slockcmd[] = { "slock", NULL }; -``` - -And the following line into _static Key keys[]_ : - -``` -{ MODKEY|ShiftMask, XK_l, spawn, {.v = slockcmd } }, -``` - -In the end, it should look like as follows: (added lines are highlighted) - -``` -... - /* commands */ - static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ - static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; - static const char *termcmd[] = { "st", NULL }; - static const char *slockcmd[] = { "slock", NULL }; - - static Key keys[] = { - /* modifier key function argument */ - { MODKEY|ShiftMask, XK_l, spawn, {.v = slockcmd } }, - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, - ... -``` - -Save the file. - -Finally, just log out by pressing _Alt+Shift+q_ and log in again. The scripts provided by the _dwm-user_ package will recognize that you have changed the _config.h_ file in your home directory and recompile dwm on login. And becuse dwm is so tiny, it’s fast enough you won’t even notice it. - -You can try locking your screen now by pressing _Alt+Shift+L_ , and then logging back in again by typing your password and pressing enter. - -## **Conclusion** - -If you like minimalism and want a very fast yet powerful window manager, dwm might be just what you’ve been looking for. However, it probably isn’t for beginners. There might be a lot of additional configuration you’ll need to do in order to make it just as you like it. - -To learn more about dwm, see the project’s homepage at . - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/lets-try-dwm-dynamic-window-manger/ - -作者:[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/2019/03/dwm-magazine-image-816x345.png -[2]: https://fedoramagazine.org/wp-content/uploads/2019/03/choosing-dwm-1024x469.png -[3]: https://fedoramagazine.org/wp-content/uploads/2019/03/dwm-desktop-1024x593.png -[4]: https://fedoramagazine.org/wp-content/uploads/2019/03/Screenshot-2019-03-15-at-11.12.32-1024x592.png diff --git a/translated/tech/20190318 Let-s try dwm - dynamic window manager.md b/translated/tech/20190318 Let-s try dwm - dynamic window manager.md new file mode 100644 index 0000000000..84c74e2f35 --- /dev/null +++ b/translated/tech/20190318 Let-s try dwm - dynamic window manager.md @@ -0,0 +1,150 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Let’s try dwm — dynamic window manager) +[#]: via: (https://fedoramagazine.org/lets-try-dwm-dynamic-window-manger/) +[#]: author: (Adam Šamalík https://fedoramagazine.org/author/asamalik/) + +试试动态窗口管理器 dwm 吧 +====== + +![][1] + +如果你崇尚效率和极简主义,并且正在为你的 Linux 桌面寻找新的窗口管理器,那么你应该尝试一下动态窗口管理器dynamic window manager dwm。以不到 2000 标准行的代码写就的 dwm,是一个速度极快而功能强大,且可高度定制的窗口管理器。 + +你可以在平铺、单片和浮动布局之间动态选择,使用标签将窗口组织到多个工作区,并使用键盘快捷键快速导航。本文将帮助你开始使用 dwm。 + +### 安装 + +要在 Fedora 上安装 dwm,运行: + +``` +$ sudo dnf install dwm dwm-user +``` + +`dwm` 包会安装窗口管理器本身,`dwm-user` 包显著简化了配置,本文稍后将对此进行说明。 + +此外,为了能够在需要时锁定屏幕,我们还将安装 `slock`,这是一个简单的 X 显示锁屏。 + +``` +$ sudo dnf install slock +``` + +当然,你可以根据你的个人喜好使用其它的锁屏。 + +### 快速入门 + +要启动 dwm,在登录屏选择 “dwm-user” 选项。 + +![][2] + +登录后,你将看到一个非常简单的桌面。事实上,顶部唯一的一个面板列出了代表工作空间的 9 个标签和一个代表窗户布局的 `[]=` 符号。 + +#### 启动应用 + +在查看布局之前,首先启动一些应用程序,以便你可以随时使用布局。可以通过按 `Alt+p` 并键入应用程序的名称,然后回车来启动应用程序。还有一个快捷键 `Alt+Shift+Enter` 用于打开终端。 + +现在有一些应用程序正在运行了,请查看布局。 + +#### 布局 + +默认情况下有三种布局:平铺布局,单片布局和浮动布局。 + +平铺布局由条形图上的 `[]=` 表示,它将窗口组织为两个主要区域:左侧为主区域,右侧为堆叠区。你可以按 `Alt+t` 激活平铺布局。 + +![][3] + +平铺布局背后的想法是,主窗口放在主区域中,同时仍然可以看到堆叠区中的其他窗口。你可以根据需要在它们之间快速切换。 + +要在两个区域之间交换窗口,请将鼠标悬停在堆叠区中的一个窗口上,然后按 `Alt+Enter` 将其与主区域中的窗口交换。 + +![][4] + +单片布局由顶部栏上的 `[N]` 表示,可以使你的主窗口占据整个屏幕。你可以按 `Alt+m` 切换到它。 + +最后,浮动布局可让你自由移动和调整窗口大小。它的快捷方式是 `Alt+f`,顶栏上的符号是 `><>`。 + +#### 工作区和标签 + +每个窗口都分配了一个顶部栏中列出的标签(1-9)。要查看特定标签,请使用鼠标单击其编号或按 `Alt+1..9`。你甚至可以使用鼠标右键单击其编号,一次查看多个标签。 + +通过使用鼠标突出显示后,并按 `Alt+Shift+1..9`,窗口可以在不同标签之间移动。 + +### 配置 + +为了使 dwm 尽可能简约,它不使用典型的配置文件。而是你需要修改代表配置的 C 语言头文件,并重新编译它。但是不要担心,在 Fedora 中你只需要简单地编辑主目录中的一个文件,而其他一切都会在后台发生,这要归功于 Fedora 的维护者提供的 `dwm-user` 包。 + +首先,你需要使用类似于以下的命令将文件复制到主目录中: + +``` +$ mkdir ~/.dwm +$ cp /usr/src/dwm-VERSION-RELEASE/config.def.h ~/.dwm/config.h +``` + +你可以通过运行 `man dwm-start` 来获取确切的路径。 + +其次,只需编辑 `~/.dwm/config.h` 文件。例如,让我们配置一个新的快捷方式:通过按 `Alt+Shift+L` 来锁定屏幕。 + +考虑到我们已经安装了本文前面提到的 `slock` 包,我们需要在文件中添加以下两行以使其工作: + +在 `/* commands */` 注释下,添加: + +``` +static const char *slockcmd[] = { "slock", NULL }; +``` + +添加下列行到 `static Key keys[]` 中: + +``` +{ MODKEY|ShiftMask, XK_l, spawn, {.v = slockcmd } }, +``` + +最终,它应该看起来如下: + +``` +... + /* commands */ + static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ + static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; + static const char *termcmd[] = { "st", NULL }; + static const char *slockcmd[] = { "slock", NULL }; + + static Key keys[] = { + /* modifier key function argument */ + { MODKEY|ShiftMask, XK_l, spawn, {.v = slockcmd } }, + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, + { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, + ... +``` + +保存文件。 + +最后,按 `Alt+Shift+q` 注销,然后重新登录。`dwm-user` 包提供的脚本将识别你已更改主目录中的`config.h` 文件,并会在登录时重新编译 dwm。因为 dwm 非常小,它快到你甚至都不会注意到它重新编译了。 + +你现在可以尝试按 `Alt+Shift+L` 锁定屏幕,然后输入密码并按回车键再次登录。 + +### 总结 + +如果你崇尚极简主义并想要一个非常快速而功能强大的窗口管理器,dwm 可能正是你一直在寻找的。但是,它可能不适合初学者,你可能需要做许多其他配置才能按照你的喜好进行配置。 + +要了解有关 dwm 的更多信息,请参阅该项目的主页: 。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/lets-try-dwm-dynamic-window-manger/ + +作者:[Adam Šamalík][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/asamalik/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/03/dwm-magazine-image-816x345.png +[2]: https://fedoramagazine.org/wp-content/uploads/2019/03/choosing-dwm-1024x469.png +[3]: https://fedoramagazine.org/wp-content/uploads/2019/03/dwm-desktop-1024x593.png +[4]: https://fedoramagazine.org/wp-content/uploads/2019/03/Screenshot-2019-03-15-at-11.12.32-1024x592.png From 9c4fd39dbc4cf71fa73a7b3fbacb59f4cee9ecde Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Aug 2019 18:31:12 +0800 Subject: [PATCH 491/951] PUB @wxy https://linux.cn/article-11235-1.html --- .../20190318 Let-s try dwm - dynamic window manager.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190318 Let-s try dwm - dynamic window manager.md (98%) diff --git a/translated/tech/20190318 Let-s try dwm - dynamic window manager.md b/published/20190318 Let-s try dwm - dynamic window manager.md similarity index 98% rename from translated/tech/20190318 Let-s try dwm - dynamic window manager.md rename to published/20190318 Let-s try dwm - dynamic window manager.md index 84c74e2f35..241869a24d 100644 --- a/translated/tech/20190318 Let-s try dwm - dynamic window manager.md +++ b/published/20190318 Let-s try dwm - dynamic window manager.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11235-1.html) [#]: subject: (Let’s try dwm — dynamic window manager) [#]: via: (https://fedoramagazine.org/lets-try-dwm-dynamic-window-manger/) [#]: author: (Adam Šamalík https://fedoramagazine.org/author/asamalik/) From 529d9b439c79e9682efde5b6efda0d146d7c15b7 Mon Sep 17 00:00:00 2001 From: cycoe Date: Fri, 16 Aug 2019 21:23:18 +0800 Subject: [PATCH 492/951] translating by cycoe && add lacking informations --- ... brief history of text-based games and open source.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sources/talk/20180720 A brief history of text-based games and open source.md b/sources/talk/20180720 A brief history of text-based games and open source.md index 2b8728fb39..a16799d551 100644 --- a/sources/talk/20180720 A brief history of text-based games and open source.md +++ b/sources/talk/20180720 A brief history of text-based games and open source.md @@ -1,3 +1,12 @@ +[#]: collector: (lujun9972) +[#]: translator: (cycoe) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A brief history of text-based games and open source) +[#]: via: (https://opensource.com/article/18/7/interactive-fiction-tools) +[#]: author: (Jason Mclntosh https://opensource.com/users/jmac) + A brief history of text-based games and open source ====== From 1c6eaba883cd70234ee5e7ce35e397f9372b4536 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 16 Aug 2019 22:59:44 +0800 Subject: [PATCH 493/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2016=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E4=BA=94=2022:59:43=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...116 Command Line Heroes- Season 1- OS Wars.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index bc7d25aee3..67250b8d21 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -54,7 +54,7 @@ Saron Yitbarek: Voice Actor: -女士们,先生们, 现在向你们展示的是 Macintosh 软件约会游戏. +女士们,先生们, 现在是 Macintosh 软件的约会游戏. Saron Yitbarek: @@ -68,35 +68,35 @@ James Allworth: [00:05:30] -我猜从哲学上来讲, 一个更理想化,注重用户体验高于一切, 是一个综合性的组织, 而微软则更务实,更模块化- +我猜从哲学上来讲, 一个更理想化,注重用户体验高于一切, 是一个集成的组织, 而微软则更务实,更模块化- Saron Yitbarek: -That's James Allworth. He's a prolific tech writer who worked inside the corporate team of Apple Retail. Notice that definition of Apple he gives. An integrated organization. That sense of a company beholden only to itself. A company that doesn't want to rely on others. That's key. +这是James Allworth。他是一位多产的科技作家,曾在苹果零售团队工作。注意他给出的苹果的定义。一个集成的组织。那种只对自己负责的公司。一个不想依赖别人的公司。这是关键。 James Allworth: [00:06:00] -Apple was the integrated player, and it wanted to focus on a delightful user experience, and that meant that it wanted to control the entire stack and everything that was delivered, from the hardware to the operating system, to even some of the applications that ran on top of the operating system. That always served it well in periods where new innovations, important innovations, were coming to market where you needed to be across both hardware and software, and where being able to change the hardware based on what you wanted to do and what t was new in software was an advantage. For example- +苹果是一家集成的公司,它专注于愉悦的用户体验,这意味着它希望控制整技术栈以及交付的一切内容,从硬件到操作系统,甚至运行在操作系统上的应用程序。 +当新的创新,重要的创新刚刚进入市场,而你需要横跨软硬件,并且能够根据自己意愿和软件的革新来改变硬件时,这是一个优势。例如-, [00:06:30] Saron Yitbarek: [00:07:00] - -A lot of people loved that integration, and became die hard Apple fans. Plenty of others stuck with Microsoft. Back to that sales conference in Honolulu. At that very same event, Jobs gave his audience a sneak peek at the Superbowl ad he was about to release. You might have seen it for yourself. Think George Orwell's 1984. In this cold and gray world, mindless automatons are shuffling along under a dictator's projected gaze. They represent IBM users. Then, beautiful, athletic Anya Major, representing Apple, comes running through the hall in full color. She hurls her sledgehammer at Big Brother's screen, smashing it to bits. Big Brother's spell is broken, and a booming voice tells us that Apple is about to introduce the Macintosh. +很多人喜欢这种整合的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。回到 Honolulu 的销售会议上。在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想 George Orwell 的1984。在这个冰冷、灰暗的世界里,在独裁者投射的目光下,没有头脑的机器人正在缓慢移动。这些机器人代表着IBM的用户们。然后,代表苹果公司的美丽而健壮的Anya Major 穿着鲜艳的衣服跑过大厅。她向着老大哥的屏幕猛地透出大锤,将它砸成一片一片的. 老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍 Macintosh 了。 Voice Actor: -And you'll see why 1984 will not be like 1984. +这就是为什么现实中的1984跟小说1984不一样了. Saron Yitbarek: [00:07:30] -And yeah, looking back at that commercial, the idea that Apple was a freedom fighter working to set the masses free is a bit much. But the thing hit a nerve. Ken Segal worked at the advertising firm that made the commercial for Apple. He was Steve Jobs' advertising guy for more than a decade in the early days. +是的,现在回顾这则广告,认为苹果是一个致力于解放大众的自由斗士的想法有点过分了。但这件事触动了我的神经。Ken Segal 曾在为苹果制作这则广告的广告公司工作过。在早期,他为 Steve Jobs 做了十多年的广告。 Ken Segal: From 782e7a04d9b210a95122e37bc77b1f47dc13ec2f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:52:07 +0800 Subject: [PATCH 494/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190816=20Cockpi?= =?UTF-8?q?t=20and=20the=20evolution=20of=20the=20Web=20User=20Interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190816 Cockpit and the evolution of the Web User Interface.md --- ...the evolution of the Web User Interface.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 sources/tech/20190816 Cockpit and the evolution of the Web User Interface.md diff --git a/sources/tech/20190816 Cockpit and the evolution of the Web User Interface.md b/sources/tech/20190816 Cockpit and the evolution of the Web User Interface.md new file mode 100644 index 0000000000..267a54e8d7 --- /dev/null +++ b/sources/tech/20190816 Cockpit and the evolution of the Web User Interface.md @@ -0,0 +1,169 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Cockpit and the evolution of the Web User Interface) +[#]: via: (https://fedoramagazine.org/cockpit-and-the-evolution-of-the-web-user-interface/) +[#]: author: (Shaun Assam https://fedoramagazine.org/author/sassam/) + +Cockpit and the evolution of the Web User Interface +====== + +![][1] + +Over 3 years ago the Fedora Magazine published an article entitled [Cockpit: an overview][2]. Since then, the interface has see some eye-catching changes. Today’s Cockpit is cleaner and the larger fonts makes better use of screen real-estate. + +This article will go over some of the changes made to the UI. It will also explore some of the general tools available in the web interface to simplify those monotonous sysadmin tasks. + +### Cockpit installation + +Cockpit can be installed using the **dnf install cockpit** command. This provides a minimal setup providing the basic tools required to use the interface. + +Another option is to install the Headless Management group. This will install additional packages used to extend the usability of Cockpit. It includes extensions for NetworkManager, software packages, disk, and SELinux management. + +Run the following commands to enable the web service on boot and open the firewall port: + +``` +$ sudo systemctl enable --now cockpit.socket +Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket -> /usr/lib/systemd/system/cockpit.socket + +$ sudo firewall-cmd --permanent --add-service cockpit +success +$ sudo firewall-cmd --reload +success +``` + +### Logging into the web interface + +To access the web interface, open your favourite browser and enter the server’s domain name or IP in the address bar followed by the service port (9090). Because Cockpit uses HTTPS, the installation will create a self-signed certificate to encrypt passwords and other sensitive data. You can safely accept this certificate, or request a CA certificate from your sysadmin or a trusted source. + +Once the certificate is accepted, the new and improved login screen will appear. Long-time users will notice the username and password fields have been moved to the top. In addition, the white background behind the credential fields immediately grabs the user’s attention. + +![][3] + +A feature added to the login screen since the previous article is logging in with **sudo** privileges — if your account is a member of the wheel group. Check the box beside _Reuse my password for privileged tasks_ to elevate your rights. + +Another edition to the login screen is the option to connect to remote servers also running the Cockpit web service. Click _Other Options_ and enter the host name or IP address of the remote machine to manage it from your local browser. + +### Home view + +Right off the bat we get a basic overview of common system information. This includes the make and model of the machine, the operating system, if the system is up-to-date, and more. + +![][4] + +Clicking the make/model of the system displays hardware information such as the BIOS/Firmware. It also includes details about the components as seen with **lspci**. + +![][5] + +Clicking on any of the options to the right will display the details of that device. For example, the _% of CPU cores_ option reveals details on how much is used by the user and the kernel. In addition, the _Memory & Swap_ graph displays how much of the system’s memory is used, how much is cached, and how much of the swap partition active. The _Disk I/O_ and _Network Traffic_ graphs are linked to the Storage and Networking sections of Cockpit. These topics will be revisited in an upcoming article that explores the system tools in detail. + +#### Secure Shell Keys and authentication + +Because security is a key factor for sysadmins, Cockpit now has the option to view the machine’s MD5 and SHA256 key fingerprints. Clicking the **Show fingerprints** options reveals the server’s ECDSA, ED25519, and RSA fingerprint keys. + +![][6] + +You can also add your own keys by clicking on your username in the top-right corner and selecting **Authentication**. Click on **Add keys** to validate the machine on other systems. You can also revoke your privileges in the Cockpit web service by clicking on the **X** button to the right. + +![][7] + +#### Changing the host name and joining a domain + +Changing the host name is a one-click solution from the home page. Click the host name currently displayed, and enter the new name in the _Change Host Name_ box. One of the latest features is the option to provide a _Pretty name_. + +Another feature added to Cockpit is the ability to connect to a directory server. Click _Join a domain_ and a pop-up will appear requesting the domain address or name, organization unit (optional), and the domain admin’s credentials. The Domain Membership group provides all the packages required to join an LDAP server including FreeIPA, and the popular Active Directory. + +To opt-out, click on the domain name followed by _Leave Domain_. A warning will appear explaining the changes that will occur once the system is no longer on the domain. To confirm click the red _Leave Domain_ button. + +![][8] + +#### Configuring NTP and system date and time + +Using the command-line and editing config files definitely takes the cake when it comes to maximum tweaking. However, there are times when something more straightforward would suffice. With Cockpit, you have the option to set the system’s date and time manually or automatically using NTP. Once synchronized, the information icon on the right turns from red to blue. The icon will disappear if you manually set the date and time. + +To change the timezone, type the continent and a list of cities will populate beneath. + +![][9] + +#### Shutting down and restarting + +You can easily shutdown and restart the server right from home screen in Cockpit. You can also delay the shutdown/reboot and send a message to warn users. + +![][10] + +#### Configuring the performance profile + +If the _tuned_ and _tuned-utils_ packages are installed, performance profiles can be changed from the main screen. By default it is set to a recommended profile. However, if the purpose of the server requires more performance, we can change the profile from Cockpit to suit those needs. + +![][11] + +### Terminal web console + +A Linux sysadmin’s toolbox would be useless without access to a terminal. This allows admins to fine-tune the server beyond what’s available in Cockpit. With the addition of themes, admins can quickly adjust the text and background colours to suit their preference. + +Also, if you type **exit** by mistake, click the _Reset_ button in the top-right corner*.* This will provide a fresh screen with a flashing cursor. + +![][12] + +### Adding a remote server and the Dashboard overlay + +The Headless Management group includes the Dashboard module (**cockpit-dashboard**). This provides an overview the of the CPU, memory, network, and disk performance in a real-time graph. Remote servers can also be added and managed through the same interface. + +For example, to add a remote computer in Dashboard, click the **+** button. Enter the name or IP address of the server and select the colour of your choice. This helps to differentiate the stats of the servers in the graph. To switch between servers, click on the host name (as seen in the screen-cast below). To remove a server from the list, click the check-mark icon, then click the red trash icon. The example below demonstrates how Cockpit manages a remote machine named _server02.local.lan_. + +![][13] + +### Documentation and finding help + +As always, the _man_ pages are a great place to find documentation. A simple search in the command-line results with pages pertaining to different aspects of using and configuring the web service. + +``` +$ man -k cockpit +cockpit (1) - Cockpit +cockpit-bridge (1) - Cockpit Host Bridge +cockpit-desktop (1) - Cockpit Desktop integration +cockpit-ws (8) - Cockpit web service +cockpit.conf (5) - Cockpit configuration file +``` + +The Fedora repository also has a package called **cockpit-doc**. The package’s description explains it best: + +> The Cockpit Deployment and Developer Guide shows sysadmins how to deploy Cockpit on their machines as well as helps developers who want to embed or extend Cockpit. + +For more documentation visit + +### Conclusion + +This article only touches upon some of the main functions available in Cockpit. Managing storage devices, networking, user account, and software control will be covered in an upcoming article. In addition, optional extensions such as the 389 directory service, and the _cockpit-ostree_ module used to handle packages in Fedora Silverblue. + +The options continue to grow as more users adopt Cockpit. The interface is ideal for admins who want a light-weight interface to control their server(s). + +What do you think about Cockpit? Share your experience and ideas in the comments below. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/cockpit-and-the-evolution-of-the-web-user-interface/ + +作者:[Shaun Assam][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/sassam/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-816x345.jpg +[2]: https://fedoramagazine.org/cockpit-overview/ +[3]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-login-screen.png +[4]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-home-screen.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-system-info.gif +[6]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-ssh-key-fingerprints.png +[7]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-authentication.png +[8]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-hostname-domain.gif +[9]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-date-time.png +[10]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-power-options.gif +[11]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-tuned.gif +[12]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-terminal.gif +[13]: https://fedoramagazine.org/wp-content/uploads/2019/08/cockpit-add-remote-servers.gif From f4f8cc7fbfb993b3c93ee8a9804e3826f6897616 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:52:24 +0800 Subject: [PATCH 495/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190817=20Share?= =?UTF-8?q?=20Your=20Keyboard=20and=20Mouse=20Between=20Linux=20and=20Rasp?= =?UTF-8?q?berry=20Pi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190817 Share Your Keyboard and Mouse Between Linux and Raspberry Pi.md --- ...nd Mouse Between Linux and Raspberry Pi.md | 209 ++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sources/tech/20190817 Share Your Keyboard and Mouse Between Linux and Raspberry Pi.md diff --git a/sources/tech/20190817 Share Your Keyboard and Mouse Between Linux and Raspberry Pi.md b/sources/tech/20190817 Share Your Keyboard and Mouse Between Linux and Raspberry Pi.md new file mode 100644 index 0000000000..71c1e77b02 --- /dev/null +++ b/sources/tech/20190817 Share Your Keyboard and Mouse Between Linux and Raspberry Pi.md @@ -0,0 +1,209 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Share Your Keyboard and Mouse Between Linux and Raspberry Pi) +[#]: via: (https://itsfoss.com/keyboard-mouse-sharing-between-computers/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Share Your Keyboard and Mouse Between Linux and Raspberry Pi +====== + +_**This DIY tutorial teaches you to share mouse and keyboard between multiple computers using open source software Barrier.**_ + +I have a multi-monitor setup where my [Dell XPS running Ubuntu][1] is connected to two external monitors. I recently got a [Raspberry Pi 4][2] that has the capability to double up as a desktop. I bought a new screen so that I could set it up for monitoring the performance of my cloud servers. + +Now the problem is that I have fours screens and one pair of keyboard and mouse. I could use a new keyboard-mouse pair but my desk doesn’t have enough free space and it’s not very convenient to switch keyboards and mouse all the time. + +One way to tackle this problem would be to buy a kvm switch. This is a handy gadget that allows you to use same display screen, keyboard and mouse between several computers running various operating systems. You can easily find one for around $30 on Amazon. + +Bestseller No. 1 + +[][3] + +[UGREEN USB Switch Selector 2 Computers Sharing 4 USB Devices USB 2.0 Peripheral Switcher Box Hub for Mouse, Keyboard, Scanner, Printer, PCs with One-Button Swapping and 2 Pack USB A to A Cable][3] + +Ugreen Group Limited - Electronics + +$18.99 [][4] + +But I didn’t go for the hardware solution. I opted for a software based approach to share the keyboard and mouse between computers. + +I used [Barrier][5], an open source fork of the now proprietary software [Synergy][6]. Synergy Core is still open source but you can’t get encryption option in its GUI. With all its limitation, Barrier works fine for me. + +Let’s see how you can use Barrier to share mouse and keyboard with multiple computers. Did I mention that you can even share clipboard and thus copy paste text between the computers? + +### Set up Barrier to share keyboard and mouse between Linux and Raspberry Pi or other devices + +![][7] + +I have prepared this tutorial with Ubuntu 18.04.3 and Raspbian 10. Some installation instructions may differ based on your distribution and version but you’ll get the idea of what you need to do here. + +#### Step 1: Install Barrier + +The first step is obvious. You need to install Barrier in your computer. + +Barrier is available in the universe repository starting Ubuntu 19.04 so you can easily install it using apt command. + +You’ll have to use the snap version of Barrier in Ubuntu 18.04. Open Software Center and search for Barrier. I recommend using barrier-maxiberta + +![Install this Barrier version][8] + +On other distributions, you should [enable Snap][9] first and then use this command: + +``` +sudo snap install barrier-maxiberta +``` + +Barrier is available in Debian 10 repositories. So installing barrier on Raspbian was easy with the [apt command][10]: + +``` +sudo apt install barrier +``` + +Once you have installed the software, it’s time to configure it. + +[][11] + +Suggested read  Fix Application Installation Issues In elementary OS + +#### Step 2: Configure Barrier server + +Barrier works on server-client model. You should configure your main computer as server and the secondary computer as client. + +In my case, my Ubuntu 18.04 is my main system so I set it up as the server. Search for Barrier in menu and start it. + +![Setup Barrier as server][12] + +You should see an IP address and an SSL fingerprint. It’s not entirely done because you have to configure the server a little. Click on Configure Server option. + +![Configure the Barrier server][13] + +In here, you should see your own system in the center. Now you have to drag and drop the computer icon from the top right to a suitable position. The position is important because that’s how your mouse pointer will move between screens. + +![Setup Barrier server with client screens][14] + +Do note that you should provide the [hostname][15] of the client computer. In my case, it was raspberrypi. It won’t work if the hostname is not correct. Don’t know the client’s hostname? Don’t worry, you can get it from the client system. + +#### Step 3: Setup barrier client + +On the second computer, start Barrier and choose to use it as client. + +![Setup Barrier Client on Raspberry Pi][16] + +You need to provide the IP address of Barrier server. You can find this IP address on the Barrier application running on the main system (see the screenshots in previous section). + +![Setup Barrier Client on Raspberry Pi][17] + +If you see an option to accept secure connection from another computer, accept it. + +You should be now able to move your mouse pointer between the screens connected to two different computers running two different operating systems. How cool is that! + +### Optional: Autostart Barrier [Intermediate to Advanced Users] + +Now that you have setup Barrier and enjoying by using the same mouse and keyboard for more than one computers, what happens when you reboot your system? You need to start Barrier in both the systems again, right? This means that you need to connect keyboard-mouse to the second computer as well. + +[][18] + +Suggested read  How To Fix Windows Updates Stuck At 0% + +Since I use Wireless mouse and keyboard, this is still easier as all I need to do is to take the adapter from my laptop and plug it in the Raspberry Pi. This works but I don’t want to do this extra step. This is why I made Barrier running at the start on both systems so that I could use the same mouse and keyboard without any additional step. + +There is no autostart option in the Barrier application. But it’s easy to [add an application to autostart in Ubuntu][19]. Just open the Startup Applications program and add the command _**barrier-maxiberta.barrier**_ here. + +![Adding Barrier To Startup applications in Ubuntu][20] + +That was the easy part. It’s not the same in Raspberry Pi though. Since Raspbian uses systemd, you can use it to create a new service that will run at the boot time. + +Open a terminal and create a new file named barrier.service in /etc/systemd/system directory. If this directory doesn’t exist, create it. You can use your favorite command line text editor for this task. I used Vim here. + +``` +sudo vim /etc/systemd/system/barrier.service +``` + +Now add lines like these to your file. _**You must replace 192.168.0.109 with your barrier server’s IP address.**_ + +``` +[Unit] +Description=Barrier Client mouse/keyboard share +Requires=display-manager.service +After=display-manager.service +StartLimitIntervalSec=0 + +[Service] +Type=forking +ExecStart=/usr/bin/barrierc --no-restart --name raspberrypi --enable-crypto 192.168.0.109 +Restart=always +RestartSec=10 +User=pi + +[Install] +WantedBy=multi-user.target +``` + +Save your file. I would advise to run the command mentioned in ExecStart line manually to see if it works or not. This will save you some headache later. + +Reload the systemd daemon: + +``` +sudo systemctl daemon-reload +``` + +Now start this new service + +``` +systemctl start barrier.service +``` + +Check its status to see if its running fine: + +``` +systemctl status barrier.service +``` + +If it works, add it to startup services: + +``` +systemctl enable barrier.service +``` + +This should take care of things for you. Now you should be able to control the Raspberry Pi (or any other second computer) with a single keyboard mouse pair. + +I know that these DIY stuff may not work straightforward for everyone so if you face issues, let me know in the comments and I’ll try to help you out. + +If it worked for you or if you use some other solution to share the mouse and keyboard between the computers, do mention it in the comments. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/keyboard-mouse-sharing-between-computers/ + +作者:[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/dell-xps-13-ubuntu-review/ +[2]: https://itsfoss.com/raspberry-pi-4/ +[3]: https://www.amazon.com/UGREEN-Selector-Computers-Peripheral-One-Button/dp/B01MXXQKGM?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01MXXQKGM&keywords=kvm%20switch (UGREEN USB Switch Selector 2 Computers Sharing 4 USB Devices USB 2.0 Peripheral Switcher Box Hub for Mouse, Keyboard, Scanner, Printer, PCs with One-Button Swapping and 2 Pack USB A to A Cable) +[4]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime) +[5]: https://github.com/debauchee/barrier +[6]: https://symless.com/synergy +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/08/Share-Keyboard-and-Mouse.jpg?resize=800%2C450&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/barrier-ubuntu-snap.jpg?ssl=1 +[9]: https://itsfoss.com/install-snap-linux/ +[10]: https://itsfoss.com/apt-command-guide/ +[11]: https://itsfoss.com/fix-application-installation-issues-elementary-os-loki/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/barrier-2.jpg?resize=800%2C512&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/barrier-server-ubuntu.png?resize=800%2C450&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/barrier-server-configuration.png?ssl=1 +[15]: https://itsfoss.com/change-hostname-ubuntu/ +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/setup-barrier-client.jpg?resize=800%2C400&ssl=1 +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/08/setup-barrier-client-2.jpg?resize=800%2C400&ssl=1 +[18]: https://itsfoss.com/fix-windows-updates-stuck-0/ +[19]: https://itsfoss.com/manage-startup-applications-ubuntu/ +[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/08/adding-barrier-to-startup-apps-ubuntu.jpg?ssl=1 From 19dd615b7214344d3d1101bf6d2862a62c6cf2e3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:52:35 +0800 Subject: [PATCH 496/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190817=20LiVES?= =?UTF-8?q?=20Video=20Editor=203.0=20is=20Here=20With=20Significant=20Impr?= =?UTF-8?q?ovements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md --- ...0 is Here With Significant Improvements.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md diff --git a/sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md b/sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md new file mode 100644 index 0000000000..70f171ac2e --- /dev/null +++ b/sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md @@ -0,0 +1,105 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (LiVES Video Editor 3.0 is Here With Significant Improvements) +[#]: via: (https://itsfoss.com/lives-video-editor/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +LiVES Video Editor 3.0 is Here With Significant Improvements +====== + +We recently covered a list of [best open source video editors][1]. LiVES is one of those open source video editors, available for free. + +Even though a lot of users are still waiting for the release on Windows, a major update just popped up for LiVES Video Editor (i.e v3.0.1 as the latest package) on Linux. The new upgrade includes some new features and improvements. + +In this article, I’ll cover the key improvements in the new version and I’ll also mention the steps to install it on your Linux system. + +### LiVES Video Editor 3.0: New Changes + +![Lives Video Editor Loading in Zorin OS][2] + +Overall, with this major update – LiVES Video Editor aims to have a smoother playback, prevent unwanted crashes, optimized video recording, and making the online video downloader more useful. + +The list of changes are: + + * Render silence to end of video if necessary during rendering. + * Improvements to openGL playback plugin, including much smoother playback. + * Re-enable Advanced options for the openGL playback plugin. + * Allow “Enough” in VJ / Pre-decode all frames + * Refactor code for timebase calculations during playback (better a/v synch). + * Overhaul external audio and audio recording to improve accuracy and use fewer CPU cycles. + * Auto switch to internal audio when entering multitack mode. + * Show correct effects state (on / off) when reshowing effect mapper window. + * Eliminate some race conditions between the audio and video threads. + * Improvements to online video downloader, clip size and format can now be selected, added an update option. + * Implemented reference counting for realtime effect instances. + * Extensively rewrote the main interface, cleaning up the code and making many visual improvements. + * Optimized recording when video generators are running. + * Improvements to the projectM filter wrapper, including SDL2 support. + * Added an option to invert the Z-order in multitrack compositor (rear layers can now overlay front ones). + * Added support for musl libc + * Updated translations for Ukranian + + + +While some of the points listed can just go over your head if you are not an advanced video editor. But, in a nutshell, all of these things make ‘LiVES Video Editor’ a better open source video editing software. + +[][3] + +Suggested read  VidCutter Lets You Easily Trim And Merge Videos In Linux + +### Installing LiVES Video Editor on Linux + +LiVES is normally available in the repository of all major Linux distributions. However, you may not find the latest version on your software center yet. So, if you want to install it that way – you’ll have to wait. + +If you want to install it manually, you can get the RPM packages for Fedora/Open SUSE from its download page. The source is also available for Linux distros. + +[Download LiVES Video Editor][4] + +For Ubuntu (or Ubuntu-based distros), you can add the [unofficial PPA][5] maintained by [Ubuntuhandbook][6]. Here’s how to do it: + +**1.** Launch the terminal and enter the following command: + +``` +sudo add-apt-repository ppa:ubuntuhandbook1/lives +``` + +You will be prompted for the password to authenticate the addition of PPA. + +**2.** Once done, you can now easily proceed to update the list of packages and get LiVES Video Editor installed. Here’s the set of commands that you need to enter next: + +``` +sudo apt update +sudo apt install lives lives-plugins +``` + +**3.** Now, it will start downloading and installing the video editor. You should be good to go in a minute. + +**Wrapping Up** + +There are a handful of [video editors available on Linux][7]. But they are not often considered good enough for professional editing. I am not a professional but I do manage simple editing with such freely available video editors like LiVES. + +How about you? How’s your experience with LiVES or other video editors on Linux? Let us know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/lives-video-editor/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/open-source-video-editors/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/lives-video-editor-loading.jpg?ssl=1 +[3]: https://itsfoss.com/vidcutter-video-editor-linux/ +[4]: http://lives-video.com/index.php?do=downloads#binaries +[5]: https://itsfoss.com/ppa-guide/ +[6]: http://ubuntuhandbook.org/index.php/2019/08/lives-video-editor-3-0-released-install-ubuntu/ +[7]: https://itsfoss.com/best-video-editing-software-linux/ From b7a52e7a15857873a524baf56b58232af2cf6084 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:53:52 +0800 Subject: [PATCH 497/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190816=20How=20?= =?UTF-8?q?to=20encrypt=20files=20with=20gocryptfs=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190816 How to encrypt files with gocryptfs on Linux.md --- ...o encrypt files with gocryptfs on Linux.md | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 sources/tech/20190816 How to encrypt files with gocryptfs on Linux.md diff --git a/sources/tech/20190816 How to encrypt files with gocryptfs on Linux.md b/sources/tech/20190816 How to encrypt files with gocryptfs on Linux.md new file mode 100644 index 0000000000..6c2cc6a2fd --- /dev/null +++ b/sources/tech/20190816 How to encrypt files with gocryptfs on Linux.md @@ -0,0 +1,150 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to encrypt files with gocryptfs on Linux) +[#]: via: (https://opensource.com/article/19/8/how-encrypt-files-gocryptfs) +[#]: author: (Brian "bex" Exelbierd https://opensource.com/users/bexelbiehttps://opensource.com/users/sethhttps://opensource.com/users/marcobravo) + +How to encrypt files with gocryptfs on Linux +====== +Gocryptfs encrypts at the file level, so synchronization operations can +work efficiently on each file. +![Filing papers and documents][1] + +[Gocryptfs][2] is a Filesystem in Userspace (FUSE)-mounted file-level encryption program. FUSE-mounted means that the encrypted files are stored in a single directory tree that is mounted, like a USB key, using the [FUSE][3] interface. This allows any user to do the mount—you don't need to be root. Because gocryptfs encrypts at the file level, synchronization operations that copy your files can work efficiently on each file. This contrasts with disk-level encryption, where the whole disk is encrypted as a single, large binary blob. + +When you use gocryptfs in its normal mode, your files are stored on your disk in an encrypted format. However, when you mount the encrypted files, you get unencrypted access to your files, just like any other file on your computer. This means all your regular tools and programs can use your unencrypted files. Changes, new files, and deletions are reflected in real-time in the encrypted version of the files stored on your disk. + +### Install gocryptfs + +Installing gocryptfs is easy on [Fedora][4] because it is packaged for Fedora 30 and Rawhide. Therefore, **sudo dnf install gocryptfs** does all the required installation work. If you're not using Fedora, you can find details on installing from source, on Debian, or via Homebrew in the [Quickstart][5]. + +### Initialize your encrypted filesystem + +To get started, you need to decide where you want to store your encrypted files. This example will keep the files in **~/.sekrit_files** so that they don't show up when doing a normal **ls**. + +Start by initializing the filesystem. This will require you to choose a password. You are strongly encouraged to use a unique password you've never used anywhere else, as this is your key to unlocking your files. The project's authors recommend a password with between 64 and 128 bits of entropy. Assuming you use upper and lower case letters and numbers, this means your password should be between [11 and 22 characters long][6]. If you're using a password manager, this should be easy to accomplish with a generated password. + +When you initialize the filesystem, you will see a unique key. Store this key somewhere securely, as it will allow you to access your files if you need to recover your files but have forgotten your password. The key works without your password, so keep it private! + +The initialization routine looks like this: + + +``` +$ mkdir ~/.sekrit_files +$ gocryptfs -init ~/.sekrit_files +Choose a password for protecting your files. +Password: +Repeat: + +Your master key is: + +    XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX- +    XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX + +If the gocryptfs.conf file becomes corrupted or you ever forget your password, +there is only one hope for recovery: The master key. Print it to a piece of +paper and store it in a drawer. This message is only printed once. +The gocryptfs filesystem has been created successfully. +You can now mount it using: gocryptfs .sekrit_files MOUNTPOINT +``` + +If you look in the **~/.sekrit_files** directory, you will see two files: a configuration file and a unique directory-level initialization vector. You will not need to edit these two files by hand. Make sure you do not delete these files. + +### Use your encrypted filesystem + +To use your encrypted filesystem, you need to mount it. This requires an empty directory where you can mount the filesystem. For example, use the **~/my_files** directory. As you can see from the initialization, mounting is easy: + + +``` +$ gocryptfs ~/.sekrit_files ~/my_files +Password: +Decrypting master key +Filesystem mounted and ready. +``` + +If you check out the **~/my_files** directory, you'll see it is empty. The configuration and initialization vector files aren't data, so they don't show up. Let's put some data in the filesystem and see what happens: + + +``` +$ cp /usr/share/dict/words ~/my_files/ +$ ls -la ~/my_files/ ~/.sekrit_files/ +~/my_files/: +.rw-r--r-- 5.0M bexelbie 19 Jul 17:48 words + +~/.sekrit_files/: +.r--------@  402 bexelbie 19 Jul 17:39 gocryptfs.conf +.r--------@   16 bexelbie 19 Jul 17:39 gocryptfs.diriv +.rw-r--r--@ 5.0M bexelbie 19 Jul 17:48 xAQrtlyYSFeCN5w7O3-9zg +``` + +Notice that there is a new file in the **~/.sekrit_files** directory. This is the encrypted copy of the dictionary you copied in (the file name will vary). Feel free to use **cat** and other tools to examine these files and experiment with adding, deleting, and modifying files. Make sure to test with a few applications, such as LibreOffice. + +Remember, this a filesystem mount, so the contents of **~/my_files** aren't saved to disk. You can verify this by running **mount | grep my_files** and observing the output. Only the encrypted files are written to your disk. The FUSE interface is doing real-time encryption and decryption of the files and presenting them to your applications and shell as a filesystem. + +### Unmount the filesystem + +When you're done with your files, you can unmount them. This causes the unencrypted filesystem to no longer be available. The encrypted files in **~/.sekrit_files** are unaffected. Unmount the filesystem using the FUSE mounter program with **fusermount -u ~/my_files** . + +### Back up your data + +One of the cool benefits of gocryptfs using file-level encryption is that it makes backing up your encrypted data easier. The files are safe to store on a synchronizing system, such as OwnCloud or Dropbox. The standard disclaimer about not modifying the same file at the same time applies. However, the files can be backed up even if they are mounted. You can also save your data any other way you would typically back up files. You don't need anything special. + +When you do backups, make sure to include the **gocryptfs.diriv** file. This file is not a secret and can be saved with the backup. However, your **gocryptfs.conf** is a secret. When you control the entirety of the backup chain, such as with tape, you can back it up with the rest of the files. However, when the files are backed up to the cloud or publicly, you may wish to omit this file. In theory, if someone gets this file, the only thing protecting your files is the strength of your password. If you have chosen a [strong password][6], that may be enough; however, you need to consider your situation carefully. More details are in this gocryptfs [upstream issue][7]. + +### Bonus: Reverse mode + +A neat feature of gocryptfs is the reverse mode function. In reverse mode, point gocryptfs at your unencrypted data, and it will create a mount point with an encrypted view of this data. This is useful for things such as creating encrypted backups. This is easy to do: + + +``` +$ gocryptfs -reverse -init my_files +Choose a password for protecting your files. +Password: +Repeat: + +Your master key is: + +    XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX- +    XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX + +If the gocryptfs.conf file becomes corrupted or you ever forget your password, +there is only one hope for recovery: The master key. Print it to a piece of +paper and store it in a drawer. This message is only printed once. +The gocryptfs-reverse filesystem has been created successfully. +You can now mount it using: gocryptfs -reverse my_files MOUNTPOINT + +$ gocryptfs -reverse my_files sekrit_files +Password: +Decrypting master key +Filesystem mounted and ready. +``` + +Now **sekrit_files** contains an encrypted view of your unencrypted data from **my_files**. This can be backed up, shared, or handled as needed. The directory is read-only, as there is nothing useful you can do with those files except back them up. + +A new file, **.gocryptfs.reverse.conf**, has been added to **my_files** to provide a stable encrypted view. This configuration file will ensure that each reverse mount will use the same encryption key. This way you could, for example, back up only changed files. + +Gocryptfs is a flexible file encryption tool that allows you to store your data in an encrypted manner without changing your workflow or processes significantly. The design has undergone a security audit, and the developers have experience with other systems, such as **encfs**. I encourage you to add gocryptfs to your system today and start protecting your data. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/how-encrypt-files-gocryptfs + +作者:[Brian "bex" Exelbierd][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/bexelbiehttps://opensource.com/users/sethhttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/documents_papers_file_storage_work.png?itok=YlXpAqAJ (Filing papers and documents) +[2]: https://nuetzlich.net/gocryptfs/ +[3]: https://en.wikipedia.org/wiki/Filesystem_in_Userspace +[4]: https://getfedora.org +[5]: https://nuetzlich.net/gocryptfs/quickstart/ +[6]: https://github.com/rfjakob/gocryptfs/wiki/Password-Strength +[7]: https://github.com/rfjakob/gocryptfs/issues/50 From 0cce132603a57aae2c24824f0c90201562e6b165 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:54:10 +0800 Subject: [PATCH 498/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190816=20How=20?= =?UTF-8?q?to=20plan=20your=20next=20IT=20career=20move?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190816 How to plan your next IT career move.md --- ...16 How to plan your next IT career move.md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/tech/20190816 How to plan your next IT career move.md diff --git a/sources/tech/20190816 How to plan your next IT career move.md b/sources/tech/20190816 How to plan your next IT career move.md new file mode 100644 index 0000000000..320444d056 --- /dev/null +++ b/sources/tech/20190816 How to plan your next IT career move.md @@ -0,0 +1,147 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to plan your next IT career move) +[#]: via: (https://opensource.com/article/19/8/plan-next-IT-career-move) +[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberghttps://opensource.com/users/marcobravo) + +How to plan your next IT career move +====== +Ask yourself these essential career questions about cloud, DevOps, +coding, and where you're going next in IT. +![Two hands holding a resume with computer, clock, and desk chair ][1] + +Being part of technology-oriented communities has been an essential part of my career development. The first community that made a difference for me was focused on virtualization. Less than a year into my first career-related job, I met a group of friends who were significant contributors to this "vCommunity," and I found their enthusiasm to be contagious. That began our daily "nerd herd," where a handful of us met nearly every day for coffee before our shifts in tech support. We often discussed the latest software releases or hardware specs of a related storage array, and other times we strategized about how we could help each other grow in our careers. + +> Any community worth being a part of will lift you up as you lift others up in the process. + +In those years, I learned a foundational truth that's as true for me today as it was then: Any community worth being a part of will lift you up as you lift others up in the process. + +![me with friends at New England VTUG meeting][2] + +Matthew with friends [Jonathan][3] and [Paul][4] (L-R) at a New England VTUG meeting. + +We began going to conferences together, with the first major effort by being the volunteer social team for a user group out of New England. We set up a Twitter account, sending play-by-plays as the event happened, but we also were there, in person, to welcome new members into our community of practice. While it wasn't my intention, finding that intersection of community and technology taught me the skills that led to my next job offer. And my story wasn't unique; many of us supported each other, and many of us advanced in our careers along the way. + +While I remained connected to the vCommunity, I haven't kept up with the (mostly proprietary) technology stack we used to talk about. + +My preferred technology shifted direction drastically when I fell in love with open source. It's been about five years since I knew virtualization deeply and two years since I spoke at an event centered on the topic. So it was a surprise and honor to be invited to give the opening keynote to the last edition of the [New England Virtualization Technology User Group][5]'s (VTUG) Summer Slam in July. Here's what I spoke about. + +### Technology and, more importantly, employment + +When I heard the user group was hosting its last-ever event, I said I'd love to be part of it. The challenge was that I didn't know how I would. While there is plenty of open source virtualization technology, I had shifted further up the stack toward applications and programming languages of late, so my technical angle wouldn't make for a good talk. The organizer said, "Good, that's what people need to hear." + +Being further away from the vCommunity meant I had missed some of the context of the last few years. A noticeable amount of the community was facing unemployment. When they went to apply for a new job, there were new titles like [DevOps Engineer][6] and [SRE][7]. Not only that, I was told that the deep focus on a single vendor of proprietary virtualization technology is no longer enough. Virtualization and storage administration (my first area of expertise) appear to be the hardest hit by this shift. One story I heard at the event was that over 50% of a local user group's attendees were looking, and there was a gap in awareness of how to move forward. + +So while I enjoy having lighthearted conversations with people learning to contribute to open source, this talk was different. It had more to do with people's lives than usual. The stakes were higher. + +### 3 trends worth exploring + +There are a thousand ways to summarize the huge waves of change that are taking place in the tech industry. In my talk, I offered the idea that cloud, DevOps, and coding are three distinct trends making some of those waves and worth considering as you plan the next steps in your IT-oriented career. + + * Cloud, including the new operational model of IT that is often Kubernetes-based + * DevOps, which rejects the silos, ticket systems, and blame of legacy IT departments + * Coding, including the practice of infrastructure as code (accompanied by a ton of YAML) + + + +I imagine them as literal waves, crashing down upon the ships of the old way to make way for the new. + +![Adaption of The Great Wave Off Kanagawa][8] + +Adaption of [The Great Wave Off Kanagawa][9] + +We have two mutually exclusive options as we consider how to respond to these shifts. We can paddle hard, feeling like we're going against the current, or we can stay put and be crushed by the wave. One is uncomfortable in the short term, while the other is more comfortable for now. Only one option is survivable. It sounds scary, and I'm okay with that. The stakes are real. + +![Adaption of The Great Wave Off Kanagawa][10] + +Adaption of [The Great Wave Off Kanagawa][9] + +Cloud, DevOps, and coding are each massive topics with a ton of nuance to unpack. But if want to retool your skills for the future, I'm confident that focusing on **any** of them will set you up for a successful next step. + +### Finding the right adoption timeline + +One of the most challenging aspects of this is the sheer onslaught of information. It's reasonable to ask what you should learn, specifically, and when. I'm reminded of the work of [Nassim Taleb][11] who, among his deeply thoughtful insights into risk, makes note of a powerful concept: + +> "The longer a technology lives, the longer it can be expected to live." +> – Nassim Taleb, [_Antifragile_][12] (2012) + +This sticking power of technology may offer insight into the right time to jump on a wave of newness. It doesn't have to be right away, given that early adopters may find their efforts don't have enough stick-to-it-ness to linger beyond a passing trend. That aligns well with my style: I'm rarely an early adopter, and I'm comfortable with that fact. I leave a lot of the early testing and debugging of new projects to those who are excited by the uncertainty of it all, and I'll be around for the phase when the brilliant idea needs to be refined (or, as [Simon Wardley][13] puts it, I prefer the [Settling phase over the Pioneer one][14]). That also aligns well with the perspective of most admin-centric professionals I know. They're wary of new things because they know saying yes to something in production is easier than supporting it after it gets there. + +![One theory on when to adopt technology as its being displaced][15] + +What I also love about Taleb's words is they offer a reasonable equation to make sure you're not the last to adopt a technology. Why not be last? Because you'll be so far behind that no one will want to hire you. + +So what does that equation look like? I think it's taking Taleb's theory, more broadly called the [Lindy effect][16], and doing the math: you can expect that any technology will be in existence at least as long as it was before a competitor came into play. So if X technology excited for 30 years before Y threatened its dominance, you can expect X to be in existence for another 30 years (even if Y is way more popular, powerful, and trendy). It takes a long time for technology to "die." + +My observation is more of a half-life of that concept: you can expect broad adoption of Y technology halfway through the adoption curve. By that point, companies hiring will start to signal they want this knowledge on their team, and it's reasonable for even the most skeptical of Sysadmins to learn said technology. In practice, that may look like this, where ETOA is the estimated time of mass adoption: + +![IP4 to IP6 estimated time of mass adoption][17] + +Many would love for IPv6 to be widely adopted sooner than 2027, and this theory offers a potential reason why it takes so long. Change is going somewhere, but the pace more aligned with the Lindy effect than to those people's expectations. + +To paraphrase statistician [George Box][18], "all models are wrong, but some are more useful than others." Taleb's adaptation of the Lindy effect helps me think about how I need to prioritize my learning relative to the larger waves of change happening in the industry. + +### Asking the right questions + +The thing I cannot say often enough is that _people who have IT admin skills have a ton of options when they look at the industry_. + +Every person who has been an admin has had to learn new technology. They excel at it. And while mastery takes time, a decent amount of familiarity and a willingness to learn are very hirable skills. Learning a new technology and inspecting its operational model to anticipate its failures in production are hugely valuable to any project. I look at open source software projects on GitHub and GitLab regularly, and many are looking for feedback on how to get their projects ready for production environments. Admins are experts at operational improvement. + +All that said, it can still be paralyzing to decide what to learn. When people are feeling stuck, I recommend asking yourself these questions to jumpstart your thinking: + + 1. What technology do you want to know? + 2. What's your next career? + + + +The first question is full of important reminders. First off, many of us in IT have the privilege of choosing to study the things that bring us joy to learn. It's a wonderful feeling to be excited by our work, and I love when I see that in someone I'm mentoring. + +Another favorite takeaway is that no one is born knowing any specific technology. All technology skills are learned skills. So, your back-of-the-mind thought that "I don't understand that" is often masking the worry that "I can't learn it." Investigate further, and you'll find that your nagging sense of impossibility is easily disproven by everything you've accomplished until this point. I find a gentle and regular reminder that all technology is learned is a great place to start. You've done this before; you will do so again. + +Here's one more piece of advice: stick with one thing and go deep. Skills—and the stories we tell about them to potential employers—are more interesting the deeper we can go. Therefore, when you're learning to code in your language of choice, find a way to build something that you can talk about at length in a job interview. Maybe it's an Ansible module in Python or a Go module for Terraform. Either one is a lot more powerful than saying you can code Hello World in seven languages. + +There is also power in asking yourself what your next career will be. It's a reminder that you have one and, to survive and advance, you have to continue learning. What got you here will not get you where you're going next. + +It's freeing to find that your next career can be an evolution of what you know now or a doubling-down on something much larger. I advocate for evolutionary, not revolutionary. There is a lot of foundational knowledge in everything we know, and it can be powerful to us and the story we tell others when we stay connected to our past. + +### Community is key + +All careers evolve and skills develop. Many of us are drawn to IT because it requires continual learning. Know that you can do it, and stick with your community to help you along the way. + +If you're looking for a way to apply your background in IT administration and you have an open source story to tell, we would love to help you share it. Read our [information for writers][19] to learn how. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/plan-next-IT-career-move + +作者:[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/mbbroberghttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/resume_career_document_general.png?itok=JEaFL2XI (Two hands holding a resume with computer, clock, and desk chair ) +[2]: https://opensource.com/sites/default/files/uploads/vtug.png (Matthew with friends at New England VTUG meeting) +[3]: https://twitter.com/jfrappier +[4]: https://twitter.com/paulbraren +[5]: https://vtug.com/ +[6]: https://opensource.com/article/19/7/how-transition-career-devops-engineer +[7]: https://opensource.com/article/19/7/sysadmins-vs-sres +[8]: https://opensource.com/sites/default/files/uploads/greatwave.png (Adaption of The Great Wave Off Kanagawa) +[9]: https://en.wikipedia.org/wiki/The_Great_Wave_off_Kanagawa +[10]: https://opensource.com/sites/default/files/uploads/greatwave2.png (Adaption of The Great Wave Off Kanagawa) +[11]: https://en.wikipedia.org/wiki/Nassim_Nicholas_Taleb +[12]: https://en.wikipedia.org/wiki/Antifragile +[13]: https://twitter.com/swardley +[14]: https://blog.gardeviance.org/2015/03/on-pioneers-settlers-town-planners-and.html +[15]: https://opensource.com/sites/default/files/articles/displacing-technology-lindy-effect-opensource.com_.png (One theory on when to adopt technology as its being displaced) +[16]: https://en.wikipedia.org/wiki/Lindy_effect +[17]: https://opensource.com/sites/default/files/uploads/ip4-to-etoa.png (IP4 to IP6 estimated time of mass adoption) +[18]: https://en.wikipedia.org/wiki/George_E._P._Box +[19]: https://opensource.com/how-submit-article From 6ba967c947bff924c2dc8fafbf5cf4623beb14ef Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:54:27 +0800 Subject: [PATCH 499/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190816=20Design?= =?UTF-8?q?ing=20open=20audio=20hardware=20as=20DIY=20kits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190816 Designing open audio hardware as DIY kits.md --- ...signing open audio hardware as DIY kits.md | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 sources/tech/20190816 Designing open audio hardware as DIY kits.md diff --git a/sources/tech/20190816 Designing open audio hardware as DIY kits.md b/sources/tech/20190816 Designing open audio hardware as DIY kits.md new file mode 100644 index 0000000000..2cec3a5675 --- /dev/null +++ b/sources/tech/20190816 Designing open audio hardware as DIY kits.md @@ -0,0 +1,208 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Designing open audio hardware as DIY kits) +[#]: via: (https://opensource.com/article/19/8/open-audio-kit-developer) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansenhttps://opensource.com/users/alanfdosshttps://opensource.com/users/clhermansen) + +Designing open audio hardware as DIY kits +====== +Did you know you can build your own speaker systems? Muffsy creator +shares how he got into making open audio hardware and why he started +selling his designs to other DIYers. +![Colorful sound wave graph][1] + +Previously in this series about people who are developing audio technology in the open, I interviewed [Juan Rios, developer and maintainer of Guayadeque][2] and [Sander Jansen, developer and maintainer of Goggles Music Manager][3]. These conversations have broadened my thinking and helped me enjoy their software even more than before. + +For this article, I contacted Håvard Skrödahl, founder of [Muffsy][4]. His hobby is designing open source audio hardware, and he offers his designs as kits for those of us who can't wait to wind up the soldering iron for another adventure. + +I've built two of Håvard's kits: a [moving coil (MC) cartridge preamp][5] and a [moving magnet (MM) cartridge phono preamp][6]. Both were a lot of fun to build and sound great. They were also a bit of a stroll down memory lane for me. In my 20s, I built some other audio kits, including a [Hafler DH-200 power amplifier][7] and a [DH-110 preamplifier][8]. Before that, I built a power amplifier using a Motorola circuit design; both the design and the amplifier were lost along the way, but they were a lot of fun! + +### Meet Håvard Skrödahl, open audio hardware maker + +**Q: How did you get started designing music playback hardware?** + +**A:** I was a teenager in the mid-'80, and listening to records and cassettes were the only options we had. Vinyl was, of course, the best quality, while cassettes were more portable. About five years ago, I was getting back into vinyl and found myself lacking the equipment I needed. So, I decided to make my own phono stage (also called a phono preamp). The first iteration was bulky and had a relatively bad [RIAA filter][9], but I improved it during the first few months. + +The first version was completely homemade. I was messing about with toner transfer and chemicals and constantly breaking drill bits to create this board.  + +![Phono stage board top][10] + +Top of the phono stage board + +![Bottom of the phono stage board][11] + +Bottom of the phono stage board + +I was over the moon with this phono stage. It worked perfectly, even though the RIAA curve was out by quite a bit. It also had variable input impedance (greatly inspired by the [Audiokarma CNC phono stage][12]). + +When I moved on to getting boards professionally made, I found that the impedance settings could be improved quite a bit. My setup needed adjustable gain, so I added it. The RIAA filter was completely redesigned, and it is (to my knowledge) the only accurate RIAA filter circuit that uses [standard E24 component values][13]. + +![Muffsy audio hardware boards][14] + +Various iterations of boards in development. + +**Q: How did you decide to offer your work as kits? And how did you go from kits to open source?** + +**A:** The component values being E24 came from a lack of decent, component providers in my area (or so I thought, as it turned out I have a great provider nearby), so I had to go for standard values. This meant my circuit was well suited for DIY, and I started selling blank printed circuit boards on [Tindie][15]. + +What really made the phono stage suitable as a kit was a power supply that didn't require messing about with [mains electricity][16]. It's basically an AC adapter, a voltage doubler, and a couple of three-pin voltage regulators. + +So there I was; I had a phono stage, a power supply, and the right (and relatively easy to source) components. The boards fit straight into the enclosure I'd selected, and I made a suitable back panel. I could now sell a DIY kit that turns into a working device once it is assembled. This is pretty unique; you won't see many kit suppliers provide everything that's needed to make a functional product. + +![Phono stage kit with the power supply and back panel][17] + +The assembled current phono stage kit with the power supply and back panel. + +As a bonus, since this is just my hobby, I'm not even aiming for profit. This is also partly why my designs are open source. Not revealing who is using the designs, but you'll find them in more than one professional vinyl mastering studio, in governmental digitization projects, and even at a vinyl player manufacturer that you will have heard of. + +**Q: Tell us a bit about your educational background. Are you an electrical engineer? Where did your interest in circuits come from?** + +**A:** I went to a military school of electrical engineering (EE). My career has been pretty void of EE though, apart from a few years as a telephony switch technician. The music interest has stayed with me, though, and I've been dreaming of making something all my life. I would rather avoid mains electricity though, so signal level and below is where I'm happy. + +**Q: In your day job, do you do hardware stuff as well? Or software? What about open source—does it matter to your day job?** + +**A:** My profession is IT management, system architecture, and security. So I'm not doing any hardware designs at work. I wouldn't be where I am today without open source, so that is the other part of the reason why my designs are openly available. + +**Q: Can you tell us a bit about what it takes to go from a design, to a circuit board, to producing a kit?** + +**A:** I am motivated by my own needs when it comes to starting a new project. Or if I get inspired, like I was when I made a constant current [LED][18] tester. The LED tester required a very specific sub-milliampere meter, and it was kind of hard to find an enclosure for it. So the LED tester wasn't suited for a kit. + +![LED tester][19] + +LED tester + +I made a [notch filter][20] that requires matched precision capacitors, and the potentiometers are quite hard to fine-tune. Besides, I don't see people lining up to buy this product, so it's not suited to be a kit. + +![Notch filter][21] + +Notch filter + +I made an inverse RIAA filter using only surface-mount device [(SMD) components][22]—not something I would offer as a kit. I built an SMD vacuum pickup tool for this project, so it wasn't all for nothing. + +![SMD vacuum pickup tool][23] + +SMD vacuum pickup tool + +I've made various PSU/transformer breakout boards, which are not suitable as kits because they require mains electricity. + +![PSU/transformer breakout board][24] + +PSU/transformer breakout boards + +I designed and built the [MC Head Amp][25] without even owning an [MC cartridge][26]. I even built the [O2 headphone amp][27] without owning a pair of headphones, although people much smarter than me suspect it was a clever excuse for buying a pair of Sennheisers. + +Kits need to be something I think people need, they must be easy to assemble (or rather difficult to assemble incorrectly), not too expensive nor require exotic components, and can't weigh too much because of the very expensive postage from Sweden. + +Most importantly, I need to have time and space for another kit. This picture shows pretty much all the space I have available for my kits, two boxes deep, IKEA all the way. + +![A shelf filled with boxed of Muffsy kits][28] + +**Q: Are you a musician or audiophile? What kind of equipment do you have?** + +**A:** I'm not a musician, and I am not an audiophile in the way most people would define such a person. I do know, from education and experience, that good sound doesn't have to cost a whole lot. It can be quite cheap, actually. A lot of the cost is in transformers, enclosures, and licenses (the stickers on the front of your gear). Stay away from those, and you're back at signal level audio that can be really affordable. + +Don't get me wrong; there are a lot of gifted designers who spend an awful lot of time and creativity making the next great piece of equipment. They deserve to get paid for their work. What I mean is that the components that go into this equipment can be bought for not much money at all. + +My equipment is a simple [op-amp][29]-based preamp with a rotational input-switch and a sub-$25 class-D amp based on the TPA3116 chip (which I will be upgrading to an IcePower 125ASX2). I'm using both the Muffsy Phono Preamp and the Muffsy MC Head Amp. Then I've got some really nice Dynaco A25 loudspeakers that I managed to refurbish through nothing more than good old dumb luck. I went for the cheapest Pro-Ject turntable that's still a "real" turntable. That's it. No surround, no remote control (yet), unless you count the Chromecast Audio that's connected to the back of my amp. + +![Håvard Skrödahl's A/V setup][30] + +Håvard's A/V setup + +I'll happily shell out for quality components, good connectors, and shielded signal cables. But, to be diplomatic, I'd rather use the correct component for the job instead of the most expensive one. I do get questions about specific resistors and expensive "boutique" components now and then. I keep my answer short and remind people that my own builds are identical to what I sell on Tindie. + +My preamp uses my MC Head Amp as a building block. + +![Preamp internals][31] + +Preamp internals + +**Q: What kind of software do you use for hardware design?** + +**A:** I've been using [Eagle][32] for many years. Getting into a different workflow takes a lot of time and requires a whole lot of mistakes, so no [KiCad][33] yet. + +**Q: Can you tell us a bit about where your kits are going? Is there a new head amplifier? A new phono amplifier? What about a line-level pre-amp or power amp?** + +**A:** If I were to do a power amp, I wouldn't dream of selling it because of what I said about mains electricity. Chip amps and [Class-D][34] seem to have taken over the DIY segment anyway, and I'm really happy with Class-D. + +My latest kit is an input selector. It's something that's a cross between hardware and software as it uses an [ESP32][35] system on a chip microcontroller. And it's something that I want for myself. + +The kit includes everything you need. It's got a rotational encoder, an infrared receiver, and I'm even adding a remote control to the kit. The software and hardware are available on GitHub, also under a permissive open source license, and will soon include Alexa voice support and [MQTT][36] for app or command line remote control. + +![Input selector][37] + +Input selector kit + +My lineup now consists of preamps for MC and MM cartridges, a power supply and a back panel for them, and the input selector. I'm even selling bare circuit boards for a tube preamp and accompanying power supply. + +These components make up pretty much all the internals of a complete preamplifier, which has become one of my main motivational factors. + +I have nothing new or significantly better to provide in terms of an ordinary preamplifier, so I'm using a modified version of a well-known circuit. I cannot, and would not, sell this circuit, as it's proprietary. + +Anyhow, here's my personal goal. It's still a work in progress, using an S3207 enclosure and a front panel made at Frontpanel Express. + +![Muffsy preamp][38] + +New Muffsy preamp prototype + +* * * + +Thanks, Håvard, that looks pretty great! I'd be happy to have something like that sitting on my Hi-Fi shelf. + +I hope there are people out there just waiting to try their hand at audio kit building or even board layout from proven open source schematics, and they find Håvard's story motivating. As for me, I think my next project could be an [active crossover][39]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/open-audio-kit-developer + +作者:[Chris Hermansen][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/clhermansenhttps://opensource.com/users/alanfdosshttps://opensource.com/users/clhermansen +[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/article/19/6/creator-guayadeque-music-player +[3]: https://opensource.com/article/19/6/gogglesmm-developer-sander-jansen +[4]: https://www.muffsy.com/ +[5]: https://opensource.com/article/18/5/building-muffsy-phono-head-amplifier-kit +[6]: https://opensource.com/article/18/7/diy-amplifier-vinyl-records +[7]: https://kenrockwell.com/audio/hafler/dh-200.htm +[8]: https://www.hifiengine.com/manual_library/hafler/dh-110.shtml +[9]: https://en.wikipedia.org/wiki/RIAA_equalization +[10]: https://opensource.com/sites/default/files/uploads/phono-stagetop.png (Phono stage board top) +[11]: https://opensource.com/sites/default/files/uploads/phono-stagebottom.png (Bottom of the phono stage board) +[12]: https://forum.psaudio.com/t/the-cnc-phono-stage-diy/3613 +[13]: https://en.wikipedia.org/wiki/E_series_of_preferred_numbers +[14]: https://opensource.com/sites/default/files/uploads/boards.png (Muffsy audio hardware boards) +[15]: https://www.tindie.com/stores/skrodahl/ +[16]: https://en.wikipedia.org/wiki/Mains_electricity +[17]: https://opensource.com/sites/default/files/uploads/phonostage-kit.png (Phono stage kit with the power supply and back panel) +[18]: https://en.wikipedia.org/wiki/Light-emitting_diode +[19]: https://opensource.com/sites/default/files/uploads/led-tester.png (LED tester) +[20]: https://en.wikipedia.org/wiki/Band-stop_filter +[21]: https://opensource.com/sites/default/files/uploads/notch-filter.png (Notch filter) +[22]: https://en.wikipedia.org/wiki/Surface-mount_technology +[23]: https://opensource.com/sites/default/files/uploads/smd-vacuum-pick-tool.png (SMD vacuum pickup tool) +[24]: https://opensource.com/sites/default/files/uploads/psu-transformer-breakout-board.png (PSU/transformer breakout board) +[25]: https://leachlegacy.ece.gatech.edu/headamp/ +[26]: https://blog.audio-technica.com/audio-solutions-question-week-differences-moving-magnet-moving-coil-phono-cartridges/ +[27]: http://nwavguy.blogspot.com/2011/07/o2-headphone-amp.html +[28]: https://opensource.com/sites/default/files/uploads/kit-shelves.png (Muffsy kits on shelves) +[29]: https://en.wikipedia.org/wiki/Operational_amplifier +[30]: https://opensource.com/sites/default/files/uploads/av-setup.png (Håvard Skrödahl's A/V setup) +[31]: https://opensource.com/sites/default/files/uploads/preamp-internals.png (Preamp internals) +[32]: https://en.wikipedia.org/wiki/EAGLE_(program) +[33]: https://en.wikipedia.org/wiki/KiCad +[34]: https://en.wikipedia.org/wiki/Class-D_amplifier +[35]: https://en.wikipedia.org/wiki/ESP32 +[36]: http://mqtt.org/ +[37]: https://opensource.com/sites/default/files/uploads/input-selector.png (Input selector) +[38]: https://opensource.com/sites/default/files/uploads/muffsy-preamp.png (Muffsy preamp) +[39]: https://www.youtube.com/watch?v=7u9OKPL1ezA&feature=youtu.be From abecf3645134bed0513b4ca0380490b8c9398008 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:55:24 +0800 Subject: [PATCH 500/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20How=20?= =?UTF-8?q?to=20create=20a=20vanity=20Tor=20.onion=20web=20address?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 How to create a vanity Tor .onion web address.md --- ... create a vanity Tor .onion web address.md | 282 ++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 sources/tech/20190815 How to create a vanity Tor .onion web address.md diff --git a/sources/tech/20190815 How to create a vanity Tor .onion web address.md b/sources/tech/20190815 How to create a vanity Tor .onion web address.md new file mode 100644 index 0000000000..77d13a1811 --- /dev/null +++ b/sources/tech/20190815 How to create a vanity Tor .onion web address.md @@ -0,0 +1,282 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to create a vanity Tor .onion web address) +[#]: via: (https://opensource.com/article/19/8/how-create-vanity-tor-onion-address) +[#]: author: (Kc Nwaezuoke https://opensource.com/users/areahintshttps://opensource.com/users/sethhttps://opensource.com/users/bexelbiehttps://opensource.com/users/bcotton) + +How to create a vanity Tor .onion web address +====== +Generate a vanity .onion website to protect your anonymity—and your +visitors' privacy, too. +![Password security with a mask][1] + +[Tor][2] is a powerful, open source network that enables anonymous and non-trackable (or difficult to track) browsing of the internet. It's able to achieve this because of users running Tor nodes, which serve as intentional detours between two otherwise direct paths. For instance, if you are in New Zealand and visit python.nz, instead of being routed next door to the data center running python.nz, your traffic might be routed to Pittsburgh and then Berlin and then Vanuatu and finally to python.nz. The Tor network, being built upon opt-in participant nodes, has an ever-changing structure. Only within this dynamic network space can there exist an exciting, transient top-level domain identifier: the .onion address. + +If you own or are looking to create a website, you can generate a vanity .onion site to protect your and your visitors' anonymity. + +### What are onion addresses? + +Because Tor is dynamic and intentionally re-routes traffic in unpredictable ways, an onion address makes both the information provider (you) and the person accessing the information (your traffic) difficult to trace by one another, by intermediate network hosts, or by an outsider. Generally, an onion address is unattractive, with 16-character names like 8zd335ae47dp89pd.onion. Not memorable, and difficult to identify when spoofed, but a few projects that culminated with Shallot (forked as eschalot) provides "vanity" onion addresses to solve those issues. + +Creating a vanity onion URL on your own is possible but computationally expensive. Getting the exact 16 characters you want could take a single computer billions of years to achieve. + +Here's a rough example (courtesy of [Shallot][3]) of how much time it takes to generate certain lengths of characters on a 1.5GHz processor: + +Characters | Time +---|--- +1 | Less than 1 second +2 | Less than 1 second +3 | Less than 1 second +4 | 2 seconds +5 | 1 minute +6 | 30 minutes +7 | 1 day +8 | 25 days +9 | 2.5 years +10 | 40 years +11 | 640 years +12 | 10 millennia +13 | 160 millennia +14 | 2.6 million years + +I love how this table goes from 25 days to 2.5 years. If you wanted to generate 56 characters, it would take 1078 years. + +An onion address with 16 characters is referred to as a version 2 onion address, and one with 56 characters is a version 3 onion address. If you're using the Tor browser, you can check out this [v2 address][4] or this [v3 address][5]. + +A v3 address has several advantages over v2: + + * Better crypto (v3 replaced SHA1/DH/RSA1024 with SHA3/ed25519/curve25519) + * Improved directory protocol that leaks much less information to directory servers + * Improved directory protocol with a smaller surface for targeted attacks + * Better onion address security against impersonation + + + +However, the downside (supposedly) of v3 is the marketing effort you might need to get netizens to type that marathon-length URL in their browser. + +You can [learn more about v3][6] in the Tor docs. + +### Why you might need an onion address + +A .onion domain has a few key advantages. Its key feature is that it can be accessed only with a Tor browser. Many people don't even know Tor exists, so you shouldn't expect massive traffic on your .onion site. However, the Tor browser provides numerous layers of anonymity not available on more popular browsers. If you want to ensure near-total anonymity for both you and your visitors, onion addresses are built for it. + +With Tor, you do not need to register with ICANN to create your own domain. You don't need to hide your details from Whois searches, and your ICANN account won't be vulnerable to malicious takeovers. You are completely in control of your privacy and your domain. + +An onion address is also an effective way to bypass censorship restrictions imposed by a government or regime. Its privacy helps protect you if your site may be viewed as a threat to the interests of the political class. Sites like Wikileaks are the best examples. + +### What you need to generate a vanity URL + +To configure a vanity onion address, you need to generate a new private key to match a custom hostname. + +Two applications that you can use for generating .onion addresses are [eschalot][7] for v2 addresses and [mkp224o][8] for v3 addresses. + +Eschalot is a Tor hidden service name generator. It allows you to produce a (partially) customized vanity .onion address using a brute-force method. Eschalot is distributed in source form under the BSD license and should compile on any Unix or Linux system. + +mkp224o is a vanity address generator for ed25519 .onion services that's available on GitHub with the CC0 1.0 Universal license. It generates vanity 56-character onion addresses. + +Here's a simple explanation of how these applications work. (This assumes you are comfortable with Git.) + +#### Eschalot + +Eschalot requires [OpenSSL][9] 0.9.7 or later libraries with source headers. Confirm your version with this command: + + +``` +$ openssl version +OpenSSL 1.1.1c FIPS  28 May 2019 +``` + +You also need a [Make][10] utility (either BSD or GNU Make will do) and a C compiler (GCC, PCC, or LLVM/Clang). + +Clone the eschalot repo to your system, and then compile: + + +``` +$ git clone +$ cd eschalot-1.2.0 +$ make +``` + +If you're not using GCC, you must set the **CC** environment variable. For example, to use PCC instead: + + +``` +$ make clean +$ env CC=pcc make +``` + +##### Using eschalot + +To see Echalot's Help pages, type **./eschalot** in the terminal: + + +``` +$ ./eschalot +Version: 1.2.0 + +usage: +eschalot [-c] [-v] [-t count] ([-n] [-l min-max] -f filename) | (-r regex) | (-p prefix) +  -v         : verbose mode - print extra information to STDERR +  -c         : continue searching after the hash is found +  -t count   : number of threads to spawn default is one) +  -l min-max : look for prefixes that are from 'min' to 'max' characters long +  -n         : Allow digits to be part of the prefix (affects wordlist mode only) +  -f filename: name of the text file with a list of prefixes +  -p prefix  : single prefix to look for (1-16 characters long) +  -r regex   : search for a POSIX-style regular expression + +Examples: +  eschalot -cvt4 -l8-12 -f wordlist.txt >> results.txt +  eschalot -v -r '^test|^exam' +  eschalot -ct5 -p test + +  base32 alphabet allows letters [a-z] and digits [2-7] +  Regex pattern examples: +    xxx           must contain 'xxx' +    ^foo          must begin with 'foo' +    bar$          must end with 'bar' +    b[aoeiu]r     must have a vowel between 'b' and 'r' +    '^ab|^cd'     must begin with 'ab' or 'cd' +    [a-z]{16}     must contain letters only, no digits +    ^dusk.*dawn$  must begin with 'dusk' and end with 'dawn' +    [a-z2-7]{16}  any name - will succeed after one iteration +``` + +You can use eschalot to generate an address using the prefix **-p** for _privacy_. Assuming your system has multiple CPU cores, use _multi-threading_ (**-t**) to speed up the URL generation. To _get verbose output_, use the **-v** option. Write the results of your calculation to a file named **newonion.txt**: + + +``` +`./eschalot -v -t4 -p privacy >> newonion.txt` +``` + +The script executes until it finds a suitable match: + + +``` +$ ./eschalot -v -t4 -p privacy >> newonion.txt +Verbose, single result, no digits, 4 threads, prefixes 7-7 characters long. +Thread #1 started. +Thread #2 started. +Thread #3 started. +Thread #4 started. +Running, collecting performance data... +Found a key for privacy (7) - privacyzofgsihx2.onion +``` + +To access the public and private keys eschalot generates, locate **newonion.txt** in the eschalot folder. + +#### mkp224o + +mkp224o requires a C99 compatible compiler, Libsodium, GNU Make, GNU Autoconf, and a Unix-like platform. It has been tested on Linux and OpenBSD. + +To get started, clone the mkp224o repo onto your system, generate the required [Autotools infrastructure][11], configure, and compile: + + +``` +$ git clone +$ cd mkp224o +$ ./autogen.sh +$ ./configure +$ make +``` + +##### Using mkp224o + +Type **./mkp224o -h** to view Help: + + +``` +$ ./mkp224o -h +Usage: ./mkp224o filter [filter...] [options] +       ./mkp224o -f filterfile [options] +Options: +        -h  - print help to stdout and quit +        -f  - specify filter file which contains filters separated by newlines +        -D  - deduplicate filters +        -q  - do not print diagnostic output to stderr +        -x  - do not print onion names +        -v  - print more diagnostic data +        -o filename  - output onion names to specified file (append) +        -O filename  - output onion names to specified file (overwrite) +        -F  - include directory names in onion names output +        -d dirname  - output directory +        -t numthreads  - specify number of threads to utilise (default - CPU core count or 1) +        -j numthreads  - same as -t +        -n numkeys  - specify number of keys (default - 0 - unlimited) +        -N numwords  - specify number of words per key (default - 1) +        -z  - use faster key generation method; this is now default +        -Z  - use slower key generation method +        -B  - use batching key generation method (>10x faster than -z, experimental) +        -s  - print statistics each 10 seconds +        -S t  - print statistics every specified ammount of seconds +        -T  - do not reset statistics counters when printing +        -y  - output generated keys in YAML format instead of dumping them to filesystem +        -Y [filename [host.onion]]  - parse YAML encoded input and extract key(s) to filesystem +``` + +One or more filters are required for mkp224o to work. When executed, mkp224o creates a directory with secret and public keys, plus a hostname for each discovered service. By default, **root** is the current directory, but that can be overridden with the **-d** switch. + +Use the **-t numthreads** option to define how many threads you want to use during processing, and **-v** to see verbose output. Use the **fast** filter, and generate four keys by setting the **-n** option: + + +``` +$ ./mkp224o filter fast -t 4 -v -n 4 -d ~/Extracts +set workdir: /home/areahints/Extracts/ +sorting filters... done. +filters: +        fast +        filter +in total, 2 filters +using 4 threads +fastrcl5totos3vekjbqcmgpnias5qytxnaj7gpxtxhubdcnfrkapqad.onion +fastz7zvpzic6dp6pvwpmrlc43b45usm2itkn4bssrklcjj5ax74kaad.onion +fastqfj44b66mqffbdfsl46tg3c3xcccbg5lfuhr73k7odfmw44uhdqd.onion +fast4xwqdhuphvglwic5dfcxoysz2kvblluinr4ubak5pluunduy7qqd.onion +waiting for threads to finish... done. +``` + +In the directory path set with **-d**, mkp224o creates a folder with the v3 address name it has generated, and within it you see your hostname, secret, and public files. + +Use the **-s** switch to enable printing statistics, which may be useful when benchmarking different ed25519 implementations on your machine. Also, read the **OPTIMISATION.txt** file in mkp224o for performance-related tips. + +### Notes about security + +If you're wondering about the security of v2 generated keys, [Shallot][3] provides an interesting take: + +> It is sometimes claimed that private keys generated by Shallot are less secure than those generated by Tor. This is false. Although Shallot generates a keypair with an unusually large public exponent **e**, it performs all of the sanity checks specified by PKCS #1 v2.1 (directly in **sane_key**), and then performs all of the sanity checks that Tor does when it generates an RSA keypair (by calling the OpenSSL function **RSA_check_key**). + +"[Zooko's Triangle][12]" (which is discussed in [Stiegler's Petname Systems][13]) argues that names cannot be global, secure, and memorable at the same time. This means while .onion names are unique and secure, they have the disadvantage that they cannot be meaningful to humans. + +Imagine that an attacker creates an .onion name that looks similar to the .onion of a different onion service and replaces its hyperlink on the onion wiki. How long would it take for someone to recognize it? + +The onion address system has trade-offs, but vanity addresses may be a reasonable balance among them. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/how-create-vanity-tor-onion-address + +作者:[Kc Nwaezuoke][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/areahintshttps://opensource.com/users/sethhttps://opensource.com/users/bexelbiehttps://opensource.com/users/bcotton +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_mask_secret.png?itok=EjqwosxY (Password security with a mask) +[2]: https://www.torproject.org/ +[3]: https://github.com/katmagic/Shallot +[4]: http://6zdgh5a5e6zpchdz.onion/ +[5]: http://vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion/ +[6]: https://www.torproject.org/docs/tor-onion-service.html.en#four +[7]: https://github.com/ReclaimYourPrivacy/eschalot +[8]: https://github.com/cathugger/mkp224o +[9]: https://www.openssl.org/ +[10]: https://en.wikipedia.org/wiki/Make_(software) +[11]: https://opensource.com/article/19/7/introduction-gnu-autotools +[12]: https://en.wikipedia.org/wiki/Zooko%27s_triangle +[13]: http://www.skyhunter.com/marcs/petnames/IntroPetNames.html From 26d0a852cbec989b6f7fea9b9fb42cbb8d8ffe6b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:55:44 +0800 Subject: [PATCH 501/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=2012=20e?= =?UTF-8?q?xtensions=20for=20your=20GNOME=20desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 12 extensions for your GNOME desktop.md --- ...15 12 extensions for your GNOME desktop.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 sources/tech/20190815 12 extensions for your GNOME desktop.md diff --git a/sources/tech/20190815 12 extensions for your GNOME desktop.md b/sources/tech/20190815 12 extensions for your GNOME desktop.md new file mode 100644 index 0000000000..307cac4ebe --- /dev/null +++ b/sources/tech/20190815 12 extensions for your GNOME desktop.md @@ -0,0 +1,130 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (12 extensions for your GNOME desktop) +[#]: via: (https://opensource.com/article/19/8/extensions-gnome-desktop) +[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdosshttps://opensource.com/users/erezhttps://opensource.com/users/alanfdosshttps://opensource.com/users/patrickhttps://opensource.com/users/liamnairn) + +12 extensions for your GNOME desktop +====== +Add functionality and features to your Linux desktop with these add-ons. +![A person working.][1] + +The GNOME desktop is the default graphical user interface for most of the popular Linux distributions and some of the BSD and Solaris operating systems. Currently at version 3, GNOME provides a sleek user experience, and extensions are available for additional functionality. + +We've covered [GNOME extensions][2] at Opensource.com before, but to celebrate GNOME's 22nd anniversary, I decided to revisit the topic. Some of these extensions may already be installed, depending on your Linux distribution; if not, check your package manager. + +### How to add extensions from the package manager + +To install extensions that aren't in your distro, open the package manager and click **Add-ons**. Then click **Shell Extensions** at the top-right of the Add-ons screen, and you will see a button for **Extension Settings** and a list of available extensions. + +![Package Manager Add-ons Extensions view][3] + +Use the Extension Settings button to enable, disable, or configure the extensions you have installed. + +Now that you know how to add and enable extensions, here are some good ones to try. + +## 1\. GNOME Clocks + +[GNOME Clocks][4] is an application that includes a world clock, alarm, stopwatch, and timer. You can configure clocks for different geographic locations. For example, if you regularly work with colleagues in another time zone, you can set up a clock for their location. You can access the World Clocks section in the top panel's drop-down menu by clicking the system clock. It shows your configured world clocks (not including your local time), so you can quickly check the time in other parts of the world. + +## 2\. GNOME Weather + +[GNOME Weather][5] displays the weather conditions and forecast for your current location. You can access local weather conditions from the top panel's drop-down menu. You can also check the weather in other geographic locations using Weather's Places menu. + +GNOME Clocks and Weather are small applications that have extension-like functionality. Both are installed by default on Fedora 30 (which is what I'm using). If you're using another distribution and don't see them, check the package manager. + +You can see both extensions in action in the image below. + +![Clocks and Weather shown in the drop-down][6] + +## 3\. Applications Menu + +I think the GNOME 3 interface is perfectly enjoyable in its stock form, but you may prefer a traditional application menu. In GNOME 30, the [Applications Menu][7] extension was installed by default but not enabled. To enable it, click the Extensions Settings button in the Add-ons section of the package manager and enable the Applications Menu extension. + +![Extension Settings][8] + +Now you can see the Applications Menu in the top-left corner of the top panel. + +![Applications Menu][9] + +## 4\. More columns in applications view + +The Applications view is set by default to six columns of icons, probably because GNOME needs to accommodate a wide array of displays. If you're using a wide-screen display, you can use the [More columns in applications menu][10] extension to increase the columns. I find that setting it to eight makes better use of my screen by eliminating the empty columns on either side of the icons when I launch the Applications view. + +## Add system info to the top panel + +The next three extensions provide basic system information to the top panel. + + * 5. [Harddisk LED][11] shows a small hard drive icon with input/output (I/O) activity. + * 6. [Load Average][12] indicates Linux load averages taken over three time intervals. + * 7. [Uptime Indicator][13] shows system uptime; when it's clicked, it shows the date and time the system was started. + + + +## 8\. Sound Input and Output Device Chooser + +Your system may have more than one audio device for input and output. For example, my laptop has internal speakers and sometimes I use a wireless Bluetooth speaker. The [Sound Input and Output Device Chooser][14] extension adds a list of your sound devices to the System Menu so you can quickly select which one you want to use. + +## 9\. Drop Down Terminal + +Fellow Opensource.com writer [Scott Nesbitt][15] recommended the next two extensions. The first, [Drop Down Terminal][16], enables a terminal window to drop down from the top panel by pressing a certain key; the default is the key above Tab; on my keyboard, that's the tilde (~) character. Drop Down Terminal has a settings menu for customizing transparency, height, the activation keystroke, and other configurations. + +## 10\. Todo.txt + +[Todo.txt][17] adds a menu to the top panel for maintaining a file for Todo.txt task tracking. You can add or delete a task from the menu or mark it as completed. + +![Drop-down menu for Todo.txt][18] + +## 11\. Removable Drive Menu + +Opensource.com editor [Seth Kenlon][19] suggested [Removable Drive Menu][20]. It provides a drop-down menu for managing removable media, such as USB thumb drives. From the extension's menu, you can access a drive's files and eject it. The menu only appears when removable media is inserted. + +![Removable Drive Menu][21] + +## 12\. GNOME Internet Radio + +I enjoy listening to internet radio streams with the [GNOME Internet Radio][22] extension, which I wrote about in [How to Stream Music with GNOME Internet Radio][23]. + +* * * + +What are your favorite GNOME extensions? Please share them in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/extensions-gnome-desktop + +作者:[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/alanfdosshttps://opensource.com/users/erezhttps://opensource.com/users/alanfdosshttps://opensource.com/users/patrickhttps://opensource.com/users/liamnairn +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003784_02_os.comcareers_os_rh2x.png?itok=jbRfXinl (A person working.) +[2]: https://opensource.com/article/17/2/top-gnome-shell-extensions +[3]: https://opensource.com/sites/default/files/uploads/add-onsextensions_6.png (Package Manager Add-ons Extensions view) +[4]: https://wiki.gnome.org/Apps/Clocks +[5]: https://wiki.gnome.org/Apps/Weather +[6]: https://opensource.com/sites/default/files/uploads/clocksweatherdropdown_6.png (Clocks and Weather shown in the drop-down) +[7]: https://extensions.gnome.org/extension/6/applications-menu/ +[8]: https://opensource.com/sites/default/files/uploads/add-onsextensionsettings_6.png (Extension Settings) +[9]: https://opensource.com/sites/default/files/uploads/applicationsmenuextension_5.png (Applications Menu) +[10]: https://extensions.gnome.org/extension/1305/more-columns-in-applications-view/ +[11]: https://extensions.gnome.org/extension/988/harddisk-led/ +[12]: https://extensions.gnome.org/extension/1381/load-average/ +[13]: https://extensions.gnome.org/extension/508/uptime-indicator/ +[14]: https://extensions.gnome.org/extension/906/sound-output-device-chooser/ +[15]: https://opensource.com/users/scottnesbitt +[16]: https://extensions.gnome.org/extension/442/drop-down-terminal/ +[17]: https://extensions.gnome.org/extension/570/todotxt/ +[18]: https://opensource.com/sites/default/files/uploads/todo.txtmenu_3.png (Drop-down menu for Todo.txt) +[19]: https://opensource.com/users/seth +[20]: https://extensions.gnome.org/extension/7/removable-drive-menu/ +[21]: https://opensource.com/sites/default/files/uploads/removabledrivemenu_3.png (Removable Drive Menu) +[22]: https://extensions.gnome.org/extension/836/internet-radio/ +[23]: https://opensource.com/article/19/6/gnome-internet-radio From 9b529b9cf628c3d2be5fee37bf704fa029006762 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:56:06 +0800 Subject: [PATCH 502/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190816=20Get=20?= =?UTF-8?q?ready=20for=20the=20convergence=20of=20IT=20and=20OT=20networki?= =?UTF-8?q?ng=20and=20security?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190816 Get ready for the convergence of IT and OT networking and security.md --- ...ce of IT and OT networking and security.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20190816 Get ready for the convergence of IT and OT networking and security.md diff --git a/sources/talk/20190816 Get ready for the convergence of IT and OT networking and security.md b/sources/talk/20190816 Get ready for the convergence of IT and OT networking and security.md new file mode 100644 index 0000000000..ccee0d44d9 --- /dev/null +++ b/sources/talk/20190816 Get ready for the convergence of IT and OT networking and security.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get ready for the convergence of IT and OT networking and security) +[#]: via: (https://www.networkworld.com/article/3432132/get-ready-for-the-convergence-of-it-and-ot-networking-and-security.html) +[#]: author: (Linda Musthaler https://www.networkworld.com/author/Linda-Musthaler/) + +Get ready for the convergence of IT and OT networking and security +====== +Collecting telemetry data from operational networks and passing it to information networks for analysis has its benefits. But this convergence presents big cultural and technology challenges. +![Thinkstock][1] + +Most IT networking professionals are so busy with their day-to-day responsibilities that they don’t have time to consider taking on more work. But for companies with an industrial component, there’s an elephant in the room that is clamoring for attention. I’m talking about the increasingly common convergence of IT and operational technology (OT) networking and security. + +Traditionally, IT and OT have had very separate roles in an organization. IT is typically tasked with moving data between computers and humans, whereas OT is tasked with moving data between “things,” such as sensors, actuators, smart machines, and other devices to enhance manufacturing and industrial processes. Not only were the roles for IT and OT completely separate, but their technologies and networks were, too. + +That’s changing, however, as companies want to collect telemetry data from the OT side to drive analytics and business processes on the IT side. The lines between the two sides are blurring, and this has big implications for IT networking and security teams. + +“This convergence of IT and OT systems is absolutely on the increase, and it's especially affecting the industries that are in the business of producing things, whatever those things happen to be,” according to Jeff Hussey, CEO of [Tempered Networks][2], which is working to help bridge the gap between the two. “There are devices on the OT side that are increasingly networked but without any security to those networks. Their operators historically relied on an air gap between the networks of devices, but those gaps no longer exist. The complexity of the environment and the expansive attack surface that is created as a result of connecting all of these devices to corporate networks massively increases the tasks needed to secure even the traditional networks, much less the expanded converged networks.” + +**[ Also read: [Is your enterprise software committing security malpractice?][3] | Get regularly scheduled insights: [Sign up for Network World newsletters][4] ]** + +Hussey is well versed on the cultural and technology issues in this arena. When asked if IT and OT people are working together to integrate their networks, he says, “That would be ideal, but it’s not really what we see in the marketplace. Typically, we see some acrimony between these two groups.” + +Hussey explains that the groups move at different paces. + +“The OT groups think in terms of 10-plus year cycles, whereas the IT groups think in terms of three-plus years cycles,” he says. “There's a lot more change and iteration in IT environments than there is OT environments, which are traditionally extremely static. But now companies want to bring telemetry data that is produced by OT devices back to some workload in a data center or in a cloud. That forces a requirement for secure connectivity because of corporate governance or regulatory requirements, and this is when we most often see the two groups clash.” + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][5] ]** + +Based on the situations Hussey has observed so far, the onus to connect and secure the disparate networks falls to the IT side of the house. This is a big challenge because the tools that have traditionally been used for security in IT environments aren’t necessarily appropriate or applicable in OT environments. IT and OT systems have very different protocols and operating systems. It’s not practical to try to create network segmentation using firewall rules, access control lists, VLANs, or VPNs because those things can’t scale to the workloads presented in OT environments. + +### OT practices create IT security concerns + +Steve Fey, CEO of [Totem Building Cybersecurity][6], concurs with Hussey and points out another significant issue in trying to integrate the networking and security aspects of IT and OT systems. In the OT world, it’s often the device vendors or their local contractors who manage and maintain all aspects of the device, typically through remote access. These vendors even install the remote access capabilities and set up the users. “This is completely opposite to how it should be done from a cybersecurity policy perspective,” says Fey. And yet, it’s common today in many industrial environments. + +Fey’s company is in the building controls industry, which automates control of everything from elevators and HVAC systems to lighting and life safety systems in commercial buildings. + +“The building controls industry, in particular, is one that's characterized by a completely different buying and decision-making culture than in enterprise IT. Everything from how the systems are engineered, purchased, installed, and supported is very different than the equivalent world of enterprise IT. Even the suppliers are largely different,” says Fey. “This is another aspect of the cultural challenge between IT and OT teams. They are two worlds that are having to figure each other out because of the cyber threats that pose a risk to these control systems.” + +Fey says major corporate entities are just waking up to the reality of this massive threat surface, whether it’s in their buildings or their manufacturing processes. + +“There’s a dire need to overcome decades of installed OT systems that have been incorrectly configured and incorrectly operated without the security policies and safeguards that are normal to enterprise IT. But the toolsets for these environments are incompatible, and the cultural differences are great,” he says. + +Totem’s goal is to bridge this gap with a specific focus on cyber and to provide a toolset that is recognizable to the enterprise IT world. + +Both Hussey and Fey say it’s likely that IT groups will be charged with leading the convergence of IT and OT networks, but they must include their OT counterparts in the efforts. There are big cultural and technical gaps to bridge to deliver the results that industrial companies are hoping to achieve. + +Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3432132/get-ready-for-the-convergence-of-it-and-ot-networking-and-security.html + +作者:[Linda Musthaler][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/Linda-Musthaler/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2018/02/abstract_networks_thinkstock_881604844-100749945-large.jpg +[2]: https://www.temperednetworks.com/ +[3]: https://www.networkworld.com/article/3429559/is-your-enterprise-software-committing-security-malpractice.html +[4]: https://www.networkworld.com/newsletters/signup.html +[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[6]: https://totembuildings.com/ +[7]: https://www.facebook.com/NetworkWorld/ +[8]: https://www.linkedin.com/company/network-world From 2465d02c6e88ee26d11b5b7f8303d32ac50cec57 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:56:21 +0800 Subject: [PATCH 503/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190816=20Poweri?= =?UTF-8?q?ng=20edge=20data=20centers:=20Blue=20energy=20might=20be=20the?= =?UTF-8?q?=20perfect=20solution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190816 Powering edge data centers- Blue energy might be the perfect solution.md --- ...ue energy might be the perfect solution.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/talk/20190816 Powering edge data centers- Blue energy might be the perfect solution.md diff --git a/sources/talk/20190816 Powering edge data centers- Blue energy might be the perfect solution.md b/sources/talk/20190816 Powering edge data centers- Blue energy might be the perfect solution.md new file mode 100644 index 0000000000..6c07136d45 --- /dev/null +++ b/sources/talk/20190816 Powering edge data centers- Blue energy might be the perfect solution.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Powering edge data centers: Blue energy might be the perfect solution) +[#]: via: (https://www.networkworld.com/article/3432116/powering-edge-data-centers-blue-energy-might-be-the-perfect-solution.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Powering edge data centers: Blue energy might be the perfect solution +====== +Blue energy, created by mixing seawater and fresh water, could be the perfect solution for providing cheap and eco-friendly power to edge data centers. +![Benkrut / Getty Images][1] + +About a cubic yard of freshwater mixed with seawater provides almost two-thirds of a kilowatt-hour of energy. And scientists say a revolutionary new battery chemistry based on that theme could power edge data centers. + +The idea is to harness power from wastewater treatment plants located along coasts, which happen to be ideal locations for edge data centers and are heavy electricity users. + +“Places where salty ocean water and freshwater mingle could provide a massive source of renewable power,” [writes Rob Jordan in a Stanford University article][2]. + +**[ Read also: [Data centers may soon recycle heat into electricity][3] | Get regularly scheduled insights: [Sign up for Network World newsletters][4] ]** + +The chemical process harnesses a mix of sodium and chloride ions. They’re squirted from battery electrodes into a solution and cause current to flow. That initial infusion is then followed by seawater being exchanged with wastewater effluent. It reverses the current flow and creates the energy, the researchers explain. + +“Energy is recovered during both the freshwater and seawater flushes, with no upfront energy investment and no need for charging,” the article says. + +In other words, the battery is continually recharging and discharging with no added input—such as electricity from the grid. The Stanford researchers say the technology could be ideal for making coastal wastewater plants energy independent. + +### Coastal edge data centers + +But edge data centers, also taking up location on the coasts, could also benefit. Those data centers are already exploring kinetic wave-energy to harvest power, as well as using seawater to cool data centers. + +I’ve written about [Ocean Energy’s offshore, power platform using kinetic wave energy][5]. That 125-feet-long, wave converter solution, not only uses ocean water for power generation, but its sea-environment implementation means the same body of water can be used for cooling, too. + +“Ocean cooling and ocean energy in the one device” is a seductive solution, the head of that company said at the time. + +[Microsoft, too, has an underwater data center][6] that proffers the same kinds of power benefits. + +Locating data centers on coasts or in the sea rather than inland doesn’t just provide virtually free-of-cost, power and cooling advantages, plus the associated eco-emissions advantages. The coasts tend to be where the populous is, and locating data center operations near to where the actual calculations, data stores, and other activities need to take place fits neatly into low-latency edge computing, conceptually. + +Other advantages to placing a data center actually in the ocean, although close to land, include the fact that there’s no rent in open waters. And in international waters, one could imagine regulatory advantages—there isn’t a country’s official hovering around. + +However, by placing the installation on terra firma (as the seawater-saltwater mix power solution would be designed for) but close to water at a coast, one can use the necessary seawater and gain an advantage of ease of access to the real estate, connections, and so on. + +The Stanford University engineers, in their seawater/wastewater mix tests, flushed a battery prototype 180 times with wastewater from the Palo Alto Regional Water Quality Control Plant and seawater from nearby Half Moon Bay. The group says they obtained 97% “capturing [of] the salinity gradient energy,” or the blue energy, as it’s sometimes called. + +“Surplus power production could even be diverted to nearby industrial operations,” the article continues. + +“Tapping blue energy at the global scale: rivers running into the ocean” is yet to be solved. “But it is a good starting point,” says Stanford scholar Kristian Dubrawski in the article. + +Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3432116/powering-edge-data-centers-blue-energy-might-be-the-perfect-solution.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://images.idgesg.net/images/article/2019/08/uk_united_kingdom_northern_ireland_belfast_river_lagan_waterfront_architecture_by_benkrut_gettyimages-530205844_2400x1600-100807934-large.jpg +[2]: https://news.stanford.edu/2019/07/29/generating-energy-wastewater/ +[3]: https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html +[4]: https://www.networkworld.com/newsletters/signup.html +[5]: https://www.networkworld.com/article/3314597/wave-energy-to-power-undersea-data-centers.html +[6]: https://www.networkworld.com/article/3283332/microsoft-launches-undersea-free-cooling-data-center.html +[7]: https://www.facebook.com/NetworkWorld/ +[8]: https://www.linkedin.com/company/network-world From 53b6d8a0b9cc72a4a87c9fe6cf18197b8e332a9b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:56:40 +0800 Subject: [PATCH 504/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20Extrem?= =?UTF-8?q?e's=20acquisitions=20have=20prepped=20it=20to=20better=20battle?= =?UTF-8?q?=20Cisco,=20Arista,=20HPE,=20others?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190815 Extreme-s acquisitions have prepped it to better battle Cisco, Arista, HPE, others.md --- ...etter battle Cisco, Arista, HPE, others.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/talk/20190815 Extreme-s acquisitions have prepped it to better battle Cisco, Arista, HPE, others.md diff --git a/sources/talk/20190815 Extreme-s acquisitions have prepped it to better battle Cisco, Arista, HPE, others.md b/sources/talk/20190815 Extreme-s acquisitions have prepped it to better battle Cisco, Arista, HPE, others.md new file mode 100644 index 0000000000..cfe30ea142 --- /dev/null +++ b/sources/talk/20190815 Extreme-s acquisitions have prepped it to better battle Cisco, Arista, HPE, others.md @@ -0,0 +1,64 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Extreme's acquisitions have prepped it to better battle Cisco, Arista, HPE, others) +[#]: via: (https://www.networkworld.com/article/3432173/extremes-acquisitions-have-prepped-it-to-better-battle-cisco-arista-hpe-others.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Extreme's acquisitions have prepped it to better battle Cisco, Arista, HPE, others +====== +Extreme has bought cloud, SD-WAN and data center technologies that make it more prepared to take on its toughest competitors. +Extreme Networks has in recent months restyled the company with data-center networking technology acquisitions and upgrades, but now comes the hard part – executing with enterprise customers and effectively competing with the likes of Cisco, VMware, Arista, Juniper, HPE and others. + +The company’s latest and perhaps most significant long-term move was closing the [acquisition of wireless-networking vendor Aerohive][1] for about $210 million.  The deal brings Extreme Aerohive’s wireless-networking technology – including its WiFi 6 gear, SD-WAN software and cloud-management services. + +**More about edge networking** + + * [How edge networking and IoT will reshape data centers][2] + * [Edge computing best practices][3] + * [How edge computing can help secure the IoT][4] + + + +With the Aerohive technology, Extreme says customers and partners will be able to mix and match a broader array of software, hardware, and services to create networks that support their unique needs, and that can be managed and automated from the enterprise edge to the cloud. + +The Aerohive buy is just the latest in a string of acquisitions that have reshaped the company. In the past few years the company has acquired networking and data-center technology from Avaya and Brocade, and it bought wireless player Zebra Technologies in 2016 for $55 million. + +While it has been a battle to integrate and get solid sales footing for those acquisitions – particularly Brocade and Avaya, the company says those challenges are behind it and that the Aerohive integration will be much smoother. + +“After scaling Extreme’s business to $1B in revenue [for FY 2019, which ended in June] and expanding our portfolio to include end-to-end enterprise networking solutions, we are now taking the next step to transform our business to add sustainable, subscription-oriented cloud-based solutions that will enable us to drive recurring revenue and improved cash-flow generation,” said Extreme CEO Ed Meyercord at the firm’s [FY 19 financial analysts][5] call. + +The strategy to move more toward a software-oriented, cloud-based revenue generation and technology development is brand new for Extreme. The company says it expects to generate as much as 30 percent of revenues from recurring charges in the near future. The tactic was enabled in large part by the Aerohive buy, which doubled Extreme’s customer based to 60,000 and its sales partners to 11,000 and whose revenues are recurring and cloud-based.  The acquisition also created the number-three enterprise Wireless LAN company behind Cisco and HPE/Aruba.    + +“We are going to take this Aerohive system and expand across our entire portfolio and use it to deliver common, simplified software  with feature packages for on-premises or in-cloud based on customers' use case,” added Norman Rice, Extreme’s Chief Marketing, Development and Product Operations Officer. “We have never really been in any cloud conversations before so for us this will be a major add.” + +Indeed, the Aerohive move is key for the company’s future, analysts say. + +To continue reading this article register now + +[Get Free Access][6] + +[Learn More][7]   Existing Users [Sign In][6] + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3432173/extremes-acquisitions-have-prepped-it-to-better-battle-cisco-arista-hpe-others.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/3405440/extreme-targets-cloud-services-sd-wan-wifi-6-with-210m-aerohive-grab.html +[2]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html +[3]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html +[4]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html +[5]: https://seekingalpha.com/article/4279527-extreme-networks-inc-extr-ceo-ed-meyercord-q4-2019-results-earnings-call-transcript +[6]: javascript:// +[7]: https://www.networkworld.com/learn-about-insider/ From 236ff0bbf9b7db82299270c577b33a6598f79d8e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:56:56 +0800 Subject: [PATCH 505/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20Nvidia?= =?UTF-8?q?=20rises=20to=20the=20need=20for=20natural=20language=20process?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190815 Nvidia rises to the need for natural language processing.md --- ...he need for natural language processing.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sources/talk/20190815 Nvidia rises to the need for natural language processing.md diff --git a/sources/talk/20190815 Nvidia rises to the need for natural language processing.md b/sources/talk/20190815 Nvidia rises to the need for natural language processing.md new file mode 100644 index 0000000000..c2b64d7f63 --- /dev/null +++ b/sources/talk/20190815 Nvidia rises to the need for natural language processing.md @@ -0,0 +1,71 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Nvidia rises to the need for natural language processing) +[#]: via: (https://www.networkworld.com/article/3432203/nvidia-rises-to-the-need-for-natural-language-processing.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Nvidia rises to the need for natural language processing +====== +As the demand for natural language processing grows for chatbots and AI-powered interactions, more companies will need systems that can provide it. Nvidia says its platform can handle it. +![andy.brandon50 \(CC BY-SA 2.0\)][1] + +Nvidia is boasting of a breakthrough in conversation natural language processing (NLP) training and inference, enabling more complex interchanges between customers and chatbots with immediate responses. + +The need for such technology is expected to grow, as digital voice assistants alone are expected to climb from 2.5 billion to 8 billion within the next four years, according to Juniper Research, while Gartner predicts that by 2021, 15% of all customer service interactions will be completely handled by AI, an increase of 400% from 2017. + +The company said its DGX-2 AI platform trained the BERT-Large AI language model in less than an hour and performed AI inference in 2+ milliseconds, making it possible “for developers to use state-of-the-art language understanding for large-scale applications.” + +**[ Also read: [What is quantum computing (and why enterprises should care)][2] ]** + +BERT, or Bidirectional Encoder Representations from Transformers, is a Google-powered AI language model that many developers say has better accuracy than humans in some performance evaluations. It’s all discussed [here][3]. + +### Nvidia sets natural language processing records + +All told, Nvidia is claiming three NLP records: + +**1\. Training:** Running the largest version of the BERT language model, a Nvidia DGX SuperPOD with 92 Nvidia DGX-2H systems running 1,472 V100 GPUs cut training from several days to 53 minutes. A single DGX-2 system, which is about the size of a tower PC, trained BERT-Large in 2.8 days. + +“The quicker we can train a model, the more models we can train, the more we learn about the problem, and the better the results get,” said Bryan Catanzaro, vice president of applied deep learning research, in a statement. + +**2\. Inference**: Using Nvidia T4 GPUs on its TensorRT deep learning inference platform, Nvidia performed inference on the BERT-Base SQuAD dataset in 2.2 milliseconds, well under the 10 millisecond processing threshold for many real-time applications, and far ahead of the 40 milliseconds measured with highly optimized CPU code. + +**3\. Model:** Nvidia said its new custom model, called Megatron, has 8.3 billion parameters, making it 24 times larger than the BERT-Large and the world's largest language model based on Transformers, the building block used for BERT and other natural language AI models. + +In a move sure to make FOSS advocates happy, Nvidia is also making a ton of source code available via [GitHub][4]. + + * NVIDIA GitHub BERT training code with PyTorch + * NGC model scripts and check-points for TensorFlow + * TensorRT optimized BERT Sample on GitHub + * Faster Transformer: C++ API, TensorRT plugin, and TensorFlow OP + * MXNet Gluon-NLP with AMP support for BERT (training and inference) + * TensorRT optimized BERT Jupyter notebook on AI Hub + * Megatron-LM: PyTorch code for training massive Transformer models + + + +Not that any of this is easily consumed. We’re talking very advanced AI code. Very few people will be able to make heads or tails of it. But the gesture is a positive one. + +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/3432203/nvidia-rises-to-the-need-for-natural-language-processing.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://images.idgesg.net/images/article/2019/04/alphabetic_letters_characters_language_by_andybrandon50_cc_by-sa_2-0_1500x1000-100794409-large.jpg +[2]: https://www.networkworld.com/article/3275367/what-s-quantum-computing-and-why-enterprises-need-to-care.html +[3]: https://medium.com/ai-network/state-of-the-art-ai-solutions-1-google-bert-an-ai-model-that-understands-language-better-than-92c74bb64c +[4]: https://github.com/NVIDIA/TensorRT/tree/release/5.1/demo/BERT/ +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From ce67f0b9c1bf1ec91264ced8d6f2bbec972cfada Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Aug 2019 00:57:20 +0800 Subject: [PATCH 506/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190815=20Keepin?= =?UTF-8?q?g=20track=20of=20Linux=20users:=20When=20do=20they=20log=20in?= =?UTF-8?q?=20and=20for=20how=20long=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190815 Keeping track of Linux users- When do they log in and for how long.md --- ...s- When do they log in and for how long.md | 195 ++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 sources/tech/20190815 Keeping track of Linux users- When do they log in and for how long.md diff --git a/sources/tech/20190815 Keeping track of Linux users- When do they log in and for how long.md b/sources/tech/20190815 Keeping track of Linux users- When do they log in and for how long.md new file mode 100644 index 0000000000..0c8378902d --- /dev/null +++ b/sources/tech/20190815 Keeping track of Linux users- When do they log in and for how long.md @@ -0,0 +1,195 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Keeping track of Linux users: When do they log in and for how long?) +[#]: via: (https://www.networkworld.com/article/3431864/keeping-track-of-linux-users-when-do-they-log-in-and-for-how-long.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Keeping track of Linux users: When do they log in and for how long? +====== +Getting an idea how often your users are logging in and how much time they spend on a Linux server is pretty easy with a couple commands and maybe a script or two. +![Adikos \(CC BY 2.0\)][1] + +The Linux command line provides some excellent tools for determining how frequently users log in and how much time they spend on a system. Pulling information from the **/var/log/wtmp** file that maintains details on user logins can be time-consuming, but with a couple easy commands, you can extract a lot of useful information on user logins. + +One of the commands that helps with this is the **last** command. It provides a list of user logins that can go quite far back. The output looks like this: + +``` +$ last | head -5 | tr -s " " +shs pts/0 192.168.0.14 Wed Aug 14 09:44 still logged in +shs pts/0 192.168.0.14 Wed Aug 14 09:41 - 09:41 (00:00) +shs pts/0 192.168.0.14 Wed Aug 14 09:40 - 09:41 (00:00) +nemo pts/1 192.168.0.18 Wed Aug 14 09:38 still logged in +shs pts/0 192.168.0.14 Tue Aug 13 06:15 - 18:18 (00:24) +``` + +Note that the **tr -s " "** portion of the command above reduces strings of blanks to single blanks, and in this case, it keeps the output shown from being so wide that it would be wrapped around on this web page. Without the **tr** command, that output would look like this: + +``` +$ last | head -5 +shs pts/0 192.168.0.14 Wed Aug 14 09:44 still logged in +shs pts/0 192.168.0.14 Wed Aug 14 09:41 - 09:41 (00:00) +shs pts/0 192.168.0.14 Wed Aug 14 09:40 - 09:41 (00:00) +nemo pts/1 192.168.0.18 Wed Aug 14 09:38 still logged in +shs pts/0 192.168.0.14 Wed Aug 14 09:15 - 09:40 (00:24) +``` + +**[ Two-Minute Linux Tips: [Learn how to master a host of Linux commands in these 2-minute video tutorials][2] ]** + +While it’s easy to generate and review login activity records like these for all users with the **last** command or for some particular user with a **last username** command, without the pipe to **head**, these commands will generally result in a _lot_ of data. In this case, a listing for all users would have 908 lines. + +``` +$ last | wc -l +908 +``` + +### Counting logins with last + +If you don't need all of the login detail, you can view user login sessions as a simple count of logins for all users on the system with a command like this: + +``` +$ for user in `ls /home`; do echo -ne "$user\t"; last $user | wc -l; done +dorothy 21 +dory 13 +eel 29 +jadep 124 +jdoe 27 +jimp 42 +nemo 9 +shark 17 +shs 423 +test 2 +waynek 201 +``` + +The list above shows how many times each user has logged since the current **/var/log/wtmp** file was initiated. Notice, however, that the command to generate it does depend on user accounts being set up in the default /home directory. + +Depending on how much data has been accumulated in your current **wtmp** file, you may see a lot of logins or relatively few. To get a little more insight into how relevant the number of logins are, you could turn this command into a script, adding a command that shows when the first login in the current file occurred to provide a little perspective. + +``` +#!/bin/bash + +echo -n "Logins since " +who /var/log/wtmp | head -1 | awk '{print $3}' +echo "=======================" + +for user in `ls /home` +do + echo -ne "$user\t" + last $user | wc -l +done +``` + +When you run the script, the "Logins since" line will let you know how to interpret the stats shown. + +``` +$ ./show_user_logins +Logins since 2018-10-05 +======================= +dorothy 21 +dory 13 +eel 29 +jadep 124 +jdoe 27 +jimp 42 +nemo 9 +shark 17 +shs 423 +test 2 +waynek 201 +``` + +### Looking at accumulated login time with **ac** + +The **ac** command provides a report on user login time — hours spent logged in. As with the **last** command, **ac** reports on user logins since the last rollover of the **wtmp** file since **ac**, like **last**, gets its details from **/var/log/wtmp**. The **ac** command, however, provides a much different view of user activity than the number of logins. For a single user, we might use a command like this one: + +``` +$ ac nemo + total 31.61 +``` + +This tells us that nemo has spent nearly 32 hours logged in. To use the command to generate a listing of the login times for all users, you might use a command like this: + +``` +$ for user in `ls /home`; do ac $user | sed "s/total/$user\t/" ; done + dorothy 9.12 + dory 1.67 + eel 4.32 + … +``` + +In this command, we are replacing the word “total” in each line with the relevant username. And, as long as usernames are fewer than 8 characters, the output will line up nicely. To left justify the output, you can modify that command to this: + +``` +$ for user in `ls /home`; do ac $user | sed "s/^\t//" | sed "s/total/$user\t/" ; done +dorothy 9.12 +dory 1.67 +eel 4.32 +... +``` + +The first used of **sed** in that string of commands strips off the initial tabs. + +To turn this command into a script and display the initial date for the **wtmp** file to add more relevance to the hour counts, you could use a script like this: + +``` +#!/bin/bash + +echo -n "hours online since " +who /var/log/wtmp | head -1 | awk '{print $3}' +echo "=============================" + +for user in `ls /home` +do + ac $user | sed "s/^\t//" | sed "s/total/$user\t/" +done +``` + +If you run the script, you'll see the hours spent by each user over the lifespan of the **wtmp** file: + +``` +$ ./show_user_hours +hours online since 2018-10-05 +============================= +dorothy 70.34 +dory 4.67 +eel 17.05 +jadep 186.04 +jdoe 28.20 +jimp 11.49 +nemo 11.61 +shark 13.04 +shs 3563.60 +test 1.00 +waynek 312.00 +``` + +The difference between the user activity levels in this example is pretty obvious with one user spending only one hour on the system since October and another dominating the system. + +### Wrap-up + +Reviewing how often users log into a system and how many hours they spend online can both give you an overview of how a system is being used and who are likely the heaviest users. Of course, login time does not necessarily correspond to how much work each user is getting done, but it's likely close and commands such as **last** and **ac **can help you identify the most active users. + +### More Linux advice: Sandra Henry-Stocker explains how to use the rev command in this 2-Minute Linux Tip video + +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/3431864/keeping-track-of-linux-users-when-do-they-log-in-and-for-how-long.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://images.idgesg.net/images/article/2019/08/keyboard-adikos-100808324-large.jpg +[2]: https://www.youtube.com/playlist?list=PL7D2RMSmRO9J8OTpjFECi8DJiTQdd4hua +[3]: https://www.facebook.com/NetworkWorld/ +[4]: https://www.linkedin.com/company/network-world From ee36dedbdc9ec42ce5b5637efccb6371916b0268 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Fri, 16 Aug 2019 17:00:17 +0000 Subject: [PATCH 507/951] Revert "leemeans translating" This reverts commit 5355532e27bbe1d219e06e6a06630f4e0942b893. --- sources/tech/20171006 7 deadly sins of documentation.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20171006 7 deadly sins of documentation.md b/sources/tech/20171006 7 deadly sins of documentation.md index 2289481584..5f2005c764 100644 --- a/sources/tech/20171006 7 deadly sins of documentation.md +++ b/sources/tech/20171006 7 deadly sins of documentation.md @@ -1,4 +1,3 @@ -leemeans translating 7 deadly sins of documentation ====== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-cat-writing-king-typewriter-doc.png?itok=afaEoOqc) From fccded393f3c572c3698c3cdb785c91ecd1a1541 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Aug 2019 10:11:17 +0800 Subject: [PATCH 508/951] PRF @geekpi --- ...et Linux Kernel 5.0 in Ubuntu 18.04 LTS.md | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md b/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md index 541253750b..ce0db437a2 100644 --- a/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md +++ b/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS) @@ -10,31 +10,29 @@ 如何在 Ubuntu 18.04 LTS 中获取 Linux 5.0 内核 ====== -_ **最近发布的 Ubuntu 18.04.3 包括 Linux 5.0 内核中的几个新功能和改进,但默认情况下没有安装。本教程演示了如何在 Ubuntu 18.04 LTS 中获取 Linux 5 内核。** _ +> 最近发布的 Ubuntu 18.04.3 包括 Linux 5.0 内核中的几个新功能和改进,但默认情况下没有安装。本教程演示了如何在 Ubuntu 18.04 LTS 中获取 Linux 5 内核。 -[Subscribe to It’s FOSS YouTube Channel for More Videos][1] +[Ubuntu 18.04 的第三个“点发布版”已经发布][2],它带来了新的稳定版本的 GNOME 组件、livepatch 桌面集成和内核 5.0。 -[Ubuntu 18.04 的第三个“点发布版”在这里][2],它带来了新的稳定版本的 GNOME 组件、livepatch 桌面集成和内核 5.0。 +可是等等!什么是“小数点版本point release”?让我先解释一下。 -可是等等!什么是“点发布版”(point release)?让我先解释一下。 +### Ubuntu LTS 小数点版本 -### Ubuntu LTS 点发布版 +Ubuntu 18.04 于 2018 年 4 月发布,由于它是一个长期支持 (LTS) 版本,它将一直支持到 2023 年。从那时起,已经有许多 bug 修复、安全更新和软件升级。如果你今天下载 Ubuntu 18.04,你需要在[在安装 Ubuntu 后首先安装这些更新][3]。 -Ubuntu 18.04 于 2018 年 4 月发布,由于它是一个长期支持 (LTS) 版本,它将一直支持到 2023 年。从那时起,已经有许多 bug 修复,安全更新和软件升级。如果你今天下载 Ubuntu 18.04,你需要在[在安装 Ubuntu 后首先安装这些更新][3]。 +当然,这不是一种理想情况。这就是 Ubuntu 提供这些“小数点版本”的原因。点发布版包含所有功能和安全更新以及自 LTS 版本首次发布以来添加的 bug 修复。如果你今天下载 Ubuntu,你会得到 Ubuntu 18.04.3 而不是 Ubuntu 18.04。这节省了在新安装的 Ubuntu 系统上下载和安装数百个更新的麻烦。 -当然,这不是一种理想情况。这就是 Ubuntu 提供这些“点发布版”的原因。点发布版包含所有功能和安全更新以及自 LTS 版本首次发布以来添加的 bug 修复。如果你今天下载 Ubuntu,你会得到 Ubuntu 18.04.3 而不是 Ubuntu 18.04。这节省了在新安装的 Ubuntu 系统上下载和安装数百个更新的麻烦。 - -好了!现在你知道“点发布版”的概念了。你如何升级到这些点发布版?答案很简单。只需要像平时一样[更新你的 Ubuntu 系统][4],这样你将在最新的点发布版上了。 +好了!现在你知道“小数点版本”的概念了。你如何升级到这些小数点版本?答案很简单。只需要像平时一样[更新你的 Ubuntu 系统][4],这样你将在最新的小数点版本上了。 你可以[查看 Ubuntu 版本][5]来了解正在使用的版本。我检查了一下,因为我用的是 Ubuntu 18.04.3,我以为我的内核会是 5。当我[查看 Linux 内核版本][6]时,它仍然是基本内核 4.15。 ![Ubuntu Version And Linux Kernel Version Check][7] -这是为什么?如果 Ubuntu 18.04.3 有 Linux 5.0 内核,为什么它仍然使用 Linux 4.15 内核?这是因为你必须通过选择 LTS 支持栈(通常称为 HWE)手动请求在 Ubuntu LTS 中安装新内核。 +这是为什么?如果 Ubuntu 18.04.3 有 Linux 5.0 内核,为什么它仍然使用 Linux 4.15 内核?这是因为你必须通过选择 LTS 支持栈Enablement Stack(通常称为 HWE)手动请求在 Ubuntu LTS 中安装新内核。 ### 使用 HWE 在Ubuntu 18.04 中获取 Linux 5.0 内核 -默认情况下,Ubuntu LTS 将保持在最初发布的 Linux 内核上。 [硬件支持栈][9](HWE)为现有的 Ubuntu LTS 版本提供了更新的内核和 xorg 支持。 +默认情况下,Ubuntu LTS 将保持在最初发布的 Linux 内核上。[硬件支持栈][9]hardware enablement stack(HWE)为现有的 Ubuntu LTS 版本提供了更新的内核和 xorg 支持。 最近发生了一些变化。如果你下载了 Ubuntu 18.04.2 或更新的桌面版本,那么就会为你启用 HWE,默认情况下你将获得新内核以及常规更新。 @@ -54,7 +52,7 @@ sudo apt-get install --install-recommends linux-generic-hwe-18.04 完成 HWE 内核的安装后,重启系统。现在你应该拥有更新的 Linux 内核了。 -**你在 Ubuntu 18.04 中获取 5.0 内核了么?** +### 你在 Ubuntu 18.04 中获取 5.0 内核了么? 请注意,下载并安装了 Ubuntu 18.04.2 的用户已经启用了 HWE。所以这些用户将能轻松获取 5.0 内核。 @@ -69,7 +67,7 @@ via: https://itsfoss.com/ubuntu-hwe-kernel/ 作者:[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 9276e40c4cb98c97f39b6cd60484376238de877e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Aug 2019 10:12:34 +0800 Subject: [PATCH 509/951] PUB @geekpi https://linux.cn/article-11236-1.html --- ...90812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md (96%) diff --git a/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md b/published/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md similarity index 96% rename from translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md rename to published/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md index ce0db437a2..ac09fa3ab2 100644 --- a/translated/tech/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md +++ b/published/20190812 How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11236-1.html) [#]: subject: (How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS) [#]: via: (https://itsfoss.com/ubuntu-hwe-kernel/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) @@ -12,6 +12,8 @@ > 最近发布的 Ubuntu 18.04.3 包括 Linux 5.0 内核中的几个新功能和改进,但默认情况下没有安装。本教程演示了如何在 Ubuntu 18.04 LTS 中获取 Linux 5 内核。 +![](https://img.linux.net.cn/data/attachment/album/201908/17/101052xday1jyrszbddsfc.jpg) + [Ubuntu 18.04 的第三个“点发布版”已经发布][2],它带来了新的稳定版本的 GNOME 组件、livepatch 桌面集成和内核 5.0。 可是等等!什么是“小数点版本point release”?让我先解释一下。 From 630e3130089651a509fb7c4d7f3f71b74be9b98f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Aug 2019 10:47:36 +0800 Subject: [PATCH 510/951] PRF @geekpi --- ... Does it Take To Boot Your Linux System.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md b/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md index 2d3bb561fc..f818cfc2d5 100644 --- a/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md +++ b/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md @@ -1,28 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Find Out How Long Does it Take To Boot Your Linux System) [#]: via: (https://itsfoss.com/check-boot-time-linux/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -了解你的 Linux 系统的启动时间 +你的 Linux 系统开机时间已经击败了 99% 的电脑 ====== -当你打开系统电源时,你会等待制造商的 logo 出现,屏幕上可能会显示一些消息(以非安全模式启动),[Grub][1] 页面,操作系统加载页面以及最后的登录页面。 +当你打开系统电源时,你会等待制造商的徽标出现,屏幕上可能会显示一些消息(以非安全模式启动),然后是 [Grub][1] 屏幕、操作系统加载屏幕以及最后的登录屏。 你检查过这花费了多长时间么?也许没有。除非你真的需要知道,否则你不会在意开机时间。 -但是如果你很想知道你的 Linux 系统需要很长时间才能启动呢?使用秒表是一种方法,但在 Linux 中,你有一种更好、更轻松地了解系统启动时间的方法。 +但是如果你很想知道你的 Linux 系统需要很长时间才能启动完成呢?使用秒表是一种方法,但在 Linux 中,你有一种更好、更轻松地了解系统启动时间的方法。 ### 在 Linux 中使用 systemd-analyze 检查启动时间 -![][2] +![](https://img.linux.net.cn/data/attachment/album/201908/17/104358s1ho8ug868hso1y8.jpg) -无论你是否喜欢,[systemd][3] 运行在大多数流行的 Linux 发行版中。systemd 有许多管理 Linux 系统的工具。其中一个就是 systemd-analyze。 +无论你是否喜欢,[systemd][3] 运行在大多数流行的 Linux 发行版中。systemd 有许多管理 Linux 系统的工具。其中一个就是 `systemd-analyze`。 -systemd-analyze 命令为你提供上次启动时运行的服务数量以及消耗时间的详细信息。 +`systemd-analyze` 命令为你提供最近一次启动时运行的服务数量以及消耗时间的详细信息。 如果在终端中运行以下命令: @@ -90,9 +90,9 @@ sudo systemctl disable NetworkManager-wait-online.service sudo systemctl enable NetworkManager-wait-online.service ``` -现在,请不要在不知道用途的情况下自行禁用各种服务。这可能会产生危险的后果。 +请不要在不知道用途的情况下自行禁用各种服务。这可能会产生危险的后果。 -_ **现在你知道了如何检查 Linux 系统的启动时间,为什么不在评论栏分享你的系统的启动时间?** _ +现在你知道了如何检查 Linux 系统的启动时间,为什么不在评论栏分享你的系统的启动时间? -------------------------------------------------------------------------------- @@ -101,7 +101,7 @@ via: https://itsfoss.com/check-boot-time-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 5e51217212fc1ad5db3d1d4ad8eb18625f4a4639 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Aug 2019 10:48:03 +0800 Subject: [PATCH 511/951] PUB @geekpi https://linux.cn/article-11238-1.html --- ...ind Out How Long Does it Take To Boot Your Linux System.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190808 Find Out How Long Does it Take To Boot Your Linux System.md (98%) diff --git a/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md b/published/20190808 Find Out How Long Does it Take To Boot Your Linux System.md similarity index 98% rename from translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md rename to published/20190808 Find Out How Long Does it Take To Boot Your Linux System.md index f818cfc2d5..f3202d96af 100644 --- a/translated/tech/20190808 Find Out How Long Does it Take To Boot Your Linux System.md +++ b/published/20190808 Find Out How Long Does it Take To Boot Your Linux System.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11238-1.html) [#]: subject: (Find Out How Long Does it Take To Boot Your Linux System) [#]: via: (https://itsfoss.com/check-boot-time-linux/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From f65e922f6d04f002c5aec6f8a80fef216f9a176d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 17 Aug 2019 11:21:21 +0800 Subject: [PATCH 512/951] Rename sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md to sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md --- ...iVES Video Editor 3.0 is Here With Significant Improvements.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md (100%) diff --git a/sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md b/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md similarity index 100% rename from sources/tech/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md rename to sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md From 6ca141e035298a9cb2a707dab3ba70d82b7828bc Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 17 Aug 2019 17:04:24 +0800 Subject: [PATCH 513/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2017=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E5=85=AD=2017:04:22=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Command Line Heroes- Season 1- OS Wars.md | 61 +++++++++---------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index 67250b8d21..5ad8d5877f 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -54,7 +54,7 @@ Saron Yitbarek: Voice Actor: -女士们,先生们, 现在是 Macintosh 软件的约会游戏. +女士们,先生们, 现在是麦金塔软件的约会游戏. Saron Yitbarek: @@ -62,7 +62,7 @@ Saron Yitbarek: [00:05:00] -Jobs 的脸上露出一个大大的笑容,台上有三个CEO都需要轮流向他示好. 这基本上就是80年代科技界的钻石王老五. 两个软件大佬讲完话后, 然后就轮到第三个人讲话了. 仅此而已不是吗? 是得. 新面孔 Bill Gates 带着一个大大的方框眼镜遮住了半个脸. 他宣称在 1984 年, 微软的一半收入将来至于 Macintosh 软件. 他的这番话引来了观众热情的掌声. 但是他们不知道的是,在一个月后, Bill Gates 将会宣布发布 Windows 1.0 的计划. 你永远也猜不到 Jobs 正在跟未来苹果最大的敌人打情骂俏. 但微软和苹果即将经历科技史上最糟糕的婚礼. 他们会彼此背叛, 相互毁灭, 但又深深地、痛苦地捆绑在一起. +Jobs 的脸上露出一个大大的笑容,台上有三个CEO都需要轮流向他示好. 这基本上就是80年代科技界的钻石王老五. 两个软件大佬讲完话后, 然后就轮到第三个人讲话了. 仅此而已不是吗? 是得. 新面孔 Bill Gates 带着一个大大的方框眼镜遮住了半个脸. 他宣称在 1984 年, 微软的一半收入将来至于麦金塔软件. 他的这番话引来了观众热情的掌声. 但是他们不知道的是,在一个月后, Bill Gates 将会宣布发布 Windows 1.0 的计划. 你永远也猜不到 Jobs 正在跟未来苹果最大的敌人打情骂俏. 但微软和苹果即将经历科技史上最糟糕的婚礼. 他们会彼此背叛, 相互毁灭, 但又深深地、痛苦地捆绑在一起. James Allworth: @@ -86,7 +86,7 @@ James Allworth: Saron Yitbarek: [00:07:00] -很多人喜欢这种整合的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。回到 Honolulu 的销售会议上。在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想 George Orwell 的1984。在这个冰冷、灰暗的世界里,在独裁者投射的目光下,没有头脑的机器人正在缓慢移动。这些机器人代表着IBM的用户们。然后,代表苹果公司的美丽而健壮的Anya Major 穿着鲜艳的衣服跑过大厅。她向着老大哥的屏幕猛地透出大锤,将它砸成一片一片的. 老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍 Macintosh 了。 +很多人喜欢这种整合的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。回到 Honolulu 的销售会议上。在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想 George Orwell 的1984。在这个冰冷、灰暗的世界里,在独裁者投射的目光下,没有头脑的机器人正在缓慢移动。这些机器人代表着IBM的用户们。然后,代表苹果公司的美丽而健壮的Anya Major 穿着鲜艳的衣服跑过大厅。她向着老大哥的屏幕猛地透出大锤,将它砸成一片一片的. 老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍麦金塔了。 Voice Actor: @@ -102,49 +102,49 @@ Ken Segal: [00:08:00] -Well, the 1984 commercial came with a lot of risk. In fact, it was so risky that Apple didn't want to run it when they saw it. You've probably heard stories that Steve liked it, but the Apple board did not like it. In fact, they were so outraged that so much money had been spent on such a thing that they wanted to fire the ad agency. Steve was the one sticking up for the agency. +1984这则广告的风险很大。事实上,它的风险太大,以至于苹果公司在看到它的时候都不想播出它。你可能听说了 Steve 喜欢它,但苹果公司董事会的人并不喜欢它。事实上,他们很愤怒,这么多钱被花在这么一件事情上,以至于他们想解雇广告代理商。Steve 则为我们公司辩护。 Saron Yitbarek: -Jobs, as usual, knew a good mythology when he saw one. +Jobs, 一如既往地, 慧眼识英雄. Ken Segal: -That commercial struck such a chord within the company, within the industry, that it became this thing for Apple. Whether or not people were buying computers that day, it had a sort of an aura that stayed around for years and years and years, and helped define the character of the company. We're the rebels. We're the guys with the sledgehammer. +这则广告在公司内,在业界内都引起了共鸣,成为了苹果产品的代表。无论人们那天是否有在购买电脑,它都带来了一种持续多年的影响,帮助定义了这家公司的品质。我们是叛军。我们是拿着大锤的人。 [00:08:30] Saron Yitbarek: -So in their battle for the hearts and minds of literally billions of potential consumers, the emperors of Apple and Microsoft were learning to frame themselves as redeemers. As singular heroes. As lifestyle choices. But Bill Gates knew something that Apple had trouble understanding. This idea that in a wired world, nobody, not even an emperor, can really go it alone. +因此,在争夺数十亿潜在消费者偏好的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主,非凡的英雄,一种对生活方式的选择。但 Bill Gates 知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,甚至是皇帝,能独自完成任务. [00:09:00] [00:09:30] -June 25th, 1985. Gates sends a memo to Apple's then CEO John Scully. This was during the wilderness years. Jobs had just been excommunicated, and wouldn't return to Apple until 1996. Maybe it was because Jobs was out that Gates felt confident enough to write what he wrote. In the memo, he encourages Apple to license their OS to clone makers. I want to read a bit from the end of the memo, just to give you a sense of how perceptive it was. Gates writes, "It is now impossible for Apple to create a standard out of their innovative technology without support from other personal computer manufacturers. Apple must open the Macintosh architecture to have the independent support required to gain momentum and establish a standard." In other words, no more operating in a silo, you guys. You've got to be willing to partner with others. You have to work with developers. +1985年6月25日。盖茨给当时的苹果CEO 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到1996年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得获得快速发展和建立标准所需的支持”。换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作. [00:10:00] [00:10:30] -You see this philosophy years later, when Microsoft CEO Steve Ballmer gets up on stage to give a keynote and he starts shouting, "Developers, developers, developers, developers, developers, developers. Developers, developers, developers, developers, developers, developers, developers, developers." You get the idea. Microsoft likes developers. Now, they're not about to share source code with them, but they do want to build this whole ecosystem of partners. And when Bill Gates suggests that Apple do the same, as you might have guessed, the idea is tossed out the window. Apple had drawn a line in the sand, and five months after they trashed Gates' memo, Microsoft released Windows 1.0. The war was on. +多年后你依然可以看到这条哲学思想,当微软首席执行官 Steve Ballmer 上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。” 你懂我的意思了吧。微软喜欢开发人员。虽然目前他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。而当 Bill Gates 建议苹果公司也这么做时(你可能已经猜到了),这个想法就被抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了Windows 1.0。战争开始了. -Developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers. +开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者. [00:11:00] -You're listening to Command Line Heroes, an original podcast from Red Hat. In this inaugural episode, we go back in time to relive the epic story of the OS wars, and we're going to find out, how did a war between tech giants clear the way for the open source world we all live in today? +您正在收听的是来自红帽公司的原创播客《代码英雄》。本集是第一集,我们将回到过去,重温操作系统战争的史诗故事,我们将会找出,科技巨头之间的战争是如何为我们今天所生活的开源世界扫清道路的? [00:11:30] -Okay, a little backstory. Forgive me if you've heard this one, but it's a classic. It's 1979, and Steve Jobs drives up to the Xerox Park research center in Palo Alto. The engineers there have been developing this whole fleet of elements for what they call a graphical user interface. Maybe you've heard of it. They've got menus, they've got scroll bars, they've got buttons and folders and overlapping windows. It was a beautiful new vision of what a computer interface could look like. And nobody had any of this stuff. Author and journalist Steven Levy talks about its potential. +好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是1979年,Steve Jobs 开车去 Palo Alto 的 Xerox Park 研究中心。那里的工程师一直在为他们所称之为的"图形用户界面"开发一系列的元素。也许你听说过。它们有菜单,滚动条,按钮,文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 Steven Levy: [00:12:00] - -There was a lot of excitement about this new interface that was going to be much friendlier than what we had before, which used what was called the command line, where there was really no interaction between you and the computer in the way you'd interact with something in real life. The mouse and the graphics on the computer gave you a way to do that, to point to something just like you'd point to something in real life. It made it a lot easier. You didn't have to memorize all these codes. +新界面要前所未有地有好的多,这让我们无比兴奋,以前我们用的是所谓的命令行,它的让你和电脑之间的交互方式跟现实生活中的交互方式完全不同。 +电脑上的鼠标和图像让你可以可以像现实生活中的交互一样实现与电脑的交互,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有代码。 Saron Yitbarek: @@ -152,11 +152,11 @@ Saron Yitbarek: [00:13:00] -Except, the Xerox executives did not get that they were sitting on top of a platinum mine. The engineers were more aware than the execs. Typical. So those engineers were, yeah, a little stressed out that they were instructed to show Jobs how everything worked. But the executives were calling the shots. Jobs felt, quote, "The product genius that brought them to that monopolistic position gets rotted out by people running these companies that have no conception of a good product versus a bad product." That's sort of harsh, but hey, Jobs walked out of that meeting with a truckload of ideas that Xerox executives had missed. Pretty much everything he needed to revolutionize the desktop computing experience. Apple releases the Lisa in 1983, and then the Mac in 1984. These devices are made by the ideas swiped from Xerox. +不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向 Jobs 展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。Jobs 觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是他最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念”。这话有些苛刻,但是,Jobs 带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983年,苹果发布了 Lisa 电脑,1984年又发布了Mac电脑。这些设备的创意是抄袭自施乐公司的. [00:13:30] -What's interesting to me is Jobs' reaction to the claim that he stole the GUI. He's pretty philosophical about it. He quotes Picasso, saying, "Good artists copy, great artists steal." He tells one reporter, "We have always been shameless about stealing great ideas." Great artists steal. Okay. I mean, we're not talking about stealing in a hard sense. Nobody's obtaining proprietary source code and blatantly incorporating it into their operating system. This is softer, more like idea borrowing. And that's much more difficult to control, as Jobs himself was about to learn. Legendary software wizard, and true command line hero, Andy Hertzfeld, was an original member of the Macintosh development team. +让我感兴趣的是,乔布斯对控诉他偷了图形用户界面的反应。他对此很冷静。他引用毕加索的话:“好的艺术家复制,伟大的艺术家偷窃。”他告诉一位记者,“我们总是无耻地窃取伟大的创意”。伟大的艺术家偷窃。好吧。我的意思是,我们说的并不是严格意义上的偷窃。没有人获得专有的源代码并公然将其集成到他们自己的操作系统中去。这要更温和些,更像是创意的借用。这就难控制的多了,就像 Jobs 自己即将学到的那样。传奇的软件向导、真正的代码英雄 Andy Hertzfeld 就是麦金塔开发团队的最初成员。 [00:14:00] @@ -166,7 +166,7 @@ Andy Hertzfeld: [00:15:00] -Yeah, Microsoft was our first software partner with the Macintosh. At the time, we didn't really consider them a competitor. They were the very first company outside of Apple that we gave Macintosh prototypes to. I talked with the technical lead at Microsoft usually once a week. They were the first outside party trying out the software that we wrote. They gave us very important feedback, and in general I would say the relationship was pretty good. But I also noticed in my conversations with the technical lead, he started asking questions that he didn't really need to know about how the system was implemented, and I got the idea that they were trying to copy the Macintosh. I t old Steve Jobs about it pretty early on, but it really came to a head in the fall of 1983. We discovered that they actually, without telling us ahead of time, they announced Windows at the COMDEX in November 1983 and Steve Jobs hit the roof. He really considered that a betrayal. +是的,微软是我们与麦金塔电脑的第一个软件合作伙伴。当时,我们并没有把他们当成是竞争对手。他们是苹果之外,第一家我们交付麦金塔原型的公司。我通常每周都会和微软的技术主管聊一次。他们是尝试我们所编写软件的第一个外部团队。他们给了我们非常重要的反馈,总的来说,我认为我们的关系非常好。但我也注意到,在我与技术主管的交谈中,他开始问一些系统实现方面的问题,而他本无需知道这些,我觉得,他们想要复制麦金塔电脑。我很早以前就像史蒂夫·乔布斯反馈过这件事,但在1983年秋天,这件事达到了高潮。我们发现,他们在1983年11月的COMDEX上发布了Windows,但却没有提前告诉我们. 对此史蒂夫·乔布斯勃然大怒。他认为那是一种背叛。 Saron Yitbarek: @@ -174,7 +174,7 @@ Saron Yitbarek: [00:16:00] -As newer versions of Windows were released, it became pretty clear that Microsoft had lifted from Apple all the ideas that Apple had lifted from Xerox. Jobs was apoplectic. His Picasso line about how great artists steal. Yeah. That goes out the window. Though maybe Gates was using it now. Reportedly, when Jobs screamed at Gates that he'd stolen from them, Gates responded, "Well Steve, I think it's more like we both had this rich neighbor named Xerox, and I broke into his house to steal the TV set, and found out that you'd already stolen it." Apple ends up suing Microsoft for stealing the look and feel of their GUI. The case goes on for years, but in 1993, a judge from the 9th Circuit Court of Appeals finally sides with Microsoft. Judge Vaughn Walker declares that look and feel are not covered by copyright. This is super important. That decision prevented Apple from creating a monopoly with the interface that would dominate desktop computing. Soon enough, Apple's brief lead had vanished. Here's Steven Levy's take. +随着新版Windows的发布,很明显,微软从苹果那里学到了苹果从施乐那里学来的所有想法。乔布斯很易怒。他的关于伟大艺术家如何偷窃的毕加索名言被别人学去了。而且恐怕盖茨也正是这么做的。据报道,当乔布斯怒斥盖茨偷了他们的东西时,盖茨回应道:“史蒂夫,我觉得这更像是我们都有一个叫施乐的富有邻居,我闯进他家偷电视机,却发现你已经偷过了”。苹果最终以窃取GUI的外观和风格为名起诉了微软。这个案子持续了好几年,但是在1993年,第九次巡回上诉法院的一名法官最终站在了微软一边。Vaughn Walker 法官宣布外观和风格不受版权保护。这是非常重要的。这一决定让苹果在无法垄断桌面计算的界面。很快,苹果短暂的领先优势消失了。以下是 Steven Levy 的观点。 Steven Levy: @@ -182,33 +182,32 @@ Steven Levy: [00:17:00] -They lost the lead not because of intellectual property theft on Microsoft's part, but because they were unable to consolidate their advantage in having a better operating system during the 1980s. They overcharged for their computers, quite frankly. So Microsoft had been developing Windows, starting with the mid-1980s, but it wasn't until Windows 3 in 1990, I believe, where they really came across with a version that was ready for prime time. Ready for masses of people to use. At that point is where Microsoft was able to migrate huge numbers of people, hundreds of millions, over to the graphical interface in a way that Apple had not been able to do. Even though they had a really good operating system, they used it since 1984. +他们之所以失去领先地位,不是因为微软方面窃取了知识产权,而是因为在上世纪80年代,他们无法通过更好的操作系统来巩固自己的优势。坦率地说,他们的电脑索价过高。因此微软从20世纪80年代中期开始开发Windows系统,但直到1990年开发出的Windows 3,我想,他才真正算是一个为黄金时期做好准备的版本,才真正可供大众使用。从此以后,微软能够将数以亿计的用户迁移到图形界面,而这是苹果无法做到的。虽然苹果公司有一个非常好的操作系统,但是那已经是1984年的产品了。 Saron Yitbarek: [00:17:30] [00:18:00] +现在微软主导着操作系统的战场。他们占据了90%的市场份额,并且针对各种各样的个人电脑进行了标准化。操作系统的未来看起来会由微软掌控。此后发生了什么?1997年,波士顿Macworld博览会上,你看到了一个几近破产的苹果。一个谦逊的多的史蒂夫·乔布斯走上舞台,开始谈论伙伴关系的重要性. 特别是他们与微软的新型合作伙伴关系。史蒂夫·乔布斯呼吁双方缓和关系,停止火拼。微软将拥有巨大的市场份额。从表面看,我们可能会认为世界和平了。但当利益如此巨大时,事情就没那么简单了。就在苹果和微软在数十年的争斗中伤痕累累、最终走向死角之际,一名21岁的芬兰计算机科学专业学生出现了。几乎是偶然地,他彻底改变了一切。 -Microsoft now dominated the OS battlefield. They held 90% of the market, and standardized their OS across a whole variety of PCs. The future of the OS looked like it'd be controlled by Microsoft. And then? Well, at the 1997 Macworld Expo in Boston, you have an almost bankrupt Apple. A more humble Steve Jobs gets on stage, and starts talking about the importance of partnerships, and one in particular, he says, has become very, very meaningful. Their new partnership with Microsoft. Steve Jobs is calling for a détente, a ceasefire. Microsoft could have their enormous market share. If we didn't know better, we might think we were entering a period of peace in the kingdom. But when stakes are this high, it's never that simple. Just as Apple and Microsoft were finally retreating to their corners, pretty bruised from decades of fighting, along came a 21-year-old Finnish computer science student who, almost by accident, changed absolutely everything. - -I'm Saron Yitbarek, and this is Command Line Heroes. +我是 Saron Yitbarek, 这里是代码英雄. [00:18:30] - -While certain tech giants were busy bashing each other over proprietary software, there were new champions of free and open source software popping up like mushrooms. One of these champions was Richard Stallman. You're probably familiar with his work. He wanted free software and a free society. That's free as in free speech, not free as in free beer. Back in the '80s, Stallman saw that there was no viable alternative to pricey, proprietary OSs, like UNIX . So, he decided to make his own. Stallman's Free Software Foundation developed GNU, which stood for GNU's not UNIX , of course. It'd be an OS like UNIX, but free of all UNIX code, and free for users to share. +正当某些科技巨头正忙着就专有软件相互攻击时,自由软件和开源软件的新领军者如雨后春笋般涌现。其中一位优胜者就是理查德·斯托尔曼。你也许对他的工作很熟悉。他想要有自由软件和自由社会。这就像言论自由一样的自由,而不是像免费啤酒一样的免费。早在80年代,斯托尔曼就发现,除了昂贵的专有操作系统(如UNIX)外,就没有其他可行的替代品。因此他决定自己做一个。斯托尔曼的自由软件基金会发明了GNU,它的意思是"GNU's not UNIX"。它将是一个像UNIX一样的操作系统,但不包含所有UNIX代码,而且用户可以自由共享。 [00:19:00] [00:19:30] -Just to give you a sense of how important that idea of free software was in the 1980s, the companies that owned the UNIX code at different points, AT&T Bell Laboratories and then UNIX System Laboratories, they threatened lawsuits on anyone making their own OS after looking at UNIX source code. These guys were next - level proprietary. All those programmers were, in the words of the two companies, "mentally contaminated," because they'd seen UNIX code. In a famous court case between UNIX System Laboratories and Berkeley Software Design, it was argued that any functionally similar system, even though it didn't use the UNIX code itself, was a bre a ch of copyright. Paul Jones was a developer at that time. He's now the director of the digital library ibiblio.org. +为了让你体会到80年代自由软件概念的重要性,从不同角度来说拥有UNIX代码的两家公司,AT&T贝尔实验室 以及 UNIX系统实验室威胁将会起诉任何看过UNIX源代码后又创建自己操作系统的人. +这些人是次一级的专利所属。用这两家公司的话来说,所有这些程序员都在“精神上受到了污染”,因为他们都见过UNIX代码。在UNIX系统实验室和Berkeley 软件设计之间的一个著名的法庭案例中,有人认为任何功能类似的系统,即使它本身没有使用UNIX代码,也归版权所有。Paul Jones当时是一名开发人员。他现在是数字图书馆ibiblio.org的主任。 Paul Jones: [00:20:00] -Anyone who has seen any of the code is mentally contaminated was their argument. That would have made almost anyone who had worked on a computer operating system that involved UNIX , in any computer science department, was mentally contaminated. So in one year at USENIX, we all got little white bar pin s with red letters that say mentally contaminated, and we all wear those around to our own great pleasure, to show that we were sticking it to Bell because we were mentally contaminated. +他们认为,任何看过代码的人都受到了精神污染。因此几乎所有在安装有与UNIX相关操作系统的电脑上工作过的人以及任何在计算机科学部门工作的人都受到精神上的污染。因此,在USENIX的一年里,我们都a发有带有红字的白色小别针,上面写着“精神受到了污染”. 我们很喜欢带着这些别针到处走,以表达我们力挺Bell,因为我们的精神受到了污染。 [00:20:30] @@ -216,17 +215,17 @@ Saron Yitbarek: [00:21:00] -The whole world was getting mentally contaminated. Staying pure, keeping things nice and proprietary, that old philosophy was getting less and less realistic. It was into this contaminated reality that one of history's biggest command line heroes was born, a boy in Finland named Linus Torvalds. If this is Star Wars, then Linus Torvalds is our Luke Skywalker. He was a mild-mannered grad student at the University of Helsinki. Talented, but lacking in grand visions. The classic reluctant hero. And, like any young hero, he was also frustrated. He wanted to incorporate the 386 processor into his new PC's functions. He wasn't impressed by the MS-DOS running on his IBM clone, and he couldn't afford the $5,000 price tag on the UNIX software that would have given him some programming freedom. The solution, which Torvalds crafted on MINIX in the spring of 1991, was an OS kernel called Linux. The kernel of an OS of his very own. +整个世界都被精神污染了。想要保持纯粹,保持事物的美好和专有的旧哲学正变得越来越不现实。正是在这被污染的现实中,历史上最伟大其中一个的代码英雄诞生了,他是一个芬兰男孩,名叫Linus Torvalds。如果这是《星球大战》,那么 Linus Torvalds 就是我们的卢克·天行者。他是赫尔辛基大学一名温文尔雅的研究生。有才华,但缺乏宏伟的愿景。典型的被逼上梁山的英雄。和其他年轻的英雄一样,他也感到沮丧。他想把386处理器整合到他的新电脑中。他对自己的IBM主机上运行的MS-DOS操作系统并不感冒,也负担不起UNIX软件5000美元的价格,而只有UNIX才能让他自由地编程。解决方案是Torvalds在1991年春天基于MINIX开发了一个名为Linux的操作系统内核。他自己的操作系统内核。 [00:21:30] Steven Vaughan-Nichols: -Linus Torvalds really just wanted to have something to play with. +Linus Torvalds 真的只想找点乐子. Saron Yitbarek: -Steven Vaughan-Nichols is a contributing editor at ZDNet.com, and he's been writing about the business of technology since there was a business of technology. +Steven Vaughan-Nichols 是 ZDNet.com 的特约编辑, 而且他从科技行业出现以来就一直在写科技行业相关的内容. Steven Vaughan-Nichols: @@ -234,13 +233,13 @@ Steven Vaughan-Nichols: [00:22:30] -There were a couple of operating systems like it at the time. The main one that he was concerned about was called MINIX. That was an operating system that was meant for students to learn how to build operating systems. Linus looked at that, and thought that it was interesting, but he wanted to build his own. So it really started as a do-it-yourself project at Helsinki. That's how it all started, is just basically a big kid playing around and learning how to do things. But what was different in his case is that he was both bright enough and persistent enough, and also friendly enough to get all these other people working on it, and then he started seeing the project through. 27 years later, it is much, much bigger than he ever dreamed it would be. +当时有几个类似的操作系统。他最关心的是一个名叫MINIX的操作系统,MINIX旨在让学生学习如何构建操作系统。莱纳斯着到这些,觉得很有趣,但他想建立自己的操作系统。因此它始于赫尔辛基的一个DIY项目。一切就这样开始了,基本上就是一个大孩子在玩耍,学习如何做事。但不同之处在于,他足够聪明,足够执着,也足够友好,让所有其他人都参与进来,然后他开始把这个项目进行到底。27年后,这个项目变得比他想象的要大得多。 Saron Yitbarek: [00:23:00] -By the fall of 1991, Torvalds releases 10,000 lines of code, and people around the world start offering comments, then tweaks, additions, edits. That might seem totally normal to you as a developer today, but remember, at that time, open collaboration like that was a moral affront to the whole proprietary system that Microsoft, Apple, and IBM had done so well by. Then that openness gets enshrined. Torvalds places Linux under the GNU general public license. The license that had kept Stallman's GNU system free was now going to keep Linux free , too. The importance of that move to incorporate GPL, basically preserving the freedom and openness of the software forever, cannot be overstated. Vaughan-Nichols explains. +到1991年秋季,Torvalds发布了10,000行代码,世界各地的人们开始提供注释,然后进行优化、添加和修改代码。对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对整个专有系统(微软、苹果和IBM在这方面做的非常好)道德上的侮辱。随后这种开放性被奉若神明。Torvalds将Linux置于GNU通用公共许可证之下。曾经保障斯托尔曼的GNU系统自由的许可证现在也将保障Linux的自由。Vaughan-Nichols解释道,迁移到incorporate GPL的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 [00:23:30] From 438f9456aab32677a360db92ed7d486d3c66c968 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Aug 2019 20:21:44 +0800 Subject: [PATCH 514/951] APL --- sources/tech/20180622 Use LVM to Upgrade Fedora.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20180622 Use LVM to Upgrade Fedora.md b/sources/tech/20180622 Use LVM to Upgrade Fedora.md index 4921782512..c390db3bd4 100644 --- a/sources/tech/20180622 Use LVM to Upgrade Fedora.md +++ b/sources/tech/20180622 Use LVM to Upgrade Fedora.md @@ -1,3 +1,5 @@ +wxy is applied + Use LVM to Upgrade Fedora ====== From 19ea69daf345ba273f663424733dc82d85039873 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Aug 2019 22:22:56 +0800 Subject: [PATCH 515/951] TSL --- .../20180622 Use LVM to Upgrade Fedora.md | 217 ------------------ .../20180622 Use LVM to Upgrade Fedora.md | 214 +++++++++++++++++ 2 files changed, 214 insertions(+), 217 deletions(-) delete mode 100644 sources/tech/20180622 Use LVM to Upgrade Fedora.md create mode 100644 translated/tech/20180622 Use LVM to Upgrade Fedora.md diff --git a/sources/tech/20180622 Use LVM to Upgrade Fedora.md b/sources/tech/20180622 Use LVM to Upgrade Fedora.md deleted file mode 100644 index c390db3bd4..0000000000 --- a/sources/tech/20180622 Use LVM to Upgrade Fedora.md +++ /dev/null @@ -1,217 +0,0 @@ -wxy is applied - -Use LVM to Upgrade Fedora -====== - -![](https://fedoramagazine.org/wp-content/uploads/2018/06/lvm-upgrade-816x345.jpg) - -Most users find it simple to upgrade [from one Fedora release to the next][1] with the standard process. However, there are inevitably many special cases that Fedora can also handle. This article shows one way to upgrade using DNF along with Logical Volume Management (LVM) to keep a bootable backup in case of problems. This example upgrades a Fedora 26 system to Fedora 28. - -The process shown here is more complex than the standard upgrade process. You should have a strong grasp of how LVM works before you use this process. Without proper skill and care, you could **lose data and/or be forced to reinstall your system!** If you don’t know what you’re doing, it is **highly recommended** you stick to the supported upgrade methods only. - -### Preparing the system - -Before you start, ensure your existing system is fully updated. -``` -$ sudo dnf update -$ sudo systemctl reboot # or GUI equivalent - -``` - -Check that your root filesystem is mounted via LVM. -``` -$ df / -Filesystem 1K-blocks Used Available Use% Mounted on -/dev/mapper/vg_sdg-f26 20511312 14879816 4566536 77% / - -$ sudo lvs -LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert -f22 vg_sdg -wi-ao---- 15.00g -f24_64 vg_sdg -wi-ao---- 20.00g -f26 vg_sdg -wi-ao---- 20.00g -home vg_sdg -wi-ao---- 100.00g -mockcache vg_sdg -wi-ao---- 10.00g -swap vg_sdg -wi-ao---- 4.00g -test vg_sdg -wi-a----- 1.00g -vg_vm vg_sdg -wi-ao---- 20.00g - -``` - -If you used the defaults when you installed Fedora, you may find the root filesystem is mounted on a LV named root. The name of your volume group will likely be different. Look at the total size of the root volume. In the example, the root filesystem is named f26 and is 20G in size. - -Next, ensure you have enough free space in LVM. -``` -$ sudo vgs -VG #PV #LV #SN Attr VSize VFree -vg_sdg 1 8 0 wz--n- 232.39g 42.39g - -``` - -This system has enough free space to allocate a 20G logical volume for the upgraded Fedora 28 root. If you used the default install, there will be no free space in LVM. Managing LVM in general is beyond the scope of this article, but here are some possibilities: - -1\. /home on its own LV, and lots of free space in /home - -You can logout of the GUI and switch to a text console, logging in as root. Then you can unmount /home, and use lvreduce -r to resize and reallocate the /home LV. You might also boot from a Live image (so as not to use /home) and use the gparted GUI utility. - -2\. Most of the LVM space allocated to a root LV, with lots of free space in the filesystem - -You can boot from a Live image and use the gparted GUI utility to reduce the root LV. Consider moving /home to its own filesystem at this point, but that is beyond the scope of this article. - -3\. Most of the file systems are full, but you have LVs you no longer need - -You can delete the unneeded LVs, freeing space in the volume group for this operation. - -### Creating a backup - -First, allocate a new LV for the upgraded system. Make sure to use the correct name for your system’s volume group (VG). In this example it’s vg_sdg. -``` -$ sudo lvcreate -L20G -n f28 vg_sdg -Logical volume "f28" created. - -``` - -Next, make a snapshot of your current root filesystem. This example creates a snapshot volume named f26_s. -``` -$ sync -$ sudo lvcreate -s -L1G -n f26_s vg_sdg/f26 -Using default stripesize 64.00 KiB. -Logical volume "f26_s" created. - -``` - -The snapshot can now be copied to the new LV. **Make sure you have the destination correct** when you substitute your own volume names. If you are not careful you could delete data irrevocably. Also, make sure you are copying from the snapshot of your root, **not** your live root. -``` -$ sudo dd if=/dev/vg_sdg/f26_s of=/dev/vg_sdg/f28 bs=256k -81920+0 records in -81920+0 records out -21474836480 bytes (21 GB, 20 GiB) copied, 149.179 s, 144 MB/s - -``` - -Give the new filesystem copy a unique UUID. This is not strictly necessary, but UUIDs are supposed to be unique, so this avoids future confusion. Here is how for an ext4 root filesystem: -``` -$ sudo e2fsck -f /dev/vg_sdg/f28 -$ sudo tune2fs -U random /dev/vg_sdg/f28 - -``` - -Then remove the snapshot volume which is no longer needed: -``` -$ sudo lvremove vg_sdg/f26_s -Do you really want to remove active logical volume vg_sdg/f26_s? [y/n]: y -Logical volume "f26_s" successfully removed - -``` - -You may wish to make a snapshot of /home at this point if you have it mounted separately. Sometimes, upgraded applications make changes that are incompatible with a much older Fedora version. If needed, edit the /etc/fstab file on the **old** root filesystem to mount the snapshot on /home. Remember that when the snapshot is full, it will disappear! You may also wish to make a normal backup of /home for good measure. - -### Configuring to use the new root - -First, mount the new LV and backup your existing GRUB settings: -``` -$ sudo mkdir /mnt/f28 -$ sudo mount /dev/vg_sdg/f28 /mnt/f28 -$ sudo mkdir /mnt/f28/f26 -$ cd /boot/grub2 -$ sudo cp -p grub.cfg grub.cfg.old - -``` - -Edit grub.conf and add this before the first menuentry, unless you already have it: -``` -menuentry 'Old boot menu' { - configfile /grub2/grub.cfg.old -} - -``` - -Edit grub.conf and change the default menuentry to activate and mount the new root filesystem. Change this line: -``` -linux16 /vmlinuz-4.16.11-100.fc26.x86_64 root=/dev/mapper/vg_sdg-f26 ro rd.lvm.lv=vg_sdg/f26 rd.lvm.lv=vg_sdg/swap rhgb quiet LANG=en_US.UTF-8 - -``` - -So that it reads like this. Remember to use the correct names for your system’s VG and LV entries! -``` -linux16 /vmlinuz-4.16.11-100.fc26.x86_64 root=/dev/mapper/vg_sdg-f28 ro rd.lvm.lv=vg_sdg/f28 rd.lvm.lv=vg_sdg/swap rhgb quiet LANG=en_US.UTF-8 - -``` - -Edit /mnt/f28/etc/default/grub and change the default root LV activated at boot: -``` -GRUB_CMDLINE_LINUX="rd.lvm.lv=vg_sdg/f28 rd.lvm.lv=vg_sdg/swap rhgb quiet" - -``` - -Edit /mnt/f28/etc/fstab to change the mounting of the root filesystem from the old volume: -``` -/dev/mapper/vg_sdg-f26 / ext4 defaults 1 1 - -``` - -to the new one: -``` -/dev/mapper/vg_sdg-f28 / ext4 defaults 1 1 - -``` - -Then, add a read-only mount of the old system for reference purposes: -``` -/dev/mapper/vg_sdg-f26 /f26 ext4 ro,nodev,noexec 0 0 - -``` - -If your root filesystem is mounted by UUID, you will need to change this. Here is how if your root is an ext4 filesystem: -``` -$ sudo e2label /dev/vg_sdg/f28 F28 - -``` - -Now edit /mnt/f28/etc/fstab to use the label. Change the mount line for the root file system so it reads like this: -``` -LABEL=F28 / ext4 defaults 1 1 - -``` - -### Rebooting and upgrading - -Reboot, and your system will be using the new root filesystem. It is still Fedora 26, but a copy with a new LV name, and ready for dnf system-upgrade! If anything goes wrong, use the Old Boot Menu to boot back into your working system, which this procedure avoids touching. -``` -$ sudo systemctl reboot # or GUI equivalent -... -$ df / /f26 -Filesystem 1K-blocks Used Available Use% Mounted on -/dev/mapper/vg_sdg-f28 20511312 14903196 4543156 77% / -/dev/mapper/vg_sdg-f26 20511312 14866412 4579940 77% /f26 - -``` - -You may wish to verify that using the Old Boot Menu does indeed get you back to having root mounted on the old root filesystem. - -Now follow the instructions at [this wiki page][2]. If anything goes wrong with the system upgrade, you have a working system to boot back into. - -### Future ideas - -The steps to create a new LV and copy a snapshot of root to it could be automated with a generic script. It needs only the name of the new LV, since the size and device of the existing root are easy to determine. For example, one would be able to type this command: -``` -$ sudo copyfs / f28 - -``` - -Supplying the mount-point to copy makes it clearer what is happening, and copying other mount-points like /home could be useful. - - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/use-lvm-upgrade-fedora/ - -作者:[Stuart D Gathman][a] -选题:[lujun9972](https://github.com/lujun9972) -译者:[译者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/sdgathman/ -[1]:https://fedoramagazine.org/upgrading-fedora-27-fedora-28/ -[2]:https://fedoraproject.org/wiki/DNF_system_upgrade diff --git a/translated/tech/20180622 Use LVM to Upgrade Fedora.md b/translated/tech/20180622 Use LVM to Upgrade Fedora.md new file mode 100644 index 0000000000..80fe0cae39 --- /dev/null +++ b/translated/tech/20180622 Use LVM to Upgrade Fedora.md @@ -0,0 +1,214 @@ +使用 LVM 升级 Fedora +====== + +![](https://fedoramagazine.org/wp-content/uploads/2018/06/lvm-upgrade-816x345.jpg) + +大多数用户发现使用标准流程升级[从一个 Fedora 版本升级到下一个][1]很简单。但是,Fedora 升级也不可避免地会遇到许多特殊情况。本文介绍了使用 DNF 和逻辑卷管理(LVM)进行升级的一种方法,以便在出现问题时保留可引导备份。这个例子是将 Fedora 26 系统升级到 Fedora 28。 + +此处展示的过程比标准升级过程更复杂。在使用此过程之前,你应该充分掌握 LVM 的工作原理。如果没有适当的技能和细心,你可能会丢失数据和/或被迫重新安装系统!如果你不知道自己在做什么,那么**强烈建议**你坚持只使用受支持的升级方法。 + +### 准备系统 + +在开始之前,请确保你的现有系统已完全更新。 + +``` +$ sudo dnf update +$ sudo systemctl reboot # 或采用 GUI 方式 +``` + +检查你的根文件系统是否是通过 LVM 挂载的。 + +``` +$ df / +Filesystem 1K-blocks Used Available Use% Mounted on +/dev/mapper/vg_sdg-f26 20511312 14879816 4566536 77% / + +$ sudo lvs +LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert +f22 vg_sdg -wi-ao---- 15.00g +f24_64 vg_sdg -wi-ao---- 20.00g +f26 vg_sdg -wi-ao---- 20.00g +home vg_sdg -wi-ao---- 100.00g +mockcache vg_sdg -wi-ao---- 10.00g +swap vg_sdg -wi-ao---- 4.00g +test vg_sdg -wi-a----- 1.00g +vg_vm vg_sdg -wi-ao---- 20.00g +``` + +如果你在安装 Fedora 时使用了默认值,你可能会发现根文件系统挂载在名为 `root` 的逻辑卷(LV)上。卷组(VG)的名称可能会有所不同。看看根卷的总大小。在该示例中,根文件系统名为 `f26`,大小为 `20G`。 + +接下来,确保 LVM 中有足够的可用空间。 + +``` +$ sudo vgs +VG #PV #LV #SN Attr VSize VFree +vg_sdg 1 8 0 wz--n- 232.39g 42.39g +``` + +该系统有足够的可用空间,可以为升级后的 Fedora 28 的根卷分配 20G 的逻辑卷。如果你使用的是默认安装,则你的 LVM 中将没有可用空间。对 LVM 的一般性管理超出了本文的范围,但这里有一些可能采取的方法: + +1、`/home` 在自己的逻辑卷,而且 `/home` 中有大量空闲空间。 + +你可以从图形界面中注销并切换到文本控制台,以 `root` 用户身份登录。然后你可以卸载 `/home`,并使用`lvreduce -r` 调整大小并重新分配 `/home` 逻辑卷。你也可以从现场镜像Live image启动(以便不使用 `/home`)并使用 gparted GUI 实用程序进行分区调整。 + +2、大多数 LVM 空间被分配给根卷,该文件系统中有大量可用空间。 + +你可以从现场镜像启动并使用 gparted GUI 实用程序来减少根卷的大小。此时也可以考虑将 `/home` 移动到另外的文件系统,但这超出了本文的范围。 + +3、大多数文件系统已满,但你有个已经不再需要逻辑卷。 + +你可以删除不需要的逻辑卷,释放卷组中的空间以进行此操作。 + +### 创建备份 + +首先,为升级后的系统分配新的逻辑卷。确保为系统的卷组(VG)使用正确的名称。在这个例子中它是 `vg_sdg`。 + +``` +$ sudo lvcreate -L20G -n f28 vg_sdg +Logical volume "f28" created. +``` + +接下来,创建当前根文件系统的快照。此示例创建名为 `f26_s` 的快照卷。 + +``` +$ sync +$ sudo lvcreate -s -L1G -n f26_s vg_sdg/f26 +Using default stripesize 64.00 KiB. +Logical volume "f26_s" created. +``` + +现在可以将快照复制到新逻辑卷。当你替换自己的卷名时,**请确保目标正确**。如果不小心,就会不可撤销地删除了数据。此外,请确保你从根卷的快照复制,**而不是**你的现在的根卷。 + +``` +$ sudo dd if=/dev/vg_sdg/f26_s of=/dev/vg_sdg/f28 bs=256k +81920+0 records in +81920+0 records out +21474836480 bytes (21 GB, 20 GiB) copied, 149.179 s, 144 MB/s +``` + +给新文件系统一个唯一的 UUID。这不是绝对必要的,但 UUID 应该是唯一的,因此这避免了未来的混淆。以下是在 ext4 根文件系统上的方法: + +``` +$ sudo e2fsck -f /dev/vg_sdg/f28 +$ sudo tune2fs -U random /dev/vg_sdg/f28 +``` + +然后删除不再需要的快照卷: + +``` +$ sudo lvremove vg_sdg/f26_s +Do you really want to remove active logical volume vg_sdg/f26_s? [y/n]: y +Logical volume "f26_s" successfully removed +``` + +如果你单独挂载了 `/home`,你可能希望在此处制作 `/home` 的快照。有时,升级的应用程序会进行与旧版 Fedora 版本不兼容的更改。如果需要,编辑**旧**根文件系统上的 `/etc/fstab` 文件以在 `/home` 上挂载快照。请记住,当快照已满时,它将消失!另外,你可能还希望给 `/home` 做个正常备份。 + +### 配置以使用新的根 + +首先,安装新的逻辑卷并备份现有的 GRUB 设置: + +``` +$ sudo mkdir /mnt/f28 +$ sudo mount /dev/vg_sdg/f28 /mnt/f28 +$ sudo mkdir /mnt/f28/f26 +$ cd /boot/grub2 +$ sudo cp -p grub.cfg grub.cfg.old +``` + +编辑 `grub.conf` 并在第一个菜单项 `menuentry` 之前添加这些,除非你已经有了: + +``` +menuentry 'Old boot menu' { + configfile /grub2/grub.cfg.old +} +``` + +编辑 `grub.conf` 并更改默认菜单项以激活并挂载新的根文件系统。改变这一行: + +``` +linux16 /vmlinuz-4.16.11-100.fc26.x86_64 root=/dev/mapper/vg_sdg-f26 ro rd.lvm.lv=vg_sdg/f26 rd.lvm.lv=vg_sdg/swap rhgb quiet LANG=en_US.UTF-8 +``` + +如你看到的这样。请记住使用你系统上的正确的卷组和逻辑卷条目名称! + +``` +linux16 /vmlinuz-4.16.11-100.fc26.x86_64 root=/dev/mapper/vg_sdg-f28 ro rd.lvm.lv=vg_sdg/f28 rd.lvm.lv=vg_sdg/swap rhgb quiet LANG=en_US.UTF-8 +``` + +编辑 `/mnt/f28/etc/default/grub` 并改变在启动时激活的默认根卷: + +``` +GRUB_CMDLINE_LINUX="rd.lvm.lv=vg_sdg/f28 rd.lvm.lv=vg_sdg/swap rhgb quiet" +``` + +编辑 `/mnt/f28/etc/fstab`,将挂载的根文件系统从旧的逻辑卷: + +``` +/dev/mapper/vg_sdg-f26 / ext4 defaults 1 1 +``` + +改为新的: + +``` +/dev/mapper/vg_sdg-f28 / ext4 defaults 1 1 +``` + +然后,出于参考的用途,只读挂载旧的根卷: + +``` +/dev/mapper/vg_sdg-f26 /f26 ext4 ro,nodev,noexec 0 0 +``` + +如果你的根文件系统是通过 UUID 挂载的,你需要改变这个方式。如果你的根文件系统是 ext4 你可以这样做: + +``` +$ sudo e2label /dev/vg_sdg/f28 F28 +``` + +现在编辑 `/mnt/f28/etc/fstab` 使用该卷标。改变该根文件系统的挂载行,像这样: + +``` +LABEL=F28 / ext4 defaults 1 1 +``` + +### 重启与升级 + +重新启动,你的系统将使用新的根文件系统。它仍然是 Fedora 26,但是带有新的逻辑卷名称的副本,并可以进行 `dnf` 系统升级!如果出现任何问题,请使用旧引导菜单引导回到你的工作系统,此过程可避免触及旧系统。 + +``` +$ sudo systemctl reboot # or GUI equivalent +... +$ df / /f26 +Filesystem 1K-blocks Used Available Use% Mounted on +/dev/mapper/vg_sdg-f28 20511312 14903196 4543156 77% / +/dev/mapper/vg_sdg-f26 20511312 14866412 4579940 77% /f26 +``` + +你可能希望验证使用旧的引导菜单确实可以让你回到挂载在旧的根文件系统上的根。 + +现在按照[此维基页面][2]中的说明进行操作。如果系统升级出现任何问题,你还会有一个可以重启回去的工作系统。 + +### 进一步的考虑 + +创建新的逻辑卷并将根卷的快照复制到其中的步骤可以使用通用脚本自动完成。它只需要新的逻辑卷的名称,因为现有根的大小和设备很容易确定。例如,可以输入以下命令: + +``` +$ sudo copyfs / f28 +``` + +提供挂载点以进行复制可以更清楚地了解发生了什么,并且复制其他挂载点(例如 `/home`)可能很有用。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/use-lvm-upgrade-fedora/ + +作者:[Stuart D Gathman][a] +选题:[lujun9972](https://github.com/lujun9972) +译者:[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/sdgathman/ +[1]:https://fedoramagazine.org/upgrading-fedora-27-fedora-28/ +[2]:https://fedoraproject.org/wiki/DNF_system_upgrade From 57fe7d105a94f6bbe387194d5f61a7f22bcbf17e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Aug 2019 22:53:13 +0800 Subject: [PATCH 516/951] APL --- ...eate animated, scalable vector graphic images with MacSVG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md b/sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md index df990db3bc..70a2239d71 100644 --- a/sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md +++ b/sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md @@ -1,3 +1,5 @@ +wxy has applied + Create animated, scalable vector graphic images with MacSVG ====== From cd8f668f9ec8bc9b9c2eb911be53309ceea25018 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 17 Aug 2019 23:01:24 +0800 Subject: [PATCH 517/951] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ux Package Version Before Installing It.md | 114 +++++++++--------- 1 file changed, 54 insertions(+), 60 deletions(-) rename {sources => translated}/tech/20190617 How To Check Linux Package Version Before Installing It.md (57%) diff --git a/sources/tech/20190617 How To Check Linux Package Version Before Installing It.md b/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md similarity index 57% rename from sources/tech/20190617 How To Check Linux Package Version Before Installing It.md rename to translated/tech/20190617 How To Check Linux Package Version Before Installing It.md index a8848cf5d9..9d05794c2b 100644 --- a/sources/tech/20190617 How To Check Linux Package Version Before Installing It.md +++ b/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md @@ -7,32 +7,32 @@ [#]: via: (https://www.ostechnix.com/how-to-check-linux-package-version-before-installing-it/) [#]: author: (sk https://www.ostechnix.com/author/sk/) -How To Check Linux Package Version Before Installing It +如何在安装之前检查 Linux 软件包的版本? ====== ![Check Linux Package Version][1] -Most of you will know how to [**find the version of an installed package**][2] in Linux. But, what would you do to find the packages’ version which are not installed in the first place? No problem! This guide describes how to check Linux package version before installing it in Debian and its derivatives like Ubuntu. This small tip might be helpful for those wondering what version they would get before installing a package. +大多数人都知道如何在 Linux 中[**查找已安装软件包的版本**][2],但是,你会如何查找那些最初没有安装的软件包的版本呢?这些都不是问题!本文将介绍在 Debian 及其衍生产品(如 Ubuntu)中,如何在软件包安装之前检查它的版本。对于那些想在安装之前知道软件包版本的人来说,这个小技巧可能会有所帮助。 -### Check Linux Package Version Before Installing It +### 在安装之前检查 Linux 软件包版本 -There are many ways to find a package’s version even if it is not installed already in DEB-based systems. Here I have given a few methods. +在基于 DEB 的系统中,即使软件包还没有安装,也有很多方法可以查看他的版本。接下来,我将一一介绍。 -##### Method 1 – Using Apt +##### 方法 1 – 使用 Apt -The quick and dirty way to check a package version, simply run: +检查软件包的版本的懒人方法: ``` $ apt show ``` -**Example:** +**示例:** ``` $ apt show vim ``` -**Sample output:** +**示例输出:** ``` Package: vim @@ -67,23 +67,22 @@ Description: Vi IMproved - enhanced vi editor N: There is 1 additional record. Please use the '-a' switch to see it ``` -As you can see in the above output, “apt show” command displays, many important details of the package such as, +正如你在上面的输出中看到的,"apt show" 命令显示了软件包许多重要的细节,例如: - 1. package name, - 2. version, - 3. origin (from where the vim comes from), - 4. maintainer, - 5. home page of the package, - 6. dependencies, - 7. download size, - 8. description, - 9. and many. + 1. 包名称, + 2. 版本, + 3. 来源(vim 的来源), + 4. 维护者, + 5. 包的主页, + 6. 依赖, + 7. 下载大小, + 8. 简介, + 9. 其他。 +因此,Ubuntu 仓库中可用的 Vim 版本是 **8.0.1453**。如果我把它我的 Ubuntu 系统上,就会得到这个版本。 -So, the available version of Vim package in the Ubuntu repositories is **8.0.1453**. This is the version I get if I install it on my Ubuntu system. - -Alternatively, use **“apt policy”** command if you prefer short output: +或者,如果你不想看那么多的内容,那么可以使用 **"apt policy"**这个命令: ``` $ apt policy vim @@ -98,7 +97,7 @@ vim: 500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages ``` -Or even shorter: +甚至更短: ``` $ apt list vim @@ -107,17 +106,17 @@ vim/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 N: There is 1 additional version. Please use the '-a' switch to see it ``` -**Apt** is the default package manager in recent Ubuntu versions. So, this command is just enough to find the detailed information of a package. It doesn’t matter whether given package is installed or not. This command will simply list the given package’s version along with all other details. +**Apt** 是 Ubuntu 最新版本的默认包管理器。因此,这个命令足以找到一个软件包的详细信息,给定的软件包是否安装并不重要。这个命令将简单地列出给定包的版本以及其他详细信息。 -##### Method 2 – Using Apt-get +##### 方法 2 – 使用 Apt-get -To find a package version without installing it, we can use **apt-get** command with **-s** option. +要查看软件包的版本而不安装它,我们可以使用 **apt-get** 命令和 **-s** 选项。 ``` $ apt-get -s install vim ``` -**Sample output:** +**示例输出:** ``` NOTE: This is only a simulation! @@ -136,19 +135,19 @@ Inst vim (2:8.0.1453-1ubuntu1.1 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic Conf vim (2:8.0.1453-1ubuntu1.1 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64]) ``` -Here, -s option indicates **simulation**. As you can see in the output, It performs no action. Instead, It simply performs a simulation to let you know what is going to happen when you install the Vim package. +这里,-s 选项代表 **模拟**。正如你在输出中看到的,它不执行任何操作。相反,它只是模拟执行,好让你知道在安装 Vim 是会发生什么。 -You can substitute “install” option with “upgrade” option to see what will happen when you upgrade a package. +你可以将 "install" 选项替换为 "upgrade",以查看升级包时会发生什么。 ``` $ apt-get -s upgrade vim ``` -##### Method 3 – Using Aptitude +##### 方法 3 – 使用 Aptitude -**Aptitude** is an ncurses and commandline-based front-end to APT package manger in Debian and its derivatives. +在 Debian 及其衍生品中,**aptitude** 是一个基于 ncurses(LCTT 译者注:ncurses 是终端基于文本的字符处理的库)和命令行的前端 APT 包管理器。 -To find the package version with Aptitude, simply run: +使用 aptitude 来查看软件包的版本,只需运行: ``` $ aptitude versions vim @@ -156,7 +155,7 @@ p 2:8.0.1453-1ubuntu1 p 2:8.0.1453-1ubuntu1.1 bionic-security,bionic-updates 500 ``` -You can also use simulation option ( **-s** ) to see what would happen if you install or upgrade package. +你还可以使用模拟选项(**-s**)来查看安装或升级包时会发生什么。 ``` $ aptitude -V -s install vim @@ -167,33 +166,29 @@ Need to get 1,152 kB of archives. After unpacking 2,852 kB will be used. Would download/install/remove packages. ``` -Here, **-V** flag is used to display detailed information of the package version. - -Similarly, just substitute “install” with “upgrade” option to see what would happen if you upgrade a package. +这里,**-V** 标志用于显示软件包的详细信息。 ``` $ aptitude -V -s upgrade vim ``` -Another way to find the non-installed package’s version using Aptitude command is: - +类似的,只需将 "install" 替换为 "upgrade" 选项,即可查看升级包会发生什么。 ``` $ aptitude search vim -F "%c %p %d %V" ``` -Here, +这里, - * **-F** is used to specify which format should be used to display the output, - * **%c** – status of the given package (installed or not installed), - * **%p** – name of the package, - * **%d** – description of the package, - * **%V** – version of the package. + * **-F** 用于指定应使用哪种格式来显示输出, + * **%c** – 包的状态(已安装或未安装), + * **%p** – 包的名称, + * **%d** – 包的简介, + * **%V** – 包的版本。 +当你不知道完整的软件包名称时,这非常有用。这个命令将列出包含给定字符串(即 vim)的所有软件包。 -This is helpful when you don’t know the full package name. This command will list all packages that contains the given string (i.e vim). - -Here is the sample output of the above command: +以下是上述命令的示例输出: ``` [...] @@ -207,17 +202,17 @@ p vim-voom Vim two-pane out p vim-youcompleteme fast, as-you-type, fuzzy-search code completion engine for Vim 0+20161219+git ``` -##### Method 4 – Using Apt-cache +##### 方法 4 – 使用 Apt-cache -**Apt-cache** command is used to query APT cache in Debian-based systems. It is useful for performing many operations on APT’s package cache. One fine example is we can [**list installed applications from a certain repository/ppa**][3]. +**Apt-cache** 命令用于查询基于 Debian 的系统中的 APT 缓存。对于要在 APT 的包缓存上执行很多操作时,它很有用。一个很好的例子是我们可以从[**某个仓库或 ppa 中列出已安装的应用程序**][3]。 -Not just installed applications, we can also find the version of a package even if it is not installed. For instance, the following command will find the version of Vim package: +不仅是已安装的应用程序,我们还可以找到软件包的版本,即使它没有被安装。例如,以下命令将找到 Vim 的版本: ``` $ apt-cache policy vim ``` -Sample output: +示例输出: ``` vim: @@ -231,19 +226,18 @@ vim: 500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages ``` -As you can see in the above output, Vim is not installed. If you wanted to install it, you would get version **8.0.1453**. It also displays from which repository the vim package is coming from. +正如你在上面的输出中所看到的,Vim 并没有安装。如果你想安装它,你会知道它的版本是 **8.0.1453**。它还显示 vim 包来自哪个仓库。 -##### Method 5 – Using Apt-show-versions +##### 方法 5 – 使用 Apt-show-versions -**Apt-show-versions** command is used to list installed and available package versions in Debian and Debian-based systems. It also displays the list of all upgradeable packages. It is quite handy if you have a mixed stable/testing environment. For instance, if you have enabled both stable and testing repositories, you can easily find the list of applications from testing and also you can upgrade all packages in testing. - -Apt-show-versions is not installed by default. You need to install it using command: +在 Debian 和基于 Debian 的系统中,**apt-show-versions** 命令用于列出已安装和可用软件包的版本。它还显示所有可升级软件包的列表。如果你有一个混合的稳定或测试环境,这是非常方便的。例如,如果你同时启用了稳定和测试仓库,那么你可以轻松地从测试库找到应用程序列表,还可以升级测试库中的所有软件包。 +默认情况下系统没有安装 apt-show-versions,你需要使用以下命令来安装它: ``` $ sudo apt-get install apt-show-versions ``` -Once installed, run the following command to find the version of a package,for example Vim: +安装后,运行以下命令查找软件包的版本,例如 Vim: ``` $ apt-show-versions -a vim @@ -253,15 +247,15 @@ vim:amd64 2:8.0.1453-1ubuntu1.1 bionic-updates archive.ubuntu.com vim:amd64 not installed ``` -Here, **-a** switch prints all available versions of the given package. +这里,**-a** 选项打印给定软件包的所有可用版本。 -If the given package is already installed, you need not to use **-a** option. In that case, simply run: +如果已经安装了给定的软件包,那么就不需要使用 **-a** 选项呢。在这种情况下,只需运行: ``` $ apt-show-versions vim ``` -And, that’s all. If you know any other methods, please share them in the comment section below. I will check and update this guide. +差不多完了。如果你还了解其他方法,在下面的评论中分享,我将检查并更新本指南。 -------------------------------------------------------------------------------- @@ -269,7 +263,7 @@ via: https://www.ostechnix.com/how-to-check-linux-package-version-before-install 作者:[sk][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[MjSeven](https://github.com/MjSeven) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f21a79a8031d3ab06af319601ac32c32ed9f6c8b Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 17 Aug 2019 23:44:56 +0800 Subject: [PATCH 518/951] translate done: 20180116 Command Line Heroes- Season 1- OS Wars.md --- ... Command Line Heroes- Season 1- OS Wars.md | 317 ------------------ ... Command Line Heroes- Season 1- OS Wars.md | 316 +++++++++++++++++ 2 files changed, 316 insertions(+), 317 deletions(-) delete mode 100644 sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md create mode 100644 translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md deleted file mode 100644 index 5ad8d5877f..0000000000 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ /dev/null @@ -1,317 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (lujun9972) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Command Line Heroes: Season 1: OS Wars) -[#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) -[#]: author: (redhat https://www.redhat.com) - -Command Line Heroes: Season 1: OS Wars -====== -Saron Yitbarek: - -有些故事如史诗般,惊险万分, 在我脑海中似乎出现了星球大战电影开头的爬行文字. 你知道的, 就像- - -Voice Actor: - -第一集, 操作系统大战. - -Saron Yitbarek: - -是的, 就像那样子. - -Voice Actor: - -[00:00:30] - -当前形势比较紧张. Bill Gates 与 Steve Jobs 的帝国发起了一场无可避免的专有软件之战. Gates 与 IBM 结成了强大的联盟, 而 Jobs 拒绝对它的硬件和操作系统开放授权. 他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时, 帝王所不知道的是, 在偏远之地, 开源的反叛者们开始集聚. - -Saron Yitbarek: - -[00:01:00] - -好吧. 这也许有点戏剧性, 但当我们谈论80年代,90年代和00年代的操作系统之争时, 这也不算言过其实. 确实曾经发生过一场史诗级的通知之战. Steve Jobs 和 Bill Gates 确实掌握着数十亿美元的命运. 掌控了操作系统, 你就掌握了绝大多数人使用计算机的方式, 我们互相通讯的方式, 我们获取信息的方式. 我可以一直罗列下去, 不过你知道我的意思. 掌握了操作系统, 你就是帝王. - -[00:01:30] - -我是 Saron Yitbarek, 你现在收听的是代码英雄, 一款红帽公司原创的博客节目. 你问,什么是代码英雄? 嗯, 如果你创造而不仅仅是使用, 如果你相信开发者拥有构建美好未来的能力, 如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界, 那么你, 我的朋友, 就是代码英雄. 在本系列节目中, 我们将为你带来那些"白码起家(原文是from the command line up,应该是改编自from the ground up)"改变技术的程序员故事. 那么我是谁,凭什么指导你踏上这段艰苦的旅程? Saron Yitbarek是哪根葱? 嗯, 事实上我觉得我跟你差不多. 我是一名面向初学者的开发人员, 我做的任何事都依赖于开源软件. 这是我的世界. 通过在博客中讲故事,我可以跳出无聊的日常工作,看清大局. 希望它对你也一样有用. - -[00:02:00] - - -[00:02:30] - -[00:03:00] - -我迫不及待地想直到,开源技术从何而来? 我的意思时, 我对 Linus Torvalds 和 Linux ® 的荣耀有一些了解, 我相信你也一样, 但是说真的, 开源并不是一开始就有的对吗? 如果我像发至内心的感激最新最棒的技术,比如 DevOps 和 containers 之类的, 我感觉我对那些早期的开发者有所亏欠,我有必要了解这些东西来自何处. 所以, 让我们暂时先不用担心内存泄露和缓冲溢出. 我们的旅程从操作系统之战开始, 这是一场波澜壮阔的桌面控制之战. 这场战争亘古未有,因为. 首先, 在计算机时代, 大公司拥有指数级的规模优势; 其次, 从未有过这么一场控制争夺战是如此变化多端. Bill Gates 和 Steve Jobs? 他们也不知道结果会如何, 但是到目前为止,这个故事进行到一半的时候, 他们所争夺的所有东西都将发声改变, 进化,最终上升到云端. - -[00:03:30] - -[00:04:00] - -好的, 让我们回到1983年的秋季. 还有六年我才出生. 那时候的总统还是 Ronald Reagan, 美国和苏联扬言要把星球拖入核战争中. 在 Honolulu 的公民中心正在举办一年一度的苹果公司销售会议. 一群苹果公司的员工正在等待 Steve Jobs 上台. 他 28 岁,热情洋溢, 看起来非常自信. Jobs 很严肃地对着麦克风说他邀请了三个行业专家来软件进行了一次小组讨论. 然而随后发生的事情你肯定想不到. 超级俗气的80年代音乐响彻整个房间. 一堆多彩灯管照亮了舞台, 然后一个播音员的声音响起- - -Voice Actor: - -女士们,先生们, 现在是麦金塔软件的约会游戏. - -Saron Yitbarek: - -[00:04:30] - -[00:05:00] - -Jobs 的脸上露出一个大大的笑容,台上有三个CEO都需要轮流向他示好. 这基本上就是80年代科技界的钻石王老五. 两个软件大佬讲完话后, 然后就轮到第三个人讲话了. 仅此而已不是吗? 是得. 新面孔 Bill Gates 带着一个大大的方框眼镜遮住了半个脸. 他宣称在 1984 年, 微软的一半收入将来至于麦金塔软件. 他的这番话引来了观众热情的掌声. 但是他们不知道的是,在一个月后, Bill Gates 将会宣布发布 Windows 1.0 的计划. 你永远也猜不到 Jobs 正在跟未来苹果最大的敌人打情骂俏. 但微软和苹果即将经历科技史上最糟糕的婚礼. 他们会彼此背叛, 相互毁灭, 但又深深地、痛苦地捆绑在一起. - -James Allworth: - -[00:05:30] - -我猜从哲学上来讲, 一个更理想化,注重用户体验高于一切, 是一个集成的组织, 而微软则更务实,更模块化- - -Saron Yitbarek: - -这是James Allworth。他是一位多产的科技作家,曾在苹果零售团队工作。注意他给出的苹果的定义。一个集成的组织。那种只对自己负责的公司。一个不想依赖别人的公司。这是关键。 - -James Allworth: - -[00:06:00] - -苹果是一家集成的公司,它专注于愉悦的用户体验,这意味着它希望控制整技术栈以及交付的一切内容,从硬件到操作系统,甚至运行在操作系统上的应用程序。 -当新的创新,重要的创新刚刚进入市场,而你需要横跨软硬件,并且能够根据自己意愿和软件的革新来改变硬件时,这是一个优势。例如-, - -[00:06:30] - -Saron Yitbarek: - -[00:07:00] -很多人喜欢这种整合的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。回到 Honolulu 的销售会议上。在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想 George Orwell 的1984。在这个冰冷、灰暗的世界里,在独裁者投射的目光下,没有头脑的机器人正在缓慢移动。这些机器人代表着IBM的用户们。然后,代表苹果公司的美丽而健壮的Anya Major 穿着鲜艳的衣服跑过大厅。她向着老大哥的屏幕猛地透出大锤,将它砸成一片一片的. 老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍麦金塔了。 - -Voice Actor: - -这就是为什么现实中的1984跟小说1984不一样了. - -Saron Yitbarek: - -[00:07:30] - -是的,现在回顾这则广告,认为苹果是一个致力于解放大众的自由斗士的想法有点过分了。但这件事触动了我的神经。Ken Segal 曾在为苹果制作这则广告的广告公司工作过。在早期,他为 Steve Jobs 做了十多年的广告。 - -Ken Segal: - -[00:08:00] - -1984这则广告的风险很大。事实上,它的风险太大,以至于苹果公司在看到它的时候都不想播出它。你可能听说了 Steve 喜欢它,但苹果公司董事会的人并不喜欢它。事实上,他们很愤怒,这么多钱被花在这么一件事情上,以至于他们想解雇广告代理商。Steve 则为我们公司辩护。 - -Saron Yitbarek: - -Jobs, 一如既往地, 慧眼识英雄. - -Ken Segal: - -这则广告在公司内,在业界内都引起了共鸣,成为了苹果产品的代表。无论人们那天是否有在购买电脑,它都带来了一种持续多年的影响,帮助定义了这家公司的品质。我们是叛军。我们是拿着大锤的人。 - -[00:08:30] - -Saron Yitbarek: - -因此,在争夺数十亿潜在消费者偏好的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主,非凡的英雄,一种对生活方式的选择。但 Bill Gates 知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,甚至是皇帝,能独自完成任务. - -[00:09:00] - -[00:09:30] - -1985年6月25日。盖茨给当时的苹果CEO 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到1996年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得获得快速发展和建立标准所需的支持”。换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作. - -[00:10:00] - -[00:10:30] - -多年后你依然可以看到这条哲学思想,当微软首席执行官 Steve Ballmer 上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。” 你懂我的意思了吧。微软喜欢开发人员。虽然目前他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。而当 Bill Gates 建议苹果公司也这么做时(你可能已经猜到了),这个想法就被抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了Windows 1.0。战争开始了. - -开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者, 开发者. - -[00:11:00] - -您正在收听的是来自红帽公司的原创播客《代码英雄》。本集是第一集,我们将回到过去,重温操作系统战争的史诗故事,我们将会找出,科技巨头之间的战争是如何为我们今天所生活的开源世界扫清道路的? - -[00:11:30] - -好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是1979年,Steve Jobs 开车去 Palo Alto 的 Xerox Park 研究中心。那里的工程师一直在为他们所称之为的"图形用户界面"开发一系列的元素。也许你听说过。它们有菜单,滚动条,按钮,文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 - -Steven Levy: - -[00:12:00] -新界面要前所未有地有好的多,这让我们无比兴奋,以前我们用的是所谓的命令行,它的让你和电脑之间的交互方式跟现实生活中的交互方式完全不同。 -电脑上的鼠标和图像让你可以可以像现实生活中的交互一样实现与电脑的交互,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有代码。 - -Saron Yitbarek: - -[00:12:30] - -[00:13:00] - -不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向 Jobs 展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。Jobs 觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是他最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念”。这话有些苛刻,但是,Jobs 带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983年,苹果发布了 Lisa 电脑,1984年又发布了Mac电脑。这些设备的创意是抄袭自施乐公司的. - -[00:13:30] - -让我感兴趣的是,乔布斯对控诉他偷了图形用户界面的反应。他对此很冷静。他引用毕加索的话:“好的艺术家复制,伟大的艺术家偷窃。”他告诉一位记者,“我们总是无耻地窃取伟大的创意”。伟大的艺术家偷窃。好吧。我的意思是,我们说的并不是严格意义上的偷窃。没有人获得专有的源代码并公然将其集成到他们自己的操作系统中去。这要更温和些,更像是创意的借用。这就难控制的多了,就像 Jobs 自己即将学到的那样。传奇的软件向导、真正的代码英雄 Andy Hertzfeld 就是麦金塔开发团队的最初成员。 - -[00:14:00] - -Andy Hertzfeld: - -[00:14:30] - -[00:15:00] - -是的,微软是我们与麦金塔电脑的第一个软件合作伙伴。当时,我们并没有把他们当成是竞争对手。他们是苹果之外,第一家我们交付麦金塔原型的公司。我通常每周都会和微软的技术主管聊一次。他们是尝试我们所编写软件的第一个外部团队。他们给了我们非常重要的反馈,总的来说,我认为我们的关系非常好。但我也注意到,在我与技术主管的交谈中,他开始问一些系统实现方面的问题,而他本无需知道这些,我觉得,他们想要复制麦金塔电脑。我很早以前就像史蒂夫·乔布斯反馈过这件事,但在1983年秋天,这件事达到了高潮。我们发现,他们在1983年11月的COMDEX上发布了Windows,但却没有提前告诉我们. 对此史蒂夫·乔布斯勃然大怒。他认为那是一种背叛。 - -Saron Yitbarek: - -[00:15:30] - -[00:16:00] - -随着新版Windows的发布,很明显,微软从苹果那里学到了苹果从施乐那里学来的所有想法。乔布斯很易怒。他的关于伟大艺术家如何偷窃的毕加索名言被别人学去了。而且恐怕盖茨也正是这么做的。据报道,当乔布斯怒斥盖茨偷了他们的东西时,盖茨回应道:“史蒂夫,我觉得这更像是我们都有一个叫施乐的富有邻居,我闯进他家偷电视机,却发现你已经偷过了”。苹果最终以窃取GUI的外观和风格为名起诉了微软。这个案子持续了好几年,但是在1993年,第九次巡回上诉法院的一名法官最终站在了微软一边。Vaughn Walker 法官宣布外观和风格不受版权保护。这是非常重要的。这一决定让苹果在无法垄断桌面计算的界面。很快,苹果短暂的领先优势消失了。以下是 Steven Levy 的观点。 - -Steven Levy: - -[00:16:30] - -[00:17:00] - -他们之所以失去领先地位,不是因为微软方面窃取了知识产权,而是因为在上世纪80年代,他们无法通过更好的操作系统来巩固自己的优势。坦率地说,他们的电脑索价过高。因此微软从20世纪80年代中期开始开发Windows系统,但直到1990年开发出的Windows 3,我想,他才真正算是一个为黄金时期做好准备的版本,才真正可供大众使用。从此以后,微软能够将数以亿计的用户迁移到图形界面,而这是苹果无法做到的。虽然苹果公司有一个非常好的操作系统,但是那已经是1984年的产品了。 - -Saron Yitbarek: - -[00:17:30] - -[00:18:00] -现在微软主导着操作系统的战场。他们占据了90%的市场份额,并且针对各种各样的个人电脑进行了标准化。操作系统的未来看起来会由微软掌控。此后发生了什么?1997年,波士顿Macworld博览会上,你看到了一个几近破产的苹果。一个谦逊的多的史蒂夫·乔布斯走上舞台,开始谈论伙伴关系的重要性. 特别是他们与微软的新型合作伙伴关系。史蒂夫·乔布斯呼吁双方缓和关系,停止火拼。微软将拥有巨大的市场份额。从表面看,我们可能会认为世界和平了。但当利益如此巨大时,事情就没那么简单了。就在苹果和微软在数十年的争斗中伤痕累累、最终走向死角之际,一名21岁的芬兰计算机科学专业学生出现了。几乎是偶然地,他彻底改变了一切。 - -我是 Saron Yitbarek, 这里是代码英雄. - -[00:18:30] -正当某些科技巨头正忙着就专有软件相互攻击时,自由软件和开源软件的新领军者如雨后春笋般涌现。其中一位优胜者就是理查德·斯托尔曼。你也许对他的工作很熟悉。他想要有自由软件和自由社会。这就像言论自由一样的自由,而不是像免费啤酒一样的免费。早在80年代,斯托尔曼就发现,除了昂贵的专有操作系统(如UNIX)外,就没有其他可行的替代品。因此他决定自己做一个。斯托尔曼的自由软件基金会发明了GNU,它的意思是"GNU's not UNIX"。它将是一个像UNIX一样的操作系统,但不包含所有UNIX代码,而且用户可以自由共享。 - -[00:19:00] - -[00:19:30] - -为了让你体会到80年代自由软件概念的重要性,从不同角度来说拥有UNIX代码的两家公司,AT&T贝尔实验室 以及 UNIX系统实验室威胁将会起诉任何看过UNIX源代码后又创建自己操作系统的人. -这些人是次一级的专利所属。用这两家公司的话来说,所有这些程序员都在“精神上受到了污染”,因为他们都见过UNIX代码。在UNIX系统实验室和Berkeley 软件设计之间的一个著名的法庭案例中,有人认为任何功能类似的系统,即使它本身没有使用UNIX代码,也归版权所有。Paul Jones当时是一名开发人员。他现在是数字图书馆ibiblio.org的主任。 - -Paul Jones: - -[00:20:00] - -他们认为,任何看过代码的人都受到了精神污染。因此几乎所有在安装有与UNIX相关操作系统的电脑上工作过的人以及任何在计算机科学部门工作的人都受到精神上的污染。因此,在USENIX的一年里,我们都a发有带有红字的白色小别针,上面写着“精神受到了污染”. 我们很喜欢带着这些别针到处走,以表达我们力挺Bell,因为我们的精神受到了污染。 - -[00:20:30] - -Saron Yitbarek: - -[00:21:00] - -整个世界都被精神污染了。想要保持纯粹,保持事物的美好和专有的旧哲学正变得越来越不现实。正是在这被污染的现实中,历史上最伟大其中一个的代码英雄诞生了,他是一个芬兰男孩,名叫Linus Torvalds。如果这是《星球大战》,那么 Linus Torvalds 就是我们的卢克·天行者。他是赫尔辛基大学一名温文尔雅的研究生。有才华,但缺乏宏伟的愿景。典型的被逼上梁山的英雄。和其他年轻的英雄一样,他也感到沮丧。他想把386处理器整合到他的新电脑中。他对自己的IBM主机上运行的MS-DOS操作系统并不感冒,也负担不起UNIX软件5000美元的价格,而只有UNIX才能让他自由地编程。解决方案是Torvalds在1991年春天基于MINIX开发了一个名为Linux的操作系统内核。他自己的操作系统内核。 - -[00:21:30] - -Steven Vaughan-Nichols: - -Linus Torvalds 真的只想找点乐子. - -Saron Yitbarek: - -Steven Vaughan-Nichols 是 ZDNet.com 的特约编辑, 而且他从科技行业出现以来就一直在写科技行业相关的内容. - -Steven Vaughan-Nichols: - -[00:22:00] - -[00:22:30] - -当时有几个类似的操作系统。他最关心的是一个名叫MINIX的操作系统,MINIX旨在让学生学习如何构建操作系统。莱纳斯着到这些,觉得很有趣,但他想建立自己的操作系统。因此它始于赫尔辛基的一个DIY项目。一切就这样开始了,基本上就是一个大孩子在玩耍,学习如何做事。但不同之处在于,他足够聪明,足够执着,也足够友好,让所有其他人都参与进来,然后他开始把这个项目进行到底。27年后,这个项目变得比他想象的要大得多。 - -Saron Yitbarek: - -[00:23:00] - -到1991年秋季,Torvalds发布了10,000行代码,世界各地的人们开始提供注释,然后进行优化、添加和修改代码。对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对整个专有系统(微软、苹果和IBM在这方面做的非常好)道德上的侮辱。随后这种开放性被奉若神明。Torvalds将Linux置于GNU通用公共许可证之下。曾经保障斯托尔曼的GNU系统自由的许可证现在也将保障Linux的自由。Vaughan-Nichols解释道,迁移到incorporate GPL的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 - -[00:23:30] - -Steven Vaughan-Nichols: - -In fact, by the license that it's under, which is called GPL version 2, you have to share the code if you're going to try to sell it or present it to the world, so that if you make an improvement, it's not enough just to give someone the improvement. You actually have to share with them the nuts and bolts of all those changes. Then they are adapted into Linux if they're good enough. - -Saron Yitbarek: - -[00:24:00] - -That public approach proved massively attractive. Eric Raymond, one of the early evangelists of the movement wrote in his famous essay that, "Corporations like Microsoft and Apple have been trying to build software cathedrals, while Linux and its kind were offering a great babbling bazaar of different agendas and approaches. The bazaar was a lot more fun than the cathedral." - -Stormy Peters: - -I think at the time, what attracted people is that they were going to be in control of their own world. - -Saron Yitbarek: - -Stormy Peters is an industry analyst, and an advocate for free and open source software. - -[00:24:30] - -Stormy Peters: - -[00:25:00] - -When open source software first came out, the OS was all proprietary. You couldn't even add a printer without going through proprietary software. You couldn't add a headset. You couldn't develop a small hardware device of your own, and make it work with your laptop. You couldn't even put in a DVD and copy it, because you couldn't change the software. Even if you owned the DVD, you couldn't copy it. You had no control over this hardware/software system that you'd bought. You couldn't create anything new and bigger and better out of it. That's why an open source operating system was so important at the beginning. We needed an open source collaborative environment where we could build bigger and better things. - -Saron Yitbarek: - -[00:25:30] - -Mind you, Linux isn't a purely egalitarian utopia. Linus Torvalds doesn't approve everything that goes into the kernel, but he does preside over its changes. He's installed a dozen or so people below him to manage different parts of the kernel. They, in turn, trust people under themselves, and so on, in a pyramid of trust. Changes might come from anywhere, but they're all judged and curated. - -[00:26:00] - -It is amazing, though, to think how humble, and kind of random, Linus' DIY project was to begin with. He didn't have a clue he was the Luke Skywalker figure in all this. He was just 21, and had been programming half his life. But this was the first time the silo opened up, and people started giving him feedback. Dozens, then hundreds, and thousands of contributors. With crowdsourcing like that, it doesn't take long before Linux starts growing. Really growing. It even finally gets noticed by Microsoft. Their CEO, Steve Ballmer, called Linux, and I quote, "A cancer that attaches itself in an intellectual property sense to everything it touches." Steven Levy describes where Ballmer was coming from. - -Steven Levy: - -[00:26:30] - -Once Microsoft really solidified its monopoly, and indeed it was judged in federal court as a monopoly, anything that could be a threat to that, they reacted very strongly to. So of course, the idea that free software would be emerging, when they were charging for software, they saw as a cancer. They tried to come up with an intellectual property theory about why this was going to be bad for consumers. - -Saron Yitbarek: - -[00:27:00] - -Linux was spreading, and Microsoft was worried. By 2006, Linux would become the second most widely used operating system after Windows, with about 5,000 developers working on it worldwide. Five thousand. Remember that memo that Bill Gates sent to Apple, the one where he's lecturing them about the importance of partnering with other people? Turns out, open source would take that idea of partnerships to a whole new level, in a way Bill Gates would have never foreseen. - -[00:27:30] - -[00:28:00] - -We've been talking about these huge battles for the OS, but so far, the unsung heroes, the developers, haven't fully made it onto the battlefield. That changes next time, on Command Line Heroes. In episode two, part two of the OS wars, it's the rise of Linux. Businesses wake up, and realize the importance of developers. These open source rebels grow stronger, and the battlefield shifts from the desktop to the server room. There's corporate espionage, new heroes, and the unlikeliest change of heart in tech history. It all comes to a head in the concluding half of the OS wars. - -[00:28:30] - -To get new episodes of Command Line Heroes delivered automatically for free, make sure you hit subscribe on Apple podcasts, Spotify, Google Play, or however you get your podcasts. Over the rest of the season, we're visiting the latest battlefields, the up-for-grab territories where the next generation of Command Line Heroes are making their mark. For more info, check us out at redhat.com/commandlineheroes. I'm Saron Yitbarek. Until next time, keep on coding. - - --------------------------------------------------------------------------------- - -via: https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1 - -作者:[redhat][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.redhat.com -[b]: https://github.com/lujun9972 diff --git a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md new file mode 100644 index 0000000000..f795de7baa --- /dev/null +++ b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -0,0 +1,316 @@ +[#]: collector: (lujun9972) +[#]: translator: (lujun9972) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command Line Heroes: Season 1: OS Wars) +[#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) +[#]: author: (redhat https://www.redhat.com) + +Command Line Heroes: Season 1: OS Wars +====== +Saron Yitbarek: + +有些故事如史诗般,惊险万分,在我脑海中似乎出现了星球大战电影开头的爬行文字。你知道的,就像- + +Voice Actor: + +第一集,操作系统大战。 + +Saron Yitbarek: + +是的,就像那样子。 + +Voice Actor: + +[00:00:30] + +当前形势比较紧张。Bill Gates 与 Steve Jobs 的帝国发起了一场无可避免的专有软件之战。Gates 与 IBM 结成了强大的联盟,而 Jobs 拒绝对它的硬件和操作系统开放授权。他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时,帝王所不知道的是,在偏远之地,开源的反叛者们开始集聚。 + +Saron Yitbarek: + +[00:01:00] + +好吧。这也许有点戏剧性,但当我们谈论 80 年代,90 年代和 00 年代的操作系统之争时,这也不算言过其实。确实曾经发生过一场史诗级的通知之战。Steve Jobs 和 Bill Gates 确实掌握着数十亿美元的命运。掌控了操作系统,你就掌握了绝大多数人使用计算机的方式,我们互相通讯的方式,我们获取信息的方式。我可以一直罗列下去,不过你知道我的意思。掌握了操作系统,你就是帝王。 + +[00:01:30] + +我是 Saron Yitbarek,你现在收听的是代码英雄,一款红帽公司原创的博客节目。你问,什么是代码英雄?嗯,如果你创造而不仅仅是使用,如果你相信开发者拥有构建美好未来的能力,如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界,那么你,我的朋友,就是代码英雄。在本系列节目中,我们将为你带来那些"白码起家(原文是 from the command line up,应该是改编自 from the ground up)" 改变技术的程序员故事。那么我是谁,凭什么指导你踏上这段艰苦的旅程?Saron Yitbarek 是哪根葱?嗯,事实上我觉得我跟你差不多。我是一名面向初学者的开发人员,我做的任何事都依赖于开源软件。这是我的世界。通过在博客中讲故事,我可以跳出无聊的日常工作,看清大局。希望它对你也一样有用。 + +[00:02:00] + + +[00:02:30] + +[00:03:00] + +我迫不及待地想直到,开源技术从何而来?我的意思时,我对 Linus Torvalds 和 Linux ® 的荣耀有一些了解,我相信你也一样,但是说真的,开源并不是一开始就有的对吗?如果我像发至内心的感激最新最棒的技术,比如 DevOps 和 containers 之类的,我感觉我对那些早期的开发者有所亏欠,我有必要了解这些东西来自何处。所以,让我们暂时先不用担心内存泄露和缓冲溢出。我们的旅程从操作系统之战开始,这是一场波澜壮阔的桌面控制之战。这场战争亘古未有,因为。首先,在计算机时代,大公司拥有指数级的规模优势; 其次,从未有过这么一场控制争夺战是如此变化多端。Bill Gates 和 Steve Jobs? 他们也不知道结果会如何,但是到目前为止,这个故事进行到一半的时候,他们所争夺的所有东西都将发声改变,进化,最终上升到云端。 + +[00:03:30] + +[00:04:00] + +好的,让我们回到 1983 年的秋季。还有六年我才出生。那时候的总统还是 Ronald Reagan,美国和苏联扬言要把星球拖入核战争中。在 Honolulu 的公民中心正在举办一年一度的苹果公司销售会议。一群苹果公司的员工正在等待 Steve Jobs 上台。他 28 岁,热情洋溢,看起来非常自信。Jobs 很严肃地对着麦克风说他邀请了三个行业专家来软件进行了一次小组讨论。然而随后发生的事情你肯定想不到。超级俗气的 80 年代音乐响彻整个房间。一堆多彩灯管照亮了舞台,然后一个播音员的声音响起- + +Voice Actor: + +女士们,先生们,现在是麦金塔软件的约会游戏。 + +Saron Yitbarek: + +[00:04:30] + +[00:05:00] + +Jobs 的脸上露出一个大大的笑容,台上有三个 CEO 都需要轮流向他示好。这基本上就是 80 年代科技界的钻石王老五。两个软件大佬讲完话后,然后就轮到第三个人讲话了。仅此而已不是吗?是得。新面孔 Bill Gates 带着一个大大的方框眼镜遮住了半个脸。他宣称在 1984 年,微软的一半收入将来至于麦金塔软件。他的这番话引来了观众热情的掌声。但是他们不知道的是,在一个月后,Bill Gates 将会宣布发布 Windows 1.0 的计划。你永远也猜不到 Jobs 正在跟未来苹果最大的敌人打情骂俏。但微软和苹果即将经历科技史上最糟糕的婚礼。他们会彼此背叛,相互毁灭,但又深深地、痛苦地捆绑在一起。 + +James Allworth: + +[00:05:30] + +我猜从哲学上来讲,一个更理想化,注重用户体验高于一切,是一个集成的组织,而微软则更务实,更模块化- + +Saron Yitbarek: + +这是 James Allworth。他是一位多产的科技作家,曾在苹果零售团队工作。注意他给出的苹果的定义。一个集成的组织。那种只对自己负责的公司。一个不想依赖别人的公司。这是关键。 + +James Allworth: + +[00:06:00] + +苹果是一家集成的公司,它专注于愉悦的用户体验,这意味着它希望控制整技术栈以及交付的一切内容,从硬件到操作系统,甚至运行在操作系统上的应用程序。 +当新的创新,重要的创新刚刚进入市场,而你需要横跨软硬件,并且能够根据自己意愿和软件的革新来改变硬件时,这是一个优势。例如-, + +[00:06:30] + +Saron Yitbarek: + +[00:07:00] +很多人喜欢这种整合的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。回到 Honolulu 的销售会议上。在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想 George Orwell 的 1984。在这个冰冷、灰暗的世界里,在独裁者投射的目光下,没有头脑的机器人正在缓慢移动。这些机器人代表着 IBM 的用户们。然后,代表苹果公司的美丽而健壮的 Anya Major 穿着鲜艳的衣服跑过大厅。她向着老大哥的屏幕猛地透出大锤,将它砸成一片一片的。老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍麦金塔了。 + +Voice Actor: + +这就是为什么现实中的 1984 跟小说 1984 不一样了。 + +Saron Yitbarek: + +[00:07:30] + +是的,现在回顾这则广告,认为苹果是一个致力于解放大众的自由斗士的想法有点过分了。但这件事触动了我的神经。Ken Segal 曾在为苹果制作这则广告的广告公司工作过。在早期,他为 Steve Jobs 做了十多年的广告。 + +Ken Segal: + +[00:08:00] + +1984 这则广告的风险很大。事实上,它的风险太大,以至于苹果公司在看到它的时候都不想播出它。你可能听说了 Steve 喜欢它,但苹果公司董事会的人并不喜欢它。事实上,他们很愤怒,这么多钱被花在这么一件事情上,以至于他们想解雇广告代理商。Steve 则为我们公司辩护。 + +Saron Yitbarek: + +Jobs,一如既往地,慧眼识英雄。 + +Ken Segal: + +这则广告在公司内,在业界内都引起了共鸣,成为了苹果产品的代表。无论人们那天是否有在购买电脑,它都带来了一种持续多年的影响,帮助定义了这家公司的品质。我们是叛军。我们是拿着大锤的人。 + +[00:08:30] + +Saron Yitbarek: + +因此,在争夺数十亿潜在消费者偏好的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主,非凡的英雄,一种对生活方式的选择。但 Bill Gates 知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,甚至是皇帝,能独自完成任务。 + +[00:09:00] + +[00:09:30] + +1985 年 6 月 25 日。盖茨给当时的苹果 CEO 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到 1996 年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得获得快速发展和建立标准所需的支持”。换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作。 + +[00:10:00] + +[00:10:30] + +多年后你依然可以看到这条哲学思想,当微软首席执行官 Steve Ballmer 上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。” 你懂我的意思了吧。微软喜欢开发人员。虽然目前他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。而当 Bill Gates 建议苹果公司也这么做时(你可能已经猜到了),这个想法就被抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了 Windows 1.0。战争开始了。 + +开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。 + +[00:11:00] + +您正在收听的是来自红帽公司的原创播客《代码英雄》。本集是第一集,我们将回到过去,重温操作系统战争的史诗故事,我们将会找出,科技巨头之间的战争是如何为我们今天所生活的开源世界扫清道路的? + +[00:11:30] + +好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是 1979 年,Steve Jobs 开车去 Palo Alto 的 Xerox Park 研究中心。那里的工程师一直在为他们所称之为的"图形用户界面"开发一系列的元素。也许你听说过。它们有菜单,滚动条,按钮,文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 + +Steven Levy: + +[00:12:00] +新界面要前所未有地有好的多,这让我们无比兴奋,以前我们用的是所谓的命令行,它的让你和电脑之间的交互方式跟现实生活中的交互方式完全不同。 +电脑上的鼠标和图像让你可以可以像现实生活中的交互一样实现与电脑的交互,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有代码。 + +Saron Yitbarek: + +[00:12:30] + +[00:13:00] + +不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向 Jobs 展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。Jobs 觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是他最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念”。这话有些苛刻,但是,Jobs 带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983 年,苹果发布了 Lisa 电脑,1984 年又发布了 Mac 电脑。这些设备的创意是抄袭自施乐公司的。 + +[00:13:30] + +让我感兴趣的是,乔布斯对控诉他偷了图形用户界面的反应。他对此很冷静。他引用毕加索的话:“好的艺术家复制,伟大的艺术家偷窃。”他告诉一位记者,“我们总是无耻地窃取伟大的创意”。伟大的艺术家偷窃。好吧。我的意思是,我们说的并不是严格意义上的偷窃。没有人获得专有的源代码并公然将其集成到他们自己的操作系统中去。这要更温和些,更像是创意的借用。这就难控制的多了,就像 Jobs 自己即将学到的那样。传奇的软件向导、真正的代码英雄 Andy Hertzfeld 就是麦金塔开发团队的最初成员。 + +[00:14:00] + +Andy Hertzfeld: + +[00:14:30] + +[00:15:00] + +是的,微软是我们与麦金塔电脑的第一个软件合作伙伴。当时,我们并没有把他们当成是竞争对手。他们是苹果之外,第一家我们交付麦金塔原型的公司。我通常每周都会和微软的技术主管聊一次。他们是尝试我们所编写软件的第一个外部团队。他们给了我们非常重要的反馈,总的来说,我认为我们的关系非常好。但我也注意到,在我与技术主管的交谈中,他开始问一些系统实现方面的问题,而他本无需知道这些,我觉得,他们想要复制麦金塔电脑。我很早以前就像史蒂夫·乔布斯反馈过这件事,但在 1983 年秋天,这件事达到了高潮。我们发现,他们在 1983 年 11 月的 COMDEX 上发布了 Windows,但却没有提前告诉我们。对此史蒂夫·乔布斯勃然大怒。他认为那是一种背叛。 + +Saron Yitbarek: + +[00:15:30] + +[00:16:00] + +随着新版 Windows 的发布,很明显,微软从苹果那里学到了苹果从施乐那里学来的所有想法。乔布斯很易怒。他的关于伟大艺术家如何偷窃的毕加索名言被别人学去了。而且恐怕盖茨也正是这么做的。据报道,当乔布斯怒斥盖茨偷了他们的东西时,盖茨回应道:“史蒂夫,我觉得这更像是我们都有一个叫施乐的富有邻居,我闯进他家偷电视机,却发现你已经偷过了”。苹果最终以窃取 GUI 的外观和风格为名起诉了微软。这个案子持续了好几年,但是在 1993 年,第九次巡回上诉法院的一名法官最终站在了微软一边。Vaughn Walker 法官宣布外观和风格不受版权保护。这是非常重要的。这一决定让苹果在无法垄断桌面计算的界面。很快,苹果短暂的领先优势消失了。以下是 Steven Levy 的观点。 + +Steven Levy: + +[00:16:30] + +[00:17:00] + +他们之所以失去领先地位,不是因为微软方面窃取了知识产权,而是因为在上世纪 80 年代,他们无法通过更好的操作系统来巩固自己的优势。坦率地说,他们的电脑索价过高。因此微软从 20 世纪 80 年代中期开始开发 Windows 系统,但直到 1990 年开发出的 Windows 3,我想,他才真正算是一个为黄金时期做好准备的版本,才真正可供大众使用。从此以后,微软能够将数以亿计的用户迁移到图形界面,而这是苹果无法做到的。虽然苹果公司有一个非常好的操作系统,但是那已经是 1984 年的产品了。 + +Saron Yitbarek: + +[00:17:30] + +[00:18:00] +现在微软主导着操作系统的战场。他们占据了 90% 的市场份额,并且针对各种各样的个人电脑进行了标准化。操作系统的未来看起来会由微软掌控。此后发生了什么 ?1997 年,波士顿 Macworld 博览会上,你看到了一个几近破产的苹果。一个谦逊的多的史蒂夫·乔布斯走上舞台,开始谈论伙伴关系的重要性。特别是他们与微软的新型合作伙伴关系。史蒂夫·乔布斯呼吁双方缓和关系,停止火拼。微软将拥有巨大的市场份额。从表面看,我们可能会认为世界和平了。但当利益如此巨大时,事情就没那么简单了。就在苹果和微软在数十年的争斗中伤痕累累、最终走向死角之际,一名 21 岁的芬兰计算机科学专业学生出现了。几乎是偶然地,他彻底改变了一切。 + +我是 Saron Yitbarek,这里是代码英雄。 + +[00:18:30] +正当某些科技巨头正忙着就专有软件相互攻击时,自由软件和开源软件的新领军者如雨后春笋般涌现。其中一位优胜者就是理查德·斯托尔曼。你也许对他的工作很熟悉。他想要有自由软件和自由社会。这就像言论自由一样的自由,而不是像免费啤酒一样的免费。早在 80 年代,斯托尔曼就发现,除了昂贵的专有操作系统(如 UNIX) 外,就没有其他可行的替代品。因此他决定自己做一个。斯托尔曼的自由软件基金会发明了 GNU,它的意思是 "GNU's not UNIX"。它将是一个像 UNIX 一样的操作系统,但不包含所有 UNIX 代码,而且用户可以自由共享。 + +[00:19:00] + +[00:19:30] + +为了让你体会到 80 年代自由软件概念的重要性,从不同角度来说拥有 UNIX 代码的两家公司,AT&T 贝尔实验室 以及 UNIX 系统实验室威胁将会起诉任何看过 UNIX 源代码后又创建自己操作系统的人。 +这些人是次一级的专利所属。用这两家公司的话来说,所有这些程序员都在“精神上受到了污染”,因为他们都见过 UNIX 代码。在 UNIX 系统实验室和 Berkeley 软件设计之间的一个著名的法庭案例中,有人认为任何功能类似的系统,即使它本身没有使用 UNIX 代码,也归版权所有。Paul Jones 当时是一名开发人员。他现在是数字图书馆 ibiblio.org 的主任。 + +Paul Jones: + +[00:20:00] + +他们认为,任何看过代码的人都受到了精神污染。因此几乎所有在安装有与 UNIX 相关操作系统的电脑上工作过的人以及任何在计算机科学部门工作的人都受到精神上的污染。因此,在 USENIX 的一年里,我们都 a 发有带有红字的白色小别针,上面写着“精神受到了污染”。我们很喜欢带着这些别针到处走,以表达我们力挺 Bell,因为我们的精神受到了污染。 + +[00:20:30] + +Saron Yitbarek: + +[00:21:00] + +整个世界都被精神污染了。想要保持纯粹,保持事物的美好和专有的旧哲学正变得越来越不现实。正是在这被污染的现实中,历史上最伟大其中一个的代码英雄诞生了,他是一个芬兰男孩,名叫 Linus Torvalds。如果这是《星球大战》,那么 Linus Torvalds 就是我们的卢克·天行者。他是赫尔辛基大学一名温文尔雅的研究生。有才华,但缺乏宏伟的愿景。典型的被逼上梁山的英雄。和其他年轻的英雄一样,他也感到沮丧。他想把 386 处理器整合到他的新电脑中。他对自己的 IBM 主机上运行的 MS-DOS 操作系统并不感冒,也负担不起 UNIX 软件 5000 美元的价格,而只有 UNIX 才能让他自由地编程。解决方案是 Torvalds 在 1991 年春天基于 MINIX 开发了一个名为 Linux 的操作系统内核。他自己的操作系统内核。 + +[00:21:30] + +Steven Vaughan-Nichols: + +Linus Torvalds 真的只想找点乐子。 + +Saron Yitbarek: + +Steven Vaughan-Nichols 是 ZDNet.com 的特约编辑,而且他从科技行业出现以来就一直在写科技行业相关的内容。 + +Steven Vaughan-Nichols: + +[00:22:00] + +[00:22:30] + +当时有几个类似的操作系统。他最关心的是一个名叫 MINIX 的操作系统,MINIX 旨在让学生学习如何构建操作系统。莱纳斯着到这些,觉得很有趣,但他想建立自己的操作系统。因此它始于赫尔辛基的一个 DIY 项目。一切就这样开始了,基本上就是一个大孩子在玩耍,学习如何做事。但不同之处在于,他足够聪明,足够执着,也足够友好,让所有其他人都参与进来,然后他开始把这个项目进行到底。27 年后,这个项目变得比他想象的要大得多。 + +Saron Yitbarek: + +[00:23:00] + +到 1991 年秋季,Torvalds 发布了 10,000 行代码,世界各地的人们开始提供注释,然后进行优化、添加和修改代码。对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对整个专有系统(微软、苹果和 IBM 在这方面做的非常好)道德上的侮辱。随后这种开放性被奉若神明。Torvalds 将 Linux 置于 GNU 通用公共许可证之下。曾经保障斯托尔曼的 GNU 系统自由的许可证现在也将保障 Linux 的自由。Vaughan-Nichols 解释道,迁移到 incorporate GPL 的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 + +[00:23:30] + +Steven Vaughan-Nichols: + +事实上,根据 Linux 所遵循的许可协议,即 GPL 第 2 版,如果你想把贩卖 Linux 或者向全世界展示它,你必须与它人共享代码,所以如果你对其做了一些改进,仅仅给别人使用是不够的。事实上你必须和他们分享所有这些变化的具体细节。然后,如果这些改进足够好,就会被 Linux 所吸收。 + +Saron Yitbarek: + +[00:24:00] + +事实证明,这种公开的方式极具吸引力。Eric Raymond 是这场运动的早期传道者之一,他在他那篇著名的文章中写道:“微软和苹果这样的公司一直在试图建造软件大教堂,而 Linux 及类似的软件则提供了一个由不同日程和方法组成的巨大集市”集市比大教堂有趣多了。 + +tormy Peters: + +我认为在那个时候,真正吸引人的是人们终于可以把控自己的世界了。 + +Saron Yitbarek: + +Stormy Peters 是一位行业分析师,也是自由和开源软件的倡导者。 + +[00:24:30] + +Stormy Peters: + +[00:25:00] + +开源软件第一次出现的时候,所有的操作系统都是专有的。如果不使用专有软件,你甚至不能添加打印机。您不能添加耳机。你不能自己开发一个小型硬件设备,然后让它在你的笔记本电脑上运行。你甚至不能放入 DVD 并复制它,因为你不能改变软件。即使你拥有这张 DVD,你也无法复制它。你无法控制你购买的硬件/软件系统。你不能从中创造出任何新的、更大的、更好的东西。这就是为什么开源操作系统在一开始是如此重要的原因。我们需要一个开源协作环境,在那里我们可以构建更大更好的东西。 + +Saron Yitbarek: + +[00:25:30] + +请注意,Linux 并不是一个纯粹的平等主义乌托邦。Linus Torvalds 不会批准所有对内核的修改,但是他确实主持内核的变更。他安排了十几个人来管理内核的不同部分。这些人也会信任自己下面的人,以此类推,形成信任金字塔。变化可能来自任何地方,但它们都是经过判断和策划的。 + +[00:26:00] + +然而,考虑到到 Linus 的 DIY 项目一开始是多么的简陋和随意,这项成就令人十分惊讶。他完全不知道自己就是卢克·天行者。当时他只有 21 岁,一半的时间都在编程。但是当魔盒第一次被打开,人们开始给他反馈。几十个,然后几百个,成千上万的贡献者。有了这样的众包基础,Linux 很快就开始成长。真的成长得很快。甚至最终引起了微软的注意。他们的首席执行官 Steve Ballmer 将 Linux 称为是“一种癌症,从知识产权得角度来看,它传染了接触到得任何东西 ”。Steven Levy 将会描述 Ballmer 的由来。 + +Steven Levy: + +[00:26:30] +一旦微软真正巩固了它的垄断地位,而且它也确实被联邦法院判定为垄断,他们将会对任何可能对其构成威胁的事情做出强烈反应。因此,既然他们对软件收费,很自然得,他们将自由软件得出现看成是一种癌症。他们试图提出一个知识产权理论,来解释为什么这对消费者不利。 + +Saron Yitbarek: + +[00:27:00] + +Linux 在不断传播,微软也开始担心起来。到了 2006 年,Linux 成为仅次于 Windows 的第二大常用操作系统,全球约有 5000 名开发人员在使用它。5000 名开发者。还记得比尔·盖茨给苹果公司的备忘录吗?在那份备忘录中,他向苹果公司的员工们论述了与他人合作的重要性。事实证明,开源将把伙伴关系的概念提升到一个全新的水平,这是 Bill Gates 从未预见到的。 + +[00:27:30] + +[00:28:00] + +我们一直在谈论操作系统之间的巨型战斗,但是到目前为止,并没有怎么提到无名英雄和开发者们。在下次得代码英雄中,情况就不同了。第二集讲的是操作系统大战的第二部分,是关于 Linux 崛起的。业界醒悟过来,认识到了开发人员的重要性。这些开源反叛者变得越来越强大,战场从桌面转移到了服务器领域。这里有商业间谍活动、新的英雄人物,还有科技史上最不可能改变的想法。这一切都在操作系统大战的后半集内达到了高潮。 + +[00:28:30] + +要想自动免费获得新一集的代码英雄,请点击订阅苹果播客 、Spotify、 谷歌播放器等其他应用获取播客。在这一季剩下的时间里,我们将参观最新的战场,相互争斗的版图,这里是下一代代码英雄留下印记的地方。更多信息,请访问 redhat.com/commandlineheroes。我是 Saron Yitbarek。下次之前,继续编码。 + + +-------------------------------------------------------------------------------- + +via: https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1 + +作者:[redhat][a] +选题:[lujun9972][b] +译者:[lujun9972](https://github.com/lujun9972) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.redhat.com +[b]: https://github.com/lujun9972 From 4dfead76cc8724b6e357ce6be1a9f7603e6dcc57 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Aug 2019 00:06:02 +0800 Subject: [PATCH 519/951] TSL&PRF --- ...lable vector graphic images with MacSVG.md | 71 ------------------- ...lable vector graphic images with MacSVG.md | 69 ++++++++++++++++++ 2 files changed, 69 insertions(+), 71 deletions(-) delete mode 100644 sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md create mode 100644 translated/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md diff --git a/sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md b/sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md deleted file mode 100644 index 70a2239d71..0000000000 --- a/sources/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md +++ /dev/null @@ -1,71 +0,0 @@ -wxy has applied - -Create animated, scalable vector graphic images with MacSVG -====== - -Open source SVG: The writing is on the wall - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_design_paper_plane_2_0.jpg?itok=xKdP-GWE) - -The Neo-Babylonian regent [Belshazzar][1] did not heed [the writing on the wall][2] that magically appeared during his great feast. However, if he had had a laptop and a good internet connection in 539 BC, he might have staved off those pesky Persians by reading the SVG on the browser. - -Animating text and objects on web pages is a great way to build user interest and engagement. There are several ways to achieve this, such as a video embed, an animated GIF, or a slideshow—but you can also use [scalable vector graphics][3] (SVG). - -An SVG image is different from, say, a JPG, because it is scalable without losing its resolution. A vector image is created by points, not dots, so no matter how large it gets, it will not lose its resolution or pixelate. An example of a good use of scalable, static images would be logos on websites. - -### Move it, move it - -You can create SVG images with several drawing programs, including open source [Inkscape][4] and Adobe Illustrator. Getting your images to “do something” requires a bit more effort. Fortunately, there are open source solutions that would get even Belshazzar’s attention. - -[MacSVG][5] is one tool that will get your images moving. You can find the source code on [GitHub][6]. - -Developed by Douglas Ward of Conway, Arkansas, MacSVG is an “open source Mac OS app for designing HTML5 SVG art and animation,” according to its [website][5]. - -I was interested in using MacSVG to create an animated signature. I admit that I found the process a bit confusing and failed at my first attempts to create an actual animated SVG image. - -![](https://opensource.com/sites/default/files/uploads/macsvg-screen.png) - -It is important to first learn what makes “the writing on the wall” actually write. - -The attribute behind the animated writing is [stroke-dasharray][7]. Breaking the term into three words helps explain what is happening: Stroke refers to the line or stroke you would make with a pen, whether physical or digital. Dash means breaking the stroke down into a series of dashes. Array means producing the whole thing into an array. That’s a simple overview, but it helped me understand what was supposed to happen and why. - -With MacSVG, you can import a graphic (.PNG) and use the pen tool to trace the path of the writing. I used a cursive representation of my first name. Then it was just a matter of applying the attributes to animate the writing, increase and decrease the thickness of the stroke, change its color, and so on. Once completed, the animated writing was exported as an .SVG file and was ready for use on the web. MacSVG can be used for many different types of SVG animation in addition to handwriting. - -### The writing is on the WordPress - -I was ready to upload and share my SVG example on my [WordPress][8] site, but I discovered that WordPress does not allow for SVG media imports. Fortunately, I found a handy plugin: Benbodhi’s [SVG Support][9] allowed a quick, easy import of my SVG the same way I would import a JPG to my Media Library. I was able to showcase my [writing on the wall][10] to Babylonians everywhere. - -I opened the source code of my SVG in [Brackets][11], and here are the results: - -``` - - -Path animation with stroke-dasharrayThis example demonstrates the use of a path element, an animate element, and the stroke-dasharray attribute to simulate drawing. -``` - -What would you use MacSVG for? - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/10/macsvg-open-source-tool-animation - -作者:[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/rikki-endsley -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Belshazzar -[2]: https://en.wikipedia.org/wiki/Belshazzar%27s_feast -[3]: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics -[4]: https://inkscape.org/ -[5]: https://macsvg.org/ -[6]: https://github.com/dsward2/macSVG -[7]: https://gist.github.com/mbostock/5649592 -[8]: https://macharyas.com/ -[9]: https://wordpress.org/plugins/svg-support/ -[10]: https://macharyas.com/index.php/2018/10/14/open-source-svg/ -[11]: http://brackets.io/ diff --git a/translated/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md b/translated/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md new file mode 100644 index 0000000000..f63585d3b1 --- /dev/null +++ b/translated/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md @@ -0,0 +1,69 @@ +使用 MacSVG 创建 SVG 动画 +====== + +> 开源 SVG:墙上的魔法字。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_design_paper_plane_2_0.jpg?itok=xKdP-GWE) + +新巴比伦的摄政王[伯沙撒][1]没有注意到他在盛宴期间神奇地[书写在墙上的文字][2]。但是,如果他在公元前 539 年有一台笔记本电脑和良好的互联网连接,他可能会通过在浏览器上阅读 SVG 来避开那些讨厌的波斯人。 + +出现在网页上的动画文本和对象是建立用户兴趣和参与度的好方法。有几种方法可以实现这一点,例如视频嵌入、动画 GIF 或幻灯片 —— 但你也可以使用[可缩放矢量图形(SVG)][3]。 + +SVG 图像与 JPG 不同,因为它可以缩放而不会丢失其分辨率。矢量图像是由点而不是像素创建的,所以无论它放大到多大,它都不会失去分辨率或像素化。充分利用可缩放的静态图像的一个例子是网站的徽标。 + +### 动起来,动起来 + +你可以使用多种绘图程序创建 SVG 图像,包括开源的 [Inkscape][4] 和 Adobe Illustrator。让你的图像“能动起来”需要更多的努力。幸运的是,有一些开源解决方案甚至可以引起 Belshazzar 的注意。 + +[MacSVG][5] 是一款可以让你的图像动起来的工具。你可以在 [GitHub][6] 上找到源代码。 + +根据其[官网][5]说,MacSVG 由阿肯色州康威的 Douglas Ward 开发,是一个“用于设计 HTML5 SVG 艺术和动画的开源 Mac OS 应用程序”。 + +我想使用 MacSVG 来创建一个动画签名。我承认我发现这个过程有点令人困惑,并且在我第一次尝试创建一个实际的动画 SVG 图像时失败了。 + +![](https://opensource.com/sites/default/files/uploads/macsvg-screen.png) + +重要的是首先要了解要展示的书法内容实际写的是什么。 + +动画文字背后的属性是 [stroke-dasharray][7]。将该术语分成三个单词有助于解释正在发生的事情:“stroke” 是指用笔(无论是物理的笔还是数字化笔)制作的线条或笔画。“dash” 意味着将笔划分解为一系列折线。“array” 意味着将整个东西生成为数组。这是一个简单的概述,但它可以帮助我理解应该发生什么以及为什么。 + +使用 MacSVG,你可以导入图形(.PNG)并使用钢笔工具描绘书写路径。我使用了草书来表示我的名字。然后,只需应用该属性来让书法动画起来、增加和减少笔划的粗细、改变其颜色等等。完成后,动画的书法将导出为 .SVG 文件,并可以在网络上使用。除书写外,MacSVG 还可用于许多不同类型的 SVG 动画。 + +### 在 WordPress 中书写 + +我准备在我的 [WordPress][8] 网站上传和分享我的 SVG 示例,但我发现 WordPress 不允许进行 SVG 媒体导入。幸运的是,我找到了一个方便的插件:Benbodhi 的 [SVG 支持][9]插件允许快速、轻松地导入我的 SVG,就像我将 JPG 导入媒体库一样。我能够在世界各地向巴比伦人展示我[写在墙上的魔法字][10]。 + +我在 [Brackets][11] 中开源了 SVG 的源代码,结果如下: + +``` + + +Path animation with stroke-dasharrayThis example demonstrates the use of a path element, an animate element, and the stroke-dasharray attribute to simulate drawing. +``` + +你会使用 MacSVG 做什么? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/10/macsvg-open-source-tool-animation + +作者:[Jeff Macharyas][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://opensource.com/users/rikki-endsley +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Belshazzar +[2]: https://en.wikipedia.org/wiki/Belshazzar%27s_feast +[3]: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics +[4]: https://inkscape.org/ +[5]: https://macsvg.org/ +[6]: https://github.com/dsward2/macSVG +[7]: https://gist.github.com/mbostock/5649592 +[8]: https://macharyas.com/ +[9]: https://wordpress.org/plugins/svg-support/ +[10]: https://macharyas.com/index.php/2018/10/14/open-source-svg/ +[11]: http://brackets.io/ From 4389a14b5c01531e41261f8883e35b005a10594b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Aug 2019 00:11:55 +0800 Subject: [PATCH 520/951] PUB @wxy https://linux.cn/article-11239-1.html --- ...te animated, scalable vector graphic images with MacSVG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181029 Create animated, scalable vector graphic images with MacSVG.md (96%) diff --git a/translated/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md b/published/20181029 Create animated, scalable vector graphic images with MacSVG.md similarity index 96% rename from translated/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md rename to published/20181029 Create animated, scalable vector graphic images with MacSVG.md index f63585d3b1..601c64ed31 100644 --- a/translated/tech/20181029 Create animated, scalable vector graphic images with MacSVG.md +++ b/published/20181029 Create animated, scalable vector graphic images with MacSVG.md @@ -3,7 +3,7 @@ > 开源 SVG:墙上的魔法字。 -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_design_paper_plane_2_0.jpg?itok=xKdP-GWE) +![](https://img.linux.net.cn/data/attachment/album/201908/18/000809mzl1wb1ww754z455.jpg) 新巴比伦的摄政王[伯沙撒][1]没有注意到他在盛宴期间神奇地[书写在墙上的文字][2]。但是,如果他在公元前 539 年有一台笔记本电脑和良好的互联网连接,他可能会通过在浏览器上阅读 SVG 来避开那些讨厌的波斯人。 @@ -13,7 +13,7 @@ SVG 图像与 JPG 不同,因为它可以缩放而不会丢失其分辨率。 ### 动起来,动起来 -你可以使用多种绘图程序创建 SVG 图像,包括开源的 [Inkscape][4] 和 Adobe Illustrator。让你的图像“能动起来”需要更多的努力。幸运的是,有一些开源解决方案甚至可以引起 Belshazzar 的注意。 +你可以使用多种绘图程序创建 SVG 图像,包括开源的 [Inkscape][4] 和 Adobe Illustrator。让你的图像“能动起来”需要更多的努力。幸运的是,有一些开源解决方案甚至可以引起伯沙撒的注意。 [MacSVG][5] 是一款可以让你的图像动起来的工具。你可以在 [GitHub][6] 上找到源代码。 From f61d6e66df25030a569606be2bff5c9fcf12854d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 18 Aug 2019 00:52:37 +0800 Subject: [PATCH 521/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190817=20GNOME?= =?UTF-8?q?=20and=20KDE=20team=20up=20on=20the=20Linux=20desktop,=20docs?= =?UTF-8?q?=20for=20Nvidia=20GPUs=20open=20up,=20a=20powerful=20new=20way?= =?UTF-8?q?=20to=20scan=20for=20firmware=20vulnerabilities,=20and=20more?= =?UTF-8?q?=20news?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md --- ...firmware vulnerabilities, and more news.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md diff --git a/sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md b/sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md new file mode 100644 index 0000000000..90c959a106 --- /dev/null +++ b/sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news) +[#]: via: (https://opensource.com/article/19/8/news-august-17) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) + +GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news +====== +Catch up on the biggest open source headlines from the past two weeks. +![Weekly news roundup with TV][1] + +In this edition of our open source news roundup, we take a look two new powerful data visualization tools, Nvidia open sourcing GPU documentation, exciting new tooling to secure firmware for self-driving cars, and more! + +### GNOME and KDE partner on the Linux Desktop + +Linux on desktop computers has been a space of fragmentation. In a recent [announcement][2], "the two chief Linux desktop rivals, [GNOME Foundation][3] and [KDE][4], have agreed to work together." + +Both organizations will be sponsors of [Linux App Summit (LAS) 2019][5] in Barcelona this November. This move, in part, appears to be in response to desktop computing no longer being the best place to fight for dominance. No matter the reason, Linux desktop fans have a new reason to hope for a future where there is a standardized GUI environment.  + +### New open source data visualization tools + +There's very little in the world that isn't driven by data. Unless that data is in a shape that people can interact with, it's not much good. Two data visualization projects that were recently open sourced are trying to make data a little more useful. + +The first tool, called **Neuroglancer**, was created by [a research team at Google][6]. It "enables neurologists to build 3D models of a brain’s neural pathways in interactive visualisations." Neuroglancer does that by using a neural network to trace paths of neurons in a brain and build a complete visualization. Scientists have already used Neuroglancer, which you can [grab off GitHub][7], to build an interactive map from scans of a fruit fly's brain. + +The second tool comes from an unlikely source: the Australian Signals Directorate. That's the country's analog to the NSA, which "open sourced one of its [in-house data visualisation and analysis tools][8]." Called **[Constellation][9]**, it can "identify trends and patterns in complex datasets, and is capable of scaling to 'billions of inputs'." Mike Burgess, the agency's Director General, said that he hopes "this tool will help generate scientific and other breakthroughs that will benefit all Australians." Given it is open source, it could benefit the whole world. + +### Nvidia begins releasing GPU documentation + +Over the years, graphics processing unit (GPU) maker Nvidia hasn't made it easy for open source projects to develop drivers for its wares. The company took a big step towards making nice with those projects by [publishing GPU hardware documentation.][10] + +The documentation, which the company is releasing under an MIT license, is [available on GitHub][11]. It covers several key areas — like device initialization, memory clocking/tweaking, and power states. According to hardware news site Phoronix, the Nouveau project (which develops open source drivers for Nvidia GPUs) will be the among the first to use this documentation to boost its development efforts. + +### New tool for securing firmware + +It seems as if every week there's news of a new vulnerability in a mobile device or an internet-connected gadget. Often, those vulnerabilities are found in the firmware that controls a device. Self-driving car service Cruise has [released an open source tool][12] for catching those vulnerabilities before they become a problem. + +That tool is called [FwAnalzyer][13]. It checks firmware code for a number of potential problems, including "identify(ing) potentially dangerous executables," and pinpointing "any debugging code that was mistakenly left behind." Collin Mulliner, an engineer at Cruise who helped develop the tool, said that by running FwAnalyzer over their code, firmware developers "now have the ability to detect and prevent a wide variety of security issues." + +#### In other news + + * [Why Los Angeles decided to open source its future][14] + * [The MIT Press releases a comprehensive report on open-source publishing software][15] + * [Huawei unveils Harmony operating system, won't ditch Android for smartphones][16] + + + +*Thanks, as always, to Opensource.com staff members and moderators for their help this week. * + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/news-august-17 + +作者:[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/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV) +[2]: https://www.zdnet.com/article/gnome-and-kde-work-together-on-the-linux-desktop/ +[3]: https://www.gnome.org/ +[4]: https://kde.org/ +[5]: https://linuxappsummit.org/ +[6]: https://www.cbronline.com/news/brain-mapping-google-ai +[7]: https://github.com/google/neuroglancer +[8]: https://www.computerworld.com.au/article/665286/australian-signals-directorate-open-sources-data-analysis-tool/ +[9]: https://www.constellation-app.com/ +[10]: https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-Open-GPU-Docs +[11]: https://github.com/nvidia/open-gpu-doc +[12]: https://arstechnica.com/information-technology/2019/08/self-driving-car-service-open-sources-new-tool-for-securing-firmware/ +[13]: https://github.com/cruise-automation/fwanalyzer +[14]: https://www.techrepublic.com/article/why-la-decided-to-open-source-its-future/ +[15]: https://news.mit.edu/2019/mit-press-report-open-source-publishing-software-0808 +[16]: https://www.itnews.com.au/news/huawei-unveils-harmony-operating-system-wont-ditch-android-for-smartphones-529432 From e62b9d141f7d718347a22b08d305d08612d94a2b Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 18 Aug 2019 08:43:03 +0800 Subject: [PATCH 522/951] Rename sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md to sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md --- ...new way to scan for firmware vulnerabilities, and more news.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md (100%) diff --git a/sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md b/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md similarity index 100% rename from sources/tech/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md rename to sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md From a76f8a9aef7cfb7372baa869da0644a4e3e7dfdb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Aug 2019 08:52:14 +0800 Subject: [PATCH 523/951] APL --- ...w way to scan for firmware vulnerabilities, and more news.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md b/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md index 90c959a106..90b021e96a 100644 --- a/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md +++ b/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4b755e0cee8853d6a72313e4cfe1b150d5820df4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Aug 2019 10:39:01 +0800 Subject: [PATCH 524/951] TSL&PRF @wxy --- ...firmware vulnerabilities, and more news.md | 81 ------------------- ...firmware vulnerabilities, and more news.md | 81 +++++++++++++++++++ 2 files changed, 81 insertions(+), 81 deletions(-) delete mode 100644 sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md create mode 100644 translated/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md diff --git a/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md b/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md deleted file mode 100644 index 90b021e96a..0000000000 --- a/sources/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news) -[#]: via: (https://opensource.com/article/19/8/news-august-17) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news -====== -Catch up on the biggest open source headlines from the past two weeks. -![Weekly news roundup with TV][1] - -In this edition of our open source news roundup, we take a look two new powerful data visualization tools, Nvidia open sourcing GPU documentation, exciting new tooling to secure firmware for self-driving cars, and more! - -### GNOME and KDE partner on the Linux Desktop - -Linux on desktop computers has been a space of fragmentation. In a recent [announcement][2], "the two chief Linux desktop rivals, [GNOME Foundation][3] and [KDE][4], have agreed to work together." - -Both organizations will be sponsors of [Linux App Summit (LAS) 2019][5] in Barcelona this November. This move, in part, appears to be in response to desktop computing no longer being the best place to fight for dominance. No matter the reason, Linux desktop fans have a new reason to hope for a future where there is a standardized GUI environment.  - -### New open source data visualization tools - -There's very little in the world that isn't driven by data. Unless that data is in a shape that people can interact with, it's not much good. Two data visualization projects that were recently open sourced are trying to make data a little more useful. - -The first tool, called **Neuroglancer**, was created by [a research team at Google][6]. It "enables neurologists to build 3D models of a brain’s neural pathways in interactive visualisations." Neuroglancer does that by using a neural network to trace paths of neurons in a brain and build a complete visualization. Scientists have already used Neuroglancer, which you can [grab off GitHub][7], to build an interactive map from scans of a fruit fly's brain. - -The second tool comes from an unlikely source: the Australian Signals Directorate. That's the country's analog to the NSA, which "open sourced one of its [in-house data visualisation and analysis tools][8]." Called **[Constellation][9]**, it can "identify trends and patterns in complex datasets, and is capable of scaling to 'billions of inputs'." Mike Burgess, the agency's Director General, said that he hopes "this tool will help generate scientific and other breakthroughs that will benefit all Australians." Given it is open source, it could benefit the whole world. - -### Nvidia begins releasing GPU documentation - -Over the years, graphics processing unit (GPU) maker Nvidia hasn't made it easy for open source projects to develop drivers for its wares. The company took a big step towards making nice with those projects by [publishing GPU hardware documentation.][10] - -The documentation, which the company is releasing under an MIT license, is [available on GitHub][11]. It covers several key areas — like device initialization, memory clocking/tweaking, and power states. According to hardware news site Phoronix, the Nouveau project (which develops open source drivers for Nvidia GPUs) will be the among the first to use this documentation to boost its development efforts. - -### New tool for securing firmware - -It seems as if every week there's news of a new vulnerability in a mobile device or an internet-connected gadget. Often, those vulnerabilities are found in the firmware that controls a device. Self-driving car service Cruise has [released an open source tool][12] for catching those vulnerabilities before they become a problem. - -That tool is called [FwAnalzyer][13]. It checks firmware code for a number of potential problems, including "identify(ing) potentially dangerous executables," and pinpointing "any debugging code that was mistakenly left behind." Collin Mulliner, an engineer at Cruise who helped develop the tool, said that by running FwAnalyzer over their code, firmware developers "now have the ability to detect and prevent a wide variety of security issues." - -#### In other news - - * [Why Los Angeles decided to open source its future][14] - * [The MIT Press releases a comprehensive report on open-source publishing software][15] - * [Huawei unveils Harmony operating system, won't ditch Android for smartphones][16] - - - -*Thanks, as always, to Opensource.com staff members and moderators for their help this week. * - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/news-august-17 - -作者:[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/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV) -[2]: https://www.zdnet.com/article/gnome-and-kde-work-together-on-the-linux-desktop/ -[3]: https://www.gnome.org/ -[4]: https://kde.org/ -[5]: https://linuxappsummit.org/ -[6]: https://www.cbronline.com/news/brain-mapping-google-ai -[7]: https://github.com/google/neuroglancer -[8]: https://www.computerworld.com.au/article/665286/australian-signals-directorate-open-sources-data-analysis-tool/ -[9]: https://www.constellation-app.com/ -[10]: https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-Open-GPU-Docs -[11]: https://github.com/nvidia/open-gpu-doc -[12]: https://arstechnica.com/information-technology/2019/08/self-driving-car-service-open-sources-new-tool-for-securing-firmware/ -[13]: https://github.com/cruise-automation/fwanalyzer -[14]: https://www.techrepublic.com/article/why-la-decided-to-open-source-its-future/ -[15]: https://news.mit.edu/2019/mit-press-report-open-source-publishing-software-0808 -[16]: https://www.itnews.com.au/news/huawei-unveils-harmony-operating-system-wont-ditch-android-for-smartphones-529432 diff --git a/translated/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md b/translated/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md new file mode 100644 index 0000000000..32d8351276 --- /dev/null +++ b/translated/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news) +[#]: via: (https://opensource.com/article/19/8/news-august-17) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) + +开源新闻综述:GNOME 和 KDE 达成合作、Nvidia 开源 GPU 文档 +====== + +> 不要错过两周以来最大的开源头条新闻。 + +![Weekly news roundup with TV][1] + +在本期开源新闻综述中,我们将介绍两种新的强大数据可视化工具、Nvidia 开源其 GPU 文档、激动人心的新工具、确保自动驾驶汽车的固件安全等等! + +### GNOME 和 KDE 在 Linux 桌面上达成合作伙伴 + +Linux 在桌面计算机上一直处于分裂状态。在最近的一篇[公告][2]中称,“两个主要的 Linux 桌面竞争对手,[GNOME 基金会][3] 和 [KDE][4] 已经同意合作。” + +这两个组织将成为今年 11 月在巴塞罗那举办的 [Linux App Summit(LAS)2019][5] 的赞助商。这一举措在某种程度上似乎是对桌面计算不再是争夺支配地位的最佳场所的回应。无论是什么原因,Linux 桌面的粉丝们都有新的理由希望未来出现一个标准化的 GUI 环境。 + +### 新的开源数据可视化工具 + +这个世界上很少有不是由数据驱动的。除非数据以人们可以互动的形式出现,否则它并不是很好使用。最近开源的两个数据可视化项目正在尝试使数据更有用。 + +第一个工具名为 **Neuroglancer**,由 [Google 的研究团队][6]创建。它“使神经科医生能够在交互式可视化中建立大脑神经通路的 3D 模型。”Neuroglancer 通过使用神经网络追踪大脑中的神经元路径并构建完整的可视化来实现这一点。科学家已经使用了 Neuroglancer(你可以[从 GitHub 取得][7])通过扫描果蝇的大脑来建立一个交互式地图。 + +第二个工具来自一个不太能想到的的来源:澳大利亚信号理事会。这是该国家类似 NSA 的机构,它“开源了[内部数据可视化和分析工具][8]之一。”这个被称为 **[Constellation][9]** 的工具可以“识别复杂数据集中的趋势和模式,并且能够扩展到‘数十亿输入’。”该机构总干事迈克•伯吉斯表示,他希望“这一工具将有助于产生有利于所有澳大利亚人的科学和其他方面的突破。”鉴于它是开源的,它可以使整个世界受益。 + +### Nvidia 开始发布 GPU 文档 + +多年来,图形处理单元(GPU)制造商 Nvidia 并没有做出什么让开源项目轻松开发其产品的驱动程序的努力。现在,该公司通过[发布 GPU 硬件文档][10]向这些项目迈出了一大步。 + +该公司根据 MIT 许可证发布的文档[可在 GitHub 上获取][11]。它涵盖了几个关键领域,如设备初始化、内存时钟/调整和电源状态。据硬件新闻网站 Phoronix 称,开发了 Nvidia GPU 的开源驱动程序的 Nouveau 项目将是率先使用该文档来推动其开发工作的项目之一。 + +### 用于保护固件的新工具 + +似乎每周都有的消息称,移动设备或连接互联网的小设备中出现新漏洞。通常,这些漏洞存在于控制设备的固件中。自动驾驶汽车服务 Cruise [发布了一个开源工具][12],用于在这些漏洞成为问题之前捕获这些漏洞。 + +该工具被称为 [FwAnalzyer][13]。它检查固件代码中是否存在许多潜在问题,包括“识别潜在危险的可执行文件”,并查明“任何错误遗留的调试代码”。Cruise 的工程师 Collin Mulliner 曾帮助开发该工具,他说通过在代码上运行 FwAnalyzer,固件开发人员“现在能够检测并防止各种安全问题。” + +### 其它新闻 + +* [为什么洛杉矶决定将未来寄予开源][14] +* [麻省理工学院出版社发布了关于开源出版软件的综合报告][15] +* [华为推出鸿蒙操作系统,不会放弃 Android 智能手机][16] + +*一如既往地感谢 Opensource.com 的工作人员和主持人本周的帮助。* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/news-august-17 + +作者:[Scott Nesbitt][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://opensource.com/users/scottnesbitt +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV) +[2]: https://www.zdnet.com/article/gnome-and-kde-work-together-on-the-linux-desktop/ +[3]: https://www.gnome.org/ +[4]: https://kde.org/ +[5]: https://linuxappsummit.org/ +[6]: https://www.cbronline.com/news/brain-mapping-google-ai +[7]: https://github.com/google/neuroglancer +[8]: https://www.computerworld.com.au/article/665286/australian-signals-directorate-open-sources-data-analysis-tool/ +[9]: https://www.constellation-app.com/ +[10]: https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-Open-GPU-Docs +[11]: https://github.com/nvidia/open-gpu-doc +[12]: https://arstechnica.com/information-technology/2019/08/self-driving-car-service-open-sources-new-tool-for-securing-firmware/ +[13]: https://github.com/cruise-automation/fwanalyzer +[14]: https://www.techrepublic.com/article/why-la-decided-to-open-source-its-future/ +[15]: https://news.mit.edu/2019/mit-press-report-open-source-publishing-software-0808 +[16]: https://www.itnews.com.au/news/huawei-unveils-harmony-operating-system-wont-ditch-android-for-smartphones-529432 From 9fdb71511edf141b7fb04496de3fa5ebeb2af0f2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Aug 2019 10:47:43 +0800 Subject: [PATCH 525/951] PUB @wxy https://linux.cn/article-11241-1.html --- ...way to scan for firmware vulnerabilities, and more news.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md (98%) diff --git a/translated/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md b/published/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md similarity index 98% rename from translated/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md rename to published/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md index 32d8351276..b0093ff375 100644 --- a/translated/news/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md +++ b/published/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11241-1.html) [#]: subject: (GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news) [#]: via: (https://opensource.com/article/19/8/news-august-17) [#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) From ae33c8bc699e15ac9d20f0f1e98974c3aa7c9bf3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Aug 2019 11:15:51 +0800 Subject: [PATCH 526/951] PRF @MjSeven --- ...ux Package Version Before Installing It.md | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md b/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md index 9d05794c2b..d75d7f5b2e 100644 --- a/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md +++ b/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Check Linux Package Version Before Installing It) @@ -12,13 +12,13 @@ ![Check Linux Package Version][1] -大多数人都知道如何在 Linux 中[**查找已安装软件包的版本**][2],但是,你会如何查找那些最初没有安装的软件包的版本呢?这些都不是问题!本文将介绍在 Debian 及其衍生产品(如 Ubuntu)中,如何在软件包安装之前检查它的版本。对于那些想在安装之前知道软件包版本的人来说,这个小技巧可能会有所帮助。 +大多数人都知道如何在 Linux 中[查找已安装软件包的版本][2],但是,你会如何查找那些还没有安装的软件包的版本呢?很简单!本文将介绍在 Debian 及其衍生品(如 Ubuntu)中,如何在软件包安装之前检查它的版本。对于那些想在安装之前知道软件包版本的人来说,这个小技巧可能会有所帮助。 ### 在安装之前检查 Linux 软件包版本 在基于 DEB 的系统中,即使软件包还没有安装,也有很多方法可以查看他的版本。接下来,我将一一介绍。 -##### 方法 1 – 使用 Apt +#### 方法 1 – 使用 Apt 检查软件包的版本的懒人方法: @@ -67,11 +67,11 @@ Description: Vi IMproved - enhanced vi editor N: There is 1 additional record. Please use the '-a' switch to see it ``` -正如你在上面的输出中看到的,"apt show" 命令显示了软件包许多重要的细节,例如: +正如你在上面的输出中看到的,`apt show` 命令显示了软件包许多重要的细节,例如: 1. 包名称, 2. 版本, - 3. 来源(vim 的来源), + 3. 来源(vim 来自哪里), 4. 维护者, 5. 包的主页, 6. 依赖, @@ -79,10 +79,9 @@ N: There is 1 additional record. Please use the '-a' switch to see it 8. 简介, 9. 其他。 +因此,Ubuntu 仓库中可用的 Vim 版本是 **8.0.1453**。如果我把它安装到我的 Ubuntu 系统上,就会得到这个版本。 -因此,Ubuntu 仓库中可用的 Vim 版本是 **8.0.1453**。如果我把它我的 Ubuntu 系统上,就会得到这个版本。 - -或者,如果你不想看那么多的内容,那么可以使用 **"apt policy"**这个命令: +或者,如果你不想看那么多的内容,那么可以使用 `apt policy` 这个命令: ``` $ apt policy vim @@ -106,11 +105,11 @@ vim/bionic-updates,bionic-security 2:8.0.1453-1ubuntu1.1 amd64 N: There is 1 additional version. Please use the '-a' switch to see it ``` -**Apt** 是 Ubuntu 最新版本的默认包管理器。因此,这个命令足以找到一个软件包的详细信息,给定的软件包是否安装并不重要。这个命令将简单地列出给定包的版本以及其他详细信息。 +`apt` 是 Ubuntu 最新版本的默认包管理器。因此,这个命令足以找到一个软件包的详细信息,给定的软件包是否安装并不重要。这个命令将简单地列出给定包的版本以及其他详细信息。 -##### 方法 2 – 使用 Apt-get +#### 方法 2 – 使用 Apt-get -要查看软件包的版本而不安装它,我们可以使用 **apt-get** 命令和 **-s** 选项。 +要查看软件包的版本而不安装它,我们可以使用 `apt-get` 命令和 `-s` 选项。 ``` $ apt-get -s install vim @@ -135,17 +134,17 @@ Inst vim (2:8.0.1453-1ubuntu1.1 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic Conf vim (2:8.0.1453-1ubuntu1.1 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64]) ``` -这里,-s 选项代表 **模拟**。正如你在输出中看到的,它不执行任何操作。相反,它只是模拟执行,好让你知道在安装 Vim 是会发生什么。 +这里,`-s` 选项代表 **模拟**。正如你在输出中看到的,它不执行任何操作。相反,它只是模拟执行,好让你知道在安装 Vim 时会发生什么。 -你可以将 "install" 选项替换为 "upgrade",以查看升级包时会发生什么。 +你可以将 `install` 选项替换为 `upgrade`,以查看升级包时会发生什么。 ``` $ apt-get -s upgrade vim ``` -##### 方法 3 – 使用 Aptitude +#### 方法 3 – 使用 Aptitude -在 Debian 及其衍生品中,**aptitude** 是一个基于 ncurses(LCTT 译者注:ncurses 是终端基于文本的字符处理的库)和命令行的前端 APT 包管理器。 +在 Debian 及其衍生品中,`aptitude` 是一个基于 ncurses(LCTT 译注:ncurses 是终端基于文本的字符处理的库)和命令行的前端 APT 包管理器。 使用 aptitude 来查看软件包的版本,只需运行: @@ -155,7 +154,7 @@ p 2:8.0.1453-1ubuntu1 p 2:8.0.1453-1ubuntu1.1 bionic-security,bionic-updates 500 ``` -你还可以使用模拟选项(**-s**)来查看安装或升级包时会发生什么。 +你还可以使用模拟选项(`-s`)来查看安装或升级包时会发生什么。 ``` $ aptitude -V -s install vim @@ -166,25 +165,25 @@ Need to get 1,152 kB of archives. After unpacking 2,852 kB will be used. Would download/install/remove packages. ``` -这里,**-V** 标志用于显示软件包的详细信息。 +这里,`-V` 标志用于显示软件包的详细信息。 ``` $ aptitude -V -s upgrade vim ``` -类似的,只需将 "install" 替换为 "upgrade" 选项,即可查看升级包会发生什么。 +类似的,只需将 `install` 替换为 `upgrade` 选项,即可查看升级包会发生什么。 + ``` $ aptitude search vim -F "%c %p %d %V" ``` 这里, - * **-F** 用于指定应使用哪种格式来显示输出, - * **%c** – 包的状态(已安装或未安装), - * **%p** – 包的名称, - * **%d** – 包的简介, - * **%V** – 包的版本。 - + * `-F` 用于指定应使用哪种格式来显示输出, + * `%c` – 包的状态(已安装或未安装), + * `%p` – 包的名称, + * `%d` – 包的简介, + * `%V` – 包的版本。 当你不知道完整的软件包名称时,这非常有用。这个命令将列出包含给定字符串(即 vim)的所有软件包。 @@ -202,9 +201,9 @@ p vim-voom Vim two-pane out p vim-youcompleteme fast, as-you-type, fuzzy-search code completion engine for Vim 0+20161219+git ``` -##### 方法 4 – 使用 Apt-cache +#### 方法 4 – 使用 Apt-cache -**Apt-cache** 命令用于查询基于 Debian 的系统中的 APT 缓存。对于要在 APT 的包缓存上执行很多操作时,它很有用。一个很好的例子是我们可以从[**某个仓库或 ppa 中列出已安装的应用程序**][3]。 +`apt-cache` 命令用于查询基于 Debian 的系统中的 APT 缓存。对于要在 APT 的包缓存上执行很多操作时,它很有用。一个很好的例子是我们可以从[某个仓库或 ppa 中列出已安装的应用程序][3]。 不仅是已安装的应用程序,我们还可以找到软件包的版本,即使它没有被安装。例如,以下命令将找到 Vim 的版本: @@ -228,11 +227,12 @@ vim: 正如你在上面的输出中所看到的,Vim 并没有安装。如果你想安装它,你会知道它的版本是 **8.0.1453**。它还显示 vim 包来自哪个仓库。 -##### 方法 5 – 使用 Apt-show-versions +#### 方法 5 – 使用 Apt-show-versions -在 Debian 和基于 Debian 的系统中,**apt-show-versions** 命令用于列出已安装和可用软件包的版本。它还显示所有可升级软件包的列表。如果你有一个混合的稳定或测试环境,这是非常方便的。例如,如果你同时启用了稳定和测试仓库,那么你可以轻松地从测试库找到应用程序列表,还可以升级测试库中的所有软件包。 +在 Debian 和基于 Debian 的系统中,`apt-show-versions` 命令用于列出已安装和可用软件包的版本。它还显示所有可升级软件包的列表。如果你有一个混合的稳定或测试环境,这是非常方便的。例如,如果你同时启用了稳定和测试仓库,那么你可以轻松地从测试库找到应用程序列表,还可以升级测试库中的所有软件包。 + +默认情况下系统没有安装 `apt-show-versions`,你需要使用以下命令来安装它: -默认情况下系统没有安装 apt-show-versions,你需要使用以下命令来安装它: ``` $ sudo apt-get install apt-show-versions ``` @@ -247,9 +247,9 @@ vim:amd64 2:8.0.1453-1ubuntu1.1 bionic-updates archive.ubuntu.com vim:amd64 not installed ``` -这里,**-a** 选项打印给定软件包的所有可用版本。 +这里,`-a` 选项打印给定软件包的所有可用版本。 -如果已经安装了给定的软件包,那么就不需要使用 **-a** 选项呢。在这种情况下,只需运行: +如果已经安装了给定的软件包,那么就不需要使用 `-a` 选项。在这种情况下,只需运行: ``` $ apt-show-versions vim @@ -264,7 +264,7 @@ via: https://www.ostechnix.com/how-to-check-linux-package-version-before-install 作者:[sk][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 5e6fe554a29814fd2c7ddecd8d092327d502e8e7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Aug 2019 11:16:19 +0800 Subject: [PATCH 527/951] PUB @MjSeven https://linux.cn/article-11243-1.html --- ...How To Check Linux Package Version Before Installing It.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190617 How To Check Linux Package Version Before Installing It.md (99%) diff --git a/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md b/published/20190617 How To Check Linux Package Version Before Installing It.md similarity index 99% rename from translated/tech/20190617 How To Check Linux Package Version Before Installing It.md rename to published/20190617 How To Check Linux Package Version Before Installing It.md index d75d7f5b2e..574b0bb031 100644 --- a/translated/tech/20190617 How To Check Linux Package Version Before Installing It.md +++ b/published/20190617 How To Check Linux Package Version Before Installing It.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11243-1.html) [#]: subject: (How To Check Linux Package Version Before Installing It) [#]: via: (https://www.ostechnix.com/how-to-check-linux-package-version-before-installing-it/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From 2bb01f83b60263a621a94419523d265388a5392e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 00:44:38 +0800 Subject: [PATCH 528/951] PRF PART --- ... Command Line Heroes- Season 1- OS Wars.md | 140 ++++-------------- 1 file changed, 28 insertions(+), 112 deletions(-) diff --git a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index f795de7baa..2479ba1024 100644 --- a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -1,150 +1,66 @@ [#]: collector: (lujun9972) [#]: translator: (lujun9972) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Command Line Heroes: Season 1: OS Wars) [#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) [#]: author: (redhat https://www.redhat.com) -Command Line Heroes: Season 1: OS Wars +代码英雄 第一季:操作系统战争(上) ====== -Saron Yitbarek: -有些故事如史诗般,惊险万分,在我脑海中似乎出现了星球大战电影开头的爬行文字。你知道的,就像- +Saron Yitbarek:有些故事如史诗般,惊险万分,在我脑海中似乎出现了星球大战电影开头的爬行文字。你知道的,就像—— -Voice Actor: +配音:“第一集,操作系统大战” -第一集,操作系统大战。 +Saron Yitbarek:是的,就像那样子。 -Saron Yitbarek: +配音:这是一个局势紧张加剧的时期。比尔·盖茨Bill Gates史蒂夫·乔布斯Steve Jobs的帝国发起了一场无可避免的专有软件之战。[00:00:30] 盖茨与 IBM 结成了强大的联盟,而乔布斯则拒绝了对它的硬件和操作系统开放授权。他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时,这些帝王们所不知道的偏远之地,开源的反叛者们开始集聚。 -是的,就像那样子。 +Saron Yitbarek:好吧。这也许有点戏剧性,但当我们谈论上世纪八九十年代和 2000 年代的操作系统之争时,这也不算言过其实。[00:01:00] 确实曾经发生过一场史诗级的统治之战。史蒂夫·乔布斯和比尔·盖茨确实掌握着数十亿人的命运。掌控了操作系统,你就掌握了绝大多数人使用计算机的方式、互相通讯的方式、获取信息的方式。我可以一直罗列下去,不过你知道我的意思。掌握了操作系统,你就是帝王。 -Voice Actor: +我是 Saron Yitbarek,你现在收听的是代码英雄,一款红帽公司原创的博客节目。[00:01:30] 你问,什么是代码英雄Command Line Hero?嗯,如果你愿意创造而不仅仅是使用,如果你相信开发者拥有构建美好未来的能力,如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界,那么你,我的朋友,就是一位代码英雄。在本系列节目中,我们将为你带来那些“白码起家”(LCTT 译注:原文是 “from the command line up”,应该是演绎自 “from the ground up”——白手起家)改变技术的程序员故事。[00:02:00] 那么我是谁,凭什么指导你踏上这段艰苦的旅程?Saron Yitbarek 是哪根葱?嗯,事实上我觉得我跟你差不多。我是一名面向初学者的开发人员,我做的任何事都依赖于开源软件,我的世界就是如此。通过在博客中讲故事,我可以跳出无聊的日常工作,鸟瞰全景,希望这对你也一样有用。 -[00:00:30] +我迫不及待地想知道,开源技术从何而来?我的意思是,我对林纳斯·托瓦兹Linus Torvalds和 Linux^® 的荣耀有一些了解,[00:02:30] 我相信你也一样,但是说真的,开源并不是一开始就有的,对吗?如果我像发自内心的感激这些最新、最棒的技术,比如 DevOps 和容器之类的,我感觉我对那些早期的开发者缺乏了解,我有必要了解这些东西来自何处。所以,让我们暂时先不用担心内存泄露和缓冲溢出。我们的旅程将从操作系统之战开始,这是一场波澜壮阔的桌面控制之战。[00:03:00] 这场战争亘古未有,因为:首先,在计算机时代,大公司拥有指数级的规模优势;其次,从未有过这么一场控制争夺战是如此变化多端。比尔·盖茨和史蒂夫·乔布斯? 他们也不知道结果会如何,但是到目前为止,这个故事进行到一半的时候,他们所争夺的所有东西都将发生改变、进化,最终上升到云端。 -当前形势比较紧张。Bill Gates 与 Steve Jobs 的帝国发起了一场无可避免的专有软件之战。Gates 与 IBM 结成了强大的联盟,而 Jobs 拒绝对它的硬件和操作系统开放授权。他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时,帝王所不知道的是,在偏远之地,开源的反叛者们开始集聚。 +[00:03:30] 好的,让我们回到 1983 年的秋季。还有六年我才出生。那时候的总统还是罗纳德·里根Ronald Reagan,美国和苏联扬言要把地球拖入核战争之中。在檀香山(火奴鲁鲁)的市政中心正在举办一年一度的苹果公司销售会议。一群苹果公司的员工正在等待史蒂夫·乔布斯上台。他 28 岁,热情洋溢,看起来非常自信。乔布斯很严肃地对着麦克风说他邀请了三个行业专家来就软件进行了一次小组讨论。[00:04:00] 然而随后发生的事情你肯定想不到。超级俗气的 80 年代音乐响彻整个房间。一堆多彩灯管照亮了舞台,然后一个播音员的声音响起- -Saron Yitbarek: +配音:女士们,先生们,现在是麦金塔软件的约会游戏。 -[00:01:00] +Saron Yitbarek:乔布斯的脸上露出一个大大的笑容,台上有三个 CEO 都需要轮流向他示好。这基本上就是 80 年代钻石王老五,不过是科技界的。[00:04:30] 两个软件大佬讲完话后,然后就轮到第三个人讲话了。仅此而已不是吗?是的。新面孔比尔·盖茨带着一个大大的遮住了半张脸的方框眼镜。他宣称在 1984 年,微软的一半收入将来自于麦金塔软件。他的这番话引来了观众热情的掌声。[00:05:00] 但是他们不知道的是,在一个月后,比尔·盖茨将会宣布发布 Windows 1.0 的计划。你永远也猜不到乔布斯正在跟苹果未来最大的敌人打情骂俏。但微软和苹果即将经历科技史上最糟糕的婚礼。他们会彼此背叛、相互毁灭,但又深深地、痛苦地捆绑在一起。 -好吧。这也许有点戏剧性,但当我们谈论 80 年代,90 年代和 00 年代的操作系统之争时,这也不算言过其实。确实曾经发生过一场史诗级的通知之战。Steve Jobs 和 Bill Gates 确实掌握着数十亿美元的命运。掌控了操作系统,你就掌握了绝大多数人使用计算机的方式,我们互相通讯的方式,我们获取信息的方式。我可以一直罗列下去,不过你知道我的意思。掌握了操作系统,你就是帝王。 +James Allworth:[00:05:30] 我猜从哲学上来讲,一个更理想化、注重用户体验高于一切,是一个一体化的组织,而微软则更务实,更模块化 —— -[00:01:30] +Saron Yitbarek:这位是 James Allworth。他是一位多产的科技作家,曾在苹果零售的企业团队工作。注意他给出的苹果的定义,一个一体化的组织,那种只对自己负责的公司,一个不想依赖别人的公司,这是关键。 -我是 Saron Yitbarek,你现在收听的是代码英雄,一款红帽公司原创的博客节目。你问,什么是代码英雄?嗯,如果你创造而不仅仅是使用,如果你相信开发者拥有构建美好未来的能力,如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界,那么你,我的朋友,就是代码英雄。在本系列节目中,我们将为你带来那些"白码起家(原文是 from the command line up,应该是改编自 from the ground up)" 改变技术的程序员故事。那么我是谁,凭什么指导你踏上这段艰苦的旅程?Saron Yitbarek 是哪根葱?嗯,事实上我觉得我跟你差不多。我是一名面向初学者的开发人员,我做的任何事都依赖于开源软件。这是我的世界。通过在博客中讲故事,我可以跳出无聊的日常工作,看清大局。希望它对你也一样有用。 +James Allworth:[00:06:00] 苹果是一家一体化的公司,它希望专注于令人愉悦的用户体验,这意味着它希望控制整个技术栈以及交付的一切内容:从硬件到操作系统,甚至运行在操作系统上的应用程序。当新的创新、重要的创新刚刚进入市场,而你需要横跨软硬件,并且能够根据自己意愿和软件的革新来改变硬件时,这是一个优势。例如 ——, -[00:02:00] +Saron Yitbarek:[00:06:30] 很多人喜欢这种一体化的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。让我们回到檀香山的销售会议上,在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想乔治·奥威尔George Orwell的 《一九八四》。在这个冰冷、灰暗的世界里,无意识的机器人正在独裁者的投射凝视下徘徊。[00:07:00] 这些机器人就像是 IBM 的用户们。然后,代表苹果公司的漂亮而健美的安娅·梅杰Anya Major穿着鲜艳的衣服跑过大厅。她向着大佬们的屏幕猛地投出大锤,将它砸成了碎片。老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍麦金塔了。 +配音:这就是为什么现实中的 1984 跟小说《一九八四》不一样了。 -[00:02:30] +Saron Yitbarek:是的,现在回顾那则广告,认为苹果是一个致力于解放大众的自由斗士的想法有点过分了。但这件事触动了我的神经。[00:07:30] Ken Segal 曾在为苹果制作这则广告的广告公司工作过。在早期,他为史蒂夫·乔布斯做了十多年的广告。 -[00:03:00] +Ken Segal:1984 这则广告的风险很大。事实上,它的风险太大,以至于苹果公司在看到它的时候都不想播出它。你可能听说了史蒂夫喜欢它,但苹果公司董事会的人并不喜欢它。事实上,他们很愤怒,这么多钱被花在这么一件事情上,以至于他们想解雇广告代理商。[00:08:00] 史蒂夫则为我们公司辩护。 -我迫不及待地想直到,开源技术从何而来?我的意思时,我对 Linus Torvalds 和 Linux ® 的荣耀有一些了解,我相信你也一样,但是说真的,开源并不是一开始就有的对吗?如果我像发至内心的感激最新最棒的技术,比如 DevOps 和 containers 之类的,我感觉我对那些早期的开发者有所亏欠,我有必要了解这些东西来自何处。所以,让我们暂时先不用担心内存泄露和缓冲溢出。我们的旅程从操作系统之战开始,这是一场波澜壮阔的桌面控制之战。这场战争亘古未有,因为。首先,在计算机时代,大公司拥有指数级的规模优势; 其次,从未有过这么一场控制争夺战是如此变化多端。Bill Gates 和 Steve Jobs? 他们也不知道结果会如何,但是到目前为止,这个故事进行到一半的时候,他们所争夺的所有东西都将发声改变,进化,最终上升到云端。 +Saron Yitbarek:乔布斯,一如既往地,慧眼识英雄。 -[00:03:30] +Ken Segal:这则广告在公司内、在业界内都引起了共鸣,成为了苹果产品的代表。无论人们那天是否有在购买电脑,它都带来了一种持续了一年又一年的影响,并有助于定义这家公司的品质:我们是叛军,我们是拿着大锤的人。 -[00:04:00] +Saron Yitbarek:[00:08:30] 因此,在争夺数十亿潜在消费者心智的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主、非凡的英雄、一种对生活方式的选择。但比尔·盖茨知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,即便是帝王,也不能独自完成任务。 -好的,让我们回到 1983 年的秋季。还有六年我才出生。那时候的总统还是 Ronald Reagan,美国和苏联扬言要把星球拖入核战争中。在 Honolulu 的公民中心正在举办一年一度的苹果公司销售会议。一群苹果公司的员工正在等待 Steve Jobs 上台。他 28 岁,热情洋溢,看起来非常自信。Jobs 很严肃地对着麦克风说他邀请了三个行业专家来软件进行了一次小组讨论。然而随后发生的事情你肯定想不到。超级俗气的 80 年代音乐响彻整个房间。一堆多彩灯管照亮了舞台,然后一个播音员的声音响起- +[00:09:00] 1985 年 6 月 25 日。盖茨给当时的苹果 CEO John Scully 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到 1996 年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。[00:09:30] 盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得获得快速发展和建立标准所需的支持。”换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作。 -Voice Actor: +[00:10:00]多年后你依然可以看到这条哲学思想,当微软首席执行官史蒂夫·鲍尔默Steve Ballmer上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。”你懂我的意思了吧。微软喜欢开发人员。虽然目前(LCTT 译注:本播客发布于 2018 年初)他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。[00:10:30] 而当比尔·盖茨建议苹果公司也这么做时,如你可能已经猜到的,这个想法就被苹果公司抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了 Windows 1.0。战争开始了。 -女士们,先生们,现在是麦金塔软件的约会游戏。 +> 开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。 -Saron Yitbarek: +[00:11:00] 你正在收听的是来自红帽公司的原创播客《代码英雄》。本集是第一集,我们将回到过去,重温操作系统战争的史诗故事,我们将会发现,科技巨头之间的战争是如何为我们今天所生活的开源世界扫清道路的 -[00:04:30] +好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是 1979 年,史蒂夫·乔布斯开车去帕洛阿尔托Palo Alto施乐公园研究中心Xerox Park research center。[00:11:30] 那里的工程师一直在为他们所谓的图形用户界面开发一系列的元素。也许你听说过。它们有菜单、滚动条、按钮、文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 -[00:05:00] - -Jobs 的脸上露出一个大大的笑容,台上有三个 CEO 都需要轮流向他示好。这基本上就是 80 年代科技界的钻石王老五。两个软件大佬讲完话后,然后就轮到第三个人讲话了。仅此而已不是吗?是得。新面孔 Bill Gates 带着一个大大的方框眼镜遮住了半个脸。他宣称在 1984 年,微软的一半收入将来至于麦金塔软件。他的这番话引来了观众热情的掌声。但是他们不知道的是,在一个月后,Bill Gates 将会宣布发布 Windows 1.0 的计划。你永远也猜不到 Jobs 正在跟未来苹果最大的敌人打情骂俏。但微软和苹果即将经历科技史上最糟糕的婚礼。他们会彼此背叛,相互毁灭,但又深深地、痛苦地捆绑在一起。 - -James Allworth: - -[00:05:30] - -我猜从哲学上来讲,一个更理想化,注重用户体验高于一切,是一个集成的组织,而微软则更务实,更模块化- - -Saron Yitbarek: - -这是 James Allworth。他是一位多产的科技作家,曾在苹果零售团队工作。注意他给出的苹果的定义。一个集成的组织。那种只对自己负责的公司。一个不想依赖别人的公司。这是关键。 - -James Allworth: - -[00:06:00] - -苹果是一家集成的公司,它专注于愉悦的用户体验,这意味着它希望控制整技术栈以及交付的一切内容,从硬件到操作系统,甚至运行在操作系统上的应用程序。 -当新的创新,重要的创新刚刚进入市场,而你需要横跨软硬件,并且能够根据自己意愿和软件的革新来改变硬件时,这是一个优势。例如-, - -[00:06:30] - -Saron Yitbarek: - -[00:07:00] -很多人喜欢这种整合的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。回到 Honolulu 的销售会议上。在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想 George Orwell 的 1984。在这个冰冷、灰暗的世界里,在独裁者投射的目光下,没有头脑的机器人正在缓慢移动。这些机器人代表着 IBM 的用户们。然后,代表苹果公司的美丽而健壮的 Anya Major 穿着鲜艳的衣服跑过大厅。她向着老大哥的屏幕猛地透出大锤,将它砸成一片一片的。老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍麦金塔了。 - -Voice Actor: - -这就是为什么现实中的 1984 跟小说 1984 不一样了。 - -Saron Yitbarek: - -[00:07:30] - -是的,现在回顾这则广告,认为苹果是一个致力于解放大众的自由斗士的想法有点过分了。但这件事触动了我的神经。Ken Segal 曾在为苹果制作这则广告的广告公司工作过。在早期,他为 Steve Jobs 做了十多年的广告。 - -Ken Segal: - -[00:08:00] - -1984 这则广告的风险很大。事实上,它的风险太大,以至于苹果公司在看到它的时候都不想播出它。你可能听说了 Steve 喜欢它,但苹果公司董事会的人并不喜欢它。事实上,他们很愤怒,这么多钱被花在这么一件事情上,以至于他们想解雇广告代理商。Steve 则为我们公司辩护。 - -Saron Yitbarek: - -Jobs,一如既往地,慧眼识英雄。 - -Ken Segal: - -这则广告在公司内,在业界内都引起了共鸣,成为了苹果产品的代表。无论人们那天是否有在购买电脑,它都带来了一种持续多年的影响,帮助定义了这家公司的品质。我们是叛军。我们是拿着大锤的人。 - -[00:08:30] - -Saron Yitbarek: - -因此,在争夺数十亿潜在消费者偏好的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主,非凡的英雄,一种对生活方式的选择。但 Bill Gates 知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,甚至是皇帝,能独自完成任务。 - -[00:09:00] - -[00:09:30] - -1985 年 6 月 25 日。盖茨给当时的苹果 CEO 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到 1996 年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得获得快速发展和建立标准所需的支持”。换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作。 - -[00:10:00] - -[00:10:30] - -多年后你依然可以看到这条哲学思想,当微软首席执行官 Steve Ballmer 上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。” 你懂我的意思了吧。微软喜欢开发人员。虽然目前他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。而当 Bill Gates 建议苹果公司也这么做时(你可能已经猜到了),这个想法就被抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了 Windows 1.0。战争开始了。 - -开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。 - -[00:11:00] - -您正在收听的是来自红帽公司的原创播客《代码英雄》。本集是第一集,我们将回到过去,重温操作系统战争的史诗故事,我们将会找出,科技巨头之间的战争是如何为我们今天所生活的开源世界扫清道路的? - -[00:11:30] - -好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是 1979 年,Steve Jobs 开车去 Palo Alto 的 Xerox Park 研究中心。那里的工程师一直在为他们所称之为的"图形用户界面"开发一系列的元素。也许你听说过。它们有菜单,滚动条,按钮,文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 - -Steven Levy: - -[00:12:00] -新界面要前所未有地有好的多,这让我们无比兴奋,以前我们用的是所谓的命令行,它的让你和电脑之间的交互方式跟现实生活中的交互方式完全不同。 -电脑上的鼠标和图像让你可以可以像现实生活中的交互一样实现与电脑的交互,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有代码。 +Steven Levy:[00:12:00] 对于这个新界面来说,有很多令人激动的地方,它以前的交互界面更友好,以前用的所谓的命令行 —— 你和电脑之间的交互方式跟现实生活中的交互方式完全不同。鼠标和电脑上的图像让你可以做到像现实生活中的交互一样,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有那些命令。 Saron Yitbarek: From b4a79532e017f5e38bf46e46ae44bbbbbdd98996 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 19 Aug 2019 00:53:27 +0800 Subject: [PATCH 529/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190818=20How=20?= =?UTF-8?q?to=20Create=20Availability=20Zones=20in=20OpenStack=20from=20Co?= =?UTF-8?q?mmand=20Line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190818 How to Create Availability Zones in OpenStack from Command Line.md --- ...ty Zones in OpenStack from Command Line.md | 321 ++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 sources/tech/20190818 How to Create Availability Zones in OpenStack from Command Line.md diff --git a/sources/tech/20190818 How to Create Availability Zones in OpenStack from Command Line.md b/sources/tech/20190818 How to Create Availability Zones in OpenStack from Command Line.md new file mode 100644 index 0000000000..dc49daebd7 --- /dev/null +++ b/sources/tech/20190818 How to Create Availability Zones in OpenStack from Command Line.md @@ -0,0 +1,321 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Create Availability Zones in OpenStack from Command Line) +[#]: via: (https://www.linuxtechi.com/create-availability-zones-openstack-command-line/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +How to Create Availability Zones in OpenStack from Command Line +====== + +In **OpenStack** terminology, **Availability Zones (AZ**) is defined as a logical partition of compute(nova), block storage (cinder) and network Service (neutron). Availability zones are required to segregate the work load of environments like production and non-production, let me elaborate this statement. + +[![Availability-Zones-OpenStack-Command-Line][1]][2] + +let’s suppose we have a tenant in OpenStack who wants to deploy their VMs in Production and Non-Production, so to create this type of setup in openstack , first we have to identify which computes will be considered as Production and Non-production then we have to create host-aggregate group where we will add the computes to the host-aggregate group and then we will map th host aggregate group to the Availability Zone. + +In this tutorial we will demonstrate how to create and use computes availability zones in openstack via command line. + +### Creating compute availability zones + +Whenever OpenStack is deployed, Nova is the default Availability Zone(AZ) created automatically and all the compute nodes belongs to Nova AZ. Run the below openstack command from the controller node to list Availability zones, + +``` +~# source openrc +~# openstack availability zone list ++-----------+-------------+ +| Zone Name | Zone Status | ++-----------+-------------+ +| internal | available | +| nova | available | +| nova | available | +| nova | available | ++-----------+-------------+ +~# +``` + +To list only compute’s availability zones, run the beneath openstack command, + +``` +~# openstack availability zone list --compute ++-----------+-------------+ +| Zone Name | Zone Status | ++-----------+-------------+ +| internal | available | +| nova | available | ++-----------+-------------+ +~# +``` + +To list all compute hosts which are mapped to nova availability zone execute the below command, + +``` +~# openstack host list | grep -E "Zone|nova" +| Host Name | Service | Zone | +| compute-0-1 | compute | nova | +| compute-0-2 | compute | nova | +| compute-0-4 | compute | nova | +| compute-0-3 | compute | nova | +| compute-0-8 | compute | nova | +| compute-0-6 | compute | nova | +| compute-0-9 | compute | nova | +| compute-0-5 | compute | nova | +| compute-0-7 | compute | nova | +~# +``` + +Let’s create a two host-aggregate group with name **production** and **non-production**, add compute-4,5 & 6 to production host aggregate group and compute-7,8 & 9 to non-production host aggregate group. + +Create Production and Non-Production Host aggregate using following OpenStack commands, + +``` +~# openstack aggregate create production ++-------------------+----------------------------+ +| Field | Value | ++-------------------+----------------------------+ +| availability_zone | None | +| created_at | 2019-08-17T03:02:41.561259 | +| deleted | False | +| deleted_at | None | +| id | 7 | +| name | production | +| updated_at | None | ++-------------------+----------------------------+ + +~# openstack aggregate create non-production ++-------------------+----------------------------+ +| Field | Value | ++-------------------+----------------------------+ +| availability_zone | None | +| created_at | 2019-08-17T03:02:53.806713 | +| deleted | False | +| deleted_at | None | +| id | 10 | +| name | non-production | +| updated_at | None | ++-------------------+----------------------------+ +~# +``` + +Now create the availability zones and associate it to its respective host aggregate groups + +**Syntax:** + +# openstack aggregate set –zone <az_name>  <host_aggregate_name> + +``` +~# openstack aggregate set --zone production-az production +~# openstack aggregate set --zone non-production-az non-production +``` + +Finally add the compute host to its host-aggregate group + +**Syntax:** + +# openstack aggregate add host <host_aggregate_name>  <compute_host> + +``` +~# openstack aggregate add host production compute-0-4 +~# openstack aggregate add host production compute-0-5 +~# openstack aggregate add host production compute-0-6 +``` + +Similarly add compute host to non-production host aggregation group, + +``` +~# openstack aggregate add host non-production compute-0-7 +~# openstack aggregate add host non-production compute-0-8 +~# openstack aggregate add host non-production compute-0-9 +``` + +Execute the beneath openstack commands to verify Host aggregate group and its availability zone + +``` +~# openstack aggregate list ++----+----------------+-------------------+ +| ID | Name | Availability Zone | ++----+----------------+-------------------+ +| 7 | production | production-az | +| 10 | non-production | non-production-az | ++----+----------------+-------------------+ +~# +``` + +Run below commands to list computes associated to AZ and host aggregate group + +``` +~# openstack aggregate show production ++-------------------+--------------------------------------------+ +| Field | Value | ++-------------------+--------------------------------------------+ +| availability_zone | production-az | +| created_at | 2019-08-17T03:02:42.000000 | +| deleted | False | +| deleted_at | None | +| hosts | [u'compute-0-4', u'compute-0-5', u'compute-0-6'] | +| id | 7 | +| name | production | +| properties | | +| updated_at | None | ++-------------------+--------------------------------------------+ + +~# openstack aggregate show non-production ++-------------------+---------------------------------------------+ +| Field | Value | ++-------------------+---------------------------------------------+ +| availability_zone | non-production-az | +| created_at | 2019-08-17T03:02:54.000000 | +| deleted | False | +| deleted_at | None | +| hosts | [u'compute-0-7', u'compute-0-8', u'compute-0-9'] | +| id | 10 | +| name | non-production | +| properties | | +| updated_at | None | ++-------------------+---------------------------------------------+ +~# +``` + +Above command’s output confirm that we have successfully create host aggregate group and availability zones. + +### Launch Virtual Machines in Availability Zones + +Now let’s create couple virtual machines in these two availability zones, to create a vm in particular availability zone use below command, + +**Syntax:** + +# openstack server create –flavor <flavor-name> –image <Image-Name-Or-Image-ID>  –nic net-id=<Network-ID> –security-group <Security-Group-ID> –key-name <Keypair-Name> –availability-zone <AZ-Name>   <VM-Name> + +Example is shown below: + +``` +~# openstack server create --flavor m1.small --image Cirros --nic net-id=37b9ab9a-f198-4db1-a5d6-5789b05bfb4c --security-group f8dda7c3-f7c3-423b-923a-2b21fe0bbf3c --key-name mykey --availability-zone production-az test-vm-prod-az +``` + +Run below command to verify virtual machine details: + +``` +~# openstack server show test-vm-prod-az +``` + +![Openstack-Server-AZ-command][1] + +To create a virtual machine in a specific compute node under availability zone, use the below command, + +**Syntax:** + +# openstack server create –flavor <flavor-name> –image <Image-Name-Or-Image-ID>  –nic net-id=<Network-ID> –security-group <Security-Group-ID> –key-name {Keypair-Name} –availability-zone <AZ-Name>:<Compute-Host> <VM-Name> + +Let suppose we want to spin a vm under production AZ on specific compute (compute-0-6), so to accomplish this, run the beneath command, + +``` +~# openstack server create --flavor m1.small --image Cirros --nic net-id=37b9ab9a-f198-4db1-a5d6-5789b05bfb4c --security-group f8dda7c3-f7c3-423b-923a-2b21fe0bbf3c --key-name mykey --availability-zone production-az:compute-0-6 test-vm-prod-az-host +``` + +Execute following command to verify the VM details: + +``` +~# openstack server show test-vm-prod-az-host +``` + +Output above command would be something like below: + +![OpenStack-VM-AZ-Specific-Host][1] + +Similarly, we can create virtual machines in non-production AZ, example is shown below + +``` +~# openstack server create --flavor m1.small --image Cirros --nic net-id=37b9ab9a-f198-4db1-a5d6-5789b05bfb4c --security-group f8dda7c3-f7c3-423b-923a-2b21fe0bbf3c --key-name mykey --availability-zone non-production-az vm-nonprod-az +``` + +Use below command verify the VM details, + +``` +~# openstack server show vm-nonprod-az +``` + +Output of above command would be something like below, + +![OpenStack-Non-Production-AZ-VM][1] + +### Removing Host aggregate group and Availability Zones + +Let’s suppose we want to remove /delete above created host aggregate group and availability zones, for that first we must remove host from the host aggregate group, use the below command, + +``` +~# openstack aggregate show production +``` + +Above command will give u the list of compute host which are added to production host aggregate group. + +Use below command to remove host from the host aggregate group + +**Syntax:** + +# openstack aggregate remove host <host-aggregate-name> <compute-name> + +``` +~# openstack aggregate remove host production compute-0-4 +~# openstack aggregate remove host production compute-0-5 +~# openstack aggregate remove host production compute-0-6 +``` + +Once you remove all host from the group, then re-run the below command, + +``` +~# openstack aggregate show production ++-------------------+----------------------------+ +| Field | Value | ++-------------------+----------------------------+ +| availability_zone | production-az | +| created_at | 2019-08-17T03:02:42.000000 | +| deleted | False | +| deleted_at | None | +| hosts | [] | +| id | 7 | +| name | production | +| properties | | +| updated_at | None | ++-------------------+----------------------------+ +~# +``` + +As we can see in above output there is no compute host associated to production host aggregate group, now we are good to remove the group + +Use below command to delete host aggregate group and its associated availability zone + +``` +~# openstack aggregate delete production +``` + +Run the following command to check whether availability zone has been removed or not, + +``` +~# openstack availability zone list | grep -i production-az +~# +``` + +Similarly, you can refer the above steps to remove or delete non-production host aggregate and its availability zone. + +That’s all from this tutorial, in case above content helps you to understand OpenStack host aggregate and availability zones then please do share your feedback and comments. + +**Read Also: [Top 30 OpenStack Interview Questions and Answers][3]** + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/create-availability-zones-openstack-command-line/ + +作者:[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/08/Availability-Zones-OpenStack-Command-Line.jpg +[3]: https://www.linuxtechi.com/openstack-interview-questions-answers/ From 4966ec9aca58925a96c45b3a91f302b00235ee38 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 19 Aug 2019 08:58:53 +0800 Subject: [PATCH 530/951] translated --- ...The Raspberry Pi -Absolute Beginner Tip.md | 111 ------------------ ...The Raspberry Pi -Absolute Beginner Tip.md | 71 +++++++++++ 2 files changed, 71 insertions(+), 111 deletions(-) delete mode 100644 sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md create mode 100644 translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md diff --git a/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md b/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md deleted file mode 100644 index d8c8878c82..0000000000 --- a/sources/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md +++ /dev/null @@ -1,111 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Turn On And Shutdown The Raspberry Pi [Absolute Beginner Tip]) -[#]: via: (https://itsfoss.com/turn-on-raspberry-pi/) -[#]: author: (Chinmay https://itsfoss.com/author/chinmay/) - -How To Turn On And Shutdown The Raspberry Pi [Absolute Beginner Tip] -====== - -_**Brief: This quick tip teaches you how to turn on Raspberry Pi and how to shut it down properly afterwards.**_ - -The [Raspberry Pi][1] is one of the [most popular SBC (Single-Board-Computer)][2]. If you are interested in this topic, I believe that you’ve finally got a Pi device. I also advise to get all the [additional Raspberry Pi accessories][3] to get started with your device. - -You’re ready to turn it on and start to tinker around with it. It has it’s own similarities and differences compared to traditional computers like desktops and laptops. - -Today, let’s go ahead and learn how to turn on and shutdown a Raspberry Pi as it doesn’t really feature a ‘power button’ of sorts. - -For this article I’m using a Raspberry Pi 3B+, but it’s the same for all the Raspberry Pi variants. - -Bestseller No. 1 - -[][4] - -[CanaKit Raspberry Pi 3 B+ (B Plus) Starter Kit (32 GB EVO+ Edition, Premium Black Case)][4] - -CanaKit - Personal Computers - -$79.99 [][5] - -Bestseller No. 2 - -[][6] - -[CanaKit Raspberry Pi 3 B+ (B Plus) with Premium Clear Case and 2.5A Power Supply][6] - -CanaKit - Personal Computers - -$54.99 [][5] - -### Turn on Raspberry Pi - -![Micro USB port for Power][7] - -The micro USB port powers the Raspberry Pi, the way you turn it on is by plugging in the power cable into the micro USB port. But, before you do that you should make sure that you have done the following things. - - * Preparing the micro SD card with Raspbian according to the official [guide][8] and inserting into the micro SD card slot. - * Plugging in the HDMI cable, USB keyboard and a Mouse. - * Plugging in the Ethernet Cable(Optional). - - - -Once you have done the above, plug in the power cable. This turns on the Raspberry Pi and the display will light up and load the Operating System. - -Bestseller No. 1 - -[][4] - -[CanaKit Raspberry Pi 3 B+ (B Plus) Starter Kit (32 GB EVO+ Edition, Premium Black Case)][4] - -CanaKit - Personal Computers - -$79.99 [][5] - -### Shutting Down the Pi - -Shutting down the Pi is pretty straight forward, click the menu button and choose shutdown. - -![Turn off Raspberry Pi graphically][9] - -Alternatively, you can use the [shutdown command][10] in the terminal: - -``` -sudo shutdown now -``` - -Once the shutdown process has started **wait** till it completely finishes and then you can cut the power to it. Once the Pi shuts down, there is no real way to turn the Pi back on without turning off and turning on the power. You could the GPIO’s to turn on the Pi from the shutdown state but it’ll require additional modding. - -[][2] - -Suggested read 12 Single Board Computers: Alternative to Raspberry Pi - -_Note: Micro USB ports tend to be fragile, hence turn-off/on the power at source instead of frequently unplugging and plugging into the micro USB port._ - -Well, that’s about all you should know about turning on and shutting down the Pi, what do you plan to use it for? Let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/turn-on-raspberry-pi/ - -作者:[Chinmay][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/chinmay/ -[b]: https://github.com/lujun9972 -[1]: https://www.raspberrypi.org/ -[2]: https://itsfoss.com/raspberry-pi-alternatives/ -[3]: https://itsfoss.com/things-you-need-to-get-your-raspberry-pi-working/ -[4]: https://www.amazon.com/CanaKit-Raspberry-Starter-Premium-Black/dp/B07BCC8PK7?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07BCC8PK7&keywords=raspberry%20pi%20kit (CanaKit Raspberry Pi 3 B+ (B Plus) Starter Kit (32 GB EVO+ Edition, Premium Black Case)) -[5]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime) -[6]: https://www.amazon.com/CanaKit-Raspberry-Premium-Clear-Supply/dp/B07BC7BMHY?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07BC7BMHY&keywords=raspberry%20pi%20kit (CanaKit Raspberry Pi 3 B+ (B Plus) with Premium Clear Case and 2.5A Power Supply) -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/raspberry-pi-3-microusb.png?fit=800%2C532&ssl=1 -[8]: https://www.raspberrypi.org/documentation/installation/installing-images/README.md -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/Raspbian-ui-menu.jpg?fit=800%2C492&ssl=1 -[10]: https://linuxhandbook.com/linux-shutdown-command/ diff --git a/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md b/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md new file mode 100644 index 0000000000..e93ae319a9 --- /dev/null +++ b/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md @@ -0,0 +1,71 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Turn On And Shutdown The Raspberry Pi [Absolute Beginner Tip]) +[#]: via: (https://itsfoss.com/turn-on-raspberry-pi/) +[#]: author: (Chinmay https://itsfoss.com/author/chinmay/) + +如何打开和关闭树莓派(新手教程) +====== + +_ **简介:这个贴士教你如何打开树莓派以及如何在之后正确关闭它。** _ + +[树莓派][1]是[最流行的 SBC(单板计算机)][2]之一。如果你对这个话题感兴趣,我相信你已经有了一个树莓派。我还建议你使用[其他树莓派配件][3]来开始使用你的设备。 + +你已经准备好打开并开始使用。与桌面和笔记本电脑等传统电脑相比,它有相似以及不同之处。 + +今天,让我们继续学习如何打开和关闭树莓派,因为它并没有真正的“电源按钮”。 + +在本文中,我使用的是树莓派 3B+,但对于所有树莓派变体都是如此。 + +### 如何打开树莓派 + +![Micro USB port for Power][7] + +micro USB 口为树莓派供电,打开它的方式是将电源线插入 micro USB 口。但是开始之前,你应该确保做了以下事情。 + + * 根据官方[指南][8]准备带有 Raspbian 的 micro SD 卡并插入 micro SD 卡插槽。 +  * 插入 HDMI 线、USB 键盘和鼠标。 +  * 插入以太网线(可选)。 + +成上述操作后,请插入电源线。这会打开树莓派,显示屏将亮起并加载操作系统。 + +### 关闭树莓派 + +关闭树莓派非常简单,单击菜单按钮并选择关闭。 + +![Turn off Raspberry Pi graphically][9] + +或者你可以在终端使用 [shutdown 命令][10] + +``` +sudo shutdown now +``` + +shutdown 执行后**等待**它完成,接着你可以关闭电源。树莓派关闭后,没有真正的办法可以在不重新打开电源的情况下打开树莓派。你可以使用 GPIO 打开树莓派,但这需要额外的改装。 + +_注意:Micro USB 口往往是脆弱的,因此请关闭/打开电源,而不是经常拔出插入 micro USB 口。_ + +好吧,这就是关于打开和关闭树莓派的所有内容,你打算用它做什么?请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/turn-on-raspberry-pi/ + +作者:[Chinmay][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/chinmay/ +[b]: https://github.com/lujun9972 +[1]: https://www.raspberrypi.org/ +[3]: https://itsfoss.com/things-you-need-to-get-your-raspberry-pi-working/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/raspberry-pi-3-microusb.png?fit=800%2C532&ssl=1 +[8]: https://www.raspberrypi.org/documentation/installation/installing-images/README.md +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/Raspbian-ui-menu.jpg?fit=800%2C492&ssl=1 +[10]: https://linuxhandbook.com/linux-shutdown-command/ From 6b599c67e7aa97ffdb476a884d75c9606d47d52e Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 19 Aug 2019 09:04:56 +0800 Subject: [PATCH 531/951] translating --- .../20190815 How To Change Linux Console Font Type And Size.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190815 How To Change Linux Console Font Type And Size.md b/sources/tech/20190815 How To Change Linux Console Font Type And Size.md index 1a12a0fccf..fa18570376 100644 --- a/sources/tech/20190815 How To Change Linux Console Font Type And Size.md +++ b/sources/tech/20190815 How To Change Linux Console Font Type And Size.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 899dae0363fef1422c007e4ef4cb568477c54507 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 17:56:19 +0800 Subject: [PATCH 532/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @lujun9972 这篇的代码也被链接搞乱了。 --- ... Understanding software design patterns.md | 196 +++++++++--------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/published/20190715 Understanding software design patterns.md b/published/20190715 Understanding software design patterns.md index 73e4082757..0347ad755b 100644 --- a/published/20190715 Understanding software design patterns.md +++ b/published/20190715 Understanding software design patterns.md @@ -69,17 +69,17 @@ package org.opensource.demo.singleton; public class OpensourceSingleton { -    private static OpensourceSingleton uniqueInstance; + private static OpensourceSingleton uniqueInstance; -    private OpensourceSingleton() { -    } + private OpensourceSingleton() { + } -    public static OpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            uniqueInstance = new OpensourceSingleton(); -        } -        return uniqueInstance; -    } + public static OpensourceSingleton getInstance() { + if (uniqueInstance == null) { + uniqueInstance = new OpensourceSingleton(); + } + return uniqueInstance; + } } ``` @@ -102,20 +102,20 @@ package org.opensource.demo.singleton; public class ImprovedOpensourceSingleton { -    private volatile static ImprovedOpensourceSingleton uniqueInstance; + private volatile static ImprovedOpensourceSingleton uniqueInstance; -    private ImprovedOpensourceSingleton() {} + private ImprovedOpensourceSingleton() {} -    public static ImprovedOpensourceSingleton getInstance() { -        if (uniqueInstance == null) { -            synchronized (ImprovedOpensourceSingleton.class) { -                if (uniqueInstance == null) { -                    uniqueInstance = new ImprovedOpensourceSingleton(); -                } -            } -        } -        return uniqueInstance; -    } + public static ImprovedOpensourceSingleton getInstance() { + if (uniqueInstance == null) { + synchronized (ImprovedOpensourceSingleton.class) { + if (uniqueInstance == null) { + uniqueInstance = new ImprovedOpensourceSingleton(); + } + } + } + return uniqueInstance; + } } ``` @@ -141,20 +141,20 @@ package org.opensource.demo.factory; public class OpensourceFactory { -    public OpensourceJVMServers getServerByVendor([String][18] name) { -        if(name.equals("Apache")) { -            return new Tomcat(); -        } -        else if(name.equals("Eclipse")) { -            return new Jetty(); -        } -        else if (name.equals("RedHat")) { -            return new WildFly(); -        } -        else { -            return null; -        } -    } + public OpensourceJVMServers getServerByVendor(String name) { + if(name.equals("Apache")) { + return new Tomcat(); + } + else if(name.equals("Eclipse")) { + return new Jetty(); + } + else if (name.equals("RedHat")) { + return new WildFly(); + } + else { + return null; + } + } } ``` @@ -164,9 +164,9 @@ public class OpensourceFactory { package org.opensource.demo.factory; public interface OpensourceJVMServers { -    public void startServer(); -    public void stopServer(); -    public [String][18] getName(); + public void startServer(); + public void stopServer(); + public String getName(); } ``` @@ -176,17 +176,17 @@ public interface OpensourceJVMServers { package org.opensource.demo.factory; public class WildFly implements OpensourceJVMServers { -    public void startServer() { -        [System][19].out.println("Starting WildFly Server..."); -    } + public void startServer() { + System.out.println("Starting WildFly Server..."); + } -    public void stopServer() { -        [System][19].out.println("Shutting Down WildFly Server..."); -    } + public void stopServer() { + System.out.println("Shutting Down WildFly Server..."); + } -    public [String][18] getName() { -        return "WildFly"; -    } + public String getName() { + return "WildFly"; + } } ``` @@ -209,9 +209,9 @@ package org.opensource.demo.observer; public interface Topic { -    public void addObserver([Observer][22] observer); -    public void deleteObserver([Observer][22] observer); -    public void notifyObservers(); + public void addObserver(Observer observer); + public void deleteObserver(Observer observer); + public void notifyObservers(); } ``` @@ -226,39 +226,39 @@ import java.util.List; import java.util.ArrayList; public class Conference implements Topic { -    private List<Observer> listObservers; -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; + private List listObservers; + private int totalAttendees; + private int totalSpeakers; + private String nameEvent; -    public Conference() { -        listObservers = new ArrayList<Observer>(); -    } + public Conference() { + listObservers = new ArrayList(); + } -    public void addObserver([Observer][22] observer) { -        listObservers.add(observer); -    } + public void addObserver(Observer observer) { + listObservers.add(observer); + } -    public void deleteObserver([Observer][22] observer) { -        int i = listObservers.indexOf(observer); -        if (i >= 0) { -            listObservers.remove(i); -        } -    } + public void deleteObserver(Observer observer) { + int i = listObservers.indexOf(observer); + if (i >= 0) { + listObservers.remove(i); + } + } -    public void notifyObservers() { -        for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { -            [Observer][22] observer = listObservers.get(i); -            observer.update(totalAttendees,totalSpeakers,nameEvent); -        } -    } + public void notifyObservers() { + for (int i=0, nObservers = listObservers.size(); i < nObservers; ++ i) { + Observer observer = listObservers.get(i); + observer.update(totalAttendees,totalSpeakers,nameEvent); + } + } -    public void setConferenceDetails(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        notifyObservers(); -    } + public void setConferenceDetails(int totalAttendees, int totalSpeakers, String nameEvent) { + this.totalAttendees = totalAttendees; + this.totalSpeakers = totalSpeakers; + this.nameEvent = nameEvent; + notifyObservers(); + } } ``` @@ -269,8 +269,8 @@ public class Conference implements Topic { ``` package org.opensource.demo.observer; -public interface [Observer][22] { -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent); +public interface Observer { + public void update(int totalAttendees, int totalSpeakers, String nameEvent); } ``` @@ -281,27 +281,27 @@ public interface [Observer][22] { ``` package org.opensource.demo.observer; -public class MonitorConferenceAttendees implements [Observer][22] { -    private int totalAttendees; -    private int totalSpeakers; -    private [String][18] nameEvent; -    private Topic topic; +public class MonitorConferenceAttendees implements Observer { + private int totalAttendees; + private int totalSpeakers; + private String nameEvent; + private Topic topic; -    public MonitorConferenceAttendees(Topic topic) { -        this.topic = topic; -        topic.addObserver(this); -    } + public MonitorConferenceAttendees(Topic topic) { + this.topic = topic; + topic.addObserver(this); + } -    public void update(int totalAttendees, int totalSpeakers, [String][18] nameEvent) { -        this.totalAttendees = totalAttendees; -        this.totalSpeakers = totalSpeakers; -        this.nameEvent = nameEvent; -        printConferenceInfo(); -    } + public void update(int totalAttendees, int totalSpeakers, String nameEvent) { + this.totalAttendees = totalAttendees; + this.totalSpeakers = totalSpeakers; + this.nameEvent = nameEvent; + printConferenceInfo(); + } -    public void printConferenceInfo() { -        [System][19].out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); -    } + public void printConferenceInfo() { + System.out.println(this.nameEvent + " has " + totalSpeakers + " speakers and " + totalAttendees + " attendees"); + } } ``` From 0deb793d0d9c48495ca3b387b55beff3470a249e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 18:44:40 +0800 Subject: [PATCH 533/951] PRF --- ... the health of an open source community.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/translated/tech/20190811 How to measure the health of an open source community.md b/translated/tech/20190811 How to measure the health of an open source community.md index ad315d0f91..0e322e87d7 100644 --- a/translated/tech/20190811 How to measure the health of an open source community.md +++ b/translated/tech/20190811 How to measure the health of an open source community.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to measure the health of an open source community) @@ -14,44 +14,44 @@ ![metrics and data shown on a computer screen][1] -作为一个经常管理软件开发团队的人,多年来我一直关注度量指标。一次又一次,我发现自己领导团队使用一个又一个的项目平台(例如 Jira、GitLab 和 Rally)生成了大量可测量的数据。从那时起,我已经及时投入了大量时间从记录平台中提取有用的指标,并采用我们可以理解它们的格式,然后使用这些指标对开发的许多方面做出更好的选择。 +作为一个经常管理软件开发团队的人,多年来我一直关注度量指标。一次次,我发现自己领导团队使用一个又一个的项目平台(例如 Jira、GitLab 和 Rally)生成了大量可测量的数据。从那时起,我已经及时投入了大量时间从记录平台中提取了有用的指标,并采用了一种我们可以理解的格式,然后使用这些指标对开发的许多方面做出更好的选择。 -今年早些时候,我有幸遇到了 [Linux 基金会][2]的一个名为[开源软件社区健康分析][3]Community Health Analytics for Open Source Software(CHAOSS)的项目。该项目侧重于从各种来源收集和丰富指标,以便开源社区的利益相关者可以衡量他们项目的健康状况。 +今年早些时候,我有幸在 [Linux 基金会][2]遇到了一个名为[开源软件社区健康分析][3]Community Health Analytics for Open Source Software(CHAOSS)的项目。该项目侧重于从各种来源收集和丰富指标,以便开源社区的利益相关者可以衡量他们项目的健康状况。 ### CHAOSS 介绍 随着我对该项目的基本指标和目标越来越熟悉,一个问题在我的脑海中不断翻滚。什么是“健康”的开源项目,由谁来定义? -特定角色的人认为健康的东西可能另一个角色的人就不会这样认为。似乎有机会拿到 CHAOSS 收集的细粒度数据并进行市场细分实验,重点关注对特定角色可能最有意义的背景问题,以及 CHAOSS 收集哪些指标可能有助于回答这些问题。 +特定角色的人认为健康的东西可能另一个角色的人就不会这样认为。似乎可以用 CHAOSS 收集的细粒度数据进行市场细分实验,重点关注对特定角色可能最有意义的背景问题,以及 CHAOSS 收集哪些指标可能有助于回答这些问题。 -使得这个实验具有可能性的是,CHAOSS 项目创建并维护了一套开源应用程序和度量标准定义,包括: +CHAOSS 项目创建并维护了一套开源应用程序和度量标准定义,使得这个实验具有可能性,这包括: * 许多基于服务器的应用程序,用于收集、聚合和丰富度量标准(例如 Augur 和 GrimoireLab)。 * ElasticSearch、Kibana 和 Logstash(ELK)的开源版本。 * 身份服务、数据分析服务和各种集成库。 -在我过去的一个程序中,有六个团队从事于不同复杂程度的项目,我们找到了一个简洁的工具,它允许我们从简单(或复杂)的 JQL 语句中创建我们想要的任何类型的度量,然后针对这些指标开发计算。在我们知道它之前,我们仅从 Jira 中就提取了400多个指标,而且还有更多指标来自手动来源。 +在我过去的一个程序中,有六个团队从事于不同复杂程度的项目,我们找到了一个简洁的工具,它允许我们从简单(或复杂)的 JQL 语句中创建我们想要的任何类型的指标,然后针对这些指标开发计算。在我们注意到之前,我们仅从 Jira 中就提取了 400 多个指标,而且还有更多指标来自手动的来源。 -在项目结束时,我们认定这 400 个指标中,大多数指标在*以我们的角色*做出决策时并不重要。最终,只有三个对我们非常重要:“缺陷去除效率”、“已完成点数与已提交点数”,以及“每个开发人员的工作进度”。这三个指标最重要,因为它们是我们对自己、客户和团队成员所做出的承诺,因此是最有意义的。 +在项目结束时,我们认定这 400 个指标中,大多数指标在*以我们的角色*做出决策时并不重要。最终,只有三个对我们非常重要:“缺陷去除效率”、“已完成的条目与承诺的条目”,以及“每个开发人员的工作进度”。这三个指标最重要,因为它们是我们对自己、客户和团队成员所做出的承诺,因此是最有意义的。 带着这些通过经验得到的教训和对什么是健康的开源项目的问题,我跳进了 CHAOSS 社区,开始建立一套角色,以提供一种建设性的方法,从基于角色的角度回答这个问题。 -CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此,我决定使用*组成分子*这个词而不是利益相关者,因为它更符合我们作为开源贡献者的责任,以创建更具共生性的价值链。 +CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此,我决定使用组成分子constituent这个词而不是利益相关者,因为它更符合我们作为开源贡献者的责任,以创建更具共生性的价值链。 -虽然创建此组成模型的过程采用了特定的目标-问题-度量方法,但有许多方法可以进行细分。CHAOSS 贡献者已经开发了很好的模型,可以按照矢量进行细分,例如项目属性(例如,个人、公司或联盟)和“容忍失败”。在为 CHAOSS 开发度量定义时,每个模型都会提供建设性的影响。 +虽然创建此组成模型的过程采用了特定的“目标-问题-度量”方法,但有许多方法可以进行细分。CHAOSS 贡献者已经开发了很好的模型,可以按照矢量进行细分,例如项目属性(例如,个人、公司或联盟)和“失败容忍度”。在为 CHAOSS 开发度量定义时,每个模型都会提供建设性的影响。 -基于这一切,我开始构建一个可能关心 CHAOSS 指标的模型,以及每个组成分子在 CHAOSS 的四个重点领域中最关心的问题: +基于这一切,我开始构建一个谁可能关心 CHAOSS 指标的模型,以及每个组成分子在 CHAOSS 的四个重点领域中最关心的问题: * [多样性和包容性][4] -* [进化][5] +* [演化][5] * [风险][6] * [价值][7] -在我们深入研究之前,重要的是要注意 CHAOSS 项目明确地给实施指标的团队留下了背景判断。什么是“有意义的”和“什么是健康的?”的答案预计会因团队和项目而异。CHAOSS 软件的现成仪表板尽可能地关注客观指标。在本文中,我们关注项目创始人、项目维护者和贡献者。 +在我们深入研究之前,重要的是要注意 CHAOSS 项目明确地将背景判断留给了实施指标的团队。什么是“有意义的”和“什么是健康的?”的答案预计会因团队和项目而异。CHAOSS 软件的现成仪表板尽可能地关注客观指标。在本文中,我们关注项目创始人、项目维护者和贡献者。 ### 项目组成分子 -虽然这绝不是这些组成分子可能认为重要的问题的详尽清单,但这些选择感觉是一个好的起点。以下每个目标-问题-度量标准部分与 CHAOSS 项目正在收集和汇总的指标直接相关。 +虽然这绝不是这些组成分子可能认为重要的问题的详尽清单,但这些选择感觉是一个好的起点。以下每个“目标-问题-度量”标准部分与 CHAOSS 项目正在收集和汇总的指标直接相关。 现在,进入分析的第 1 部分! @@ -59,14 +59,14 @@ CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此 作为**项目创始人**,我**最**关心: -* 我的项目**对其他人有用吗?**作为以下函数测量: +* 我的项目**对其他人有用吗?**通过以下测量: * 随着时间推移有多少复刻? * **指标:**存储库复刻数。 * 随着时间的推移有多少贡献者? * **指标:**贡献者数量。 * 贡献净质量。 * **指标:**随着时间的推移提交的错误。 - * **指标:**随时间的回归。 + * **指标:**随着时间的回归。 * 项目的财务状况。 * **指标:**随着时间的推移的捐赠/收入。 * **指标:**随着时间的推移的费用。 @@ -74,10 +74,10 @@ CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此 * 有谁知道我的项目?别人认为它很整洁吗? * **指标:**社交媒体上的提及、分享、喜欢和订阅的数量。 * 有影响力的人是否了解我的项目? - * **指标:**贡献者的社交范围。 + * **指标:**贡献者的社会影响力。 * 人们在公共场所对项目有何评价?是正面还是负面? * **指标:**跨社交媒体渠道的情感(关键字或 NLP)分析。 -* 我的项目**可行**程度? +* 我的项目**可行性**程度? * 我们有足够的维护者吗?该数字是随着时间的推移而上升还是下降? * **指标:**维护者数量。 * 改变速度如何随时间变化? @@ -87,17 +87,17 @@ CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此 * 我们是否拥有有效的公开行为准则(CoC)? * **度量标准:** 检查存储库中的 CoC 文件。 * 与我的项目相关的活动是否积极包容? - * **指标:**关于活动的票务政策和活动包容性活动的手动报告。 - * 我们的项目在可访问性上做的如好不好? + * **指标:**关于活动的票务政策和活动包容性行为的手动报告。 + * 我们的项目在可访问性上做的好不好? * **指标:**验证发布的文字会议纪要。 * **指标:**验证会议期间使用的隐藏式字幕。 * **指标:**验证在演示文稿和项目前端设计中色盲可访问的素材。 * 我的项目代表了多少[价值][7]? * 我如何帮助组织了解使用我们的项目将节省多少时间和金钱(劳动力投资) - * **指标:**仓库的议题书、提交书、拉取请求书和估计人工费率。 - * 我如何理解项目创建的下游价值的数量以及维护我的项目对更广泛的社区的重要性(或不重要)? + * **指标:**仓库的议题、提交、拉取请求的数量和估计人工费率。 + * 我如何理解项目创建的下游价值的数量,以及维护我的项目对更广泛的社区的重要性(或不重要)? * **指标:**依赖我的项目的其他项目数。 - * 为我的项目做出贡献的人有多少机会使用他们学到的东西来找到合适的工作岗位以及在哪些组织(即生活工资)? + * 为我的项目做出贡献的人有多少机会使用他们学到的东西来找到合适的工作岗位,以及在哪些组织(即生活工资)? * **指标:**使用或贡献此库的组织数量。 * **指标:**使用此类项目的开发人员的平均工资。 * **指标:**与该项目匹配的关键字的职位发布计数。 @@ -113,7 +113,7 @@ CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此 * **指标:**我的代码评论中有多少被拒绝或返工? * **指标:**代码审查的评论的情感分析。 * 我如何让**更多人**帮助我维护这件事? - * **指标:**项目贡献者的社交覆盖面数。 + * **指标:**项目贡献者的社交覆盖面数量。 * 我们的**代码质量**随着时间的推移变得越来越好吗? * **指标:**计算随着时间的推移引入的回归数量。 * **指标:**计算随着时间推移引入的错误数量。 @@ -133,7 +133,7 @@ CHAOSS 是一个开源项目,我们尝试使用民主共识来运作。因此 * 社区有影响力的人知道我的项目吗? * **指标:**创始人、维护者和贡献者的社交范围。 -通过创建这个列表,我们刚刚开始对 CHAOSS 的上下文进行抨击,并且在今年夏天项目中首次发布该指标时,我迫不及待地想看看广泛的开源社区可能有什么其他伟大的想法,以及我们还可以从这些贡献中学到什么(并衡量!)。 +通过创建这个列表,我们开始让 CHAOSS 更加丰满了,并且在今年夏天项目中首次发布该指标时,我迫不及待地想看看广泛的开源社区可能有什么其他伟大的想法,以及我们还可以从这些贡献中学到什么(并衡量!)。 ### 其它角色 @@ -148,7 +148,7 @@ via: https://opensource.com/article/19/8/measure-project 作者:[Jon Lawrence][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 4fdf1c84d8a7b48f02be5a98b8b18670bbca36f6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 18:48:27 +0800 Subject: [PATCH 534/951] PUB @wxy https://linux.cn/article-11244-1.html --- ...How to measure the health of an open source community.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190811 How to measure the health of an open source community.md (98%) diff --git a/translated/tech/20190811 How to measure the health of an open source community.md b/published/20190811 How to measure the health of an open source community.md similarity index 98% rename from translated/tech/20190811 How to measure the health of an open source community.md rename to published/20190811 How to measure the health of an open source community.md index 0e322e87d7..68f5c12299 100644 --- a/translated/tech/20190811 How to measure the health of an open source community.md +++ b/published/20190811 How to measure the health of an open source community.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11244-1.html) [#]: subject: (How to measure the health of an open source community) [#]: via: (https://opensource.com/article/19/8/measure-project) [#]: author: (Jon Lawrence https://opensource.com/users/the3rdlaw) @@ -12,7 +12,7 @@ > 这比较复杂。 -![metrics and data shown on a computer screen][1] +![](https://img.linux.net.cn/data/attachment/album/201908/19/184719nz3xuazppzu3vwcg.jpg) 作为一个经常管理软件开发团队的人,多年来我一直关注度量指标。一次次,我发现自己领导团队使用一个又一个的项目平台(例如 Jira、GitLab 和 Rally)生成了大量可测量的数据。从那时起,我已经及时投入了大量时间从记录平台中提取了有用的指标,并采用了一种我们可以理解的格式,然后使用这些指标对开发的许多方面做出更好的选择。 From 2c705d7e3df7b09eae6b2e7d35bbd971fd68b102 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 19:29:01 +0800 Subject: [PATCH 535/951] PRF @geekpi --- ...The Raspberry Pi -Absolute Beginner Tip.md | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md b/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md index e93ae319a9..070f5f801a 100644 --- a/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md +++ b/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md @@ -1,16 +1,18 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Turn On And Shutdown The Raspberry Pi [Absolute Beginner Tip]) [#]: via: (https://itsfoss.com/turn-on-raspberry-pi/) [#]: author: (Chinmay https://itsfoss.com/author/chinmay/) -如何打开和关闭树莓派(新手教程) +如何打开和关闭树莓派(绝对新手) ====== -_ **简介:这个贴士教你如何打开树莓派以及如何在之后正确关闭它。** _ +> 这篇短文教你如何打开树莓派以及如何在之后正确关闭它。 + +![](https://img.linux.net.cn/data/attachment/album/201908/19/192825rlrjy3sj77j7j79y.jpg) [树莓派][1]是[最流行的 SBC(单板计算机)][2]之一。如果你对这个话题感兴趣,我相信你已经有了一个树莓派。我还建议你使用[其他树莓派配件][3]来开始使用你的设备。 @@ -26,12 +28,14 @@ _ **简介:这个贴士教你如何打开树莓派以及如何在之后正确 micro USB 口为树莓派供电,打开它的方式是将电源线插入 micro USB 口。但是开始之前,你应该确保做了以下事情。 - * 根据官方[指南][8]准备带有 Raspbian 的 micro SD 卡并插入 micro SD 卡插槽。 -  * 插入 HDMI 线、USB 键盘和鼠标。 -  * 插入以太网线(可选)。 +* 根据官方[指南][8]准备带有 Raspbian 的 micro SD 卡并插入 micro SD 卡插槽。 +* 插入 HDMI 线、USB 键盘和鼠标。 +* 插入以太网线(可选)。 成上述操作后,请插入电源线。这会打开树莓派,显示屏将亮起并加载操作系统。 +如果您将其关闭并且想要再次打开它,则必须从电源插座(首选)或从电路板的电源端口拔下电源线,然后再插上。它没有电源按钮。 + ### 关闭树莓派 关闭树莓派非常简单,单击菜单按钮并选择关闭。 @@ -44,9 +48,11 @@ micro USB 口为树莓派供电,打开它的方式是将电源线插入 micro sudo shutdown now ``` -shutdown 执行后**等待**它完成,接着你可以关闭电源。树莓派关闭后,没有真正的办法可以在不重新打开电源的情况下打开树莓派。你可以使用 GPIO 打开树莓派,但这需要额外的改装。 +`shutdown` 执行后**等待**它完成,接着你可以关闭电源。 -_注意:Micro USB 口往往是脆弱的,因此请关闭/打开电源,而不是经常拔出插入 micro USB 口。_ +再说一次,树莓派关闭后,没有真正的办法可以在不关闭再打开电源的情况下打开树莓派。你可以使用 GPIO 打开树莓派,但这需要额外的改装。 + +*注意:Micro USB 口往往是脆弱的,因此请关闭/打开电源,而不是经常拔出插入 micro USB 口。 好吧,这就是关于打开和关闭树莓派的所有内容,你打算用它做什么?请在评论中告诉我。 @@ -57,13 +63,14 @@ via: https://itsfoss.com/turn-on-raspberry-pi/ 作者:[Chinmay][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/chinmay/ [b]: https://github.com/lujun9972 [1]: https://www.raspberrypi.org/ +[2]: https://linux.cn/article-10823-1.html [3]: https://itsfoss.com/things-you-need-to-get-your-raspberry-pi-working/ [7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/raspberry-pi-3-microusb.png?fit=800%2C532&ssl=1 [8]: https://www.raspberrypi.org/documentation/installation/installing-images/README.md From 1222928862a049926f6df5b61aebc26755e23bbf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 19:29:40 +0800 Subject: [PATCH 536/951] PUB @geekpi https://linux.cn/article-11245-1.html --- ...On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md (97%) diff --git a/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md b/published/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md similarity index 97% rename from translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md rename to published/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md index 070f5f801a..3afa479e52 100644 --- a/translated/tech/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md +++ b/published/20190429 How To Turn On And Shutdown The Raspberry Pi -Absolute Beginner Tip.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11245-1.html) [#]: subject: (How To Turn On And Shutdown The Raspberry Pi [Absolute Beginner Tip]) [#]: via: (https://itsfoss.com/turn-on-raspberry-pi/) [#]: author: (Chinmay https://itsfoss.com/author/chinmay/) From de8ffc7fbf2327371e00e631c586472282b830c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Mon, 19 Aug 2019 19:31:46 +0800 Subject: [PATCH 537/951] Translating --- sources/tech/20181202 How To Customize The GNOME 3 Desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20181202 How To Customize The GNOME 3 Desktop.md b/sources/tech/20181202 How To Customize The GNOME 3 Desktop.md index 91c16e4e99..84b8ab119d 100644 --- a/sources/tech/20181202 How To Customize The GNOME 3 Desktop.md +++ b/sources/tech/20181202 How To Customize The GNOME 3 Desktop.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: subject: (How To Customize The GNOME 3 Desktop?) From 8bc7e1b7bed167d9d5b71f474f9f9e4061014f24 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 19:45:10 +0800 Subject: [PATCH 538/951] APL --- .../tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md b/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md index f7cc8ef1f3..f22cb7ebd2 100644 --- a/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md +++ b/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 5d6f2c90ccd6e047b04b9d2c4c7a8569ac39a754 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 20:13:20 +0800 Subject: [PATCH 539/951] TSL&PRF: --- ...H - Share A Same Port For HTTPS And SSH.md | 227 ------------------ ...H - Share A Same Port For HTTPS And SSH.md | 205 ++++++++++++++++ 2 files changed, 205 insertions(+), 227 deletions(-) delete mode 100644 sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md create mode 100644 translated/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md diff --git a/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md b/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md deleted file mode 100644 index f22cb7ebd2..0000000000 --- a/sources/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md +++ /dev/null @@ -1,227 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (SSLH – Share A Same Port For HTTPS And SSH) -[#]: via: (https://www.ostechnix.com/sslh-share-port-https-ssh/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -SSLH – Share A Same Port For HTTPS And SSH -====== - -![SSLH - Share A Same Port For HTTPS And SSH][1] - -Some Internet service providers and corporate companies might have blocked most of the ports, and allowed only a few specific ports such as port 80 and 443 to tighten their security. In such cases, we have no choice, but use a same port for multiple programs, say the HTTPS Port **443** , which is rarely blocked. Here is where **SSLH** , a SSL/SSH multiplexer, comes in help. It will listen for incoming connections on a port 443. To put this more simply, SSLH allows us to run several programs/services on port 443 on a Linux system. So, you can use both SSL and SSH using a same port at the same time. If you ever been in a situation where most ports are blocked by the firewalls, you can use SSLH to access your remote server. This brief tutorial describes how to share a same port for https, ssh using SSLH in Unix-like operating systems. - -### SSLH – Share A Same Port For HTTPS, SSH, And OpenVPN - -##### Install SSLH - -SSLH is packaged for most Linux distributions, so you can install it using the default package managers. - -On **Debian** , **Ubuntu** , and derivatives, run: - -``` -$ sudo apt-get install sslh -``` - -While installing SSLH, you will prompted whether you want to run sslh as a service from inetd, or as a standalone server. Each choice has its own benefits. With only a few connection per day, it is probably better to run sslh from inetd in order to save resources. On the other hand, with many connections, sslh should run as a standalone server to avoid spawning a new process for each incoming connection. - -![][2] - -Install sslh - -On **Arch Linux** and derivatives like Antergos, Manjaro Linux, install it using Pacman as shown below. - -``` -$ sudo pacman -S sslh -``` - -On **RHEL** , **CentOS** , you need to add **EPEL** repository and then install SSLH as shown below. - -``` -$ sudo yum install epel-release - -$ sudo yum install sslh -``` - -On **Fedora** : - -``` -$ sudo dnf install sslh -``` - -If it is not available on default repositories, you can manually compile and install SSLH as described [**here**][3]. - -##### Configure Apache or Nginx webservers - -As you already know, Apache and Nginx webservers will listen on all network interfaces (i.e **0.0.0.0:443** ) by default. We need to change this setting to tell the webserver to listen on the localhost interface only (i.e **127.0.0.1:443 **or **localhost:443** ). - -To do so, edit the webserver (nginx or apache) configuration file and find the following line: - -``` -listen 443 ssl; -``` - -And, change it to: - -``` -listen 127.0.0.1:443 ssl; -``` - -If you’re using Virutalhosts in Apache, make sure you have changed that it too. - -``` -VirtualHost 127.0.0.1:443 -``` - -Save and close the config files. Do not restart the services. We haven’t finished yet. - -##### Configure SSLH - -Once you have made the webservers to listen on local interface only, edit SSLH config file: - -``` -$ sudo vi /etc/default/sslh -``` - -Find the following line: - -``` -Run=no -``` - -And, change it to: - -``` -Run=yes -``` - -Then, scroll a little bit down and modify the following line to allow SSLH to listen on port 443 on all available interfaces (Eg. 0.0.0.0:443). - -``` -DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:443 --pidfile /var/run/sslh/sslh.pid" -``` - -Where, - - * –user sslh : Requires to run under this specified username. - * –listen 0.0.0.0:443 : SSLH is listening on port 443 on all available interfaces. - * –sshs 127.0.0.1:22 : Route SSH traffic to port 22 on the localhost. - * –ssl 127.0.0.1:443 : Route HTTPS/SSL traffic to port 443 on the localhost. - - - -Save and close the file. - -Finally, enable and start sslh service to update the changes. - -``` -$ sudo systemctl enable sslh - -$ sudo systemctl start sslh -``` - -##### Testing - -Check if the SSLH daemon is listening to 443. - -``` -$ ps -ef | grep sslh -sslh 2746 1 0 15:51 ? 00:00:00 /usr/sbin/sslh --foreground --user sslh --listen 0.0.0.0 443 --ssh 127.0.0.1 22 --ssl 127.0.0.1 443 --pidfile /var/run/sslh/sslh.pid -sslh 2747 2746 0 15:51 ? 00:00:00 /usr/sbin/sslh --foreground --user sslh --listen 0.0.0.0 443 --ssh 127.0.0.1 22 --ssl 127.0.0.1 443 --pidfile /var/run/sslh/sslh.pid -sk 2754 1432 0 15:51 pts/0 00:00:00 grep --color=auto sslh -``` - -Now, you can access your remote server via SSH using port 443: - -``` -$ ssh -p 443 [email protected] -``` - -**Sample output:** - -``` -[email protected]'s password: -Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-55-generic x86_64) - -* Documentation: https://help.ubuntu.com -* Management: https://landscape.canonical.com -* Support: https://ubuntu.com/advantage - -System information as of Wed Aug 14 13:11:04 IST 2019 - -System load: 0.23 Processes: 101 -Usage of /: 53.5% of 19.56GB Users logged in: 0 -Memory usage: 9% IP address for enp0s3: 192.168.225.50 -Swap usage: 0% IP address for enp0s8: 192.168.225.51 - -* Keen to learn Istio? It's included in the single-package MicroK8s. - -https://snapcraft.io/microk8s - -61 packages can be updated. -22 updates are security updates. - - -Last login: Wed Aug 14 13:10:33 2019 from 127.0.0.1 -``` - -![][4] - -Access remote systems via SSH using port 443 - -See? I can now be able to access the remote server via SSH even if the default SSH port 22 is blocked. As you see in the above example, I have used the https port 443 for SSH connection. Also, we can use the same port 443 for openVPN connections too. - -* * * - -**Suggested read:** - - * [**How To SSH Into A Particular Directory On Linux**][5] - * [**How To Create SSH Alias In Linux**][6] - * [**How To Configure SSH Key-based Authentication In Linux**][7] - * [**How To Stop SSH Session From Disconnecting In Linux**][8] - * [**Allow Or Deny SSH Access To A Particular User Or Group In Linux**][9] - * [**4 Ways To Keep A Command Running After You Log Out Of The SSH Session**][10] - * [**ScanSSH – Fast SSH Server And Open Proxy Scanner**][11] - - - -* * * - -I tested SSLH on my Ubuntu 18.04 LTS server and it worked just fine as described above. I tested SSLH in a protected local area network, so I am not aware of the security issues. If you’re using it in production, let us know the advantages and disadvantages of using SSLH in the comment section below. - -For more details, check the official GitHub page given below. - -**Resource:** - - * [**SSLH GitHub Repository**][12] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/sslh-share-port-https-ssh/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2017/08/SSLH-Share-A-Same-Port-For-HTTPS-And-SSH-1-720x340.jpg -[2]: https://www.ostechnix.com/wp-content/uploads/2017/08/install-sslh.png -[3]: https://github.com/yrutschle/sslh/blob/master/doc/INSTALL.md -[4]: https://www.ostechnix.com/wp-content/uploads/2017/08/Access-remote-systems-via-SSH-using-port-443.png -[5]: https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/ -[6]: https://www.ostechnix.com/how-to-create-ssh-alias-in-linux/ -[7]: https://www.ostechnix.com/configure-ssh-key-based-authentication-linux/ -[8]: https://www.ostechnix.com/how-to-stop-ssh-session-from-disconnecting-in-linux/ -[9]: https://www.ostechnix.com/allow-deny-ssh-access-particular-user-group-linux/ -[10]: https://www.ostechnix.com/4-ways-keep-command-running-log-ssh-session/ -[11]: https://www.ostechnix.com/scanssh-fast-ssh-server-open-proxy-scanner/ -[12]: https://github.com/yrutschle/sslh diff --git a/translated/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md b/translated/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md new file mode 100644 index 0000000000..f0a25a6eb2 --- /dev/null +++ b/translated/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md @@ -0,0 +1,205 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (SSLH – Share A Same Port For HTTPS And SSH) +[#]: via: (https://www.ostechnix.com/sslh-share-port-https-ssh/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +SSLH:让 HTTPS 和 SSH 共享同一个端口 +====== + +![SSLH - Share A Same Port For HTTPS And SSH][1] + +一些 ISP 和公司可能已经阻止了大多数端口,并且只允许少数特定端口(如端口 80 和 443)访问来加强其安全性。在这种情况下,我们别无选择,但同一个端口可以用于多个程序,比如 HTTPS 端口 443,很少被阻止。通过 SSL/SSH 多路复用器 SSLH 的帮助,它可以侦听端口 443 上的传入连接。更简单地说,SSLH 允许我们在 Linux 系统上的端口 443 上运行多个程序/服务。因此,你可以同时通过同一个端口同时使用 SSL 和 SSH。如果你遇到大多数端口被防火墙阻止的情况,你可以使用 SSLH 访问远程服务器。这个简短的教程描述了如何在类 Unix 操作系统中使用 SSLH 让 https、ssh 共享相同的端口。 + +### SSLH:让 HTTPS、SSH 共享端口 + +#### 安装 SSLH + +大多数 Linux 发行版上 SSLH 都有软件包,因此你可以使用默认包管理器进行安装。 + +在 Debian、Ubuntu 及其衍生品上运行: + +``` +$ sudo apt-get install sslh +``` + +安装 SSLH 时,将提示你是要将 sslh 作为从 inetd 运行的服务,还是作为独立服务器运行。每种选择都有其自身的优点。如果每天只有少量连接,最好从 inetd 运行 sslh 以节省资源。另一方面,如果有很多连接,sslh 应作为独立服务器运行,以避免为每个传入连接生成新进程。 + +![][2] + +*安装 sslh* + +在 Arch Linux 和 Antergos、Manjaro Linux 等衍生品上,使用 Pacman 进行安装,如下所示: + +``` +$ sudo pacman -S sslh +``` + +在 RHEL、CentOS 上,你需要添加 EPEL 存储库,然后安装 SSLH,如下所示: + +``` +$ sudo yum install epel-release +$ sudo yum install sslh +``` + +在 Fedora: + +``` +$ sudo dnf install sslh +``` + +如果它在默认存储库中不可用,你可以如[这里][3]所述手动编译和安装 SSLH。 + +#### 配置 Apache 或 Nginx Web 服务器 + +如你所知,Apache 和 Nginx Web 服务器默认会监听所有网络接口(即 `0.0.0.0:443`)。我们需要更改此设置以告知 Web 服务器仅侦听 `localhost` 接口(即 `127.0.0.1:443` 或 `localhost:443`)。 + +为此,请编辑 Web 服务器(nginx 或 apache)配置文件并找到以下行: + +``` +listen 443 ssl; +``` + +将其修改为: + +``` +listen 127.0.0.1:443 ssl; +``` + +如果你在 Apache 中使用虚拟主机,请确保你也修改了它。 + +``` +VirtualHost 127.0.0.1:443 +``` + +保存并关闭配置文件。不要重新启动该服务。我们还没有完成。 + +#### 配置 SSLH + +使 Web 服务器仅在本地接口上侦听后,编辑 SSLH 配置文件: + +``` +$ sudo vi /etc/default/sslh +``` + +找到下列行: + +``` +Run=no +``` + +将其修改为: + +``` +Run=yes +``` + +然后,向下滚动一点并修改以下行以允许 SSLH 在所有可用接口上侦听端口 443(例如 `0.0.0.0:443`)。 + +``` +DAEMON_OPTS="--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:443 --pidfile /var/run/sslh/sslh.pid" +``` + +这里, + + * `–user sslh`:要求在这个特定的用户身份下运行。 + * `–listen 0.0.0.0:443`:SSLH 监听于所有可用接口的 443 端口。 + * `–sshs 127.0.0.1:22` : 将 SSH 流量路由到本地的 22 端口。 + * `–ssl 127.0.0.1:443` : 将 HTTPS/SSL 流量路由到本地的 443 端口。 + +保存并关闭文件。 + +最后,启用并启动 `sslh` 服务以更新更改。 + +``` +$ sudo systemctl enable sslh +$ sudo systemctl start sslh +``` + +#### 测试 + +检查 SSLH 守护程序是否正在监听 443。 + +``` +$ ps -ef | grep sslh +sslh 2746 1 0 15:51 ? 00:00:00 /usr/sbin/sslh --foreground --user sslh --listen 0.0.0.0 443 --ssh 127.0.0.1 22 --ssl 127.0.0.1 443 --pidfile /var/run/sslh/sslh.pid +sslh 2747 2746 0 15:51 ? 00:00:00 /usr/sbin/sslh --foreground --user sslh --listen 0.0.0.0 443 --ssh 127.0.0.1 22 --ssl 127.0.0.1 443 --pidfile /var/run/sslh/sslh.pid +sk 2754 1432 0 15:51 pts/0 00:00:00 grep --color=auto sslh +``` + +现在,你可以使用端口 443 通过 SSH 访问远程服务器: + +``` +$ ssh -p 443 [email protected] +``` + +示例输出: + +``` +[email protected]'s password: +Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-55-generic x86_64) + +* Documentation: https://help.ubuntu.com +* Management: https://landscape.canonical.com +* Support: https://ubuntu.com/advantage + +System information as of Wed Aug 14 13:11:04 IST 2019 + +System load: 0.23 Processes: 101 +Usage of /: 53.5% of 19.56GB Users logged in: 0 +Memory usage: 9% IP address for enp0s3: 192.168.225.50 +Swap usage: 0% IP address for enp0s8: 192.168.225.51 + +* Keen to learn Istio? It's included in the single-package MicroK8s. + +https://snapcraft.io/microk8s + +61 packages can be updated. +22 updates are security updates. + + +Last login: Wed Aug 14 13:10:33 2019 from 127.0.0.1 +``` + +![][4] + +*通过 SSH 使用 443 端口访问远程系统* + +看见了吗?即使默认的 SSH 端口 22 被阻止,我现在也可以通过 SSH 访问远程服务器。正如你在上面的示例中所看到的,我使用 https 端口 443 进行 SSH 连接。 + +我在我的 Ubuntu 18.04 LTS 服务器上测试了 SSLH,它如上所述工作得很好。我在受保护的局域网中测试了 SSLH,所以我不知道是否有安全问题。如果你在生产环境中使用它,请在下面的评论部分中告诉我们使用 SSLH 的优缺点。 + +有关更多详细信息,请查看下面给出的官方 GitHub 页面。 + +资源: + +* [SSLH GitHub 仓库][12] + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/sslh-share-port-https-ssh/ + +作者:[sk][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://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/wp-content/uploads/2017/08/SSLH-Share-A-Same-Port-For-HTTPS-And-SSH-1-720x340.jpg +[2]: https://www.ostechnix.com/wp-content/uploads/2017/08/install-sslh.png +[3]: https://github.com/yrutschle/sslh/blob/master/doc/INSTALL.md +[4]: https://www.ostechnix.com/wp-content/uploads/2017/08/Access-remote-systems-via-SSH-using-port-443.png +[5]: https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/ +[6]: https://www.ostechnix.com/how-to-create-ssh-alias-in-linux/ +[7]: https://www.ostechnix.com/configure-ssh-key-based-authentication-linux/ +[8]: https://www.ostechnix.com/how-to-stop-ssh-session-from-disconnecting-in-linux/ +[9]: https://www.ostechnix.com/allow-deny-ssh-access-particular-user-group-linux/ +[10]: https://www.ostechnix.com/4-ways-keep-command-running-log-ssh-session/ +[11]: https://www.ostechnix.com/scanssh-fast-ssh-server-open-proxy-scanner/ +[12]: https://github.com/yrutschle/sslh From 639c7b074e065a8ecdcc057f4efebef603976485 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 20:15:37 +0800 Subject: [PATCH 540/951] PUB @wxy https://linux.cn/article-11247-1.html --- .../20190815 SSLH - Share A Same Port For HTTPS And SSH.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190815 SSLH - Share A Same Port For HTTPS And SSH.md (99%) diff --git a/translated/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md b/published/20190815 SSLH - Share A Same Port For HTTPS And SSH.md similarity index 99% rename from translated/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md rename to published/20190815 SSLH - Share A Same Port For HTTPS And SSH.md index f0a25a6eb2..88bbbfc21a 100644 --- a/translated/tech/20190815 SSLH - Share A Same Port For HTTPS And SSH.md +++ b/published/20190815 SSLH - Share A Same Port For HTTPS And SSH.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11247-1.html) [#]: subject: (SSLH – Share A Same Port For HTTPS And SSH) [#]: via: (https://www.ostechnix.com/sslh-share-port-https-ssh/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From 0b6fe4532a892af800f5ed06908594e271aa2af4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 22:30:54 +0800 Subject: [PATCH 541/951] APL --- sources/tech/20190806 Unboxing the Raspberry Pi 4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190806 Unboxing the Raspberry Pi 4.md b/sources/tech/20190806 Unboxing the Raspberry Pi 4.md index 83239f5505..ac0025ade2 100644 --- a/sources/tech/20190806 Unboxing the Raspberry Pi 4.md +++ b/sources/tech/20190806 Unboxing the Raspberry Pi 4.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3b4c39a037f6fef017af59aa7468028821353b80 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Aug 2019 23:31:39 +0800 Subject: [PATCH 542/951] TSL --- .../20190806 Unboxing the Raspberry Pi 4.md | 99 ------------------- .../20190806 Unboxing the Raspberry Pi 4.md | 99 +++++++++++++++++++ 2 files changed, 99 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20190806 Unboxing the Raspberry Pi 4.md create mode 100644 translated/tech/20190806 Unboxing the Raspberry Pi 4.md diff --git a/sources/tech/20190806 Unboxing the Raspberry Pi 4.md b/sources/tech/20190806 Unboxing the Raspberry Pi 4.md deleted file mode 100644 index ac0025ade2..0000000000 --- a/sources/tech/20190806 Unboxing the Raspberry Pi 4.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Unboxing the Raspberry Pi 4) -[#]: via: (https://opensource.com/article/19/8/unboxing-raspberry-pi-4) -[#]: author: (Anderson Silva https://opensource.com/users/ansilvahttps://opensource.com/users/bennuttall) - -Unboxing the Raspberry Pi 4 -====== -The Raspberry Pi 4 delivers impressive performance gains over its -predecessors, and the Starter Kit makes it easy to get it up and running -quickly. -![Raspberry Pi 4 board, posterized filter][1] - -When the Raspberry Pi 4 was [announced at the end of June][2], I wasted no time. I ordered two Raspberry Pi 4 Starter Kits the same day from [CanaKit][3]. The 1GB RAM version was available right away, but the 4GB version wouldn't ship until July 19th. Since I wanted to try both, I ordered them to be shipped together. - -![CanaKit's Raspberry Pi 4 Starter Kit and official accessories][4] - -Here's what I found when I unboxed my Raspberry Pi 4. - -### Power supply - -The Raspberry Pi 4 uses a USB-C connector for its power supply. Even though USB-C cables are very common now, your Pi 4 [may not like your USB-C cable][5] (at least with these first editions of the Raspberry Pi 4). So, unless you know exactly what you are doing, I recommend ordering the Starter Kit, which comes with an official Raspberry Pi charger. In case you would rather try whatever you have on hand, the device's input reads 100-240V ~ 50/60Hz 0.5A, and the output says 5.1V --- 3.0A. - -![Raspberry Pi USB-C charger][6] - -### Keyboard and mouse - -The official keyboard and mouse are [sold separately][7] from the Starter Kit, and at $25 total, they aren't really cheap, given you're paying only $35 to $55 for a proper computer. But the Raspberry Pi logo is printed on this keyboard (instead of the Windows logo), and there is something compelling about having an appropriate appearance. The keyboard is also a USB hub, so it allows you to plug in even more devices. I plugged in my [YubiKey][8] security key, and it works very nicely. I would classify the keyboard and mouse as a "nice to have" versus a "must-have." Your regular keyboard and mouse should work fine. - -![Official Raspberry Pi keyboard \(with YubiKey plugged in\) and mouse.][9] - -![Raspberry Pi logo on the keyboard][10] - -### Micro-HDMI cable - -Something that may have caught some folks by surprise is that, unlike the Raspberry Pi Zero that comes with a Mini-HDMI port, the Raspberry Pi 4 comes with a Micro-HDMI. They are not the same thing! So, even though you may have a suitable USB-C cable/power adaptor, mouse, and keyboard on hand, there is a pretty good chance you will need a Micro-HDMI-to-HDMI cable (or an adapter) to plug your new Raspberry Pi into a display. - -### The case - -Cases for the Raspberry Pi have been around for years and are probably one of the very first "official" peripherals the Raspberry Pi Foundation sold. Some people like them; others don't. I think putting a Pi in a case makes it easier to carry it around and avoid static electricity and bent pins. - -On the other hand, keeping your Pi covered can overheat the board. This CanaKit Starter Kit also comes with heatsink for the processor, which might help, as the newer Pis are already [known for running pretty hot][11]. - -![Raspberry Pi 4 case][12] - -### Raspbian and NOOBS - -The other item that comes with the Starter Kit is a microSD card with the correct version of the [NOOBS][13] operating system for the Raspberry Pi 4 pre-installed. (I got version 3.1.1, released June 24, 2019). If you're using a Raspberry Pi for the first time and are not sure where to start, this could save you a lot of time. The microSD card in the Starter Kit is 32GB. - -After you insert the microSD card and connect all the cables, just start up the Pi, boot into NOOBS, pick the Raspbian distribution, and wait while it installs. - -![Raspberry Pi 4 with 4GB of RAM][14] - -I noticed a couple of improvements while installing the latest Raspbian. (Forgive me if they've been around for a while—I haven't done a fresh install on a Pi since the 3 came out.) One is that Raspbian will ask you to set up a password for your account at first boot after installation, and the other is that it will run a software update (assuming you have network connectivity). These are great improvements to help keep your Raspberry Pi a little more secure. I would love to see the option to encrypt the microSD card at installation … maybe someday? - -![Running Raspbian updates at first boot][15] - -![Raspberry Pi 4 setup][16] - -It runs very smoothly! - -### Wrapping up - -Although CanaKit isn't the only authorized Raspberry Pi retailer in the US, I found its Starter Kit to provide great value for the price. - -So far, I am very impressed with the performance gains in the Raspberry Pi 4. I'm planning to try spending an entire workday using it as my only computer, and I'll write a follow-up article soon about how far I can go. Stay tuned! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/unboxing-raspberry-pi-4 - -作者:[Anderson Silva][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/ansilvahttps://opensource.com/users/bennuttall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/raspberrypi4_board_hardware.jpg?itok=KnFU7NvR (Raspberry Pi 4 board, posterized filter) -[2]: https://opensource.com/article/19/6/raspberry-pi-4 -[3]: https://www.canakit.com/raspberry-pi-4-starter-kit.html -[4]: https://opensource.com/sites/default/files/uploads/raspberrypi4_canakit.jpg (CanaKit's Raspberry Pi 4 Starter Kit and official accessories) -[5]: https://www.techrepublic.com/article/your-new-raspberry-pi-4-wont-power-on-usb-c-cable-problem-now-officially-confirmed/ -[6]: https://opensource.com/sites/default/files/uploads/raspberrypi_usb-c_charger.jpg (Raspberry Pi USB-C charger) -[7]: https://www.canakit.com/official-raspberry-pi-keyboard-mouse.html?defpid=4476 -[8]: https://www.yubico.com/products/yubikey-hardware/ -[9]: https://opensource.com/sites/default/files/uploads/raspberrypi_keyboardmouse.jpg (Official Raspberry Pi keyboard (with YubiKey plugged in) and mouse.) -[10]: https://opensource.com/sites/default/files/uploads/raspberrypi_keyboardlogo.jpg (Raspberry Pi logo on the keyboard) -[11]: https://www.theregister.co.uk/2019/07/22/raspberry_pi_4_too_hot_to_handle/ -[12]: https://opensource.com/sites/default/files/uploads/raspberrypi4_case.jpg (Raspberry Pi 4 case) -[13]: https://www.raspberrypi.org/downloads/noobs/ -[14]: https://opensource.com/sites/default/files/uploads/raspberrypi4_ram.jpg (Raspberry Pi 4 with 4GB of RAM) -[15]: https://opensource.com/sites/default/files/uploads/raspberrypi4_rasbpianupdate.jpg (Running Raspbian updates at first boot) -[16]: https://opensource.com/sites/default/files/uploads/raspberrypi_setup.jpg (Raspberry Pi 4 setup) diff --git a/translated/tech/20190806 Unboxing the Raspberry Pi 4.md b/translated/tech/20190806 Unboxing the Raspberry Pi 4.md new file mode 100644 index 0000000000..44ed535063 --- /dev/null +++ b/translated/tech/20190806 Unboxing the Raspberry Pi 4.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Unboxing the Raspberry Pi 4) +[#]: via: (https://opensource.com/article/19/8/unboxing-raspberry-pi-4) +[#]: author: (Anderson Silva https://opensource.com/users/ansilvahttps://opensource.com/users/bennuttall) + +树莓派 4 开箱记 +====== + +> 树莓派 4 与其前代产品相比具有令人印象深刻的性能提升,而入门套件使其易于快速启动和运行。 + +![Raspberry Pi 4 board, posterized filter][1] + +当 树莓派 4 [在 6 月底宣布发布][2]时,我没有迟疑,在宣布的同一天就从 [CanaKit][3] 订购了两个树莓派 4 入门套件。1GB RAM 版本有现货,但 4GB 版本要在 7 月 19 日才能发货。由于我想两个都试试,我两个都订购了让它们一起发货。 + +![CanaKit's Raspberry Pi 4 Starter Kit and official accessories][4] + +这是我开箱我的树莓派 4 后看到的。 + +### 电源 + +树莓派 4 使用 USB-C 连接器供电。虽然 USB-C 电缆现在非常普遍,但你的树莓派 4 [可能不喜欢你的USB-C 线][5](至少对于树莓派 4 的第一版如此)。因此,除非你确切知道自己在做什么,否则我建议你订购带有官方的树莓派充电器的入门套件。如果你想尝试手头的充电设备,那么设备的输入是100-240V ~ 50/60Hz 0.5A,输出为 5.1V - 3.0A。 + +![Raspberry Pi USB-C charger][6] + +### 键盘和鼠标 + +官方键盘和鼠标是和入门套件[单独出售][7],总价 25 美元,并不很便宜,因为你的这台树莓派电脑也只才 35 到 55 美元。但树莓派徽标印在这个键盘上(而不是 Windows 徽标),并且外观相宜。键盘也是 USB 集线器,因此它允许你插入更多设备。我插入了我的 [YubiKey][8] 安全密钥,它运行得非常好。我会把键盘和鼠标分类为“值得拥有”而不是“必须拥有”。你的常规键盘和鼠标应该可以正常工作。 + +![Official Raspberry Pi keyboard \(with YubiKey plugged in\) and mouse.][9] + +![Raspberry Pi logo on the keyboard][10] + +### Micro-HDMI 电缆 + +可能让一些人惊讶的是,与带有 Mini-HDMI 端口的树莓派 Zero 不同,上面牛皮 4 配备了 Micro-HDMI。它们不是同一个东西!因此,即使你手头有合适的 USB-C 线缆/电源适配器、鼠标和键盘,也很有可能需要使用 Micro-HDMI 转 HDMI 的线缆(或适配器)来将你的新树莓派接到显示器上。 + +### 外壳 + +树莓派的外壳已经有了多年,这可能是树莓派基金会销售的第一批“官方”外围设备之一。有些人喜欢他们,而有些人不喜欢。我认为将一个树莓派放在一个盒子里可以更容易携带它,可以避免静电和针脚弯曲。 + +另一方面,把你的树莓派包装起来会使电路板过热。这款 CanaKit 入门套件还配备了处理器散热器,这可能有所帮助,因为更新的树莓派已经[以运行相当热而闻名][11]了。 + +![Raspberry Pi 4 case][12] + +### Raspbian 和 NOOBS + +入门套件附带的另一个东西是 microSD 卡,其中预装了树莓派 4 的 [NOOBS][13] 操作系统的正确版本。(我拿到的是 3.19 版,发布于 2019 年 6 月 24 日)。如果你是第一次使用树莓派并且不确定从哪里开始,这可以为你节省大量时间。入门套件中的 microSD 卡容量为 32GB。 + +插入 microSD 卡并连接所有电缆后,只需启动树莓派,引导进入 NOOBS,选择 Raspbian 发行版,然后等待安装。 + +![Raspberry Pi 4 with 4GB of RAM][14] + +我注意到在安装最新的 Raspbian 时有一些改进。(如果他们已经存在一段时间了,请原谅我 —— 自从 3 出现以来我没有对树莓派进行过全新安装。)其中一个是 Raspbian 会要求你在安装后的首次启动为你的帐户设置一个密码,另一个是它将运行软件更新(假设你有网络连接)。这些都是很大的改进,有助于保持你的树莓派更安全。我很希望能有一天在安装时看到加密 microSD 卡的选项。 + +![Running Raspbian updates at first boot][15] + +![Raspberry Pi 4 setup][16] + +运行非常顺畅! + +### 结语 + +虽然 CanaKit 不是美国唯一授权的树莓派零售商,但我发现它的入门套件的价格物超所值。 + +到目前为止,我对树莓派 4 的性能提升印象深刻。我打算尝试用一整个工作日将它作为我唯一的计算机,我很快就会写一篇关于我探索了多远的后续文章。敬请关注! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/unboxing-raspberry-pi-4 + +作者:[Anderson Silva][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/ansilvahttps://opensource.com/users/bennuttall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/raspberrypi4_board_hardware.jpg?itok=KnFU7NvR (Raspberry Pi 4 board, posterized filter) +[2]: https://opensource.com/article/19/6/raspberry-pi-4 +[3]: https://www.canakit.com/raspberry-pi-4-starter-kit.html +[4]: https://opensource.com/sites/default/files/uploads/raspberrypi4_canakit.jpg (CanaKit's Raspberry Pi 4 Starter Kit and official accessories) +[5]: https://www.techrepublic.com/article/your-new-raspberry-pi-4-wont-power-on-usb-c-cable-problem-now-officially-confirmed/ +[6]: https://opensource.com/sites/default/files/uploads/raspberrypi_usb-c_charger.jpg (Raspberry Pi USB-C charger) +[7]: https://www.canakit.com/official-raspberry-pi-keyboard-mouse.html?defpid=4476 +[8]: https://www.yubico.com/products/yubikey-hardware/ +[9]: https://opensource.com/sites/default/files/uploads/raspberrypi_keyboardmouse.jpg (Official Raspberry Pi keyboard (with YubiKey plugged in) and mouse.) +[10]: https://opensource.com/sites/default/files/uploads/raspberrypi_keyboardlogo.jpg (Raspberry Pi logo on the keyboard) +[11]: https://www.theregister.co.uk/2019/07/22/raspberry_pi_4_too_hot_to_handle/ +[12]: https://opensource.com/sites/default/files/uploads/raspberrypi4_case.jpg (Raspberry Pi 4 case) +[13]: https://www.raspberrypi.org/downloads/noobs/ +[14]: https://opensource.com/sites/default/files/uploads/raspberrypi4_ram.jpg (Raspberry Pi 4 with 4GB of RAM) +[15]: https://opensource.com/sites/default/files/uploads/raspberrypi4_rasbpianupdate.jpg (Running Raspbian updates at first boot) +[16]: https://opensource.com/sites/default/files/uploads/raspberrypi_setup.jpg (Raspberry Pi 4 setup) From 6d0c935c564d8f186d5795a209d024850e9ebfee Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 01:27:18 +0800 Subject: [PATCH 543/951] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @lujun9972 翻译的很棒!你看看我校对有没有啥问题。 --- ... Command Line Heroes- Season 1- OS Wars.md | 161 ++++-------------- 1 file changed, 31 insertions(+), 130 deletions(-) diff --git a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index 2479ba1024..4c0256dbca 100644 --- a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -7,9 +7,13 @@ [#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) [#]: author: (redhat https://www.redhat.com) -代码英雄 第一季:操作系统战争(上) +《代码英雄》第一季(1):操作系统战争(上) ====== +> 代码英雄讲述了开发人员、程序员、黑客、极客和开源反叛者如何彻底改变技术前景的真实史诗故事。 + +本文是《[代码英雄](https://www.redhat.com/en/command-line-heroes)》系列播客[第一季第一集:操作系统战争(上)](https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) 的[音频](https://dts.podtrac.com/redirect.mp3/audio.simplecast.com/f7670e99.mp3)脚本。 + Saron Yitbarek:有些故事如史诗般,惊险万分,在我脑海中似乎出现了星球大战电影开头的爬行文字。你知道的,就像—— 配音:“第一集,操作系统大战” @@ -62,160 +66,57 @@ Saron Yitbarek:[00:08:30] 因此,在争夺数十亿潜在消费者心智的 Steven Levy:[00:12:00] 对于这个新界面来说,有很多令人激动的地方,它以前的交互界面更友好,以前用的所谓的命令行 —— 你和电脑之间的交互方式跟现实生活中的交互方式完全不同。鼠标和电脑上的图像让你可以做到像现实生活中的交互一样,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有那些命令。 -Saron Yitbarek: +Saron Yitbarek:[00:12:30] 不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向乔布斯展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。乔布斯觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是它最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念。”[00:13:00] 这话有些苛刻,但是,乔布斯带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983 年,苹果发布了 Lisa 电脑,1984 年又发布了 Mac 电脑。这些设备的创意是抄袭自施乐公司的。 -[00:12:30] +让我感兴趣的是,乔布斯对控诉他偷了图形用户界面的反应。他对此很冷静。他引用毕加索的话:“好的艺术家抄袭,伟大的艺术家偷窃。”他告诉一位记者,“我们总是无耻地窃取伟大的创意。”[00:13:30] 伟大的艺术家偷窃,好吧,我的意思是,我们说的并不是严格意义上的“偷窃”。没人拿到了专有的源代码并公然将其集成到他们自己的操作系统中去。这要更温和些,更像是创意的借用。这就难控制的多了,就像乔布斯自己即将学到的那样。传奇的软件奇才、真正的代码英雄 Andy Hertzfeld 就是麦金塔开发团队的最初成员。 -[00:13:00] +Andy Hertzfeld:[00:14:00] 是的,微软是我们的第一个麦金塔电脑软件合作伙伴。当时,我们并没有把他们当成是竞争对手。他们是苹果之外,我们第一家交付麦金塔电脑原型的公司。我通常每周都会和微软的技术主管聊一次。他们是第一个尝试我们所编写软件的外部团队。[00:14:30] 他们给了我们非常重要的反馈,总的来说,我认为我们的关系非常好。但我也注意到,在我与技术主管的交谈中,他开始问一些系统实现方面的问题,而他本无需知道这些,我觉得,他们想要复制麦金塔电脑。我很早以前就向史蒂夫·乔布斯反馈过这件事,但在 1983 年秋天,这件事达到了高潮。[00:15:00] 我们发现,他们在 1983 年 11 月的 COMDEX 上发布了 Windows,但却没有提前告诉我们。对此史蒂夫·乔布斯勃然大怒。他认为那是一种背叛。 -不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向 Jobs 展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。Jobs 觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是他最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念”。这话有些苛刻,但是,Jobs 带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983 年,苹果发布了 Lisa 电脑,1984 年又发布了 Mac 电脑。这些设备的创意是抄袭自施乐公司的。 +Saron Yitbarek:随着新版 Windows 的发布,很明显,微软从苹果那里学到了苹果从施乐那里学来的所有想法。乔布斯很易怒。他的关于伟大艺术家如何偷窃的毕加索名言被别人学去了,而且恐怕盖茨也正是这么做的。[00:15:30] 据报道,当乔布斯怒斥盖茨偷了他们的东西时,盖茨回应道:“史蒂夫,我觉得这更像是我们都有一个叫施乐的富有邻居,我闯进他家偷电视机,却发现你已经偷过了”。苹果最终以窃取 GUI 的外观和风格为名起诉了微软。这个案子持续了好几年,但是在 1993 年,第 9 巡回上诉法院的一名法官最终站在了微软一边。[00:16:00] Vaughn Walker 法官宣布外观和风格不受版权保护。这是非常重要的。这一决定让苹果在无法垄断桌面计算的界面。很快,苹果短暂的领先优势消失了。以下是 Steven Levy 的观点。 -[00:13:30] +Steven Levy:他们之所以失去领先地位,不是因为微软方面窃取了知识产权,而是因为他们无法巩固自己在上世纪 80 年代拥有的更好的操作系统的优势。坦率地说,他们的电脑索价过高。[00:16:30] 因此微软从 20 世纪 80 年代中期开始开发 Windows 系统,但直到 1990 年开发出的 Windows 3,我想,它才真正算是一个为黄金时期做好准备的版本,才真正可供大众使用。[00:17:00] 从此以后,微软能够将数以亿计的用户迁移到图形界面,而这是苹果无法做到的。虽然苹果公司有一个非常好的操作系统,但是那已经是 1984 年的产品了。 -让我感兴趣的是,乔布斯对控诉他偷了图形用户界面的反应。他对此很冷静。他引用毕加索的话:“好的艺术家复制,伟大的艺术家偷窃。”他告诉一位记者,“我们总是无耻地窃取伟大的创意”。伟大的艺术家偷窃。好吧。我的意思是,我们说的并不是严格意义上的偷窃。没有人获得专有的源代码并公然将其集成到他们自己的操作系统中去。这要更温和些,更像是创意的借用。这就难控制的多了,就像 Jobs 自己即将学到的那样。传奇的软件向导、真正的代码英雄 Andy Hertzfeld 就是麦金塔开发团队的最初成员。 - -[00:14:00] - -Andy Hertzfeld: - -[00:14:30] - -[00:15:00] - -是的,微软是我们与麦金塔电脑的第一个软件合作伙伴。当时,我们并没有把他们当成是竞争对手。他们是苹果之外,第一家我们交付麦金塔原型的公司。我通常每周都会和微软的技术主管聊一次。他们是尝试我们所编写软件的第一个外部团队。他们给了我们非常重要的反馈,总的来说,我认为我们的关系非常好。但我也注意到,在我与技术主管的交谈中,他开始问一些系统实现方面的问题,而他本无需知道这些,我觉得,他们想要复制麦金塔电脑。我很早以前就像史蒂夫·乔布斯反馈过这件事,但在 1983 年秋天,这件事达到了高潮。我们发现,他们在 1983 年 11 月的 COMDEX 上发布了 Windows,但却没有提前告诉我们。对此史蒂夫·乔布斯勃然大怒。他认为那是一种背叛。 - -Saron Yitbarek: - -[00:15:30] - -[00:16:00] - -随着新版 Windows 的发布,很明显,微软从苹果那里学到了苹果从施乐那里学来的所有想法。乔布斯很易怒。他的关于伟大艺术家如何偷窃的毕加索名言被别人学去了。而且恐怕盖茨也正是这么做的。据报道,当乔布斯怒斥盖茨偷了他们的东西时,盖茨回应道:“史蒂夫,我觉得这更像是我们都有一个叫施乐的富有邻居,我闯进他家偷电视机,却发现你已经偷过了”。苹果最终以窃取 GUI 的外观和风格为名起诉了微软。这个案子持续了好几年,但是在 1993 年,第九次巡回上诉法院的一名法官最终站在了微软一边。Vaughn Walker 法官宣布外观和风格不受版权保护。这是非常重要的。这一决定让苹果在无法垄断桌面计算的界面。很快,苹果短暂的领先优势消失了。以下是 Steven Levy 的观点。 - -Steven Levy: - -[00:16:30] - -[00:17:00] - -他们之所以失去领先地位,不是因为微软方面窃取了知识产权,而是因为在上世纪 80 年代,他们无法通过更好的操作系统来巩固自己的优势。坦率地说,他们的电脑索价过高。因此微软从 20 世纪 80 年代中期开始开发 Windows 系统,但直到 1990 年开发出的 Windows 3,我想,他才真正算是一个为黄金时期做好准备的版本,才真正可供大众使用。从此以后,微软能够将数以亿计的用户迁移到图形界面,而这是苹果无法做到的。虽然苹果公司有一个非常好的操作系统,但是那已经是 1984 年的产品了。 - -Saron Yitbarek: - -[00:17:30] - -[00:18:00] -现在微软主导着操作系统的战场。他们占据了 90% 的市场份额,并且针对各种各样的个人电脑进行了标准化。操作系统的未来看起来会由微软掌控。此后发生了什么 ?1997 年,波士顿 Macworld 博览会上,你看到了一个几近破产的苹果。一个谦逊的多的史蒂夫·乔布斯走上舞台,开始谈论伙伴关系的重要性。特别是他们与微软的新型合作伙伴关系。史蒂夫·乔布斯呼吁双方缓和关系,停止火拼。微软将拥有巨大的市场份额。从表面看,我们可能会认为世界和平了。但当利益如此巨大时,事情就没那么简单了。就在苹果和微软在数十年的争斗中伤痕累累、最终走向死角之际,一名 21 岁的芬兰计算机科学专业学生出现了。几乎是偶然地,他彻底改变了一切。 +Saron Yitbarek:现在微软主导着操作系统的战场。他们占据了 90% 的市场份额,并且针对各种各样的个人电脑进行了标准化。操作系统的未来看起来会由微软掌控。此后发生了什么?[00:17:30] 1997 年,波士顿 Macworld 博览会上,你看到了一个几近破产的苹果,一个谦逊的多的史蒂夫·乔布斯走上舞台,开始谈论伙伴关系的重要性,特别是他们与微软的新型合作伙伴关系。史蒂夫·乔布斯呼吁双方缓和关系,停止火拼。微软将拥有巨大的市场份额。从表面看,我们可能会认为世界和平了。但当利益如此巨大时,事情就没那么简单了。[00:18:00] 就在苹果和微软在数十年的争斗中伤痕累累、最终败退到死角之际,一名 21 岁的芬兰计算机科学专业学生出现了。几乎是偶然地,他彻底改变了一切。 我是 Saron Yitbarek,这里是代码英雄。 -[00:18:30] -正当某些科技巨头正忙着就专有软件相互攻击时,自由软件和开源软件的新领军者如雨后春笋般涌现。其中一位优胜者就是理查德·斯托尔曼。你也许对他的工作很熟悉。他想要有自由软件和自由社会。这就像言论自由一样的自由,而不是像免费啤酒一样的免费。早在 80 年代,斯托尔曼就发现,除了昂贵的专有操作系统(如 UNIX) 外,就没有其他可行的替代品。因此他决定自己做一个。斯托尔曼的自由软件基金会发明了 GNU,它的意思是 "GNU's not UNIX"。它将是一个像 UNIX 一样的操作系统,但不包含所有 UNIX 代码,而且用户可以自由共享。 +正当某些科技巨头正忙着就专有软件相互攻击时,自由软件和开源软件的新领军者如雨后春笋般涌现。[00:18:30] 其中一位优胜者就是理查德·斯托尔曼Richard Stallman。你也许对他的工作很熟悉。他想要有自由软件和自由社会。这就像言论自由一样的自由free,而不是像免费啤酒一样的免费free。早在 80 年代,斯托尔曼就发现,除了昂贵的专有操作系统(如 UNIX)外,就没有其他可行的替代品。因此他决定自己做一个。斯托尔曼的自由软件基金会Free Software Foundation开发了 GNU,当然,它的意思是 “GNU's not UNIX”。它将是一个像 UNIX 一样的操作系统,但不包含所有的 UNIX 代码,而且用户可以自由共享。 -[00:19:00] +[00:19:00] 为了让你体会到上世纪 80 年代自由软件概念的重要性,从不同角度来说拥有 UNIX 代码的两家公司,AT&T 贝尔实验室AT&T Bell Laboratories以及UNIX 系统实验室UNIX System Laboratories威胁将会起诉任何看过 UNIX 源代码后又创建自己操作系统的人。这些人是次级专利所属。[00:19:30] 用这两家公司的话来说,所有这些程序员都在“精神上受到了污染”,因为他们都见过 UNIX 代码。在 UNIX 系统实验室和伯克利软件设计公司Berkeley Software Design之间的一个著名的法庭案例中,有人认为任何功能类似的系统,即使它本身没有使用 UNIX 代码,也侵犯版权。Paul Jones 当时是一名开发人员。他现在是数字图书馆 ibiblio.org 的主管。 -[00:19:30] +Paul Jones:[00:20:00] 任何看过代码的人都受到了精神污染是他们的观点。因此几乎所有在安装有与 UNIX 相关操作系统的电脑上工作过的人以及任何在计算机科学部门工作的人都受到精神上的污染。因此,在 USENIX 的一年里,我们都得到了一写带有红色字母的白色小别针,上面写着“精神受到了污染”。我们很喜欢带着这些别针到处走,以表达我们跟着贝尔实验室混,因为我们的精神受到了污染。 -为了让你体会到 80 年代自由软件概念的重要性,从不同角度来说拥有 UNIX 代码的两家公司,AT&T 贝尔实验室 以及 UNIX 系统实验室威胁将会起诉任何看过 UNIX 源代码后又创建自己操作系统的人。 -这些人是次一级的专利所属。用这两家公司的话来说,所有这些程序员都在“精神上受到了污染”,因为他们都见过 UNIX 代码。在 UNIX 系统实验室和 Berkeley 软件设计之间的一个著名的法庭案例中,有人认为任何功能类似的系统,即使它本身没有使用 UNIX 代码,也归版权所有。Paul Jones 当时是一名开发人员。他现在是数字图书馆 ibiblio.org 的主任。 +Saron Yitbarek:[00:20:30] 整个世界都被精神污染了。想要保持纯粹、保持事物的美好和专有的旧哲学正变得越来越不现实。正是在这被污染的现实中,历史上最伟大的代码英雄之一诞生了,他是一个芬兰男孩,名叫林纳斯·托瓦兹Linus Torvalds。如果这是《星球大战》,那么林纳斯·托瓦兹就是我们的卢克·天行者Luke Skywalker。他是赫尔辛基大学一名温文尔雅的研究生。[00:21:00] 有才华,但缺乏大志。典型的被逼上梁山的英雄。和其他年轻的英雄一样,他也感到沮丧。他想把 386 处理器整合到他的新电脑中。他对自己的 IBM 兼容电脑上运行的 MS-DOS 操作系统并不感冒,也负担不起 UNIX 软件 5000 美元的价格,而只有 UNIX 才能让他自由地编程。解决方案是托瓦兹在 1991 年春天基于 MINIX 开发了一个名为 Linux 的操作系统内核。他自己的操作系统内核。 -Paul Jones: +Steven Vaughan-Nichols:[00:21:30] 林纳斯·托瓦兹真的只是想找点乐子而已。 -[00:20:00] +Saron Yitbarek:Steven Vaughan-Nichols 是 ZDNet.com 的特约编辑,而且他从科技行业出现以来就一直在写科技行业相关的内容。 -他们认为,任何看过代码的人都受到了精神污染。因此几乎所有在安装有与 UNIX 相关操作系统的电脑上工作过的人以及任何在计算机科学部门工作的人都受到精神上的污染。因此,在 USENIX 的一年里,我们都 a 发有带有红字的白色小别针,上面写着“精神受到了污染”。我们很喜欢带着这些别针到处走,以表达我们力挺 Bell,因为我们的精神受到了污染。 +Steven Vaughan-Nichols:当时有几个类似的操作系统。他最关注的是一个名叫 MINIX 的操作系统,MINIX 旨在让学生学习如何构建操作系统。林纳斯看到这些,觉得很有趣,但他想建立自己的操作系统。[00:22:00] 所以,它实际上始于赫尔辛基的一个 DIY 项目。一切就这样开始了,基本上就是一个大孩子在玩耍,学习如何做些什么。[00:22:30] 但不同之处在于,他足够聪明、足够执着,也足够友好,让所有其他人都参与进来,然后他开始把这个项目进行到底。27 年后,这个项目变得比他想象的要大得多。 -[00:20:30] +Saron Yitbarek:到 1991 年秋季,托瓦兹发布了 10000 行代码,世界各地的人们开始评头论足,然后进行优化、添加和修改代码。[00:23:00] 对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对微软、苹果和 IBM 已经做的很好的整个专有系统的道德侮辱。随后这种开放性被奉若神明。托瓦兹将 Linux 置于 GNU 通用公共许可证(GPL)之下。曾经保障斯托尔曼的 GNU 系统自由的许可证现在也将保障 Linux 的自由。Vaughan-Nichols 解释道,这种融入到 GPL 的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 -Saron Yitbarek: +Steven Vaughan-Nichols:[00:23:30] 事实上,根据 Linux 所遵循的许可协议,即 GPL 第 2 版,如果你想把贩卖 Linux 或者向全世界展示它,你必须与他人共享代码,所以如果你对其做了一些改进,仅仅给别人使用是不够的。事实上你必须和他们分享所有这些变化的具体细节。然后,如果这些改进足够好,就会被 Linux 所吸收。 -[00:21:00] +Saron Yitbarek:[00:24:00] 事实证明,这种公开的方式极具吸引力。埃里克·雷蒙德Eric Raymond 是这场运动的早期传道者之一,他在他那篇著名的文章中写道:“微软和苹果这样的公司一直在试图建造软件大教堂,而 Linux 及类似的软件则提供了一个由不同议程和方法组成的巨大集市,集市比大教堂有趣多了。” -整个世界都被精神污染了。想要保持纯粹,保持事物的美好和专有的旧哲学正变得越来越不现实。正是在这被污染的现实中,历史上最伟大其中一个的代码英雄诞生了,他是一个芬兰男孩,名叫 Linus Torvalds。如果这是《星球大战》,那么 Linus Torvalds 就是我们的卢克·天行者。他是赫尔辛基大学一名温文尔雅的研究生。有才华,但缺乏宏伟的愿景。典型的被逼上梁山的英雄。和其他年轻的英雄一样,他也感到沮丧。他想把 386 处理器整合到他的新电脑中。他对自己的 IBM 主机上运行的 MS-DOS 操作系统并不感冒,也负担不起 UNIX 软件 5000 美元的价格,而只有 UNIX 才能让他自由地编程。解决方案是 Torvalds 在 1991 年春天基于 MINIX 开发了一个名为 Linux 的操作系统内核。他自己的操作系统内核。 +tormy Peters:我认为在那个时候,真正吸引人的是人们终于可以把控自己的世界了。 -[00:21:30] +Saron Yitbarek:Stormy Peters 是一位行业分析师,也是自由和开源软件的倡导者。 -Steven Vaughan-Nichols: +Stormy Peters:[00:24:30] 当开源软件第一次出现的时候,所有的操作系统都是专有的。如果不使用专有软件,你甚至不能添加打印机,你不能添加耳机,你不能自己开发一个小型硬件设备,然后让它在你的笔记本电脑上运行。你甚至不能放入 DVD 并复制它,因为你不能改变软件,即使你拥有这张 DVD,你也无法复制它。[00:25:00] 你无法控制你购买的硬件/软件系统。你不能从中创造出任何新的、更大的、更好的东西。这就是为什么开源操作系统在一开始就如此重要的原因。我们需要一个开源协作环境,在那里我们可以构建更大更好的东西。 -Linus Torvalds 真的只想找点乐子。 +Saron Yitbarek:请注意,Linux 并不是一个纯粹的平等主义乌托邦。林纳斯·托瓦兹不会批准对内核的所有修改,而是主导了内核的变更。他安排了十几个人来管理内核的不同部分。[00:25:30] 这些人也会信任自己下面的人,以此类推,形成信任金字塔。变化可能来自任何地方,但它们都是经过判断和策划的。 -Saron Yitbarek: +然而,考虑到到林纳斯的 DIY 项目一开始是多么的简陋和随意,这项成就令人十分惊讶。他完全不知道自己就是这一切中的卢克·天行者。当时他只有 21 岁,一半的时间都在编程。但是当魔盒第一次被打开,人们开始给他反馈。[00:26:00] 几十个,然后几百个,成千上万的贡献者。有了这样的众包基础,Linux 很快就开始成长。真的成长得很快。甚至最终引起了微软的注意。他们的首席执行官史蒂夫·鲍尔默Steve Ballmer将 Linux 称为是“一种癌症,从知识产权得角度来看,它传染了接触到得任何东西 ”。Steven Levy 将会描述 Ballmer 的由来。 -Steven Vaughan-Nichols 是 ZDNet.com 的特约编辑,而且他从科技行业出现以来就一直在写科技行业相关的内容。 +Steven Levy:[00:26:30] 一旦微软真正巩固了它的垄断地位,而且它也确实被联邦法院判定为垄断,他们将会对任何可能对其构成威胁的事情做出强烈反应。因此,既然他们对软件收费,很自然得,他们将自由软件得出现看成是一种癌症。他们试图提出一个知识产权理论,来解释为什么这对消费者不利。 -Steven Vaughan-Nichols: +Saron Yitbarek:[00:27:00] Linux 在不断传播,微软也开始担心起来。到了 2006 年,Linux 成为仅次于 Windows 的第二大常用操作系统,全球约有 5000 名开发人员在使用它。5000 名开发者。还记得比尔·盖茨给苹果公司的备忘录吗?在那份备忘录中,他向苹果公司的员工们论述了与他人合作的重要性。事实证明,开源将把伙伴关系的概念提升到一个全新的水平,这是比尔·盖茨从未预见到的。 -[00:22:00] - -[00:22:30] - -当时有几个类似的操作系统。他最关心的是一个名叫 MINIX 的操作系统,MINIX 旨在让学生学习如何构建操作系统。莱纳斯着到这些,觉得很有趣,但他想建立自己的操作系统。因此它始于赫尔辛基的一个 DIY 项目。一切就这样开始了,基本上就是一个大孩子在玩耍,学习如何做事。但不同之处在于,他足够聪明,足够执着,也足够友好,让所有其他人都参与进来,然后他开始把这个项目进行到底。27 年后,这个项目变得比他想象的要大得多。 - -Saron Yitbarek: - -[00:23:00] - -到 1991 年秋季,Torvalds 发布了 10,000 行代码,世界各地的人们开始提供注释,然后进行优化、添加和修改代码。对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对整个专有系统(微软、苹果和 IBM 在这方面做的非常好)道德上的侮辱。随后这种开放性被奉若神明。Torvalds 将 Linux 置于 GNU 通用公共许可证之下。曾经保障斯托尔曼的 GNU 系统自由的许可证现在也将保障 Linux 的自由。Vaughan-Nichols 解释道,迁移到 incorporate GPL 的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 - -[00:23:30] - -Steven Vaughan-Nichols: - -事实上,根据 Linux 所遵循的许可协议,即 GPL 第 2 版,如果你想把贩卖 Linux 或者向全世界展示它,你必须与它人共享代码,所以如果你对其做了一些改进,仅仅给别人使用是不够的。事实上你必须和他们分享所有这些变化的具体细节。然后,如果这些改进足够好,就会被 Linux 所吸收。 - -Saron Yitbarek: - -[00:24:00] - -事实证明,这种公开的方式极具吸引力。Eric Raymond 是这场运动的早期传道者之一,他在他那篇著名的文章中写道:“微软和苹果这样的公司一直在试图建造软件大教堂,而 Linux 及类似的软件则提供了一个由不同日程和方法组成的巨大集市”集市比大教堂有趣多了。 - -tormy Peters: - -我认为在那个时候,真正吸引人的是人们终于可以把控自己的世界了。 - -Saron Yitbarek: - -Stormy Peters 是一位行业分析师,也是自由和开源软件的倡导者。 - -[00:24:30] - -Stormy Peters: - -[00:25:00] - -开源软件第一次出现的时候,所有的操作系统都是专有的。如果不使用专有软件,你甚至不能添加打印机。您不能添加耳机。你不能自己开发一个小型硬件设备,然后让它在你的笔记本电脑上运行。你甚至不能放入 DVD 并复制它,因为你不能改变软件。即使你拥有这张 DVD,你也无法复制它。你无法控制你购买的硬件/软件系统。你不能从中创造出任何新的、更大的、更好的东西。这就是为什么开源操作系统在一开始是如此重要的原因。我们需要一个开源协作环境,在那里我们可以构建更大更好的东西。 - -Saron Yitbarek: - -[00:25:30] - -请注意,Linux 并不是一个纯粹的平等主义乌托邦。Linus Torvalds 不会批准所有对内核的修改,但是他确实主持内核的变更。他安排了十几个人来管理内核的不同部分。这些人也会信任自己下面的人,以此类推,形成信任金字塔。变化可能来自任何地方,但它们都是经过判断和策划的。 - -[00:26:00] - -然而,考虑到到 Linus 的 DIY 项目一开始是多么的简陋和随意,这项成就令人十分惊讶。他完全不知道自己就是卢克·天行者。当时他只有 21 岁,一半的时间都在编程。但是当魔盒第一次被打开,人们开始给他反馈。几十个,然后几百个,成千上万的贡献者。有了这样的众包基础,Linux 很快就开始成长。真的成长得很快。甚至最终引起了微软的注意。他们的首席执行官 Steve Ballmer 将 Linux 称为是“一种癌症,从知识产权得角度来看,它传染了接触到得任何东西 ”。Steven Levy 将会描述 Ballmer 的由来。 - -Steven Levy: - -[00:26:30] -一旦微软真正巩固了它的垄断地位,而且它也确实被联邦法院判定为垄断,他们将会对任何可能对其构成威胁的事情做出强烈反应。因此,既然他们对软件收费,很自然得,他们将自由软件得出现看成是一种癌症。他们试图提出一个知识产权理论,来解释为什么这对消费者不利。 - -Saron Yitbarek: - -[00:27:00] - -Linux 在不断传播,微软也开始担心起来。到了 2006 年,Linux 成为仅次于 Windows 的第二大常用操作系统,全球约有 5000 名开发人员在使用它。5000 名开发者。还记得比尔·盖茨给苹果公司的备忘录吗?在那份备忘录中,他向苹果公司的员工们论述了与他人合作的重要性。事实证明,开源将把伙伴关系的概念提升到一个全新的水平,这是 Bill Gates 从未预见到的。 - -[00:27:30] - -[00:28:00] - -我们一直在谈论操作系统之间的巨型战斗,但是到目前为止,并没有怎么提到无名英雄和开发者们。在下次得代码英雄中,情况就不同了。第二集讲的是操作系统大战的第二部分,是关于 Linux 崛起的。业界醒悟过来,认识到了开发人员的重要性。这些开源反叛者变得越来越强大,战场从桌面转移到了服务器领域。这里有商业间谍活动、新的英雄人物,还有科技史上最不可能改变的想法。这一切都在操作系统大战的后半集内达到了高潮。 - -[00:28:30] - -要想自动免费获得新一集的代码英雄,请点击订阅苹果播客 、Spotify、 谷歌播放器等其他应用获取播客。在这一季剩下的时间里,我们将参观最新的战场,相互争斗的版图,这里是下一代代码英雄留下印记的地方。更多信息,请访问 redhat.com/commandlineheroes。我是 Saron Yitbarek。下次之前,继续编码。 +[00:27:30] 我们一直在谈论操作系统之间的大战,但是到目前为止,并没有怎么提到无名英雄和开发者们。在下次的代码英雄中,情况就不同了。第二集讲的是操作系统大战的第二部分,是关于 Linux 崛起的。业界醒悟过来,认识到了开发人员的重要性。这些开源反叛者变得越来越强大,战场从桌面转移到了服务器领域。[00:28:00] 这里有商业间谍活动、新的英雄人物,还有科技史上最不可思议的改变。这一切都在操作系统大战的后半集内达到了高潮。 +要想免费自动获得新一集的代码英雄,请点击订阅苹果播客、Spotify、谷歌 Play,或其他应用获取该播客。在这一季剩下的时间里,我们将参观最新的战场,相互争斗的版图,这里是下一代的代码英雄留下印记的地方。[00:28:30] 更多信息,请访问 https://redhat.com/commandlineheroes 。我是 Saron Yitbarek。下次之前,继续编码。 -------------------------------------------------------------------------------- @@ -224,7 +125,7 @@ via: https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1 作者:[redhat][a] 选题:[lujun9972][b] 译者:[lujun9972](https://github.com/lujun9972) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c9e691d4badb4c9942635c7fc31296941315d020 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 20 Aug 2019 08:50:57 +0800 Subject: [PATCH 544/951] translating --- ...d, it has the wrong hash- Error In Ubuntu.md | 93 ------------------- ...d, it has the wrong hash- Error In Ubuntu.md | 74 +++++++++++++++ 2 files changed, 74 insertions(+), 93 deletions(-) delete mode 100644 sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md create mode 100644 translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md diff --git a/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md b/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md deleted file mode 100644 index 71ec68f8bd..0000000000 --- a/sources/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu) -[#]: via: (https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu -====== - -Today, I tried to update the repository lists in my Ubuntu 18.04 LTS desktop and got an error that says – **E: The package cache file is corrupted, it has the wrong hash**. Here is what I run from the Terminal and its output: - -``` -$ sudo apt update -``` - -Sample output: - -``` -Hit:1 http://it-mirrors.evowise.com/ubuntu bionic InRelease -Hit:2 http://it-mirrors.evowise.com/ubuntu bionic-updates InRelease -Hit:3 http://it-mirrors.evowise.com/ubuntu bionic-backports InRelease -Hit:4 http://it-mirrors.evowise.com/ubuntu bionic-security InRelease -Hit:5 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease -Hit:7 http://ppa.launchpad.net/leaeasy/dde/ubuntu bionic InRelease -Hit:8 http://ppa.launchpad.net/rvm/smplayer/ubuntu bionic InRelease -Ign:6 https://dl.bintray.com/etcher/debian stable InRelease -Get:9 https://dl.bintray.com/etcher/debian stable Release [3,674 B] -Fetched 3,674 B in 3s (1,196 B/s) -Reading package lists... Done -E: The package cache file is corrupted, it has the wrong hash -``` - -![][2] - -“The package cache file is corrupted, it has the wrong hash” Error In Ubuntu - -After couple Google searches, I found a workaround to fix this error. - -If you ever encountered with this error, don’t panic. Just run the following commands to fix it. - -Before running the following command, **double check you have added “*” at the end**. It is very important to add ***** at the end of this command. If you don’t add it, it will delete **/var/lib/apt/lists/** directory and there is no way to bring it back. You have been warned! - -``` -$ sudo rm -rf /var/lib/apt/lists/* -``` - -Now I tried again to update the system using command: - -``` -$ sudo apt update -``` - -![][3] - -This time it works!! Hope this helps. - -* * * - -**Suggested read:** - - * [**How To Fix Broken Ubuntu OS Without Reinstalling It**][4] - * [**How to fix “Package operation failed” Error in Ubuntu**][5] - * [**Fix “dpkg: error: parsing file ‘/var/lib/dpkg/updates/0014′” Error In Ubuntu**][6] - * [**How To Fix “Kernel driver not installed (rc=-1908)” VirtualBox Error In Ubuntu**][7] - * [**How to fix ‘Failed to install the Extension pack’ error in Ubuntu**][8] - - - -* * * - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[2]: https://www.ostechnix.com/wp-content/uploads/2019/08/The-package-cache-file-is-corrupted.png -[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/apt-update-command-output-in-Ubuntu.png -[4]: https://www.ostechnix.com/how-to-fix-broken-ubuntu-os-without-reinstalling-it/ -[5]: https://www.ostechnix.com/how-to-fix-package-operation-failed-error-in-ubuntu/ -[6]: https://www.ostechnix.com/fix-dpkg-error-parsing-file-var-lib-dpkg-updates-0014-error-in-ubuntu/ -[7]: https://www.ostechnix.com/how-to-fix-kernel-driver-not-installed-rc-1908-virtualbox-error-in-ubuntu/ -[8]: https://www.ostechnix.com/some-softwares-are-not-working-after-uninstall-moksha-desktop-from-ubuntu-14-04-lts/ diff --git a/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md b/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md new file mode 100644 index 0000000000..f7823538eb --- /dev/null +++ b/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu) +[#]: via: (https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +修复 Ubuntu 中 “E: The package cache file is corrupted, it has the wrong hash” 错误 +====== + +今天,我尝试更新我的 Ubuntu 18.04 LTS 的仓库列表,但收到了一条错误消息:“**E: The package cache file is corrupted, it has the wrong hash**”。这是我在终端运行的命令以及输出: + +``` +$ sudo apt update +``` + +示例输出: + +``` +Hit:1 http://it-mirrors.evowise.com/ubuntu bionic InRelease +Hit:2 http://it-mirrors.evowise.com/ubuntu bionic-updates InRelease +Hit:3 http://it-mirrors.evowise.com/ubuntu bionic-backports InRelease +Hit:4 http://it-mirrors.evowise.com/ubuntu bionic-security InRelease +Hit:5 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease +Hit:7 http://ppa.launchpad.net/leaeasy/dde/ubuntu bionic InRelease +Hit:8 http://ppa.launchpad.net/rvm/smplayer/ubuntu bionic InRelease +Ign:6 https://dl.bintray.com/etcher/debian stable InRelease +Get:9 https://dl.bintray.com/etcher/debian stable Release [3,674 B] +Fetched 3,674 B in 3s (1,196 B/s) +Reading package lists... Done +E: The package cache file is corrupted, it has the wrong hash +``` + +![][2] + +Ubuntu 中的 “The package cache file is corrupted, it has the wrong hash” 错误 + +经过一番谷歌搜索,我找到了解决此错误的方法。 + +如果你遇到过这个错误,不要惊慌。只需运行下面的命令修复。 + +在运行命令之前,**请再次确认你在最后加入了 “\*”**。在命令最后加上 ***** 很重要。如果你没有添加,它会删除 **/var/lib/apt/lists/** 目录,而且无法恢复。我提醒过你了! + +``` +$ sudo rm -rf /var/lib/apt/lists/* +``` + +现在我再次使用下面的命令更新系统: + +``` +$ sudo apt update +``` + +![][3] + +现在好了!希望它有帮助。 + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/08/The-package-cache-file-is-corrupted.png +[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/apt-update-command-output-in-Ubuntu.png From 4983a4f84118f7f0cf9f305cde907d234b869784 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 20 Aug 2019 08:57:32 +0800 Subject: [PATCH 545/951] translating --- ...iver not installed (rc--1908)- VirtualBox Error In Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md b/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md index db2cf67506..9f977842f4 100644 --- a/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md +++ b/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 11b99e97662fe026f8015fc155b3d6c140df9965 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 09:18:28 +0800 Subject: [PATCH 546/951] PRF @wxy --- .../20190806 Unboxing the Raspberry Pi 4.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20190806 Unboxing the Raspberry Pi 4.md b/translated/tech/20190806 Unboxing the Raspberry Pi 4.md index 44ed535063..152c924539 100644 --- a/translated/tech/20190806 Unboxing the Raspberry Pi 4.md +++ b/translated/tech/20190806 Unboxing the Raspberry Pi 4.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Unboxing the Raspberry Pi 4) @@ -12,23 +12,23 @@ > 树莓派 4 与其前代产品相比具有令人印象深刻的性能提升,而入门套件使其易于快速启动和运行。 -![Raspberry Pi 4 board, posterized filter][1] +![](https://img.linux.net.cn/data/attachment/album/201908/20/091730rl99q2ahycd4sz9h.jpg) -当 树莓派 4 [在 6 月底宣布发布][2]时,我没有迟疑,在宣布的同一天就从 [CanaKit][3] 订购了两个树莓派 4 入门套件。1GB RAM 版本有现货,但 4GB 版本要在 7 月 19 日才能发货。由于我想两个都试试,我两个都订购了让它们一起发货。 +当树莓派 4 [在 6 月底宣布发布][2]时,我没有迟疑,在发布的同一天就从 [CanaKit][3] 订购了两套树莓派 4 入门套件。1GB RAM 版本有现货,但 4GB 版本要在 7 月 19 日才能发货。由于我想两个都试试,这两个都订购了让它们一起发货。 ![CanaKit's Raspberry Pi 4 Starter Kit and official accessories][4] -这是我开箱我的树莓派 4 后看到的。 +这是我开箱我的树莓派 4 后所看到的。 ### 电源 -树莓派 4 使用 USB-C 连接器供电。虽然 USB-C 电缆现在非常普遍,但你的树莓派 4 [可能不喜欢你的USB-C 线][5](至少对于树莓派 4 的第一版如此)。因此,除非你确切知道自己在做什么,否则我建议你订购带有官方的树莓派充电器的入门套件。如果你想尝试手头的充电设备,那么设备的输入是100-240V ~ 50/60Hz 0.5A,输出为 5.1V - 3.0A。 +树莓派 4 使用 USB-C 连接器供电。虽然 USB-C 电缆现在非常普遍,但你的树莓派 4 [可能不喜欢你的USB-C 线][5](至少对于树莓派 4 的第一版如此)。因此,除非你确切知道自己在做什么,否则我建议你订购含有官方树莓派充电器的入门套件。如果你想尝试手头的充电设备,那么该设备的输入是 100-240V ~ 50/60Hz 0.5A,输出为 5.1V - 3.0A。 ![Raspberry Pi USB-C charger][6] ### 键盘和鼠标 -官方键盘和鼠标是和入门套件[单独出售][7],总价 25 美元,并不很便宜,因为你的这台树莓派电脑也只才 35 到 55 美元。但树莓派徽标印在这个键盘上(而不是 Windows 徽标),并且外观相宜。键盘也是 USB 集线器,因此它允许你插入更多设备。我插入了我的 [YubiKey][8] 安全密钥,它运行得非常好。我会把键盘和鼠标分类为“值得拥有”而不是“必须拥有”。你的常规键盘和鼠标应该可以正常工作。 +官方的键盘和鼠标是和入门套件是[分开出售][7]的,总价 25 美元,并不很便宜,因为你的这台树莓派电脑也才只有 35 到 55 美元。但树莓派徽标印在这个键盘上(而不是 Windows 徽标),并且外观相宜。键盘也是 USB 集线器,因此它允许你插入更多设备。我插入了我的 [YubiKey][8] 安全密钥,它运行得非常好。我会把键盘和鼠标分类为“值得拥有”而不是“必须拥有”。你的常规键盘和鼠标应该也可以正常工作。 ![Official Raspberry Pi keyboard \(with YubiKey plugged in\) and mouse.][9] @@ -36,13 +36,13 @@ ### Micro-HDMI 电缆 -可能让一些人惊讶的是,与带有 Mini-HDMI 端口的树莓派 Zero 不同,上面牛皮 4 配备了 Micro-HDMI。它们不是同一个东西!因此,即使你手头有合适的 USB-C 线缆/电源适配器、鼠标和键盘,也很有可能需要使用 Micro-HDMI 转 HDMI 的线缆(或适配器)来将你的新树莓派接到显示器上。 +可能让一些人惊讶的是,与带有 Mini-HDMI 端口的树莓派 Zero 不同,树莓派 4 配备了 Micro-HDMI。它们不是同一个东西!因此,即使你手头有合适的 USB-C 线缆/电源适配器、鼠标和键盘,也很有可能需要使用 Micro-HDMI 转 HDMI 的线缆(或适配器)来将你的新树莓派接到显示器上。 ### 外壳 -树莓派的外壳已经有了多年,这可能是树莓派基金会销售的第一批“官方”外围设备之一。有些人喜欢他们,而有些人不喜欢。我认为将一个树莓派放在一个盒子里可以更容易携带它,可以避免静电和针脚弯曲。 +树莓派的外壳已经有了很多年,这可能是树莓派基金会销售的第一批“官方”外围设备之一。有些人喜欢它们,而有些人不喜欢。我认为将一个树莓派放在一个盒子里可以更容易携带它,可以避免静电和针脚弯曲。 -另一方面,把你的树莓派包装起来会使电路板过热。这款 CanaKit 入门套件还配备了处理器散热器,这可能有所帮助,因为更新的树莓派已经[以运行相当热而闻名][11]了。 +另一方面,把你的树莓派装在盒子里会使电路板过热。这款 CanaKit 入门套件还配备了处理器散热器,这可能有所帮助,因为较新的树莓派已经[以运行相当热而闻名][11]了。 ![Raspberry Pi 4 case][12] @@ -54,7 +54,7 @@ ![Raspberry Pi 4 with 4GB of RAM][14] -我注意到在安装最新的 Raspbian 时有一些改进。(如果他们已经存在一段时间了,请原谅我 —— 自从 3 出现以来我没有对树莓派进行过全新安装。)其中一个是 Raspbian 会要求你在安装后的首次启动为你的帐户设置一个密码,另一个是它将运行软件更新(假设你有网络连接)。这些都是很大的改进,有助于保持你的树莓派更安全。我很希望能有一天在安装时看到加密 microSD 卡的选项。 +我注意到在安装最新的 Raspbian 时有一些改进。(如果它们已经出现了一段时间,请原谅我 —— 自从树莓派 3 出现以来我没有对树莓派进行过全新安装。)其中一个是 Raspbian 会要求你在安装后的首次启动为你的帐户设置一个密码,另一个是它将运行软件更新(假设你有网络连接)。这些都是很大的改进,有助于保持你的树莓派更安全。我很希望能有一天在安装时看到加密 microSD 卡的选项。 ![Running Raspbian updates at first boot][15] @@ -75,7 +75,7 @@ via: https://opensource.com/article/19/8/unboxing-raspberry-pi-4 作者:[Anderson Silva][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 307a0f18309e996342359ea7892494cc368c0d7f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 09:18:59 +0800 Subject: [PATCH 547/951] PUB @wxy https://linux.cn/article-11248-1.html --- .../20190806 Unboxing the Raspberry Pi 4.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190806 Unboxing the Raspberry Pi 4.md (98%) diff --git a/translated/tech/20190806 Unboxing the Raspberry Pi 4.md b/published/20190806 Unboxing the Raspberry Pi 4.md similarity index 98% rename from translated/tech/20190806 Unboxing the Raspberry Pi 4.md rename to published/20190806 Unboxing the Raspberry Pi 4.md index 152c924539..b4a72adf63 100644 --- a/translated/tech/20190806 Unboxing the Raspberry Pi 4.md +++ b/published/20190806 Unboxing the Raspberry Pi 4.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11248-1.html) [#]: subject: (Unboxing the Raspberry Pi 4) [#]: via: (https://opensource.com/article/19/8/unboxing-raspberry-pi-4) [#]: author: (Anderson Silva https://opensource.com/users/ansilvahttps://opensource.com/users/bennuttall) From 8631f7ae229e616ec9d58f804d7a7016c498f036 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 09:57:14 +0800 Subject: [PATCH 548/951] PRF @wxy --- .../tech/20180622 Use LVM to Upgrade Fedora.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/tech/20180622 Use LVM to Upgrade Fedora.md b/translated/tech/20180622 Use LVM to Upgrade Fedora.md index 80fe0cae39..2c4f9ff474 100644 --- a/translated/tech/20180622 Use LVM to Upgrade Fedora.md +++ b/translated/tech/20180622 Use LVM to Upgrade Fedora.md @@ -5,7 +5,7 @@ 大多数用户发现使用标准流程升级[从一个 Fedora 版本升级到下一个][1]很简单。但是,Fedora 升级也不可避免地会遇到许多特殊情况。本文介绍了使用 DNF 和逻辑卷管理(LVM)进行升级的一种方法,以便在出现问题时保留可引导备份。这个例子是将 Fedora 26 系统升级到 Fedora 28。 -此处展示的过程比标准升级过程更复杂。在使用此过程之前,你应该充分掌握 LVM 的工作原理。如果没有适当的技能和细心,你可能会丢失数据和/或被迫重新安装系统!如果你不知道自己在做什么,那么**强烈建议**你坚持只使用受支持的升级方法。 +此处展示的过程比标准升级过程更复杂。在使用此过程之前,你应该充分掌握 LVM 的工作原理。如果没有适当的技能和细心,你可能会丢失数据和/或被迫重新安装系统!如果你不知道自己在做什么,那么**强烈建议**你坚持只使用得到支持的升级方法。 ### 准备系统 @@ -45,11 +45,11 @@ VG #PV #LV #SN Attr VSize VFree vg_sdg 1 8 0 wz--n- 232.39g 42.39g ``` -该系统有足够的可用空间,可以为升级后的 Fedora 28 的根卷分配 20G 的逻辑卷。如果你使用的是默认安装,则你的 LVM 中将没有可用空间。对 LVM 的一般性管理超出了本文的范围,但这里有一些可能采取的方法: +该系统有足够的可用空间,可以为升级后的 Fedora 28 的根卷分配 20G 的逻辑卷。如果你使用的是默认安装,则你的 LVM 中将没有可用空间。对 LVM 的一般性管理超出了本文的范围,但这里有一些情形下可能采取的方法: 1、`/home` 在自己的逻辑卷,而且 `/home` 中有大量空闲空间。 -你可以从图形界面中注销并切换到文本控制台,以 `root` 用户身份登录。然后你可以卸载 `/home`,并使用`lvreduce -r` 调整大小并重新分配 `/home` 逻辑卷。你也可以从现场镜像Live image启动(以便不使用 `/home`)并使用 gparted GUI 实用程序进行分区调整。 +你可以从图形界面中注销并切换到文本控制台,以 `root` 用户身份登录。然后你可以卸载 `/home`,并使用 `lvreduce -r` 调整大小并重新分配 `/home` 逻辑卷。你也可以从现场镜像Live image启动(以便不使用 `/home`)并使用 gparted GUI 实用程序进行分区调整。 2、大多数 LVM 空间被分配给根卷,该文件系统中有大量可用空间。 @@ -77,7 +77,7 @@ Using default stripesize 64.00 KiB. Logical volume "f26_s" created. ``` -现在可以将快照复制到新逻辑卷。当你替换自己的卷名时,**请确保目标正确**。如果不小心,就会不可撤销地删除了数据。此外,请确保你从根卷的快照复制,**而不是**你的现在的根卷。 +现在可以将快照复制到新逻辑卷。当你替换自己的卷名时,**请确保目标正确**。如果不小心,就会不可撤销地删除了数据。此外,请确保你从根卷的快照复制,**而不是**从你的现在的根卷。 ``` $ sudo dd if=/dev/vg_sdg/f26_s of=/dev/vg_sdg/f28 bs=256k @@ -135,7 +135,7 @@ linux16 /vmlinuz-4.16.11-100.fc26.x86_64 root=/dev/mapper/vg_sdg-f26 ro rd.lvm.l linux16 /vmlinuz-4.16.11-100.fc26.x86_64 root=/dev/mapper/vg_sdg-f28 ro rd.lvm.lv=vg_sdg/f28 rd.lvm.lv=vg_sdg/swap rhgb quiet LANG=en_US.UTF-8 ``` -编辑 `/mnt/f28/etc/default/grub` 并改变在启动时激活的默认根卷: +编辑 `/mnt/f28/etc/default/grub` 并改变在启动时激活的默认的根卷: ``` GRUB_CMDLINE_LINUX="rd.lvm.lv=vg_sdg/f28 rd.lvm.lv=vg_sdg/swap rhgb quiet" @@ -173,7 +173,7 @@ LABEL=F28 / ext4 defaults 1 1 ### 重启与升级 -重新启动,你的系统将使用新的根文件系统。它仍然是 Fedora 26,但是带有新的逻辑卷名称的副本,并可以进行 `dnf` 系统升级!如果出现任何问题,请使用旧引导菜单引导回到你的工作系统,此过程可避免触及旧系统。 +重新启动,你的系统将使用新的根文件系统。它仍然是 Fedora 26,但是是带有新的逻辑卷名称的副本,并可以进行 `dnf` 系统升级!如果出现任何问题,请使用旧引导菜单引导回到你的工作系统,此过程可避免触及旧系统。 ``` $ sudo systemctl reboot # or GUI equivalent @@ -205,7 +205,7 @@ via: https://fedoramagazine.org/use-lvm-upgrade-fedora/ 作者:[Stuart D Gathman][a] 选题:[lujun9972](https://github.com/lujun9972) 译者:[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 70f38e517496aa2021563ae5340fb7943d04c78d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 09:57:39 +0800 Subject: [PATCH 549/951] PUB @wxy https://linux.cn/article-11250-1.html --- .../tech => published}/20180622 Use LVM to Upgrade Fedora.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180622 Use LVM to Upgrade Fedora.md (100%) diff --git a/translated/tech/20180622 Use LVM to Upgrade Fedora.md b/published/20180622 Use LVM to Upgrade Fedora.md similarity index 100% rename from translated/tech/20180622 Use LVM to Upgrade Fedora.md rename to published/20180622 Use LVM to Upgrade Fedora.md From f2895f9e83eced8aec811fbddc8d3c07d38c0c0e Mon Sep 17 00:00:00 2001 From: darksun Date: Tue, 20 Aug 2019 12:08:16 +0800 Subject: [PATCH 550/951] =?UTF-8?q?=E4=BF=AE=E8=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20180116 Command Line Heroes- Season 1- OS Wars.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index 4c0256dbca..9010b59376 100644 --- a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -26,11 +26,11 @@ Saron Yitbarek:好吧。这也许有点戏剧性,但当我们谈论上世纪 我是 Saron Yitbarek,你现在收听的是代码英雄,一款红帽公司原创的博客节目。[00:01:30] 你问,什么是代码英雄Command Line Hero?嗯,如果你愿意创造而不仅仅是使用,如果你相信开发者拥有构建美好未来的能力,如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界,那么你,我的朋友,就是一位代码英雄。在本系列节目中,我们将为你带来那些“白码起家”(LCTT 译注:原文是 “from the command line up”,应该是演绎自 “from the ground up”——白手起家)改变技术的程序员故事。[00:02:00] 那么我是谁,凭什么指导你踏上这段艰苦的旅程?Saron Yitbarek 是哪根葱?嗯,事实上我觉得我跟你差不多。我是一名面向初学者的开发人员,我做的任何事都依赖于开源软件,我的世界就是如此。通过在博客中讲故事,我可以跳出无聊的日常工作,鸟瞰全景,希望这对你也一样有用。 -我迫不及待地想知道,开源技术从何而来?我的意思是,我对林纳斯·托瓦兹Linus Torvalds和 Linux^® 的荣耀有一些了解,[00:02:30] 我相信你也一样,但是说真的,开源并不是一开始就有的,对吗?如果我像发自内心的感激这些最新、最棒的技术,比如 DevOps 和容器之类的,我感觉我对那些早期的开发者缺乏了解,我有必要了解这些东西来自何处。所以,让我们暂时先不用担心内存泄露和缓冲溢出。我们的旅程将从操作系统之战开始,这是一场波澜壮阔的桌面控制之战。[00:03:00] 这场战争亘古未有,因为:首先,在计算机时代,大公司拥有指数级的规模优势;其次,从未有过这么一场控制争夺战是如此变化多端。比尔·盖茨和史蒂夫·乔布斯? 他们也不知道结果会如何,但是到目前为止,这个故事进行到一半的时候,他们所争夺的所有东西都将发生改变、进化,最终上升到云端。 +我迫不及待地想知道,开源技术从何而来?我的意思是,我对林纳斯·托瓦兹Linus Torvalds和 Linux^® 的荣耀有一些了解,[00:02:30] 我相信你也一样,但是说真的,开源并不是一开始就有的,对吗?如果我想发自内心的感激这些最新、最棒的技术,比如 DevOps 和容器之类的,我感觉我对那些早期的开发者缺乏了解,我有必要了解这些东西来自何处。所以,让我们暂时先不用担心内存泄露和缓冲溢出。我们的旅程将从操作系统之战开始,这是一场波澜壮阔的桌面控制之战。[00:03:00] 这场战争亘古未有,因为:首先,在计算机时代,大公司拥有指数级的规模优势;其次,从未有过这么一场控制争夺战是如此变化多端。比尔·盖茨和史蒂夫·乔布斯? 他们也不知道结果会如何,但是到目前为止,这个故事进行到一半的时候,他们所争夺的所有东西都将发生改变、进化,最终上升到云端。 [00:03:30] 好的,让我们回到 1983 年的秋季。还有六年我才出生。那时候的总统还是罗纳德·里根Ronald Reagan,美国和苏联扬言要把地球拖入核战争之中。在檀香山(火奴鲁鲁)的市政中心正在举办一年一度的苹果公司销售会议。一群苹果公司的员工正在等待史蒂夫·乔布斯上台。他 28 岁,热情洋溢,看起来非常自信。乔布斯很严肃地对着麦克风说他邀请了三个行业专家来就软件进行了一次小组讨论。[00:04:00] 然而随后发生的事情你肯定想不到。超级俗气的 80 年代音乐响彻整个房间。一堆多彩灯管照亮了舞台,然后一个播音员的声音响起- -配音:女士们,先生们,现在是麦金塔软件的约会游戏。 +配音:女士们,先生们,现在是麦金塔软件的约会游戏时间。 Saron Yitbarek:乔布斯的脸上露出一个大大的笑容,台上有三个 CEO 都需要轮流向他示好。这基本上就是 80 年代钻石王老五,不过是科技界的。[00:04:30] 两个软件大佬讲完话后,然后就轮到第三个人讲话了。仅此而已不是吗?是的。新面孔比尔·盖茨带着一个大大的遮住了半张脸的方框眼镜。他宣称在 1984 年,微软的一半收入将来自于麦金塔软件。他的这番话引来了观众热情的掌声。[00:05:00] 但是他们不知道的是,在一个月后,比尔·盖茨将会宣布发布 Windows 1.0 的计划。你永远也猜不到乔布斯正在跟苹果未来最大的敌人打情骂俏。但微软和苹果即将经历科技史上最糟糕的婚礼。他们会彼此背叛、相互毁灭,但又深深地、痛苦地捆绑在一起。 @@ -54,7 +54,7 @@ Ken Segal:这则广告在公司内、在业界内都引起了共鸣,成为 Saron Yitbarek:[00:08:30] 因此,在争夺数十亿潜在消费者心智的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主、非凡的英雄、一种对生活方式的选择。但比尔·盖茨知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,即便是帝王,也不能独自完成任务。 -[00:09:00] 1985 年 6 月 25 日。盖茨给当时的苹果 CEO John Scully 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到 1996 年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。[00:09:30] 盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得获得快速发展和建立标准所需的支持。”换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作。 +[00:09:00] 1985 年 6 月 25 日。盖茨给当时的苹果 CEO John Scully 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到 1996 年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。[00:09:30] 盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得快速发展和建立标准所需的支持。”换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作。 [00:10:00]多年后你依然可以看到这条哲学思想,当微软首席执行官史蒂夫·鲍尔默Steve Ballmer上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。”你懂我的意思了吧。微软喜欢开发人员。虽然目前(LCTT 译注:本播客发布于 2018 年初)他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。[00:10:30] 而当比尔·盖茨建议苹果公司也这么做时,如你可能已经猜到的,这个想法就被苹果公司抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了 Windows 1.0。战争开始了。 @@ -64,7 +64,7 @@ Saron Yitbarek:[00:08:30] 因此,在争夺数十亿潜在消费者心智的 好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是 1979 年,史蒂夫·乔布斯开车去帕洛阿尔托Palo Alto施乐公园研究中心Xerox Park research center。[00:11:30] 那里的工程师一直在为他们所谓的图形用户界面开发一系列的元素。也许你听说过。它们有菜单、滚动条、按钮、文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 -Steven Levy:[00:12:00] 对于这个新界面来说,有很多令人激动的地方,它以前的交互界面更友好,以前用的所谓的命令行 —— 你和电脑之间的交互方式跟现实生活中的交互方式完全不同。鼠标和电脑上的图像让你可以做到像现实生活中的交互一样,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有那些命令。 +Steven Levy:[00:12:00] 对于这个新界面来说,有很多令人激动的地方,它比以前的交互界面更友好,以前用的所谓的命令行 —— 你和电脑之间的交互方式跟现实生活中的交互方式完全不同。鼠标和电脑上的图像让你可以做到像现实生活中的交互一样,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有那些命令。 Saron Yitbarek:[00:12:30] 不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向乔布斯展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。乔布斯觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是它最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念。”[00:13:00] 这话有些苛刻,但是,乔布斯带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983 年,苹果发布了 Lisa 电脑,1984 年又发布了 Mac 电脑。这些设备的创意是抄袭自施乐公司的。 @@ -96,7 +96,7 @@ Steven Vaughan-Nichols:当时有几个类似的操作系统。他最关注的 Saron Yitbarek:到 1991 年秋季,托瓦兹发布了 10000 行代码,世界各地的人们开始评头论足,然后进行优化、添加和修改代码。[00:23:00] 对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对微软、苹果和 IBM 已经做的很好的整个专有系统的道德侮辱。随后这种开放性被奉若神明。托瓦兹将 Linux 置于 GNU 通用公共许可证(GPL)之下。曾经保障斯托尔曼的 GNU 系统自由的许可证现在也将保障 Linux 的自由。Vaughan-Nichols 解释道,这种融入到 GPL 的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 -Steven Vaughan-Nichols:[00:23:30] 事实上,根据 Linux 所遵循的许可协议,即 GPL 第 2 版,如果你想把贩卖 Linux 或者向全世界展示它,你必须与他人共享代码,所以如果你对其做了一些改进,仅仅给别人使用是不够的。事实上你必须和他们分享所有这些变化的具体细节。然后,如果这些改进足够好,就会被 Linux 所吸收。 +Steven Vaughan-Nichols:[00:23:30] 事实上,根据 Linux 所遵循的许可协议,即 GPL 第 2 版,如果你想贩卖 Linux 或者向全世界展示它,你必须与他人共享代码,所以如果你对其做了一些改进,仅仅给别人使用是不够的。事实上你必须和他们分享所有这些变化的具体细节。然后,如果这些改进足够好,就会被 Linux 所吸收。 Saron Yitbarek:[00:24:00] 事实证明,这种公开的方式极具吸引力。埃里克·雷蒙德Eric Raymond 是这场运动的早期传道者之一,他在他那篇著名的文章中写道:“微软和苹果这样的公司一直在试图建造软件大教堂,而 Linux 及类似的软件则提供了一个由不同议程和方法组成的巨大集市,集市比大教堂有趣多了。” From 6286ef33d9fed5b33a482af2a0cd3a00501543a9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 12:25:15 +0800 Subject: [PATCH 551/951] APL --- ...213 Podman and user namespaces- A marriage made in heaven.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md b/sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md index adc14c6111..bbff51d93e 100644 --- a/sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md +++ b/sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4a33a41200e373441e6b118251f8b693bb06ba26 Mon Sep 17 00:00:00 2001 From: Scvoet Date: Tue, 20 Aug 2019 12:38:53 +0800 Subject: [PATCH 552/951] =?UTF-8?q?=E7=94=B3=E9=A2=86=E5=8E=9F=E6=96=87:?= =?UTF-8?q?=20LiVES=20Video=20Editor=203.0=20is=20Here=20With=20Significan?= =?UTF-8?q?t=20Improvements.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ES Video Editor 3.0 is Here With Significant Improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md b/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md index 70f171ac2e..46d3badd53 100644 --- a/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md +++ b/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (scvoet) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 34173d20e82323ac25f05399bca182bafb98ddfd Mon Sep 17 00:00:00 2001 From: Scvoet Date: Tue, 20 Aug 2019 13:53:47 +0800 Subject: [PATCH 553/951] docs: translate 20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md --- ...0 is Here With Significant Improvements.md | 88 ++++++++++--------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md b/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md index 46d3badd53..30130205d6 100644 --- a/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md +++ b/sources/news/20190817 LiVES Video Editor 3.0 is Here With Significant Improvements.md @@ -7,81 +7,82 @@ [#]: via: (https://itsfoss.com/lives-video-editor/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -LiVES Video Editor 3.0 is Here With Significant Improvements +LiVES 视频编辑器 3.0 有了显著的改善 ====== -We recently covered a list of [best open source video editors][1]. LiVES is one of those open source video editors, available for free. +我们最近列出了[最好开源视频编辑器][1]的清单。LiVES 是这些开源视频编辑器中的免费提供服务的一个。 -Even though a lot of users are still waiting for the release on Windows, a major update just popped up for LiVES Video Editor (i.e v3.0.1 as the latest package) on Linux. The new upgrade includes some new features and improvements. +即使许多用户还在等待 Windows 版本的发行,但在刚刚发行的 LiVES 视频编辑器 Linux 版本中(最新版本 v3.0.1)进行了一个重大更新,更新内容中包括了一些新的功能和改进。 -In this article, I’ll cover the key improvements in the new version and I’ll also mention the steps to install it on your Linux system. +在这篇文章里,我将会列出新版本中的重要改进,并且我将会提到在 Linux 上安装的步骤。 -### LiVES Video Editor 3.0: New Changes +### LiVES 视频编辑器 3.0:新的改进 -![Lives Video Editor Loading in Zorin OS][2] +![Zorin OS 中正在加载的 LiVES 视频编辑器][2] -Overall, with this major update – LiVES Video Editor aims to have a smoother playback, prevent unwanted crashes, optimized video recording, and making the online video downloader more useful. +总的来说,在这次重大更新中 LiVES 视频编辑器旨在提供更加丝滑的回放、防止闻所未闻的崩溃、优化视频记录,以及让在线视频下载更加实用。 -The list of changes are: +下面列出了修改: - * Render silence to end of video if necessary during rendering. - * Improvements to openGL playback plugin, including much smoother playback. - * Re-enable Advanced options for the openGL playback plugin. - * Allow “Enough” in VJ / Pre-decode all frames - * Refactor code for timebase calculations during playback (better a/v synch). - * Overhaul external audio and audio recording to improve accuracy and use fewer CPU cycles. - * Auto switch to internal audio when entering multitack mode. - * Show correct effects state (on / off) when reshowing effect mapper window. - * Eliminate some race conditions between the audio and video threads. - * Improvements to online video downloader, clip size and format can now be selected, added an update option. - * Implemented reference counting for realtime effect instances. - * Extensively rewrote the main interface, cleaning up the code and making many visual improvements. - * Optimized recording when video generators are running. - * Improvements to the projectM filter wrapper, including SDL2 support. - * Added an option to invert the Z-order in multitrack compositor (rear layers can now overlay front ones). - * Added support for musl libc - * Updated translations for Ukranian + * 如果需要加载的话,可以静默加载直到到视频播放完毕。 + * 改进回放插件为 openGL,提供更加丝滑的回放。 + * 重新启用了 openGL 回放插件的高级选项。 +  * 在 VJ/预解码 中允许“充足”的所有帧 +  * 重构了在播放时基础计算的代码(有了更好的 a/v 同步)。 +  * 彻底修复了外部音频和音频,提高了准确性并减少了 CPU 周期。 +  * 进入多音轨模式时自动切换至内部音频。 +  * 重新显示效果映射器窗口时,将会正常展示效果状态(on/off)。 +  * 解决了音频和视频线程之间的冲突。 +  * 现在可以对在线视频下载器,剪辑大小和格式进行修改并添加了更新选项。 +  * 对实时效果实行了参考计数的记录。 +  * 大范围重写了主界面,清理代码并改进多视觉。 +  * 优化了视频播放器运行时的录制功能。 +  * 改进了 projectM 过滤器,包括支持了 SDL2。 +  * 添加了一个选项来逆转多轨合成器中的 Z-order(后层现在可以覆盖上层了)。 +  * 增加了对 musl libc 的支持 +  * 更新了乌克兰语的翻译 - -While some of the points listed can just go over your head if you are not an advanced video editor. But, in a nutshell, all of these things make ‘LiVES Video Editor’ a better open source video editing software. +如果您不是一位高级视频编辑师,也许会对上面列出的重要更新提不起太大的兴趣。但正是因为这些更新,才使得“LiVES 视频编辑器”成为了最好的开源视频编辑软件。 [][3] -Suggested read  VidCutter Lets You Easily Trim And Merge Videos In Linux +推荐阅读  VidCutter Lets You Easily Trim And Merge Videos In Linux -### Installing LiVES Video Editor on Linux +### 在 Linux 上安装 LiVES 视频编辑器 -LiVES is normally available in the repository of all major Linux distributions. However, you may not find the latest version on your software center yet. So, if you want to install it that way – you’ll have to wait. +LiVES 几乎可以在所有主要 Linux 发行版中使用。但是,您可能并不能在软件中心找到它的最新版本。所以,如果你想通过这种方式安装,那你就不得不耐心等待了。 -If you want to install it manually, you can get the RPM packages for Fedora/Open SUSE from its download page. The source is also available for Linux distros. +如果你想要手动安装,可以从它的下载页面获取 Fedora/Open SUSE 的 RPM 安装包。它也适用于其他 Linux 发行版。 -[Download LiVES Video Editor][4] +[下载 LiVES 视频编辑器] [4] -For Ubuntu (or Ubuntu-based distros), you can add the [unofficial PPA][5] maintained by [Ubuntuhandbook][6]. Here’s how to do it: +如果您使用的是 Ubuntu(或其他基于 Ubuntu 的发行版),您可以安装由 [Ubuntuhandbook][6] 进行维护的[非官方 PPA][5]。 -**1.** Launch the terminal and enter the following command: +下面由我来告诉你,你该做些什么: + +**1. **启动终端后输入以下命令: ``` -sudo add-apt-repository ppa:ubuntuhandbook1/lives +sudo add-apt-repository ppa:ubuntuhandbook1 / lives ``` -You will be prompted for the password to authenticate the addition of PPA. +系统将提示您输入密码用于确认添加 PPA。 -**2.** Once done, you can now easily proceed to update the list of packages and get LiVES Video Editor installed. Here’s the set of commands that you need to enter next: +**2. **完成后,您现在可以轻松地更新软件包列表并安装 LiVES 视频编辑器。以下是需要您输入的命令段: ``` sudo apt update -sudo apt install lives lives-plugins +sudo apt install life-plugins ``` -**3.** Now, it will start downloading and installing the video editor. You should be good to go in a minute. +**3.** 现在,它开始下载并安装视频编辑器,等待大约一分钟即可完成。 -**Wrapping Up** +**总结** -There are a handful of [video editors available on Linux][7]. But they are not often considered good enough for professional editing. I am not a professional but I do manage simple editing with such freely available video editors like LiVES. +Linux 上有许多[视频编辑器] [7]。但它们通常被认为不能进行专业的编辑。而我并不是一名专业人士,所以像 LiVES 这样免费的视频编辑器就足以进行简单的编辑了。 -How about you? How’s your experience with LiVES or other video editors on Linux? Let us know your thoughts in the comments below. +您认为怎么样呢?您在 Linux 上使用 LiVES 或其他视频编辑器的体验还好吗?在下面的评论中告诉我们你的感觉吧。 -------------------------------------------------------------------------------- @@ -89,13 +90,14 @@ via: https://itsfoss.com/lives-video-editor/ 作者:[Ankush Das][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Scvoet][c] 校对:[校对者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 +[c]: https://github.com/scvoet [1]: https://itsfoss.com/open-source-video-editors/ [2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/lives-video-editor-loading.jpg?ssl=1 [3]: https://itsfoss.com/vidcutter-video-editor-linux/ From 4528a5844706cd58da171008e0e3772da795cdbf Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Tue, 20 Aug 2019 16:49:00 +0800 Subject: [PATCH 554/951] Update 20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md --- ...ing Digital Files (e.g., Photographs) in Files and Folders.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md b/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md index d1fd01ef0c..e3f832254e 100644 --- a/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md +++ b/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md @@ -1,3 +1,4 @@ +qfzy1233 is translating Managing Digital Files (e.g., Photographs) in Files and Folders ====== Update 2014-05-14: added real world example From 6b7654fefc88763dce2255b209d8181bc4baa5f0 Mon Sep 17 00:00:00 2001 From: "qfzy1233@163.com" Date: Tue, 20 Aug 2019 17:06:21 +0800 Subject: [PATCH 555/951] Update 20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md --- ...iles (e.g., Photographs) in Files and Folders.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md b/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md index e3f832254e..7683868979 100644 --- a/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md +++ b/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md @@ -1,14 +1,17 @@ qfzy1233 is translating -Managing Digital Files (e.g., Photographs) in Files and Folders + + + +数码文件与文件夹收纳术(以照片为例) ====== -Update 2014-05-14: added real world example +更新 2014-05-14:增加了一些具体实例 -Update 2015-03-16: filtering photographs according to their GPS coordinates +更新 2015-03-16:根据照片的 GPS 坐标过滤图片 -Update 2016-08-29: replaced outdated `show-sel.sh` method with new `filetags --filter` method +更新 2016-08-29:以新的 `filetags--filter` (LCTT译注:文件标签过滤器)替换已经过时的 `show-sel.sh` 脚本(LCTT译注:show-sel 为 show firmware System Event Log records 即硬件系统事件及日志显示) Update 2017-08-28: Email comment on geeqie video thumbnails - +更新 2017-08-28: I am a passionate photographer when being on vacation or whenever I see something beautiful. This way, I collected many [JPEG][1] files over the past years. Here, I describe how I manage my digital photographs while avoiding any [vendor lock-in][2] which binds me to a temporary solution and leads to loss of data. Instead, I prefer solutions where I am able to **invest my time and effort for a long-term relationship**. This (very long) entry is **not about image files only** : I am going to explain further things like my folder hierarchy, file name convention, and so forth. Therefore, this information applies to all kind of files I process. From 64024c494256c1bfae870bd1da3418e2a05386cc Mon Sep 17 00:00:00 2001 From: Liwen Jiang Date: Tue, 20 Aug 2019 08:57:21 -0500 Subject: [PATCH 556/951] Apply for Translating Apply for Translating --- ... Security Update (Unattended Upgrades) on Debian-Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md b/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md index 226856f31c..c4a85f6c7d 100644 --- a/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md +++ b/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (tomjlw) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -156,7 +156,7 @@ via: https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubun 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[tomjlw](https://github.com/tomjlw) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bfe235e0a3605a11110db5f43d5d172e71c74273 Mon Sep 17 00:00:00 2001 From: Liwen Jiang Date: Tue, 20 Aug 2019 09:58:43 -0500 Subject: [PATCH 557/951] Submit for Review Submit for Review --- ... (Unattended Upgrades) on Debian-Ubuntu.md | 168 ------------------ ... (Unattended Upgrades) on Debian-Ubuntu.md | 165 +++++++++++++++++ 2 files changed, 165 insertions(+), 168 deletions(-) delete mode 100644 sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md create mode 100644 translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md diff --git a/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md b/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md deleted file mode 100644 index c4a85f6c7d..0000000000 --- a/sources/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (tomjlw) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Set up Automatic Security Update (Unattended Upgrades) on Debian/Ubuntu?) -[#]: via: (https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubuntu-debian/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -How To Set up Automatic Security Update (Unattended Upgrades) on Debian/Ubuntu? -====== - -One of an important task for Linux admins to make the system up-to-date. - -It’s keep your system more stable and avoid unwanted access and attack. - -Installing a package in Linux is a piece of cake. - -In the similar way we can update security patches as well. - -This is a simple tutorial that will show you to configure your system to receive automatic security updates. - -There are some security risks involved when you running an automatic security package upgrades without inspection, but there are also benefits. - -If you don’t want to miss security patches and would like to stay up-to-date with the latest security patches. - -Then you should set up an automatic security update with help of unattended upgrades utility. - -You can **[manually install Security Updates on Debian & Ubuntu systems][1]** if you don’t want to go for automatic security update. - -There are many ways that we can automate this. However, we are going with an official method and later we will cover other ways too. - -### How to Install unattended-upgrades package in Debian/Ubuntu? - -By default unattended-upgrades package should be installed on your system. But in case if it’s not installed use the following command to install it. - -Use **[APT-GET Command][2]** or **[APT Command][3]** to install unattended-upgrades package. - -``` -$ sudo apt-get install unattended-upgrades -``` - -The below two files are allows you to customize this utility. - -``` -/etc/apt/apt.conf.d/50unattended-upgrades -/etc/apt/apt.conf.d/20auto-upgrades -``` - -### Make necessary changes in 50unattended-upgrades file - -By default only minimal required options were enabled for security updates. It’s not limited and you can configure many option in this to make this utility more useful. - -I have trimmed the file and added only the enabled lines for better clarifications. - -``` -# vi /etc/apt/apt.conf.d/50unattended-upgrades - -Unattended-Upgrade::Allowed-Origins { - "${distro_id}:${distro_codename}"; - "${distro_id}:${distro_codename}-security"; - "${distro_id}ESM:${distro_codename}"; - }; -Unattended-Upgrade::DevRelease "false"; -``` - -There are three origins are enabled and the details are below. - - * **`${distro_id}:${distro_codename}:`**` ` It is necessary because security updates may pull in new dependencies from non-security sources. - * **`${distro_id}:${distro_codename}-security:`**` ` It is used to get a security updates from sources. - * **`${distro_id}ESM:${distro_codename}:`**` ` It is used to get a security updates for ESM (Extended Security Maintenance) users. - - - -**Enable Email Notification:** If you would like to receive email notifications after every security update, then modify the following line (uncomment it and add your email id). - -From: - -``` -//Unattended-Upgrade::Mail "root"; -``` - -To: - -``` -Unattended-Upgrade::Mail "[email protected]"; -``` - -**Auto Remove Unused Dependencies:** You may need to run “sudo apt autoremove” command after every update to remove unused dependencies from the system. - -We can automate this task by making the changes in the following line (uncomment it and change “false” to “true”). - -From: - -``` -//Unattended-Upgrade::Remove-Unused-Dependencies "false"; -``` - -To: - -``` -Unattended-Upgrade::Remove-Unused-Dependencies "true"; -``` - -**Enable Automatic Reboot:** You may need to reboot your system when a security updates installed for kernel. To do so, make the following changes in the following line. - -From: - -``` -//Unattended-Upgrade::Automatic-Reboot "false"; -``` - -To: Uncomment it and change “false” to “true” to enable automatic reboot. - -``` -Unattended-Upgrade::Automatic-Reboot "true"; -``` - -**Enable Automatic Reboot at The Specific Time:** If automatic reboot is enabled and you would like to perform the reboot at the specific time, then make the following changes. - -From: - -``` -//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; -``` - -To: Uncomment it and change the time as per your requirement. I set it to reboot at 5 AM. - -``` -Unattended-Upgrade::Automatic-Reboot-Time "05:00"; -``` - -### How to Enable Automatic Security Update? - -Now, we have configured the necessary options. Once you are done. - -Open the following file and verify it, both the values are set up correctly or not? It should not be a zero’s. (1=enabled, 0=disabled). - -``` -# vi /etc/apt/apt.conf.d/20auto-upgrades - -APT::Periodic::Update-Package-Lists "1"; -APT::Periodic::Unattended-Upgrade "1"; -``` - -**Details:** - - * The first line makes apt to perform “apt-get update” automatically every day. - * The second line makes apt to install security updates automatically every day. - - - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubuntu-debian/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[tomjlw](https://github.com/tomjlw) -校对:[校对者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/manually-install-security-updates-ubuntu-debian/ -[2]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ -[3]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ diff --git a/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md b/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md new file mode 100644 index 0000000000..4de4a82373 --- /dev/null +++ b/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md @@ -0,0 +1,165 @@ +[#]: collector: (lujun9972) +[#]: translator: (tomjlw) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Set up Automatic Security Update (Unattended Upgrades) on Debian/Ubuntu?) +[#]: via: (https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubuntu-debian/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +如何在 Debian/Ubuntu 上设置自动安全更新(无人值守更新) +====== + +对于 Linux 管理员来说重要的任务之一是让系统保持最新状态。 + +这使得你的系统更加稳健并且可以避免不想要的访问与攻击。 + +在 Linux 上安装包裹小菜一碟。 + +用相似的方法我们也可以更新安全补丁。 + +这是一个向你展示如何配置系统接收自动安全更新的简单教程。 + +未经审查运行自动安全包更新会给你带来一定风险,但是也有一些好处。 + +如果你不想错过安全补丁且想要与最新的安全补丁保持同步, + +那你应该借助无人值守更新机制设置自动安全更新。 + +如果你不想要自动安全更新的话,你可以**[在 Debian/Ubuntu 系统上手动安装安全更新][1]**。 + +我们有许多可以自动化更新的办法,然而我们将先采用官方的方法之后我们会介绍其它方法。 + +### 如何在 Debian/Ubuntu 上安装无人值守更新包 + +无人值守更新包默认应该装在你的系统上。但万一它没被安装,就用下面的命令来安装: + +``` +$ sudo apt-get install unattended-upgrades +``` + +下方两个文件可以使你自定义该机制。 + +``` +/etc/apt/apt.conf.d/50unattended-upgrades +/etc/apt/apt.conf.d/20auto-upgrades +``` + +### 在无人值守更新文件中做出必要修改 + +默认情况下只有少数安全更新需要的选项被启用。无需被它们限制,你可以配置其中的许多选项以使得这个机制更加有用。 + +我修改了一下文件并仅加上被启用的行段以方便阐述。 + +``` +# vi /etc/apt/apt.conf.d/50unattended-upgrades + +Unattended-Upgrade::Allowed-Origins { + "${distro_id}:${distro_codename}"; + "${distro_id}:${distro_codename}-security"; + "${distro_id}ESM:${distro_codename}"; + }; +Unattended-Upgrade::DevRelease "false"; +``` + +有三个源被启用,细节如下: + * **`${distro_id}:${distro_codename}:`**` ` 这是必须的因为安全更新可能会从非安全来源拉取依赖。 + * **`${distro_id}:${distro_codename}-security:`**` ` 这是用来从来源得到安全更新 + * **`${distro_id}ESM:${distro_codename}:`**` ` 这是用来从 ESM(扩展安全维护)获得安全更新。 + + + +**启用邮件通知:** 如果你想要在每次安全更新后收到邮件通知,那么久修改以下行段(取消其注释并加上你的 email 账号)。 + +从: + +``` +//Unattended-Upgrade::Mail "root"; +``` + +到: + +``` +Unattended-Upgrade::Mail "[email protected]"; +``` + +**自动移除不用的依赖:** 你可能需要在每次更新后运行“sudo apt autoremove” 命令来从系统中移除不用的依赖。 + +我们可以通过修改以下行段来自动化这项任务(取消注释并将“false”改成“true”)。 + +从: + +``` +//Unattended-Upgrade::Remove-Unused-Dependencies "false"; +``` + +到: + +``` +Unattended-Upgrade::Remove-Unused-Dependencies "true"; +``` + +**启用自动重启:** 你可能需要在安全更新安装至内核后重启你的系统。你可以在以下行段做出修改: + +从: + +``` +//Unattended-Upgrade::Automatic-Reboot "false"; +``` + +到:取消注释并将“false”改成“true”以启用自动重启。 + +``` +Unattended-Upgrade::Automatic-Reboot "true"; +``` + +**启用特定时段的自动重启:** 如果自动重启已启用且你想要在特定时段进行重启,那么做出以下修改。 + +从: + +``` +//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; +``` + +到:取消注释并将时间改成你需要的时间。我将重启设置在早上5点。 + +``` +Unattended-Upgrade::Automatic-Reboot-Time "05:00"; +``` + +### 如何启用自动化安全更新? + +现在我们已经配置好了必须选项,一旦配置好, + +打开以下文件并确认是否值都已设置好?值不应为0。(1=启用,0=禁止)。 + +``` +# vi /etc/apt/apt.conf.d/20auto-upgrades + +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "1"; +``` + +**详情:** + + * 第一行使 apt 每天自动运行 “apt-get update”。 + * 第一行使 apt 每天自动安装安全更新。 + + + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubuntu-debian/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[tomjlw](https://github.com/tomjlw) +校对:[校对者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/manually-install-security-updates-ubuntu-debian/ +[2]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ +[3]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ From fee9c6070226bdd0037667a794fce48977bccd73 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 23:33:35 +0800 Subject: [PATCH 558/951] TSL --- ...r namespaces- A marriage made in heaven.md | 145 ----------------- ...r namespaces- A marriage made in heaven.md | 146 ++++++++++++++++++ 2 files changed, 146 insertions(+), 145 deletions(-) delete mode 100644 sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md create mode 100644 translated/tech/20181213 Podman and user namespaces- A marriage made in heaven.md diff --git a/sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md b/sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md deleted file mode 100644 index bbff51d93e..0000000000 --- a/sources/tech/20181213 Podman and user namespaces- A marriage made in heaven.md +++ /dev/null @@ -1,145 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Podman and user namespaces: A marriage made in heaven) -[#]: via: (https://opensource.com/article/18/12/podman-and-user-namespaces) -[#]: author: (Daniel J Walsh https://opensource.com/users/rhatdan) - -Podman and user namespaces: A marriage made in heaven -====== -Learn how to use Podman to run containers in separate user namespaces. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/architecture_structure_planning_design_.png?itok=KL7dIDct) - -[Podman][1], part of the [libpod][2] library, enables users to manage pods, containers, and container images. In my last article, I wrote about [Podman as a more secure way to run containers][3]. Here, I'll explain how to use Podman to run containers in separate user namespaces. - -I have always thought of [user namespace][4], primarily developed by Red Hat's Eric Biederman, as a great feature for separating containers. User namespace allows you to specify a user identifier (UID) and group identifier (GID) mapping to run your containers. This means you can run as UID 0 inside the container and UID 100000 outside the container. If your container processes escape the container, the kernel will treat them as UID 100000. Not only that, but any file object owned by a UID that isn't mapped into the user namespace will be treated as owned by "nobody" (65534, kernel.overflowuid), and the container process will not be allowed access unless the object is accessible by "other" (world readable/writable). - -If you have a file owned by "real" root with permissions [660][5], and the container processes in the user namespace attempt to read it, they will be prevented from accessing it and will see the file as owned by nobody. - -### An example - -Here's how that might work. First, I create a file in my system owned by root. - -``` -$ sudo bash -c "echo Test > /tmp/test" -$ sudo chmod 600 /tmp/test -$ sudo ls -l /tmp/test --rw-------. 1 root root 5 Dec 17 16:40 /tmp/test -``` - -Next, I volume-mount the file into a container running with a user namespace map 0:100000:5000. - -``` -$ sudo podman run -ti -v /tmp/test:/tmp/test:Z --uidmap 0:100000:5000 fedora sh -# id -uid=0(root) gid=0(root) groups=0(root) -# ls -l /tmp/test --rw-rw----. 1 nobody nobody 8 Nov 30 12:40 /tmp/test -# cat /tmp/test -cat: /tmp/test: Permission denied -``` - -The **\--uidmap** setting above tells Podman to map a range of 5000 UIDs inside the container, starting with UID 100000 outside the container (so the range is 100000-104999) to a range starting at UID 0 inside the container (so the range is 0-4999). Inside the container, if my process is running as UID 1, it is 100001 on the host - -Since the real UID=0 is not mapped into the container, any file owned by root will be treated as owned by nobody. Even if the process inside the container has **CAP_DAC_OVERRIDE** , it can't override this protection. **DAC_OVERRIDE** enables root processes to read/write any file on the system, even if the process was not owned by root or world readable or writable. - -User namespace capabilities are not the same as capabilities on the host. They are namespaced capabilities. This means my container root has capabilities only within the container—really only across the range of UIDs that were mapped into the user namespace. If a container process escaped the container, it wouldn't have any capabilities over UIDs not mapped into the user namespace, including UID=0. Even if the processes could somehow enter another container, they would not have those capabilities if the container uses a different range of UIDs. - -Note that SELinux and other technologies also limit what would happen if a container process broke out of the container. - -### Using `podman top` to show user namespaces - -We have added features to **podman top** to allow you to examine the usernames of processes running inside a container and identify their real UIDs on the host. - -Let's start by running a sleep container using our UID mapping. - -``` -$ sudo podman run --uidmap 0:100000:5000 -d fedora sleep 1000 -``` - -Now run **podman top** : - -``` -$ sudo podman top --latest user huser -USER   HUSER -root   100000 - -$ ps -ef | grep sleep -100000   21821 21809  0 08:04 ?         00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 -``` - -Notice **podman top** reports that the user process is running as root inside the container but as UID 100000 on the host (HUSER). Also the **ps** command confirms that the sleep process is running as UID 100000. - -Now let's run a second container, but this time we will choose a separate UID map starting at 200000. - -``` -$ sudo podman run --uidmap 0:200000:5000 -d fedora sleep 1000 -$ sudo podman top --latest user huser -USER   HUSER -root   200000 - -$ ps -ef | grep sleep -100000   21821 21809  0 08:04 ?         00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 -200000   23644 23632  1 08:08 ?         00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 -``` - -Notice that **podman top** reports the second container is running as root inside the container but as UID=200000 on the host. - -Also look at the **ps** command—it shows both sleep processes running: one as 100000 and the other as 200000. - -This means running the containers inside separate user namespaces gives you traditional UID separation between processes, which has been the standard security tool of Linux/Unix from the beginning. - -### Problems with user namespaces - -For several years, I've advocated user namespace as the security tool everyone wants but hardly anyone has used. The reason is there hasn't been any filesystem support or a shifting file system. - -In containers, you want to share the **base** image between lots of containers. The examples above use the Fedora base image in each example. Most of the files in the Fedora image are owned by real UID=0. If I run a container on this image with the user namespace 0:100000:5000, by default it sees all of these files as owned by nobody, so we need to shift all of these UIDs to match the user namespace. For years, I've wanted a mount option to tell the kernel to remap these file UIDs to match the user namespace. Upstream kernel storage developers continue to investigate and make progress on this feature, but it is a difficult problem. - - -Podman can use different user namespaces on the same image because of automatic [chowning][6] built into [containers/storage][7] by a team led by Nalin Dahyabhai. Podman uses containers/storage, and the first time Podman uses a container image in a new user namespace, container/storage "chowns" (i.e., changes ownership for) all files in the image to the UIDs mapped in the user namespace and creates a new image. Think of this as the **fedora:0:100000:5000** image. - -When Podman runs another container on the image with the same UID mappings, it uses the "pre-chowned" image. When I run the second container on 0:200000:5000, containers/storage creates a second image, let's call it **fedora:0:200000:5000**. - -Note if you are doing a **podman build** or **podman commit** and push the newly created image to a container registry, Podman will use container/storage to reverse the shift and push the image with all files chowned back to real UID=0. - -This can cause a real slowdown in creating containers in new UID mappings since the **chown** can be slow depending on the number of files in the image. Also, on a normal [OverlayFS][8], every file in the image gets copied up. The normal Fedora image can take up to 30 seconds to finish the chown and start the container. - -Luckily, the Red Hat kernel storage team, primarily Vivek Goyal and Miklos Szeredi, added a new feature to OverlayFS in kernel 4.19. The feature is called **metadata only copy-up**. If you mount an overlay filesystem with **metacopy=on** as a mount option, it will not copy up the contents of the lower layers when you change file attributes; the kernel creates new inodes that include the attributes with references pointing at the lower-level data. It will still copy up the contents if the content changes. This functionality is available in the Red Hat Enterprise Linux 8 Beta, if you want to try it out. - -This means container chowning can happen in a couple of seconds, and you won't double the storage space for each container. - -This makes running containers with tools like Podman in separate user namespaces viable, greatly increasing the security of the system. - -### Going forward - -I want to add a new flag, like **\--userns=auto** , to Podman that will tell it to automatically pick a unique user namespace for each container you run. This is similar to the way SELinux works with separate multi-category security (MCS) labels. If you set the environment variable **PODMAN_USERNS=auto** , you won't even need to set the flag. - -Podman is finally allowing users to run containers in separate user namespaces. Tools like [Buildah][9] and [CRI-O][10] will also be able to take advantage of user namespaces. For CRI-O, however, Kubernetes needs to understand which user namespace will run the container engine, and the upstream is working on that. - -In my next article, I will explain how to run Podman as non-root in a user namespace. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/12/podman-and-user-namespaces - -作者:[Daniel J Walsh][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/rhatdan -[b]: https://github.com/lujun9972 -[1]: https://podman.io/ -[2]: https://github.com/containers/libpod -[3]: https://opensource.com/article/18/10/podman-more-secure-way-run-containers -[4]: http://man7.org/linux/man-pages/man7/user_namespaces.7.html -[5]: https://chmodcommand.com/chmod-660/ -[6]: https://en.wikipedia.org/wiki/Chown -[7]: https://github.com/containers/storage -[8]: https://en.wikipedia.org/wiki/OverlayFS -[9]: https://buildah.io/ -[10]: http://cri-o.io/ diff --git a/translated/tech/20181213 Podman and user namespaces- A marriage made in heaven.md b/translated/tech/20181213 Podman and user namespaces- A marriage made in heaven.md new file mode 100644 index 0000000000..166a0f8b0b --- /dev/null +++ b/translated/tech/20181213 Podman and user namespaces- A marriage made in heaven.md @@ -0,0 +1,146 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Podman and user namespaces: A marriage made in heaven) +[#]: via: (https://opensource.com/article/18/12/podman-and-user-namespaces) +[#]: author: (Daniel J Walsh https://opensource.com/users/rhatdan) + +Podman 和用户名字空间:天作之合 +====== + +> 了解如何使用 Podman 在单独的用户空间运行容器。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/architecture_structure_planning_design_.png?itok=KL7dIDct) + +[Podman][1] 是 [libpod][2] 库的一部分,使用户能够管理 pod、容器和容器镜像。在我的上一篇文章中,我写过 [Podman 作为一种更安全的运行容器的方式][3]。在这里,我将解释如何使用 Podman 在单独的用户命名空间中运行容器。 + +我一直在思考[用户命名空间][4]user namespace,它主要是由 Red Hat 的 Eric Biederman 开发的,作为分离容器的一个很棒的功能。用户命名空间允许你指定用于运行容器的用户标识符(UID)和组标识符(GID)映射。这意味着你可以在容器内运行 UID 0,在容器外运行 UID 100000。如果容器进程逃逸出了容器,内核会将它们视为 UID 100000。不仅如此,任何未映射到用户命名空间的 UID 所拥有的任何文件对象都将被视为 `nobody` 所拥有(65534,`kernel.overflowuid`),并且不允许容器进程访问,除非该对象可由“其他人”访问(世界可读/可写)。 + +如果你拥有一个权限为 [660][5] 的属主为“真实” `root` 的文件,并且用户命名空间中的容器进程尝试读取它,则会阻止它们访问它,并且会将该文件视为 `nobody` 所拥有。 + +### 示例 + +以下是它是如何工作的。首先,我在 `root` 拥有的系统中创建一个文件。 + +``` +$ sudo bash -c "echo Test > /tmp/test" +$ sudo chmod 600 /tmp/test +$ sudo ls -l /tmp/test +-rw-------. 1 root root 5 Dec 17 16:40 /tmp/test +``` + +接下来,我将该文件卷挂载到一个使用用户命名空间映射 `0:100000:5000` 运行的容器中。 + +``` +$ sudo podman run -ti -v /tmp/test:/tmp/test:Z --uidmap 0:100000:5000 fedora sh +# id +uid=0(root) gid=0(root) groups=0(root) +# ls -l /tmp/test +-rw-rw----. 1 nobody nobody 8 Nov 30 12:40 /tmp/test +# cat /tmp/test +cat: /tmp/test: Permission denied +``` + +上面的 `--uidmap` 设置告诉 Podman 在容器内映射一系列 5000 个 UID,从容器外的 UID 100000开始(因此范围是 100000-104999)到容器内 UID 0 开始的范围(所以范围是 0-4999)。在容器内部,如果我的进程以 UID 1 运行,则它在主机上为 100001。 + +由于实际的 `UID=0` 未映射到容器中,因此 `root` 拥有的任何文件都将被视为 `nobody` 所拥有。即使容器内的进程具有 `CAP_DAC_OVERRIDE`,也无法覆盖此种保护。`DAC_OVERRIDE` 使根进程能够读/写系统上的任何文件,即使进程不是 `root` 用户拥有,也不是全局可读或可写的。 + +用户命名空间功能与主机上的功能不同。它们是命名空间功能。这意味着我的容器根只在容器内具有功能,实际上只在映射到用户命名空间的 UID 范围内。如果容器进程逃逸了容器,则它将没有任何功能而不是映射到用户命名空间的 UID,包括 UID=0。即使进程可能以某种方式进入另一个容器,如果容器使用不同范围的 UID,它们也不具备这些功能。 + +请注意,SELinux 和其他技术还限制了容器进程破开容器时会发生的情况。 + +### 使用 podman top 来显示用户名字空间 + +我们在 `podman top` 中添加了一些功能,允许你检查容器内运行的进程的用户名,并在主机上标识它们的真实 UID。 + +让我们首先使用我们的 UID 映射运行一个 `sleep` 容器。 + +``` +$ sudo podman run --uidmap 0:100000:5000 -d fedora sleep 1000 +``` + +现在运行 `podman top`: + +``` +$ sudo podman top --latest user huser +USER   HUSER +root   100000 + +$ ps -ef | grep sleep +100000   21821 21809  0 08:04 ?         00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 +``` + +注意 `podman top` 报告用户进程在容器内以 `root` 身份运行,但在主机(`HUSER`)上以 UID 100000 运行。此外,`ps` 命令确认 `sleep` 过程以 UID 100000 运行。 + +现在让我们运行第二个容器,但这次我们将选择一个单独的 UID 映射,从 200000 开始。 + +``` +$ sudo podman run --uidmap 0:200000:5000 -d fedora sleep 1000 +$ sudo podman top --latest user huser +USER   HUSER +root   200000 + +$ ps -ef | grep sleep +100000   21821 21809  0 08:04 ?         00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 +200000   23644 23632  1 08:08 ?         00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 +``` + +请注意,`podman top` 报告第二个容器在容器内以 `root` 身份运行,但主机上的 UID=200000。 + +另请参阅 `ps` 命令,它显示两个 `sleep` 进程都在运行:一个为 100000,另一个为 200000。 + +这意味着在单独的用户命名空间内运行容器可以在进程之间进行传统的 UID 分离,这从一开始就是 Linux/Unix 的标准安全工具。 + +### 用户名字空间的问题 + +几年来,我一直主张用户命名空间应该作为每个人应该有的安全工具,但几乎没有人使用过。原因是没有任何文件系统支持或转移文件系统。 + +在容器中,你希望在许多容器之间共享**基本**镜像。上面的示例在每个示例中使用 Fedora 基本镜像。Fedora 镜像中的大多数文件都由实际的 UID=0 拥有。如果我使用用户名称空间 0:100000:5000 在此镜像上运行容器,默认情况下它会将所有这些文件视为 `nobody` 所拥有,因此我们需要移动所有这些 UID 以匹配用户名称空间。多年来,我想要一个挂载选项来告诉内核重新映射这些文件 UID 以匹配用户命名空间。上游内核存储开发人员继续调查并在此功能上取得进展,但这是一个难题。 + +Podman 可以在同一镜像上使用不同的用户名称空间,是由于自动 [chown][6] 内置于由 Nalin Dahyabhai 领导的团队开发的[容器/存储][7]中。Podman使用容器/存储,Podman 第一次在新的用户命名空间中使用容器镜像,容器/存储 “chowns”(如,更改所有权)镜像中的所有文件到用户命名空间中映射的 UID 并创建新镜像。可以把它想象成 `fedora:0:100000:5000` 镜像。 + +当 Podman 在具有相同 UID 映射的镜像上运行另一个容器时,它使用“预先设置所有权”的图像。当我在0:200000:5000 上运行第二个容器时,容器/存储会创建第二个镜像,我们称之为 `fedora:0:200000:5000`。 + +请注意,如果你正在执行 `podman build` 或 `podman commit` 并将新创建的镜像推送到容器注册表,Podman 将使用容器/存储来反转移位并将所有文件推回到实际 UID=0 的镜像。 + +这可能会导致在新的 UID 映射中创建容器时出现真正的减速,因为 `chown` 可能会很慢,具体取决于镜像中的文件数。此外,在普通 [OverlayFS][8] 上,镜像中的每个文件都会被复制。正常的 Fedora 镜像最多可能需要 30 秒才能完成 `chown` 并启动容器。 + +幸运的是,Red Hat 内核存储团队(主要是 Vivek Goyal 和 Miklos Szeredi)在内核 4.19 中为 OverlayFS 添加了一项新功能。该功能称为“仅元数据复制”。如果使用 `metacopy=on` 挂载覆盖文件系统作为挂载选项,则在更改文件属性时,它不会复制较低层的内容;内核创建新的 inode,其中包含引用指向较低级别数据的属性。如果内容发生变化,它仍会复制内容。如果你想试用它,可以在 Red Hat Enterprise Linux 8 Beta 中使用此功能。 + +这意味着容器 `chown` 可能在几秒钟内发生,并且你不会将每个容器的存储空间加倍。 + +这使得像 Podman 这样的工具在不同的用户命名空间中运行容器是可行的,大大提高了系统的安全性。 + +### 前瞻 + +我想向 Podman 添加一个新标志,比如 `--userns=auto`,它会告诉它为你运行的每个容器自动选择一个唯一的用户命名空间。这类似于 SELinux 与单独的多类别安全(MCS)标签一起使用的方式。如果设置环境变量 `PODMAN_USERNS=auto`,则甚至不需要设置标志。 + +Podman 最终允许用户在不同的用户名称空间中运行容器。像 [Buildah][9] 和 [CRI-O][10] 这样的工具也可以利用用户命名空间。但是,对于 CRI-O,Kubernetes 需要了解哪个用户命名空间将运行容器引擎,而上游正在处理它。 + +在我的下一篇文章中,我将解释如何在用户命名空间中将 Podman 作为非 root 用户运行。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/12/podman-and-user-namespaces + +作者:[Daniel J Walsh][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/rhatdan +[b]: https://github.com/lujun9972 +[1]: https://podman.io/ +[2]: https://github.com/containers/libpod +[3]: https://opensource.com/article/18/10/podman-more-secure-way-run-containers +[4]: http://man7.org/linux/man-pages/man7/user_namespaces.7.html +[5]: https://chmodcommand.com/chmod-660/ +[6]: https://en.wikipedia.org/wiki/Chown +[7]: https://github.com/containers/storage +[8]: https://en.wikipedia.org/wiki/OverlayFS +[9]: https://buildah.io/ +[10]: http://cri-o.io/ From 030a40bcb4c0f370e474fd99e62d8501bc6688e1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 23:59:16 +0800 Subject: [PATCH 559/951] PRF --- ... Command Line Heroes- Season 1- OS Wars.md | 100 +++++++++--------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md index 9010b59376..ab58c8edd0 100644 --- a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -12,111 +12,113 @@ > 代码英雄讲述了开发人员、程序员、黑客、极客和开源反叛者如何彻底改变技术前景的真实史诗故事。 -本文是《[代码英雄](https://www.redhat.com/en/command-line-heroes)》系列播客[第一季第一集:操作系统战争(上)](https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) 的[音频](https://dts.podtrac.com/redirect.mp3/audio.simplecast.com/f7670e99.mp3)脚本。 +![](https://www.redhat.com/files/webux/img/bandbg/bkgd-clh-ep1-2000x950.png) -Saron Yitbarek:有些故事如史诗般,惊险万分,在我脑海中似乎出现了星球大战电影开头的爬行文字。你知道的,就像—— +本文是《[代码英雄](https://www.redhat.com/en/command-line-heroes)》系列播客[第一季(1):操作系统战争(上)](https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) 的[音频](https://dts.podtrac.com/redirect.mp3/audio.simplecast.com/f7670e99.mp3)脚本。 + +**Saron Yitbarek:**有些故事如史诗般,惊险万分,在我脑海中似乎出现了星球大战电影开头的爬行文字。你知道的,就像—— 配音:“第一集,操作系统大战” -Saron Yitbarek:是的,就像那样子。 +**Saron Yitbarek:**是的,就像那样子。 配音:这是一个局势紧张加剧的时期。比尔·盖茨Bill Gates史蒂夫·乔布斯Steve Jobs的帝国发起了一场无可避免的专有软件之战。[00:00:30] 盖茨与 IBM 结成了强大的联盟,而乔布斯则拒绝了对它的硬件和操作系统开放授权。他们争夺统治地位的争斗在一场操作系统战争中席卷了整个银河系。与此同时,这些帝王们所不知道的偏远之地,开源的反叛者们开始集聚。 -Saron Yitbarek:好吧。这也许有点戏剧性,但当我们谈论上世纪八九十年代和 2000 年代的操作系统之争时,这也不算言过其实。[00:01:00] 确实曾经发生过一场史诗级的统治之战。史蒂夫·乔布斯和比尔·盖茨确实掌握着数十亿人的命运。掌控了操作系统,你就掌握了绝大多数人使用计算机的方式、互相通讯的方式、获取信息的方式。我可以一直罗列下去,不过你知道我的意思。掌握了操作系统,你就是帝王。 +**Saron Yitbarek:**好吧。这也许有点戏剧性,但当我们谈论上世纪八九十年代和 2000 年代的操作系统之争时,这也不算言过其实。*[00:01:00]* 确实曾经发生过一场史诗级的统治之战。史蒂夫·乔布斯和比尔·盖茨确实掌握着数十亿人的命运。掌控了操作系统,你就掌握了绝大多数人使用计算机的方式、互相通讯的方式、获取信息的方式。我可以一直罗列下去,不过你知道我的意思。掌握了操作系统,你就是帝王。 -我是 Saron Yitbarek,你现在收听的是代码英雄,一款红帽公司原创的博客节目。[00:01:30] 你问,什么是代码英雄Command Line Hero?嗯,如果你愿意创造而不仅仅是使用,如果你相信开发者拥有构建美好未来的能力,如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界,那么你,我的朋友,就是一位代码英雄。在本系列节目中,我们将为你带来那些“白码起家”(LCTT 译注:原文是 “from the command line up”,应该是演绎自 “from the ground up”——白手起家)改变技术的程序员故事。[00:02:00] 那么我是谁,凭什么指导你踏上这段艰苦的旅程?Saron Yitbarek 是哪根葱?嗯,事实上我觉得我跟你差不多。我是一名面向初学者的开发人员,我做的任何事都依赖于开源软件,我的世界就是如此。通过在博客中讲故事,我可以跳出无聊的日常工作,鸟瞰全景,希望这对你也一样有用。 +我是 Saron Yitbarek,你现在收听的是代码英雄,一款红帽公司原创的博客节目。*[00:01:30]* 你问,什么是代码英雄Command Line Hero?嗯,如果你愿意创造而不仅仅是使用,如果你相信开发者拥有构建美好未来的能力,如果你希望拥有一个大家都有权利表达科技如何塑造生活的世界,那么你,我的朋友,就是一位代码英雄。在本系列节目中,我们将为你带来那些“白码起家”(LCTT 译注:原文是 “from the command line up”,应该是演绎自 “from the ground up”——白手起家)改变技术的程序员故事。*[00:02:00]* 那么我是谁,凭什么指导你踏上这段艰苦的旅程?Saron Yitbarek 是哪根葱?嗯,事实上我觉得我跟你差不多。我是一名面向初学者的开发人员,我做的任何事都依赖于开源软件,我的世界就是如此。通过在博客中讲故事,我可以跳出无聊的日常工作,鸟瞰全景,希望这对你也一样有用。 -我迫不及待地想知道,开源技术从何而来?我的意思是,我对林纳斯·托瓦兹Linus Torvalds和 Linux^® 的荣耀有一些了解,[00:02:30] 我相信你也一样,但是说真的,开源并不是一开始就有的,对吗?如果我想发自内心的感激这些最新、最棒的技术,比如 DevOps 和容器之类的,我感觉我对那些早期的开发者缺乏了解,我有必要了解这些东西来自何处。所以,让我们暂时先不用担心内存泄露和缓冲溢出。我们的旅程将从操作系统之战开始,这是一场波澜壮阔的桌面控制之战。[00:03:00] 这场战争亘古未有,因为:首先,在计算机时代,大公司拥有指数级的规模优势;其次,从未有过这么一场控制争夺战是如此变化多端。比尔·盖茨和史蒂夫·乔布斯? 他们也不知道结果会如何,但是到目前为止,这个故事进行到一半的时候,他们所争夺的所有东西都将发生改变、进化,最终上升到云端。 +我迫不及待地想知道,开源技术从何而来?我的意思是,我对林纳斯·托瓦兹Linus Torvalds和 Linux^® 的荣耀有一些了解,*[00:02:30]* 我相信你也一样,但是说真的,开源并不是一开始就有的,对吗?如果我想发自内心的感激这些最新、最棒的技术,比如 DevOps 和容器之类的,我感觉我对那些早期的开发者缺乏了解,我有必要了解这些东西来自何处。所以,让我们暂时先不用担心内存泄露和缓冲溢出。我们的旅程将从操作系统之战开始,这是一场波澜壮阔的桌面控制之战。*[00:03:00]* 这场战争亘古未有,因为:首先,在计算机时代,大公司拥有指数级的规模优势;其次,从未有过这么一场控制争夺战是如此变化多端。比尔·盖茨和史蒂夫·乔布斯? 他们也不知道结果会如何,但是到目前为止,这个故事进行到一半的时候,他们所争夺的所有东西都将发生改变、进化,最终上升到云端。 -[00:03:30] 好的,让我们回到 1983 年的秋季。还有六年我才出生。那时候的总统还是罗纳德·里根Ronald Reagan,美国和苏联扬言要把地球拖入核战争之中。在檀香山(火奴鲁鲁)的市政中心正在举办一年一度的苹果公司销售会议。一群苹果公司的员工正在等待史蒂夫·乔布斯上台。他 28 岁,热情洋溢,看起来非常自信。乔布斯很严肃地对着麦克风说他邀请了三个行业专家来就软件进行了一次小组讨论。[00:04:00] 然而随后发生的事情你肯定想不到。超级俗气的 80 年代音乐响彻整个房间。一堆多彩灯管照亮了舞台,然后一个播音员的声音响起- +*[00:03:30]* 好的,让我们回到 1983 年的秋季。还有六年我才出生。那时候的总统还是罗纳德·里根Ronald Reagan,美国和苏联扬言要把地球拖入核战争之中。在檀香山(火奴鲁鲁)的市政中心正在举办一年一度的苹果公司销售会议。一群苹果公司的员工正在等待史蒂夫·乔布斯上台。他 28 岁,热情洋溢,看起来非常自信。乔布斯很严肃地对着麦克风说他邀请了三个行业专家来就软件进行了一次小组讨论。*[00:04:00]* 然而随后发生的事情你肯定想不到。超级俗气的 80 年代音乐响彻整个房间。一堆多彩灯管照亮了舞台,然后一个播音员的声音响起- -配音:女士们,先生们,现在是麦金塔软件的约会游戏时间。 +**配音:**女士们,先生们,现在是麦金塔软件的约会游戏时间。 -Saron Yitbarek:乔布斯的脸上露出一个大大的笑容,台上有三个 CEO 都需要轮流向他示好。这基本上就是 80 年代钻石王老五,不过是科技界的。[00:04:30] 两个软件大佬讲完话后,然后就轮到第三个人讲话了。仅此而已不是吗?是的。新面孔比尔·盖茨带着一个大大的遮住了半张脸的方框眼镜。他宣称在 1984 年,微软的一半收入将来自于麦金塔软件。他的这番话引来了观众热情的掌声。[00:05:00] 但是他们不知道的是,在一个月后,比尔·盖茨将会宣布发布 Windows 1.0 的计划。你永远也猜不到乔布斯正在跟苹果未来最大的敌人打情骂俏。但微软和苹果即将经历科技史上最糟糕的婚礼。他们会彼此背叛、相互毁灭,但又深深地、痛苦地捆绑在一起。 +**Saron Yitbarek:**乔布斯的脸上露出一个大大的笑容,台上有三个 CEO 都需要轮流向他示好。这基本上就是 80 年代钻石王老五,不过是科技界的。*[00:04:30]* 两个软件大佬讲完话后,然后就轮到第三个人讲话了。仅此而已不是吗?是的。新面孔比尔·盖茨带着一个大大的遮住了半张脸的方框眼镜。他宣称在 1984 年,微软的一半收入将来自于麦金塔软件。他的这番话引来了观众热情的掌声。*[00:05:00]* 但是他们不知道的是,在一个月后,比尔·盖茨将会宣布发布 Windows 1.0 的计划。你永远也猜不到乔布斯正在跟苹果未来最大的敌人打情骂俏。但微软和苹果即将经历科技史上最糟糕的婚礼。他们会彼此背叛、相互毁灭,但又深深地、痛苦地捆绑在一起。 -James Allworth:[00:05:30] 我猜从哲学上来讲,一个更理想化、注重用户体验高于一切,是一个一体化的组织,而微软则更务实,更模块化 —— +**James Allworth:***[00:05:30]* 我猜从哲学上来讲,一个更理想化、注重用户体验高于一切,是一个一体化的组织,而微软则更务实,更模块化 —— -Saron Yitbarek:这位是 James Allworth。他是一位多产的科技作家,曾在苹果零售的企业团队工作。注意他给出的苹果的定义,一个一体化的组织,那种只对自己负责的公司,一个不想依赖别人的公司,这是关键。 +**Saron Yitbarek:**这位是 James Allworth。他是一位多产的科技作家,曾在苹果零售的企业团队工作。注意他给出的苹果的定义,一个一体化的组织,那种只对自己负责的公司,一个不想依赖别人的公司,这是关键。 -James Allworth:[00:06:00] 苹果是一家一体化的公司,它希望专注于令人愉悦的用户体验,这意味着它希望控制整个技术栈以及交付的一切内容:从硬件到操作系统,甚至运行在操作系统上的应用程序。当新的创新、重要的创新刚刚进入市场,而你需要横跨软硬件,并且能够根据自己意愿和软件的革新来改变硬件时,这是一个优势。例如 ——, +**James Allworth:***[00:06:00]* 苹果是一家一体化的公司,它希望专注于令人愉悦的用户体验,这意味着它希望控制整个技术栈以及交付的一切内容:从硬件到操作系统,甚至运行在操作系统上的应用程序。当新的创新、重要的创新刚刚进入市场,而你需要横跨软硬件,并且能够根据自己意愿和软件的革新来改变硬件时,这是一个优势。例如 ——, -Saron Yitbarek:[00:06:30] 很多人喜欢这种一体化的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。让我们回到檀香山的销售会议上,在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想乔治·奥威尔George Orwell的 《一九八四》。在这个冰冷、灰暗的世界里,无意识的机器人正在独裁者的投射凝视下徘徊。[00:07:00] 这些机器人就像是 IBM 的用户们。然后,代表苹果公司的漂亮而健美的安娅·梅杰Anya Major穿着鲜艳的衣服跑过大厅。她向着大佬们的屏幕猛地投出大锤,将它砸成了碎片。老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍麦金塔了。 +**Saron Yitbarek:***[00:06:30]* 很多人喜欢这种一体化的模式,并因此成为了苹果的铁杆粉丝。还有很多人则选择了微软。让我们回到檀香山的销售会议上,在同一场活动中,乔布斯向观众展示了他即将发布的超级碗广告。你可能已经亲眼见过这则广告了。想想乔治·奥威尔George Orwell的 《一九八四》。在这个冰冷、灰暗的世界里,无意识的机器人正在独裁者的投射凝视下徘徊。*[00:07:00]* 这些机器人就像是 IBM 的用户们。然后,代表苹果公司的漂亮而健美的安娅·梅杰Anya Major穿着鲜艳的衣服跑过大厅。她向着大佬们的屏幕猛地投出大锤,将它砸成了碎片。老大哥的咒语解除了,一个低沉的声音响起,苹果公司要开始介绍麦金塔了。 -配音:这就是为什么现实中的 1984 跟小说《一九八四》不一样了。 +**配音:**这就是为什么现实中的 1984 跟小说《一九八四》不一样了。 -Saron Yitbarek:是的,现在回顾那则广告,认为苹果是一个致力于解放大众的自由斗士的想法有点过分了。但这件事触动了我的神经。[00:07:30] Ken Segal 曾在为苹果制作这则广告的广告公司工作过。在早期,他为史蒂夫·乔布斯做了十多年的广告。 +Saron Yitbarek:是的,现在回顾那则广告,认为苹果是一个致力于解放大众的自由斗士的想法有点过分了。但这件事触动了我的神经。*[00:07:30]* Ken Segal 曾在为苹果制作这则广告的广告公司工作过。在早期,他为史蒂夫·乔布斯做了十多年的广告。 -Ken Segal:1984 这则广告的风险很大。事实上,它的风险太大,以至于苹果公司在看到它的时候都不想播出它。你可能听说了史蒂夫喜欢它,但苹果公司董事会的人并不喜欢它。事实上,他们很愤怒,这么多钱被花在这么一件事情上,以至于他们想解雇广告代理商。[00:08:00] 史蒂夫则为我们公司辩护。 +**Ken Segal:**1984 这则广告的风险很大。事实上,它的风险太大,以至于苹果公司在看到它的时候都不想播出它。你可能听说了史蒂夫喜欢它,但苹果公司董事会的人并不喜欢它。事实上,他们很愤怒,这么多钱被花在这么一件事情上,以至于他们想解雇广告代理商。*[00:08:00]* 史蒂夫则为我们公司辩护。 -Saron Yitbarek:乔布斯,一如既往地,慧眼识英雄。 +**Saron Yitbarek:**乔布斯,一如既往地,慧眼识英雄。 -Ken Segal:这则广告在公司内、在业界内都引起了共鸣,成为了苹果产品的代表。无论人们那天是否有在购买电脑,它都带来了一种持续了一年又一年的影响,并有助于定义这家公司的品质:我们是叛军,我们是拿着大锤的人。 +**Ken Segal:**这则广告在公司内、在业界内都引起了共鸣,成为了苹果产品的代表。无论人们那天是否有在购买电脑,它都带来了一种持续了一年又一年的影响,并有助于定义这家公司的品质:我们是叛军,我们是拿着大锤的人。 -Saron Yitbarek:[00:08:30] 因此,在争夺数十亿潜在消费者心智的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主、非凡的英雄、一种对生活方式的选择。但比尔·盖茨知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,即便是帝王,也不能独自完成任务。 +**Saron Yitbarek:***[00:08:30]* 因此,在争夺数十亿潜在消费者心智的过程中,苹果公司和微软公司的帝王们正在学着把自己塑造成救世主、非凡的英雄、一种对生活方式的选择。但比尔·盖茨知道一些苹果难以理解的事情。那就是在一个相互连接的世界里,没有人,即便是帝王,也不能独自完成任务。 -[00:09:00] 1985 年 6 月 25 日。盖茨给当时的苹果 CEO John Scully 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到 1996 年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。[00:09:30] 盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得快速发展和建立标准所需的支持。”换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作。 +*[00:09:00]* 1985 年 6 月 25 日。盖茨给当时的苹果 CEO John Scully 发了一份备忘录。那是一个迷失的年代。乔布斯刚刚被逐出公司,直到 1996 年才回到苹果。也许正是因为乔布斯离开了,盖茨才敢写这份东西。在备忘录中,他鼓励苹果授权制造商分发他们的操作系统。我想读一下备忘录的最后部分,让你们知道这份备忘录是多么的有洞察力。*[00:09:30]* 盖茨写道:“如果没有其他个人电脑制造商的支持,苹果现在不可能让他们的创新技术成为标准。苹果必须开放麦金塔的架构,以获得快速发展和建立标准所需的支持。”换句话说,你们不要再自己玩自己的了。你们必须有与他人合作的意愿。你们必须与开发者合作。 -[00:10:00]多年后你依然可以看到这条哲学思想,当微软首席执行官史蒂夫·鲍尔默Steve Ballmer上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。”你懂我的意思了吧。微软喜欢开发人员。虽然目前(LCTT 译注:本播客发布于 2018 年初)他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。[00:10:30] 而当比尔·盖茨建议苹果公司也这么做时,如你可能已经猜到的,这个想法就被苹果公司抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了 Windows 1.0。战争开始了。 +*[00:10:00]* 多年后你依然可以看到这条哲学思想,当微软首席执行官史蒂夫·鲍尔默Steve Ballmer上台做主题演讲时,他开始大喊:“开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。”你懂我的意思了吧。微软喜欢开发人员。虽然目前(LCTT 译注:本播客发布于 2018 年初)他们不打算与这些开发人员共享源代码,但是他们确实想建立起整个合作伙伴生态系统。*[00:10:30]* 而当比尔·盖茨建议苹果公司也这么做时,如你可能已经猜到的,这个想法就被苹果公司抛到了九霄云外。他们的关系产生了间隙,五个月后,微软发布了 Windows 1.0。战争开始了。 > 开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者,开发者。 -[00:11:00] 你正在收听的是来自红帽公司的原创播客《代码英雄》。本集是第一集,我们将回到过去,重温操作系统战争的史诗故事,我们将会发现,科技巨头之间的战争是如何为我们今天所生活的开源世界扫清道路的 +*[00:11:00]* 你正在收听的是来自红帽公司的原创播客《代码英雄》。本集是第一集,我们将回到过去,重温操作系统战争的史诗故事,我们将会发现,科技巨头之间的战争是如何为我们今天所生活的开源世界扫清道路的 -好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是 1979 年,史蒂夫·乔布斯开车去帕洛阿尔托Palo Alto施乐公园研究中心Xerox Park research center。[00:11:30] 那里的工程师一直在为他们所谓的图形用户界面开发一系列的元素。也许你听说过。它们有菜单、滚动条、按钮、文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 +好的,让我们先来个背景故事吧。如果你已经听过了,那么请原谅我,但它很经典。当时是 1979 年,史蒂夫·乔布斯开车去帕洛阿尔托Palo Alto施乐公园研究中心Xerox Park research center。*[00:11:30]* 那里的工程师一直在为他们所谓的图形用户界面开发一系列的元素。也许你听说过。它们有菜单、滚动条、按钮、文件夹和重叠的窗口。这是对计算机界面的一个美丽的新设想。这是前所未有的。作家兼记者 Steve Levy 会谈到它的潜力。 -Steven Levy:[00:12:00] 对于这个新界面来说,有很多令人激动的地方,它比以前的交互界面更友好,以前用的所谓的命令行 —— 你和电脑之间的交互方式跟现实生活中的交互方式完全不同。鼠标和电脑上的图像让你可以做到像现实生活中的交互一样,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有那些命令。 +**Steven Levy:***[00:12:00]* 对于这个新界面来说,有很多令人激动的地方,它比以前的交互界面更友好,以前用的所谓的命令行 —— 你和电脑之间的交互方式跟现实生活中的交互方式完全不同。鼠标和电脑上的图像让你可以做到像现实生活中的交互一样,你可以像指向现实生活中的东西一样指向电脑上的东西。这让事情变得简单多了。你无需要记住所有那些命令。 -Saron Yitbarek:[00:12:30] 不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向乔布斯展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。乔布斯觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是它最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念。”[00:13:00] 这话有些苛刻,但是,乔布斯带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983 年,苹果发布了 Lisa 电脑,1984 年又发布了 Mac 电脑。这些设备的创意是抄袭自施乐公司的。 +**Saron Yitbarek:***[00:12:30]* 不过,施乐的高管们并没有意识到他们正坐在金矿上。一如既往地,工程师比主管们更清楚它的价值。因此那些工程师,当被要求向乔布斯展示所有这些东西是如何工作时,有点紧张。然而这是毕竟是高管的命令。乔布斯觉得,用他的话来说,“这个产品天才本来能够让施乐公司垄断整个行业,可是它最终会被公司的经营者毁掉,因为他们对产品的好坏没有概念。”*[00:13:00]* 这话有些苛刻,但是,乔布斯带着一卡车施乐高管错过的想法离开了会议。这几乎包含了他需要革新桌面计算体验的所有东西。1983 年,苹果发布了 Lisa 电脑,1984 年又发布了 Mac 电脑。这些设备的创意是抄袭自施乐公司的。 -让我感兴趣的是,乔布斯对控诉他偷了图形用户界面的反应。他对此很冷静。他引用毕加索的话:“好的艺术家抄袭,伟大的艺术家偷窃。”他告诉一位记者,“我们总是无耻地窃取伟大的创意。”[00:13:30] 伟大的艺术家偷窃,好吧,我的意思是,我们说的并不是严格意义上的“偷窃”。没人拿到了专有的源代码并公然将其集成到他们自己的操作系统中去。这要更温和些,更像是创意的借用。这就难控制的多了,就像乔布斯自己即将学到的那样。传奇的软件奇才、真正的代码英雄 Andy Hertzfeld 就是麦金塔开发团队的最初成员。 +让我感兴趣的是,乔布斯对控诉他偷了图形用户界面的反应。他对此很冷静。他引用毕加索的话:“好的艺术家抄袭,伟大的艺术家偷窃。”他告诉一位记者,“我们总是无耻地窃取伟大的创意。”*[00:13:30]* 伟大的艺术家偷窃,好吧,我的意思是,我们说的并不是严格意义上的“偷窃”。没人拿到了专有的源代码并公然将其集成到他们自己的操作系统中去。这要更温和些,更像是创意的借用。这就难控制的多了,就像乔布斯自己即将学到的那样。传奇的软件奇才、真正的代码英雄 Andy Hertzfeld 就是麦金塔开发团队的最初成员。 -Andy Hertzfeld:[00:14:00] 是的,微软是我们的第一个麦金塔电脑软件合作伙伴。当时,我们并没有把他们当成是竞争对手。他们是苹果之外,我们第一家交付麦金塔电脑原型的公司。我通常每周都会和微软的技术主管聊一次。他们是第一个尝试我们所编写软件的外部团队。[00:14:30] 他们给了我们非常重要的反馈,总的来说,我认为我们的关系非常好。但我也注意到,在我与技术主管的交谈中,他开始问一些系统实现方面的问题,而他本无需知道这些,我觉得,他们想要复制麦金塔电脑。我很早以前就向史蒂夫·乔布斯反馈过这件事,但在 1983 年秋天,这件事达到了高潮。[00:15:00] 我们发现,他们在 1983 年 11 月的 COMDEX 上发布了 Windows,但却没有提前告诉我们。对此史蒂夫·乔布斯勃然大怒。他认为那是一种背叛。 +**Andy Hertzfeld:***[00:14:00]* 是的,微软是我们的第一个麦金塔电脑软件合作伙伴。当时,我们并没有把他们当成是竞争对手。他们是苹果之外,我们第一家交付麦金塔电脑原型的公司。我通常每周都会和微软的技术主管聊一次。他们是第一个尝试我们所编写软件的外部团队。*[00:14:30]* 他们给了我们非常重要的反馈,总的来说,我认为我们的关系非常好。但我也注意到,在我与技术主管的交谈中,他开始问一些系统实现方面的问题,而他本无需知道这些,我觉得,他们想要复制麦金塔电脑。我很早以前就向史蒂夫·乔布斯反馈过这件事,但在 1983 年秋天,这件事达到了高潮。*[00:15:00]* 我们发现,他们在 1983 年 11 月的 COMDEX 上发布了 Windows,但却没有提前告诉我们。对此史蒂夫·乔布斯勃然大怒。他认为那是一种背叛。 -Saron Yitbarek:随着新版 Windows 的发布,很明显,微软从苹果那里学到了苹果从施乐那里学来的所有想法。乔布斯很易怒。他的关于伟大艺术家如何偷窃的毕加索名言被别人学去了,而且恐怕盖茨也正是这么做的。[00:15:30] 据报道,当乔布斯怒斥盖茨偷了他们的东西时,盖茨回应道:“史蒂夫,我觉得这更像是我们都有一个叫施乐的富有邻居,我闯进他家偷电视机,却发现你已经偷过了”。苹果最终以窃取 GUI 的外观和风格为名起诉了微软。这个案子持续了好几年,但是在 1993 年,第 9 巡回上诉法院的一名法官最终站在了微软一边。[00:16:00] Vaughn Walker 法官宣布外观和风格不受版权保护。这是非常重要的。这一决定让苹果在无法垄断桌面计算的界面。很快,苹果短暂的领先优势消失了。以下是 Steven Levy 的观点。 +**Saron Yitbarek:**随着新版 Windows 的发布,很明显,微软从苹果那里学到了苹果从施乐那里学来的所有想法。乔布斯很易怒。他的关于伟大艺术家如何偷窃的毕加索名言被别人学去了,而且恐怕盖茨也正是这么做的。*[00:15:30]* 据报道,当乔布斯怒斥盖茨偷了他们的东西时,盖茨回应道:“史蒂夫,我觉得这更像是我们都有一个叫施乐的富有邻居,我闯进他家偷电视机,却发现你已经偷过了”。苹果最终以窃取 GUI 的外观和风格为名起诉了微软。这个案子持续了好几年,但是在 1993 年,第 9 巡回上诉法院的一名法官最终站在了微软一边。*[00:16:00]* Vaughn Walker 法官宣布外观和风格不受版权保护。这是非常重要的。这一决定让苹果在无法垄断桌面计算的界面。很快,苹果短暂的领先优势消失了。以下是 Steven Levy 的观点。 -Steven Levy:他们之所以失去领先地位,不是因为微软方面窃取了知识产权,而是因为他们无法巩固自己在上世纪 80 年代拥有的更好的操作系统的优势。坦率地说,他们的电脑索价过高。[00:16:30] 因此微软从 20 世纪 80 年代中期开始开发 Windows 系统,但直到 1990 年开发出的 Windows 3,我想,它才真正算是一个为黄金时期做好准备的版本,才真正可供大众使用。[00:17:00] 从此以后,微软能够将数以亿计的用户迁移到图形界面,而这是苹果无法做到的。虽然苹果公司有一个非常好的操作系统,但是那已经是 1984 年的产品了。 +**Steven Levy:**他们之所以失去领先地位,不是因为微软方面窃取了知识产权,而是因为他们无法巩固自己在上世纪 80 年代拥有的更好的操作系统的优势。坦率地说,他们的电脑索价过高。*[00:16:30]* 因此微软从 20 世纪 80 年代中期开始开发 Windows 系统,但直到 1990 年开发出的 Windows 3,我想,它才真正算是一个为黄金时期做好准备的版本,才真正可供大众使用。*[00:17:00]* 从此以后,微软能够将数以亿计的用户迁移到图形界面,而这是苹果无法做到的。虽然苹果公司有一个非常好的操作系统,但是那已经是 1984 年的产品了。 -Saron Yitbarek:现在微软主导着操作系统的战场。他们占据了 90% 的市场份额,并且针对各种各样的个人电脑进行了标准化。操作系统的未来看起来会由微软掌控。此后发生了什么?[00:17:30] 1997 年,波士顿 Macworld 博览会上,你看到了一个几近破产的苹果,一个谦逊的多的史蒂夫·乔布斯走上舞台,开始谈论伙伴关系的重要性,特别是他们与微软的新型合作伙伴关系。史蒂夫·乔布斯呼吁双方缓和关系,停止火拼。微软将拥有巨大的市场份额。从表面看,我们可能会认为世界和平了。但当利益如此巨大时,事情就没那么简单了。[00:18:00] 就在苹果和微软在数十年的争斗中伤痕累累、最终败退到死角之际,一名 21 岁的芬兰计算机科学专业学生出现了。几乎是偶然地,他彻底改变了一切。 +**Saron Yitbarek:**现在微软主导着操作系统的战场。他们占据了 90% 的市场份额,并且针对各种各样的个人电脑进行了标准化。操作系统的未来看起来会由微软掌控。此后发生了什么?*[00:17:30]* 1997 年,波士顿 Macworld 博览会上,你看到了一个几近破产的苹果,一个谦逊的多的史蒂夫·乔布斯走上舞台,开始谈论伙伴关系的重要性,特别是他们与微软的新型合作伙伴关系。史蒂夫·乔布斯呼吁双方缓和关系,停止火拼。微软将拥有巨大的市场份额。从表面看,我们可能会认为世界和平了。但当利益如此巨大时,事情就没那么简单了。*[00:18:00]* 就在苹果和微软在数十年的争斗中伤痕累累、最终败退到死角之际,一名 21 岁的芬兰计算机科学专业学生出现了。几乎是偶然地,他彻底改变了一切。 我是 Saron Yitbarek,这里是代码英雄。 -正当某些科技巨头正忙着就专有软件相互攻击时,自由软件和开源软件的新领军者如雨后春笋般涌现。[00:18:30] 其中一位优胜者就是理查德·斯托尔曼Richard Stallman。你也许对他的工作很熟悉。他想要有自由软件和自由社会。这就像言论自由一样的自由free,而不是像免费啤酒一样的免费free。早在 80 年代,斯托尔曼就发现,除了昂贵的专有操作系统(如 UNIX)外,就没有其他可行的替代品。因此他决定自己做一个。斯托尔曼的自由软件基金会Free Software Foundation开发了 GNU,当然,它的意思是 “GNU's not UNIX”。它将是一个像 UNIX 一样的操作系统,但不包含所有的 UNIX 代码,而且用户可以自由共享。 +正当某些科技巨头正忙着就专有软件相互攻击时,自由软件和开源软件的新领军者如雨后春笋般涌现。*[00:18:30]* 其中一位优胜者就是理查德·斯托尔曼Richard Stallman。你也许对他的工作很熟悉。他想要有自由软件和自由社会。这就像言论自由一样的自由free,而不是像免费啤酒一样的免费free。早在 80 年代,斯托尔曼就发现,除了昂贵的专有操作系统(如 UNIX)外,就没有其他可行的替代品。因此他决定自己做一个。斯托尔曼的自由软件基金会Free Software Foundation开发了 GNU,当然,它的意思是 “GNU's not UNIX”。它将是一个像 UNIX 一样的操作系统,但不包含所有的 UNIX 代码,而且用户可以自由共享。 -[00:19:00] 为了让你体会到上世纪 80 年代自由软件概念的重要性,从不同角度来说拥有 UNIX 代码的两家公司,AT&T 贝尔实验室AT&T Bell Laboratories以及UNIX 系统实验室UNIX System Laboratories威胁将会起诉任何看过 UNIX 源代码后又创建自己操作系统的人。这些人是次级专利所属。[00:19:30] 用这两家公司的话来说,所有这些程序员都在“精神上受到了污染”,因为他们都见过 UNIX 代码。在 UNIX 系统实验室和伯克利软件设计公司Berkeley Software Design之间的一个著名的法庭案例中,有人认为任何功能类似的系统,即使它本身没有使用 UNIX 代码,也侵犯版权。Paul Jones 当时是一名开发人员。他现在是数字图书馆 ibiblio.org 的主管。 +*[00:19:00]* 为了让你体会到上世纪 80 年代自由软件概念的重要性,从不同角度来说拥有 UNIX 代码的两家公司,AT&T 贝尔实验室AT&T Bell Laboratories以及UNIX 系统实验室UNIX System Laboratories威胁将会起诉任何看过 UNIX 源代码后又创建自己操作系统的人。这些人是次级专利所属。*[00:19:30]* 用这两家公司的话来说,所有这些程序员都在“精神上受到了污染”,因为他们都见过 UNIX 代码。在 UNIX 系统实验室和伯克利软件设计公司Berkeley Software Design之间的一个著名的法庭案例中,有人认为任何功能类似的系统,即使它本身没有使用 UNIX 代码,也侵犯版权。Paul Jones 当时是一名开发人员。他现在是数字图书馆 ibiblio.org 的主管。 -Paul Jones:[00:20:00] 任何看过代码的人都受到了精神污染是他们的观点。因此几乎所有在安装有与 UNIX 相关操作系统的电脑上工作过的人以及任何在计算机科学部门工作的人都受到精神上的污染。因此,在 USENIX 的一年里,我们都得到了一写带有红色字母的白色小别针,上面写着“精神受到了污染”。我们很喜欢带着这些别针到处走,以表达我们跟着贝尔实验室混,因为我们的精神受到了污染。 +**Paul Jones:***[00:20:00]* 任何看过代码的人都受到了精神污染是他们的观点。因此几乎所有在安装有与 UNIX 相关操作系统的电脑上工作过的人以及任何在计算机科学部门工作的人都受到精神上的污染。因此,在 USENIX 的一年里,我们都得到了一写带有红色字母的白色小别针,上面写着“精神受到了污染”。我们很喜欢带着这些别针到处走,以表达我们跟着贝尔实验室混,因为我们的精神受到了污染。 -Saron Yitbarek:[00:20:30] 整个世界都被精神污染了。想要保持纯粹、保持事物的美好和专有的旧哲学正变得越来越不现实。正是在这被污染的现实中,历史上最伟大的代码英雄之一诞生了,他是一个芬兰男孩,名叫林纳斯·托瓦兹Linus Torvalds。如果这是《星球大战》,那么林纳斯·托瓦兹就是我们的卢克·天行者Luke Skywalker。他是赫尔辛基大学一名温文尔雅的研究生。[00:21:00] 有才华,但缺乏大志。典型的被逼上梁山的英雄。和其他年轻的英雄一样,他也感到沮丧。他想把 386 处理器整合到他的新电脑中。他对自己的 IBM 兼容电脑上运行的 MS-DOS 操作系统并不感冒,也负担不起 UNIX 软件 5000 美元的价格,而只有 UNIX 才能让他自由地编程。解决方案是托瓦兹在 1991 年春天基于 MINIX 开发了一个名为 Linux 的操作系统内核。他自己的操作系统内核。 +**Saron Yitbarek:***[00:20:30]* 整个世界都被精神污染了。想要保持纯粹、保持事物的美好和专有的旧哲学正变得越来越不现实。正是在这被污染的现实中,历史上最伟大的代码英雄之一诞生了,他是一个芬兰男孩,名叫林纳斯·托瓦兹Linus Torvalds。如果这是《星球大战》,那么林纳斯·托瓦兹就是我们的卢克·天行者Luke Skywalker。他是赫尔辛基大学一名温文尔雅的研究生。*[00:21:00]* 有才华,但缺乏大志。典型的被逼上梁山的英雄。和其他年轻的英雄一样,他也感到沮丧。他想把 386 处理器整合到他的新电脑中。他对自己的 IBM 兼容电脑上运行的 MS-DOS 操作系统并不感冒,也负担不起 UNIX 软件 5000 美元的价格,而只有 UNIX 才能让他自由地编程。解决方案是托瓦兹在 1991 年春天基于 MINIX 开发了一个名为 Linux 的操作系统内核。他自己的操作系统内核。 -Steven Vaughan-Nichols:[00:21:30] 林纳斯·托瓦兹真的只是想找点乐子而已。 +**Steven Vaughan-Nichols:***[00:21:30]* 林纳斯·托瓦兹真的只是想找点乐子而已。 -Saron Yitbarek:Steven Vaughan-Nichols 是 ZDNet.com 的特约编辑,而且他从科技行业出现以来就一直在写科技行业相关的内容。 +**Saron Yitbarek:**Steven Vaughan-Nichols 是 ZDNet.com 的特约编辑,而且他从科技行业出现以来就一直在写科技行业相关的内容。 -Steven Vaughan-Nichols:当时有几个类似的操作系统。他最关注的是一个名叫 MINIX 的操作系统,MINIX 旨在让学生学习如何构建操作系统。林纳斯看到这些,觉得很有趣,但他想建立自己的操作系统。[00:22:00] 所以,它实际上始于赫尔辛基的一个 DIY 项目。一切就这样开始了,基本上就是一个大孩子在玩耍,学习如何做些什么。[00:22:30] 但不同之处在于,他足够聪明、足够执着,也足够友好,让所有其他人都参与进来,然后他开始把这个项目进行到底。27 年后,这个项目变得比他想象的要大得多。 +**Steven Vaughan-Nichols:**当时有几个类似的操作系统。他最关注的是一个名叫 MINIX 的操作系统,MINIX 旨在让学生学习如何构建操作系统。林纳斯看到这些,觉得很有趣,但他想建立自己的操作系统。*[00:22:00]* 所以,它实际上始于赫尔辛基的一个 DIY 项目。一切就这样开始了,基本上就是一个大孩子在玩耍,学习如何做些什么。*[00:22:30]* 但不同之处在于,他足够聪明、足够执着,也足够友好,让所有其他人都参与进来,然后他开始把这个项目进行到底。27 年后,这个项目变得比他想象的要大得多。 -Saron Yitbarek:到 1991 年秋季,托瓦兹发布了 10000 行代码,世界各地的人们开始评头论足,然后进行优化、添加和修改代码。[00:23:00] 对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对微软、苹果和 IBM 已经做的很好的整个专有系统的道德侮辱。随后这种开放性被奉若神明。托瓦兹将 Linux 置于 GNU 通用公共许可证(GPL)之下。曾经保障斯托尔曼的 GNU 系统自由的许可证现在也将保障 Linux 的自由。Vaughan-Nichols 解释道,这种融入到 GPL 的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 +**Saron Yitbarek:**到 1991 年秋季,托瓦兹发布了 10000 行代码,世界各地的人们开始评头论足,然后进行优化、添加和修改代码。*[00:23:00]* 对于今天的开发人员来说,这似乎很正常,但请记住,在那个时候,像这样的开放协作是对微软、苹果和 IBM 已经做的很好的整个专有系统的道德侮辱。随后这种开放性被奉若神明。托瓦兹将 Linux 置于 GNU 通用公共许可证(GPL)之下。曾经保障斯托尔曼的 GNU 系统自由的许可证现在也将保障 Linux 的自由。Vaughan-Nichols 解释道,这种融入到 GPL 的重要性怎么强调都不过分,它基本上能永远保证软件的自由和开放性。 -Steven Vaughan-Nichols:[00:23:30] 事实上,根据 Linux 所遵循的许可协议,即 GPL 第 2 版,如果你想贩卖 Linux 或者向全世界展示它,你必须与他人共享代码,所以如果你对其做了一些改进,仅仅给别人使用是不够的。事实上你必须和他们分享所有这些变化的具体细节。然后,如果这些改进足够好,就会被 Linux 所吸收。 +**Steven Vaughan-Nichols:***[00:23:30]* 事实上,根据 Linux 所遵循的许可协议,即 GPL 第 2 版,如果你想贩卖 Linux 或者向全世界展示它,你必须与他人共享代码,所以如果你对其做了一些改进,仅仅给别人使用是不够的。事实上你必须和他们分享所有这些变化的具体细节。然后,如果这些改进足够好,就会被 Linux 所吸收。 -Saron Yitbarek:[00:24:00] 事实证明,这种公开的方式极具吸引力。埃里克·雷蒙德Eric Raymond 是这场运动的早期传道者之一,他在他那篇著名的文章中写道:“微软和苹果这样的公司一直在试图建造软件大教堂,而 Linux 及类似的软件则提供了一个由不同议程和方法组成的巨大集市,集市比大教堂有趣多了。” +**Saron Yitbarek:***[00:24:00]* 事实证明,这种公开的方式极具吸引力。埃里克·雷蒙德Eric Raymond 是这场运动的早期传道者之一,他在他那篇著名的文章中写道:“微软和苹果这样的公司一直在试图建造软件大教堂,而 Linux 及类似的软件则提供了一个由不同议程和方法组成的巨大集市,集市比大教堂有趣多了。” -tormy Peters:我认为在那个时候,真正吸引人的是人们终于可以把控自己的世界了。 +**tormy Peters:**我认为在那个时候,真正吸引人的是人们终于可以把控自己的世界了。 -Saron Yitbarek:Stormy Peters 是一位行业分析师,也是自由和开源软件的倡导者。 +**Saron Yitbarek:**Stormy Peters 是一位行业分析师,也是自由和开源软件的倡导者。 -Stormy Peters:[00:24:30] 当开源软件第一次出现的时候,所有的操作系统都是专有的。如果不使用专有软件,你甚至不能添加打印机,你不能添加耳机,你不能自己开发一个小型硬件设备,然后让它在你的笔记本电脑上运行。你甚至不能放入 DVD 并复制它,因为你不能改变软件,即使你拥有这张 DVD,你也无法复制它。[00:25:00] 你无法控制你购买的硬件/软件系统。你不能从中创造出任何新的、更大的、更好的东西。这就是为什么开源操作系统在一开始就如此重要的原因。我们需要一个开源协作环境,在那里我们可以构建更大更好的东西。 +**Stormy Peters:***[00:24:30]* 当开源软件第一次出现的时候,所有的操作系统都是专有的。如果不使用专有软件,你甚至不能添加打印机,你不能添加耳机,你不能自己开发一个小型硬件设备,然后让它在你的笔记本电脑上运行。你甚至不能放入 DVD 并复制它,因为你不能改变软件,即使你拥有这张 DVD,你也无法复制它。*[00:25:00]* 你无法控制你购买的硬件/软件系统。你不能从中创造出任何新的、更大的、更好的东西。这就是为什么开源操作系统在一开始就如此重要的原因。我们需要一个开源协作环境,在那里我们可以构建更大更好的东西。 -Saron Yitbarek:请注意,Linux 并不是一个纯粹的平等主义乌托邦。林纳斯·托瓦兹不会批准对内核的所有修改,而是主导了内核的变更。他安排了十几个人来管理内核的不同部分。[00:25:30] 这些人也会信任自己下面的人,以此类推,形成信任金字塔。变化可能来自任何地方,但它们都是经过判断和策划的。 +**Saron Yitbarek:**请注意,Linux 并不是一个纯粹的平等主义乌托邦。林纳斯·托瓦兹不会批准对内核的所有修改,而是主导了内核的变更。他安排了十几个人来管理内核的不同部分。*[00:25:30]* 这些人也会信任自己下面的人,以此类推,形成信任金字塔。变化可能来自任何地方,但它们都是经过判断和策划的。 -然而,考虑到到林纳斯的 DIY 项目一开始是多么的简陋和随意,这项成就令人十分惊讶。他完全不知道自己就是这一切中的卢克·天行者。当时他只有 21 岁,一半的时间都在编程。但是当魔盒第一次被打开,人们开始给他反馈。[00:26:00] 几十个,然后几百个,成千上万的贡献者。有了这样的众包基础,Linux 很快就开始成长。真的成长得很快。甚至最终引起了微软的注意。他们的首席执行官史蒂夫·鲍尔默Steve Ballmer将 Linux 称为是“一种癌症,从知识产权得角度来看,它传染了接触到得任何东西 ”。Steven Levy 将会描述 Ballmer 的由来。 +然而,考虑到到林纳斯的 DIY 项目一开始是多么的简陋和随意,这项成就令人十分惊讶。他完全不知道自己就是这一切中的卢克·天行者。当时他只有 21 岁,一半的时间都在编程。但是当魔盒第一次被打开,人们开始给他反馈。*[00:26:00]* 几十个,然后几百个,成千上万的贡献者。有了这样的众包基础,Linux 很快就开始成长。真的成长得很快。甚至最终引起了微软的注意。他们的首席执行官史蒂夫·鲍尔默Steve Ballmer将 Linux 称为是“一种癌症,从知识产权得角度来看,它传染了接触到得任何东西 ”。Steven Levy 将会描述 Ballmer 的由来。 -Steven Levy:[00:26:30] 一旦微软真正巩固了它的垄断地位,而且它也确实被联邦法院判定为垄断,他们将会对任何可能对其构成威胁的事情做出强烈反应。因此,既然他们对软件收费,很自然得,他们将自由软件得出现看成是一种癌症。他们试图提出一个知识产权理论,来解释为什么这对消费者不利。 +**Steven Levy:***[00:26:30]* 一旦微软真正巩固了它的垄断地位,而且它也确实被联邦法院判定为垄断,他们将会对任何可能对其构成威胁的事情做出强烈反应。因此,既然他们对软件收费,很自然得,他们将自由软件得出现看成是一种癌症。他们试图提出一个知识产权理论,来解释为什么这对消费者不利。 -Saron Yitbarek:[00:27:00] Linux 在不断传播,微软也开始担心起来。到了 2006 年,Linux 成为仅次于 Windows 的第二大常用操作系统,全球约有 5000 名开发人员在使用它。5000 名开发者。还记得比尔·盖茨给苹果公司的备忘录吗?在那份备忘录中,他向苹果公司的员工们论述了与他人合作的重要性。事实证明,开源将把伙伴关系的概念提升到一个全新的水平,这是比尔·盖茨从未预见到的。 +**Saron Yitbarek:***[00:27:00]* Linux 在不断传播,微软也开始担心起来。到了 2006 年,Linux 成为仅次于 Windows 的第二大常用操作系统,全球约有 5000 名开发人员在使用它。5000 名开发者。还记得比尔·盖茨给苹果公司的备忘录吗?在那份备忘录中,他向苹果公司的员工们论述了与他人合作的重要性。事实证明,开源将把伙伴关系的概念提升到一个全新的水平,这是比尔·盖茨从未预见到的。 -[00:27:30] 我们一直在谈论操作系统之间的大战,但是到目前为止,并没有怎么提到无名英雄和开发者们。在下次的代码英雄中,情况就不同了。第二集讲的是操作系统大战的第二部分,是关于 Linux 崛起的。业界醒悟过来,认识到了开发人员的重要性。这些开源反叛者变得越来越强大,战场从桌面转移到了服务器领域。[00:28:00] 这里有商业间谍活动、新的英雄人物,还有科技史上最不可思议的改变。这一切都在操作系统大战的后半集内达到了高潮。 +*[00:27:30]* 我们一直在谈论操作系统之间的大战,但是到目前为止,并没有怎么提到无名英雄和开发者们。在下次的代码英雄中,情况就不同了。第二集讲的是操作系统大战的第二部分,是关于 Linux 崛起的。业界醒悟过来,认识到了开发人员的重要性。这些开源反叛者变得越来越强大,战场从桌面转移到了服务器领域。*[00:28:00]* 这里有商业间谍活动、新的英雄人物,还有科技史上最不可思议的改变。这一切都在操作系统大战的后半集内达到了高潮。 -要想免费自动获得新一集的代码英雄,请点击订阅苹果播客、Spotify、谷歌 Play,或其他应用获取该播客。在这一季剩下的时间里,我们将参观最新的战场,相互争斗的版图,这里是下一代的代码英雄留下印记的地方。[00:28:30] 更多信息,请访问 https://redhat.com/commandlineheroes 。我是 Saron Yitbarek。下次之前,继续编码。 +要想免费自动获得新一集的代码英雄,请点击订阅苹果播客、Spotify、谷歌 Play,或其他应用获取该播客。在这一季剩下的时间里,我们将参观最新的战场,相互争斗的版图,这里是下一代的代码英雄留下印记的地方。*[00:28:30]* 更多信息,请访问 https://redhat.com/commandlineheroes 。我是 Saron Yitbarek。下次之前,继续编码。 -------------------------------------------------------------------------------- From defc993d18a12f8bcbb7d16de2a9e10ec9aa369e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Aug 2019 23:59:44 +0800 Subject: [PATCH 560/951] PUB @lujun9972 https://linux.cn/article-11251-1.html --- .../20180116 Command Line Heroes- Season 1- OS Wars.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20180116 Command Line Heroes- Season 1- OS Wars.md (99%) diff --git a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/published/20180116 Command Line Heroes- Season 1- OS Wars.md similarity index 99% rename from translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md rename to published/20180116 Command Line Heroes- Season 1- OS Wars.md index ab58c8edd0..6858132c13 100644 --- a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/published/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (lujun9972) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11251-1.html) [#]: subject: (Command Line Heroes: Season 1: OS Wars) [#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-1) [#]: author: (redhat https://www.redhat.com) From dd4d2ce15d6d98dbe1433029f07c566f0d1c7fef Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Aug 2019 00:50:16 +0800 Subject: [PATCH 561/951] PRF @tomjlw --- ... (Unattended Upgrades) on Debian-Ubuntu.md | 69 ++++++++----------- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md b/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md index 4de4a82373..968c1ff921 100644 --- a/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md +++ b/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (tomjlw) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Set up Automatic Security Update (Unattended Upgrades) on Debian/Ubuntu?) @@ -10,46 +10,40 @@ 如何在 Debian/Ubuntu 上设置自动安全更新(无人值守更新) ====== -对于 Linux 管理员来说重要的任务之一是让系统保持最新状态。 +对于 Linux 管理员来说重要的任务之一是让系统保持最新状态,这可以使得你的系统更加稳健并且可以避免不想要的访问与攻击。 -这使得你的系统更加稳健并且可以避免不想要的访问与攻击。 +在 Linux 上安装软件包是小菜一碟,用相似的方法我们也可以更新安全补丁。 -在 Linux 上安装包裹小菜一碟。 +这是一个向你展示如何配置系统接收自动安全更新的简单教程。当你运行自动安全包更新而不经审查会给你带来一定风险,但是也有一些好处。 -用相似的方法我们也可以更新安全补丁。 +如果你不想错过安全补丁,且想要与最新的安全补丁保持同步,那你应该借助无人值守更新机制设置自动安全更新。 -这是一个向你展示如何配置系统接收自动安全更新的简单教程。 - -未经审查运行自动安全包更新会给你带来一定风险,但是也有一些好处。 - -如果你不想错过安全补丁且想要与最新的安全补丁保持同步, - -那你应该借助无人值守更新机制设置自动安全更新。 - -如果你不想要自动安全更新的话,你可以**[在 Debian/Ubuntu 系统上手动安装安全更新][1]**。 +如果你不想要自动安全更新的话,你可以[在 Debian/Ubuntu 系统上手动安装安全更新][1]。 我们有许多可以自动化更新的办法,然而我们将先采用官方的方法之后我们会介绍其它方法。 ### 如何在 Debian/Ubuntu 上安装无人值守更新包 -无人值守更新包默认应该装在你的系统上。但万一它没被安装,就用下面的命令来安装: +无人值守更新包默认应该已经装在你的系统上。但万一它没被安装,就用下面的命令来安装。 + +使用 [APT-GET 命令][2]和 [APT 命令][3]来安装 `unattended-upgrades` 软件包。 ``` $ sudo apt-get install unattended-upgrades ``` -下方两个文件可以使你自定义该机制。 +下方两个文件可以使你自定义该机制: ``` /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/20auto-upgrades ``` -### 在无人值守更新文件中做出必要修改 +### 在 50unattended-upgrades 文件中做出必要修改 -默认情况下只有少数安全更新需要的选项被启用。无需被它们限制,你可以配置其中的许多选项以使得这个机制更加有用。 +默认情况下只有安全更新需要的最必要的选项被启用。但并不限于此,你可以配置其中的许多选项以使得这个机制更加有用。 -我修改了一下文件并仅加上被启用的行段以方便阐述。 +我修改了一下文件并仅加上被启用的行以方便阐述: ``` # vi /etc/apt/apt.conf.d/50unattended-upgrades @@ -63,13 +57,12 @@ Unattended-Upgrade::DevRelease "false"; ``` 有三个源被启用,细节如下: - * **`${distro_id}:${distro_codename}:`**` ` 这是必须的因为安全更新可能会从非安全来源拉取依赖。 - * **`${distro_id}:${distro_codename}-security:`**` ` 这是用来从来源得到安全更新 - * **`${distro_id}ESM:${distro_codename}:`**` ` 这是用来从 ESM(扩展安全维护)获得安全更新。 + * `${distro_id}:${distro_codename}`:这是必须的,因为安全更新可能会从非安全来源拉取依赖。 + * `${distro_id}:${distro_codename}-security`:这用来从来源得到安全更新。 + * `${distro_id}ESM:${distro_codename}`:这是用来从 ESM(扩展安全维护)获得安全更新。 - -**启用邮件通知:** 如果你想要在每次安全更新后收到邮件通知,那么久修改以下行段(取消其注释并加上你的 email 账号)。 +**启用邮件通知:** 如果你想要在每次安全更新后收到邮件通知,那么就修改以下行段(取消其注释并加上你的 email 账号)。 从: @@ -77,15 +70,15 @@ Unattended-Upgrade::DevRelease "false"; //Unattended-Upgrade::Mail "root"; ``` -到: +修改为: ``` -Unattended-Upgrade::Mail "[email protected]"; +Unattended-Upgrade::Mail "2daygeek@gmail.com"; ``` -**自动移除不用的依赖:** 你可能需要在每次更新后运行“sudo apt autoremove” 命令来从系统中移除不用的依赖。 +**自动移除不用的依赖:** 你可能需要在每次更新后运行 `sudo apt autoremove` 命令来从系统中移除不用的依赖。 -我们可以通过修改以下行段来自动化这项任务(取消注释并将“false”改成“true”)。 +我们可以通过修改以下行来自动化这项任务(取消注释并将 `false` 改成 `true`)。 从: @@ -93,13 +86,13 @@ Unattended-Upgrade::Mail "[email protected]"; //Unattended-Upgrade::Remove-Unused-Dependencies "false"; ``` -到: +修改为: ``` Unattended-Upgrade::Remove-Unused-Dependencies "true"; ``` -**启用自动重启:** 你可能需要在安全更新安装至内核后重启你的系统。你可以在以下行段做出修改: +**启用自动重启:** 你可能需要在安全更新安装至内核后重启你的系统。你可以在以下行做出修改: 从: @@ -107,13 +100,13 @@ Unattended-Upgrade::Remove-Unused-Dependencies "true"; //Unattended-Upgrade::Automatic-Reboot "false"; ``` -到:取消注释并将“false”改成“true”以启用自动重启。 +到:取消注释并将 `false` 改成 `true`以启用自动重启。 ``` Unattended-Upgrade::Automatic-Reboot "true"; ``` -**启用特定时段的自动重启:** 如果自动重启已启用且你想要在特定时段进行重启,那么做出以下修改。 +**启用特定时段的自动重启:** 如果自动重启已启用,且你想要在特定时段进行重启,那么做出以下修改。 从: @@ -121,7 +114,7 @@ Unattended-Upgrade::Automatic-Reboot "true"; //Unattended-Upgrade::Automatic-Reboot-Time "02:00"; ``` -到:取消注释并将时间改成你需要的时间。我将重启设置在早上5点。 +到:取消注释并将时间改成你需要的时间。我将重启设置在早上 5 点。 ``` Unattended-Upgrade::Automatic-Reboot-Time "05:00"; @@ -129,9 +122,7 @@ Unattended-Upgrade::Automatic-Reboot-Time "05:00"; ### 如何启用自动化安全更新? -现在我们已经配置好了必须选项,一旦配置好, - -打开以下文件并确认是否值都已设置好?值不应为0。(1=启用,0=禁止)。 +现在我们已经配置好了必须的选项,一旦配置好,打开以下文件并确认是否这两个值都已设置好?值不应为0。(1=启用,0=禁止)。 ``` # vi /etc/apt/apt.conf.d/20auto-upgrades @@ -142,8 +133,8 @@ APT::Periodic::Unattended-Upgrade "1"; **详情:** - * 第一行使 apt 每天自动运行 “apt-get update”。 - * 第一行使 apt 每天自动安装安全更新。 + * 第一行使 `apt` 每天自动运行 `apt-get update`。 + * 第一行使 `apt` 每天自动安装安全更新。 @@ -154,7 +145,7 @@ via: https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubun 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] 译者:[tomjlw](https://github.com/tomjlw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 073ea44def7f0ab1798db6d1c1133390d365709e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Aug 2019 00:50:57 +0800 Subject: [PATCH 562/951] PUB @tomjlw https://linux.cn/article-11252-1.html --- ... Security Update (Unattended Upgrades) on Debian-Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md (98%) diff --git a/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md b/published/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md similarity index 98% rename from translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md rename to published/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md index 968c1ff921..486767a090 100644 --- a/translated/tech/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md +++ b/published/20190815 How To Set up Automatic Security Update (Unattended Upgrades) on Debian-Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (tomjlw) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11252-1.html) [#]: subject: (How To Set up Automatic Security Update (Unattended Upgrades) on Debian/Ubuntu?) [#]: via: (https://www.2daygeek.com/automatic-security-update-unattended-upgrades-ubuntu-debian/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) From 3d47fbf3bead0b94031b138e8182795e19609441 Mon Sep 17 00:00:00 2001 From: Liwen Jiang Date: Tue, 20 Aug 2019 12:19:48 -0500 Subject: [PATCH 563/951] Apply for Translating Apply for Translating --- ...190815 How To Setup Multilingual Input Method On Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md b/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md index cc3596630b..d4f0243e74 100644 --- a/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md +++ b/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (tomjlw) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -156,7 +156,7 @@ via: https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/ 作者:[sk][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[tomjlw](https://github.com/tomjlw) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c77502872a74f04199d6e3d4b10f00c09841ddea Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 21 Aug 2019 08:44:12 +0800 Subject: [PATCH 564/951] translated --- ...Change Linux Console Font Type And Size.md | 143 ------------------ ...Change Linux Console Font Type And Size.md | 134 ++++++++++++++++ 2 files changed, 134 insertions(+), 143 deletions(-) delete mode 100644 sources/tech/20190815 How To Change Linux Console Font Type And Size.md create mode 100644 translated/tech/20190815 How To Change Linux Console Font Type And Size.md diff --git a/sources/tech/20190815 How To Change Linux Console Font Type And Size.md b/sources/tech/20190815 How To Change Linux Console Font Type And Size.md deleted file mode 100644 index fa18570376..0000000000 --- a/sources/tech/20190815 How To Change Linux Console Font Type And Size.md +++ /dev/null @@ -1,143 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Change Linux Console Font Type And Size) -[#]: via: (https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -How To Change Linux Console Font Type And Size -====== - -It is quite easy to change the text font type and its size if you have graphical desktop environment. How would you do that in an Ubuntu headless server that doesn’t have a graphical environment? No worries! This brief guide describes how to change Linux console font and size. This can be useful for those who don’t like the default font type/size or who prefer different fonts in general. - -### Change Linux Console Font Type And Size - -Just in case you don’t know yet, this is how a headless Ubuntu Linux server console looks like. - -![][2] - -Ubuntu Linux console - -As far as I know, we can [**list the installed fonts**][3], but there is no option to change the font type or its size from Linux console as we do in the Terminal emulators in GUI desktop. - -But that doesn’t mean that we can’t change it. We still can change the console fonts. - -If you’re using Debian, Ubuntu and other DEB-based systems, you can use **“console-setup”** configuration file for **setupcon** which is used to configure font and keyboard layout for the console. The standard location of the console-setup configuration file is **/etc/default/console- setup**. - -Now, run the following command to setup font for your Linux console. - -``` -$ sudo dpkg-reconfigure console-setup -``` - -Choose the encoding to use on your Linux console. Just leave the default values, choose OK and hit ENTER to continue. - -![][4] - -Choose encoding to set on the console in Ubuntu - -Next choose the character set that should be supported by the console font from the list. By default, it was the the last option i.e. **Guess optimal character set** in my system. Just leave it as default and hit ENTER key. - -![][5] - -Choose character set in Ubuntu - -Next choose the font for your console and hit ENTER key. Here, I am choosing “TerminusBold”. - -![][6] - -Choose font for your Linux console - -In this step, we choose the desired font size for our Linux console. - -![][7] - -Choose font size for your Linux console - -After a few seconds, the selected font with size will applied for your Linux console. - -This is how console fonts looked like in my Ubuntu 18.04 LTS server before changing the font type and size. - -![][8] - -This is after changing the font type and size. - -![][9] - -As you can see, the text size is much bigger, better and the font type is different that default one. - -You can also directly edit **/etc/default/console-setup** file and set the font type and size as you wish. As per the following example, my Linux console font type is “Terminus Bold” and font size is 32. - -``` -ACTIVE_CONSOLES="/dev/tty[1-6]" -CHARMAP="UTF-8" -CODESET="guess" -FONTFACE="TerminusBold" -FONTSIZE="16x32" -``` - -* * * - -**Suggested read:** - - * [**How To Switch Between TTYs Without Using Function Keys In Linux**][10] - - - -* * * - -##### Display Console fonts - -To show your console font, simply type: - -``` -$ showconsolefont -``` - -This command will show a table of glyphs or letters of a font. - -![][11] - -Show console fonts - -If your Linux distribution does not have “console-setup”, you can get it from [**here**][12]. - -On Linux distributions that uses **Systemd** , you can change the console font by editing **“/etc/vconsole.conf”** file. - -Here is an example configuration for German keyboard. - -``` -$ vi /etc/vconsole.conf - -KEYMAP=de-latin1 -FONT=Lat2-Terminus16 -``` - -Hope you find this useful. - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[2]: https://www.ostechnix.com/wp-content/uploads/2019/08/Ubuntu-Linux-console.png -[3]: https://www.ostechnix.com/find-installed-fonts-commandline-linux/ -[4]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-encoding-to-set-on-the-console.png -[5]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-character-set-in-Ubuntu.png -[6]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-font-for-Linux-console.png -[7]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-font-size-for-Linux-console.png -[8]: https://www.ostechnix.com/wp-content/uploads/2019/08/Linux-console-tty-ubuntu-1.png -[9]: https://www.ostechnix.com/wp-content/uploads/2019/08/Ubuntu-Linux-TTY-console.png -[10]: https://www.ostechnix.com/how-to-switch-between-ttys-without-using-function-keys-in-linux/ -[11]: https://www.ostechnix.com/wp-content/uploads/2019/08/show-console-fonts.png -[12]: https://software.opensuse.org/package/console-setup diff --git a/translated/tech/20190815 How To Change Linux Console Font Type And Size.md b/translated/tech/20190815 How To Change Linux Console Font Type And Size.md new file mode 100644 index 0000000000..9fd5d51523 --- /dev/null +++ b/translated/tech/20190815 How To Change Linux Console Font Type And Size.md @@ -0,0 +1,134 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Change Linux Console Font Type And Size) +[#]: via: (https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +如何更改 Linux 控制台字体类型和大小 +====== + +如果你有图形桌面环境,那么就很容易更改文本的字体以及大小。你如何在没有图形环境的 Ubuntu 无头服务器中做到?别担心!本指南介绍了如何更改 Linux 控制台的字体和大小。这对于那些不喜欢默认字体类型/大小或者喜欢不同字体的人来说非常有用。 + +### 更改 Linux 控制台字体类型和大小 + +如果你还不知道,这就是无头 Ubuntu Linux 服务器控制台的样子。 + +![][2] + +Ubuntu Linux 控制台 + +据我所知,我们可以[**列出已安装的字体**][3],但是没有选项可以像在 Linux 桌面终端仿真器中那样更改 Linux 控制台字体类型或大小。 + +但这并不意味着我们无法改变它。我们仍然可以更改控制台字体。 + +如果你正在使用 Debian、Ubuntu 和其他基于 DEB 的系统,你可以使用 **“console-setup”** 配置文件来设置 **setupcon**,它用于配置控制台的字体和键盘布局。控制台设置的配置文件位于 **/etc/default/console-setup**。 + +现在,运行以下命令来设置 Linux 控制台的字体。 + +``` +$ sudo dpkg-reconfigure console-setup +``` + +选择要在 Linux 控制台上使用的编码。只需保留默认值,选择 “OK” 并按回车继续。 + +![][4] + +选择要在 Ubuntu 控制台上设置的编码 + +接下来,在列表中选择受支持的字符集。默认情况下,这是我系统中的最后一个选项,即 **Guess optimal character set**。只需保留默认值,然后按回车键。 + +![][5] + +在 Ubuntu 中选择字符集 + +接下来选择控制台的字体,然后按回车键。我这里选择 “TerminusBold”。 + +![][6] + +选择 Linux 控制台的字体 + +这里,我们为 Linux 控制台选择所需的字体大小。 + +![][7] + +选择 Linux 控制台的字体大小 + +几秒钟后,所选的字体及大小将应用于你的 Linux 控制台。 + +这是在更改字体类型和大小之前,我的 Ubuntu 18.04 LTS 服务器中控制台字体的样子。 + +![][8] + +这是更改之后。 + +![][9] + +如你所见,文本更大、更好,字体类型不同于默认。 + +你也可以直接编辑 **/etc/default/console-setup**,并根据需要设置字体类型和大小。根据以下示例,我的 Linux 控制台字体类型为 “Terminus Bold”,字体大小为 32。 + +``` +ACTIVE_CONSOLES="/dev/tty[1-6]" +CHARMAP="UTF-8" +CODESET="guess" +FONTFACE="TerminusBold" +FONTSIZE="16x32" +``` + + +##### 显示控制台字体 + +要显示你的控制台字体,只需输入: + +``` +$ showconsolefont +``` + +此命令将显示字体的字形或字母表。 + +![][11] + +显示控制台字体 + +如果你的 Linux 发行版没有 “console-setup”,你可以从[**这里**][12]获取它。 + +在使用 **Systemd** 的 Linux 发行版上,你可以通过编辑 **“/etc/vconsole.conf”** 来更改控制台字体。 + +以下是德语键盘的示例配置。 + +``` +$ vi /etc/vconsole.conf + +KEYMAP=de-latin1 +FONT=Lat2-Terminus16 +``` + +希望这篇文章对你有用! + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/08/Ubuntu-Linux-console.png +[3]: https://www.ostechnix.com/find-installed-fonts-commandline-linux/ +[4]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-encoding-to-set-on-the-console.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-character-set-in-Ubuntu.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-font-for-Linux-console.png +[7]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-font-size-for-Linux-console.png +[8]: https://www.ostechnix.com/wp-content/uploads/2019/08/Linux-console-tty-ubuntu-1.png +[9]: https://www.ostechnix.com/wp-content/uploads/2019/08/Ubuntu-Linux-TTY-console.png +[10]: https://www.ostechnix.com/how-to-switch-between-ttys-without-using-function-keys-in-linux/ +[11]: https://www.ostechnix.com/wp-content/uploads/2019/08/show-console-fonts.png +[12]: https://software.opensuse.org/package/console-setup From cc180ebd5abb54cb23a112501c3dcead97d81f5f Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 21 Aug 2019 09:00:31 +0800 Subject: [PATCH 565/951] translating --- ... How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md b/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md index 39fb04fdcc..08e0784009 100644 --- a/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md +++ b/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From eb5f1327455f12dedccb3759dcfc37b006e7429f Mon Sep 17 00:00:00 2001 From: darksun Date: Wed, 21 Aug 2019 12:59:09 +0800 Subject: [PATCH 566/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020180116=20Comman?= =?UTF-8?q?d=20Line=20Heroes:=20Season=201:=20OS=20Wars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md --- ... Command Line Heroes- Season 1- OS Wars.md | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md new file mode 100644 index 0000000000..7a419f0521 --- /dev/null +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md @@ -0,0 +1,162 @@ +[#]: collector: (lujun9972) +[#]: translator: (lujun9972) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command Line Heroes: Season 1: OS Wars) +[#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux) +[#]: author: (redhat https://www.redhat.com) + +Command Line Heroes: Season 1: OS Wars +====== +Saron Yitbarek: Is this thing on? Cue the epic Star Wars crawl, and, action. + +Voice Actor: [00:00:30] Episode Two: Rise of Linux ® . The empire of Microsoft controls 90 % of desktop users . C omplete standardization of operating systems seems assured. However, the advent of the internet swerves the focus of the war from the desktop toward enterprise, where all businesses scramble to claim a server of their own. Meanwhile, an unlikely hero arises from amongst the band of open source rebels . Linus Torvalds, head strong, bespectacled, releases his Linux system free of charge. Microsoft reels — and regroups. + +Saron Yitbarek: [00:01:00] Oh, the nerd in me just loves that. So, where were we? Last time, Apple and Microsoft were trading blows, trying to dominate in a war over desktop users. By the end of e pisode o ne, we saw Microsoft claiming most of the prize. Soon, the entire landscape went through a seismic upheaval. That's all because of the rise of the internet and the army of developers that rose with it. The internet moves the battlefield from PC users in their home offices to giant business clients with hundreds of servers. + +[00:01:30] This is a huge resource shift. Not only does every company out there wanting to remain relevant suddenly have to pay for server space and get a website built — they also have to integrate software to track resources, monitor databases, et cetera, et cetera. You're going to need a lot of developers to help you with that. At least, back then you did. + +In p art t wo of the OS wars, we'll see how that enormous shift in priorities , and the work of a few open source rebels like Linus Torvalds and Richard Stallman , managed to strike fear in the heart of Microsoft, and an entire software industry. + +[00:02:00] I'm Saron Yitbarek and you're listening to Command Line Heroes, an original podcast from Red Hat. In each episode, we're bringing you stories about the people who transform technology from the command line up. + +[00:02:30] Okay. Imagine for a second that you're Microsoft in 1991. You're feeling pretty good, right? Pretty confident. Assured global domination feels nice. You've mastered the art of partnering with other businesses, but you're still pretty much cutting out the developers, programmers, and sys admins that are the real foot soldiers out there. There is this Finnish geek named Linus Torvalds. He and his team of open source programmers are starting to put out versions of Linux, this OS kernel that they're duct taping together. + +[00:03:00] If you're Microsoft, frankly, you're not too concerned about Linux or even about open source in general, but eventually, the sheer size of Linux gets so big that it becomes impossible for Microsoft not to notice. The first version comes out in 1991 and it's got maybe 10,000 lines of code. A decade later, there will be three million lines of code. In case you're wondering, today it's at 20 million. + +[00:03:30] For a moment, let's stay in the early 90s. Linux hasn't yet become the behemoth we know now. It's just this strangely viral OS that's creeping across the planet, and the geeks and hackers of the world are falling in love with it. I was too young in those early days, but I sort of wish I'd been there. At that time, discovering Linux was like gaining access to a secret society. Programmers would share the Linux CD set with friends the same way other people would share mixtapes of underground music. + +Developer Tristram Oaten [00:03:40] tells the story of how he first encountered Linux when he was 16 years old. + +Tristram Oaten: [00:04:00] We went on a scuba diving holiday, my family and I, to Hurghada, which is on the Red Sea. Beautiful place, highly recommend it. The first day, I drank the tap water. Probably, my mom told me not to. I was really sick the whole week — didn't leave the hotel room. All I had with me was a laptop with a fresh install of Slackware Linux, this thing that I'd heard about and was giving it a try. There were no extra apps, just what came on the eight CDs. By necessity, all I had to do this whole week was to get to grips with this alien system. I read man pages, played around with the terminal. I remember not knowing the difference between a single dot, meaning the current directory, and two dots, meaning the previous directory. + +[00:04:30] I had no clue. I must have made so many mistakes, but slowly, over the course of this forcible solitude, I broke through this barrier and started to understand and figure out what this command line thing was all about. By the end of the holiday, I hadn't seen the pyramids, the Nile, or any Egyptian sites, but I had unlocked one of the wonders of the modern world. I'd unlocked Linux, and the rest is history. + +Saron Yitbarek: You can hear some variation on that story from a lot of people. Getting access to that Linux command line was a transformative experience. + +David Cantrell: This thing gave me the source code. I was like, "That's amazing." + +Saron Yitbarek: We're at a 2017 Linux developers conference called Flock to Fedora. + +David Cantrell: ... very appealing. I felt like I had more control over the system and it just drew me in more and more. From there, I guess, after my first Linux kernel compile in 1995, I was hooked, so, yeah. + +Saron Yitbarek: Developers David Cantrell and Joe Brockmire. + +Joe Brockmeier: I was going through the cheap software and found a four - CD set of Slackware Linux. It sounded really exciting and interesting so I took it home, installed it on a second computer, started playing with it, and really got excited about two things. One was, I was excited not to be running Windows, and I was excited by the open source nature of Linux. + +Saron Yitbarek: [00:06:00] That access to the command line was, in some ways, always there. Decades before open source really took off, there was always a desire to have complete control, at least among developers. Go way back to a time before the OS wars, before Apple and Microsoft were fighting over their GUIs. There were command line heroes then, too. Professor Paul Jones is the director of the online library ibiblio.org. He worked as a developer during those early days. + +Paul Jones: [00:07:00] The internet, by its nature, at that time, was less client server, totally, and more peer to peer. We're talking about, really, some sort of VAX to VAX, some sort of scientific workstation, the scientific workstation. That doesn't mean that client and server relationships and applications weren't there, but it does mean that the original design was to think of how to do peer - to - peer things, the opposite of what IBM had been doing, in which they had dumb terminals that had only enough intelligence to manage the user interface, but not enough intelligence to actually let you do anything in the terminal that would expose anything to it. + +Saron Yitbarek: As popular as GUI was becoming among casual users, there was always a pull in the opposite direction for the engineers and developers. Before Linux in the 1970s and 80s, that resistance was there, with EMAX and GNU . W ith Stallman's free software foundation, certain folks were always begging for access to the command line, but it was Linux in the 1990s that delivered like no other. + +[00:07:30] The early lovers of Linux and other open source software were pioneers. I'm standing on their shoulders. We all are. + +You're listening to Command Line Heroes, an original podcast from Red Hat. This is part two of the OS wars: Rise of Linux. + +Steven Vaughan-Nichols: By 1998, things have changed. + +Saron Yitbarek: Steven Vaughan-Nichols is a contributing editor at zdnet.com, and he's been writing for decades about the business side of technology. He describes how Linux slowly became more and more popular until the number of volunteer contributors was way larger than the number of Microsoft developers working on Windows. Linux never really went after Microsoft's desktop customers, though, and maybe that's why Microsoft ignored them at first. Where Linux did shine was in the server room. When businesses went online, each one required a unique programming solution for their needs. + +[00:08:30] Windows NT comes out in 1993 and it's competing with other server operating systems, but lots of developers are thinking, "Why am I going to buy an AIX box or a large windows box when I could set up a cheap Linux-based system with Apache?" Point is, Linux code started seeping into just about everything online. + +Steven Vaughan-Nichols: [00:09:00] Microsoft realizes that Linux, quite to their surprise, is actually beginning to get some of the business, not so much on the desktop, but on business servers. As a result of that, they start a campaign, what we like to call FUD — fear, uncertainty and doubt — saying, "Oh this Linux stuff, it's really not that good. It's not very reliable. You can't trust it with anything." + +Saron Yitbarek: [00:09:30] That soft propaganda style attack goes on for a while. Microsoft wasn't the only one getting nervous about Linux, either. It was really a whole industry versus that weird new guy. For example, anyone with a stake in UNIX was likely to see Linux as a usurper. Famously, the SCO Group, which had produced a version of UNIX, waged lawsuits for over a decade to try and stop the spread of Linux. SCO ultimately failed and went bankrupt. Meanwhile, Microsoft kept searching for their opening. They were a company that needed to make a move. It just wasn't clear what that move was going to be. + +Steven Vaughan-Nichols: [00:10:30] What will make Microsoft really concerned about it is the next year, in 2000, IBM will announce that they will invest a billion dollars in Linux in 2001. Now, IBM is not really in the PC business anymore. They're not out yet, but they're going in that direction, but what they are doing is they see Linux as being the future of servers and mainframe computers, which, spoiler alert, IBM was correct. Linux is going to dominate the server world. + +Saron Yitbarek: This was no longer just about a bunch of hackers loving their Jedi-like control of the command line. This was about the money side working in Linux's favor in a major way. John "Mad Dog" Hall, the executive director of Linux International, has a story that explains why that was. We reached him by phone. + +John Hall: [00:11:30] A friend of mine named Dirk Holden [00:10:56] was a German systems administrator at Deutsche Bank in Germany, and he also worked in the graphics projects for the early days of the X Windows system for PCs. I visited him one day at the bank, and I said, "Dirk, you have 3,000 servers here at the bank and you use Linux. Why don't you use Microsoft NT?" He looked at me and he said, "Yes, I have 3,000 servers , and if I used Microsoft Windows NT, I would need 2,999 systems administrators." He says, "With Linux, I only need four." That was the perfect answer. + +Saron Yitbarek: [00:12:00] The thing programmers are getting obsessed with also happens to be deeply attractive to big business. Some businesses were wary. The FUD was having an effect. They heard open source and thought, "Open. That doesn't sound solid. It's going to be chaotic, full of bugs," but as that bank manager pointed out, money has a funny way of convincing people to get over their hangups. Even little businesses, all of which needed websites, were coming on board. The cost of working with a cheap Linux system over some expensive proprietary option, there was really no comparison. If you were a shop hiring a pro to build your website, you wanted them to use Linux. + +[00:12:30] Fast forward a few years. Linux runs everybody's website. Linux has conquered the server world, and then, along comes the smartphone. Apple and their iPhones take a sizeable share of the market, of course, and Microsoft hoped to get in on that, except, surprise, Linux was there, too, ready and raring to go. + +Author and journalist James Allworth. + +James Allworth: [00:13:00] There was certainly room for a second player, and that could well have been Microsoft, but for the fact of Android, which was fundamentally based on Linux, and because Android, famously acquired by Google, and now running a majority of the world's smartphones, Google built it on top of that. They were able to start with a very sophisticated operating system and a cost basis of zero. They managed to pull it off, and it ended up locking Microsoft out of the next generation of devices, by and large, at least from an operating system perspective. + +Saron Yitbarek: [00:13:30] The ground was breaking up, big time, and Microsoft was in danger of falling into the cracks. John Gossman is the chief architect on the Azure team at Microsoft. He remembers the confusion that gripped the company at that time. + +John Gossman: [00:14:00] Like a lot of companies, Microsoft was very concerned about IP pollution. They thought that if you let developers use open source they would likely just copy and paste bits of code into some product and then some sort of a viral license might take effect that ... They were also very confused, I think, it was just culturally, a lot of companies, Microsoft included, were confused on the difference between what open source development meant and what the business model was. There was this idea that open source meant that all your software was free and people were never going to pay anything. + +Saron Yitbarek: [00:14:30] Anybody invested in the old, proprietary model of software is going to feel threatened by what's happening here. When you threaten an enormous company like Microsoft, yeah, you can bet they're going to react. It makes sense they were pushing all that FUD — fear, uncertainty and doubt. At the time, an “ us versus them ” attitude was pretty much how business worked. If they'd been any other company, though, they might have kept that old grudge, that old thinking, but then, in 2013, everything changes. + +[00:15:00] Microsoft's cloud computing service, Azure, goes online and, shockingly, it offers Linux virtual machines from day one. Steve Ballmer, the CEO who called Linux a cancer, he's out, and a new forward - thinking CEO, Satya Nadella, has been brought in. + +John Gossman: Satya has a different attitude. He's another generation. He's a generation younger than Paul and Bill and Steve were, and had a different perspective on open source. + +Saron Yitbarek: John Gossman, again, from Microsoft's Azure team. + +John Gossman: [00:16:00] We added Linux support into Azure about four years ago, and that was for very pragmatic reasons. If you go to any enterprise customer, you will find that they are not trying to decide whether to use Windows or to use Linux or to use .net or to use Java TM . They made all those decisions a long time ago — about 15 years or so ago, there was some of this argument. Now, every company that I have ever seen has a mix of Linux and Java and Windows and .net and SQL Server and Oracle and MySQL — proprietary source code - based products and open source code products. + +If you're going to operate a cloud and you're going to allow and enable those companies to run their businesses on the cloud, you simply cannot tell them, "You can use this software but you can't use this software." + +Saron Yitbarek: [00:16:30] That's exactly the philosophy that Satya Nadella adopted. In the fall of 2014, he gets up on stage and he wants to get across one big, fat point. Microsoft loves Linux. He goes on to say that 20 % of Azure is already Linux and that Microsoft will always have first - class support for Linux distros. There's not even a whiff of that old antagonism toward open source. + +To drive the point home, there's literally a giant sign behind them that reads, "Microsoft hearts Linux." Aww. For some of us, that turnaround was a bit of a shock, but really, it shouldn't have been. Here's Steven Levy, a tech journalist and author. + +Steven Levy: [00:17:30] When you're playing a football game and the turf becomes really slick, maybe you switch to a different kind of footwear in order to play on that turf. That's what they were doing. They can't deny reality and there are smart people there so they had to realize that this is the way the world is and put aside what they said earlier, even though they might be a little embarrassed at their earlier statements, but it would be crazy to let their statements about how horrible open source was earlier, affect their smart decisions now. + +Saron Yitbarek: [00:18:00] Microsoft swallowed its pride in a big way. You might remember that Apple, after years of splendid isolation, finally shifted toward a partnership with Microsoft. Now it was Microsoft's turn to do a 180. After years of battling the open source approach, they were reinventing themselves. It was change or perish. Steven Vaughan-Nichols. + +Steven Vaughan-Nichols: [00:18:30] Even a company the size of Microsoft simply can't compete with the thousands of open source developers working on all these other major projects , including Linux. They were very loath e to do so for a long time. The former Microsoft CEO, Steve Ballmer, hated Linux with a passion. Because of its GPL license, it was a cancer, but once Ballmer was finally shown the door, the new Microsoft leadership said, "This is like trying to order the tide to stop coming in. The tide is going to keep coming in. We should work with Linux, not against it." + +Saron Yitbarek: [00:19:00] Really, one of the big wins in the history of online tech is the way Microsoft was able to make this pivot, when they finally decided to. Of course, older, hardcore Linux supporters were pretty skeptical when Microsoft showed up at the open source table. They weren't sure if they could embrace these guys, but, as Vaughan-Nichols points out, today's Microsoft simply is not your mom and dad's Microsoft. + +Steven Vaughan-Nichols : [00:19:30] Microsoft 2017 is not Steve Ballmer's Microsoft, nor is it Bill Gates' Microsoft. It's an entirely different company with a very different approach and, again, once you start using open source, it's not like you can really pull back. Open source has devoured the entire technology world. People who have never heard of Linux as such, don't know it, but every time they're on Facebook , they're running Linux. Every time you do a Google search , you're running Linux. + +[00:20:00] Every time you do anything with your Android phone , you're running Linux again. It literally is everywhere, and Microsoft can't stop that, and thinking that Microsoft can somehow take it all over, I think is naïve. + +Saron Yitbarek: [00:20:30] Open source supporters might have been worrying about Microsoft coming in like a wolf in the flock, but the truth is, the very nature of open source software protects it from total domination. No single company can own Linux and control it in any specific way. Greg Kroah-Hartman is a fellow at the Linux Foundation. + +Greg Kroah-Hartman: Every company and every individual contributes to Linux in a selfish manner. They're doing so because they want to solve a problem that they have, be it hardware isn't working , or they want to add a new feature to do something else , or want to take it in a direction that they'll build that they can use for their product. That's great, because then everybody benefits from that because they're releasing the code back, so that everybody can use it. It's because of that selfishness that all companies and all people have, everybody benefits. + +Saron Yitbarek: [00:21:30] Microsoft has realized that in the coming cloud wars, fighting Linux would be like going to war with, well, a cloud. Linux and open source aren't the enemy, they're the atmosphere. Today, Microsoft has joined the Linux Foundation as a platinum member. They became the number one contributor to open source on GitHub. In September, 2017, they even joined the Open Source Initiative. These days, Microsoft releases a lot of its code under open licenses. Microsoft's John Gossman describes what happened when they open sourced .net. At first, they didn't really think they'd get much back. + +John Gossman: [00:22:00] We didn't count on contributions from the community, and yet, three years in, over 50 per cent of the contributions to the .net framework libraries, now, are coming from outside of Microsoft. This includes big pieces of code. Samsung has contributed ARM support to .net. Intel and ARM and a couple other chip people have contributed code generation specific for their processors to the .net framework, as well as a surprising number of fixes, performance improvements , and stuff — from just individual contributors to the community. + +Saron Yitbarek: Up until a few years ago, the Microsoft we have today, this open Microsoft, would have been unthinkable. + +[00:23:00] I'm Saron Yitbarek, and this is Command Line Heroes. Okay, we've seen titanic battles for the love of millions of desktop users. We've seen open source software creep up behind the proprietary titans, and nab huge market share. We've seen fleets of command line heroes transform the programming landscape into the one handed down to people like me and you. Today, big business is absorbing open source software, and through it all, everybody is still borrowing from everybody. + +[00:23:30] In the tech wild west, it's always been that way. Apple gets inspired by Xerox, Microsoft gets inspired by Apple, Linux gets inspired by UNIX. Evolve, borrow, constantly grow. In David and Goliath terms, open source software is no longer a David, but, you know what? It's not even Goliath, either. Open source has transcended. It's become the battlefield that others fight on. As the open source approach becomes inevitable, new wars, wars that are fought in the cloud, wars that are fought on the open source battlefield, are ramping up. + +Here's author Steven Levy. + +Steven Levy: [00:24:00] Basically, right now, we have four or five companies, if you count Microsoft, that in various ways are fighting to be the platform for all we do, for artificial intelligence, say. You see wars between intelligent assistants, and guess what? Apple has an intelligent assistant, Siri. Microsoft has one, Cortana. Google has the Google Assistant. Samsung has an intelligent assistant. Amazon has one, Alexa. We see these battles shifting to different areas, there. Maybe, you could say, the hottest one is would be, whose AI platform is going to control all the stuff in our lives there, and those five companies are all competing for that. + +Saron Yitbarek: If you're looking for another rebel that's going to sneak up behind Facebook or Google or Amazon and blindside them the way Linux blindsided Microsoft, you might be looking a long time, because as author James Allworth points out, being a true rebel is only getting harder and harder. + +James Allworth: [00:25:30] Scale's always been an advantage but the nature of scale advantages are almost ... Whereas, I think previously they were more linear in nature, now it's more exponential in nature, and so, once you start to get out in front with something like this , it becomes harder and harder for a new player to come in and catch up. I think this is true of the internet era in general, whether it's scale like that or the importance and advantages that data bestow on an organization in terms of its ability to compete. Once you get out in front, you attract more customers, and then that gives you more data and that enables you to do an even better job, and then, why on earth would you want to go with the number two player, because they're so far behind? I think it's going to be no different in cloud. + +Saron Yitbarek: [00:26:00] This story began with singular heroes like Steve Jobs and Bill Gates, but the progress of technology has taken on a crowdsourced, organic feel. I think it's telling that our open source hero, Linus Torvalds, didn't even have a real plan when he first invented the Linux kernel. He was a brilliant , young developer for sure, but he was also like a single drop of water at the very front of a tidal wave. The revolution was inevitable. It's been estimated that for a proprietary company to create a Linux distribution in their old - fashioned , proprietary way, it would cost them well over $ 10 billion. That points to the power of open source. + +[00:26:30] In the end, it's not something that a proprietary model is going to compete with. Successful companies have to remain open. That's the big, ultimate lesson in all this. Something else to keep in mind: W hen we're wired together, our capacity to grow and build on what we've already accomplished becomes limitless. As big as these companies get, we don't have to sit around waiting for them to give us something better. Think about the new developer who learns to code for the sheer joy of creating, the mom who decides that if nobody's going to build what she needs, then she'll build it herself. + +Wherever tomorrow's great programmers come from, they're always going to have the capacity to build the next big thing, so long as there's access to the command line. + +[00:27:30] That's it for our two - part tale on the OS wars that shaped our digital lives. The struggle for dominance moved from the desktop to the server room, and ultimately into the cloud. Old enemies became unlikely allies, and a crowdsourced future left everything open . Listen, I know, there are a hundred other heroes we didn't have space for in this history trip, so drop us a line. Share your story. Redhat.com/commandlineheroes. I'm listening. + +We're spending the rest of the season learning what today's heroes are creating, and what battles they're going through to bring their creations to life. Come back for more tales — from the epic front lines of programming. We drop a new episode every two weeks. In a couple weeks' time, we bring you episode three: the Agile Revolution. + +[00:28:00] Command Line Heroes is an original podcast from Red Hat. To get new episodes delivered automatically for free, make sure to subscribe to the show. Just search for “ Command Line Heroes ” in Apple p odcast s , Spotify, Google Play, and pretty much everywhere else you can find podcasts. Then, hit “ subscribe ” so you will be the first to know when new episodes are available. + +I'm Saron Yitbarek. Thanks for listening. Keep on coding. + +-------------------------------------------------------------------------------- + +via: https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux + +作者:[redhat][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.redhat.com +[b]: https://github.com/lujun9972 From a1cab09f073bd779a6ce83faed3d3048066b17cd Mon Sep 17 00:00:00 2001 From: darksun Date: Wed, 21 Aug 2019 13:05:27 +0800 Subject: [PATCH 567/951] rename title --- ....md => 20180116 Command Line Heroes- Season 1- OS Wars_2.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename sources/talk/{20180116 Command Line Heroes- Season 1- OS Wars.md => 20180116 Command Line Heroes- Season 1- OS Wars_2.md} (99%) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md similarity index 99% rename from sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md rename to sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md index 7a419f0521..59747b4d40 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md @@ -7,7 +7,7 @@ [#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux) [#]: author: (redhat https://www.redhat.com) -Command Line Heroes: Season 1: OS Wars +Command Line Heroes: Season 1: OS Wars(Part2 Rise of Linux) ====== Saron Yitbarek: Is this thing on? Cue the epic Star Wars crawl, and, action. From 441733327bf8858e6ae16b1f3d623ae71660572a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Wed, 21 Aug 2019 13:54:45 +0800 Subject: [PATCH 568/951] Translated --- ...02 How To Customize The GNOME 3 Desktop.md | 266 ----------------- ...02 How To Customize The GNOME 3 Desktop.md | 267 ++++++++++++++++++ 2 files changed, 267 insertions(+), 266 deletions(-) delete mode 100644 sources/tech/20181202 How To Customize The GNOME 3 Desktop.md create mode 100644 translated/tech/20181202 How To Customize The GNOME 3 Desktop.md diff --git a/sources/tech/20181202 How To Customize The GNOME 3 Desktop.md b/sources/tech/20181202 How To Customize The GNOME 3 Desktop.md deleted file mode 100644 index 84b8ab119d..0000000000 --- a/sources/tech/20181202 How To Customize The GNOME 3 Desktop.md +++ /dev/null @@ -1,266 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: subject: (How To Customize The GNOME 3 Desktop?) -[#]: via: (https://www.2daygeek.com/how-to-customize-the-gnome-3-desktop/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -[#]: url: ( ) - -How To Customize The GNOME 3 Desktop? -====== - -We have got many emails from user to write an article about GNOME 3 desktop customization but we don’t get a time to write this topic. - -I was using Ubuntu operating system since long time in my primary laptop and i got bored so, i would like to test some other distro which is related to Arch Linux. - -I prefer to go with Majaro so, i have installed Manjaro 18.0 with GNOME 3 desktop in my laptop. - -I’m customizing my desktop, how i want it. So, i would like to take this opportunity to write up this article in detailed way to help others. - -This article helps others to customize their desktop without headache. - -I’m not going to include all my customization and i will be adding a necessary things which will be mandatory and useful for Linux desktop users. - -If you feel some tweak is missing in this article, i would request you to mention that in comment sections. It will be very helpful for other users. - -### 1) How to Launch Activities Overview in GNOME 3 Desktop? - -The Activities Overview will display all the running applications or launched/opened windows by clicking `Super Key` or by clicking `Activities` button in the topmost left corner. - -It allows you to launch a new applications, switch windows, and move windows between workspaces. - -You can simply exit the Activities Overview by choosing the following any of the one actions like selecting a window, application or workspace, or by pressing the `Super Key` or `Esc Key`. - -Activities Overview Screenshot. -![][2] - -### 2) How to Resize Windows in GNOME 3 Desktop? - -The Launched windows can be maximized, unmaximized and snapped to one side of the screen (Left or Right) by using the following key combinations. - - * `Super Key+Down Arrow:` To unmaximize the window. - * `Super Key+Up Arrow:` To maximize the window. - * `Super Key+Right Arrow:` To fill a window in the right side of the half screen. - * `Super Key+Left Arrow:` To fill a window in the left side of the half screen - - - -Use `Super Key+Down Arrow` to unmaximize the window. -![][3] - -Use `Super Key+Up Arrow` to maximize the window. -![][4] - -Use `Super Key+Right Arrow` to fill a window in the right side of the half screen. -![][5] - -Use `Super Key+Left Arrow` to fill a window in the left side of the half screen. -![][6] - -This feature will help you to view two applications at a time a.k.a splitting screen. -![][7] - -### 3) How to Display Applications in GNOME 3 Desktop? - -Click on the `Show Application Grid` button in the Dash to display all the installed applications on your system. -![][8] - -### 4) How to Add Applications on Dash in GNOME 3 Desktop? - -To speed up your day to day activity you may want to add frequently used application into Dash or Drag the application launcher to the Dash. - -It will allow you to directly launch your favorite applications without searching them. To do so, simply right click on it and use the option `Add to Favorites`. -![][9] - -To remove a application launcher a.k.a favorite from Dash, either drag it from the Dash to the grid button or simply right click on it and use the option `Remove from Favorites`. -![][10] - -### 5) How to Switch Between Workspaces in GNOME 3 Desktop? - -Workspaces allow you to group windows together. It will helps you to segregate your work properly. If you are working on Multiple things and you want to group each work and related things separately then it will be very handy and perfect option for you. - -You can switch workspaces in two ways, Open the Activities Overview and select a workspace from the right-hand side or use the following key combinations. - - * Use `Ctrl+Alt+Up` Switch to the workspace above. - * Use `Ctrl+Alt+Down` Switch to the workspace below. - - - -![][11] - -### 6) How to Switch Between Applications (Application Switcher) in GNOME 3 Desktop? - -Use either `Alt+Tab` or `Super+Tab` to switch between applications. To launch Application Switcher, use either `Alt+Tab` or `Super+Tab`. - -Once launched, just keep holding the Alt or Super key and hit the tab key to move to the next application from left to right order. - -### 7) How to Add UserName to Top Panel in GNOME 3 Desktop? - -If you would like to add your UserName to Top Panel then install the following [Add Username to Top Panel][12] GNOME Extension. -![][13] - -### 8) How to Add Microsoft Bing’s wallpaper in GNOME 3 Desktop? - -Install the following [Bing Wallpaper Changer][14] GNOME shell extension to change your wallpaper every day to Microsoft Bing’s wallpaper. -![][15] - -### 9) How to Enable Night Light in GNOME 3 Desktop? - -Night light app is one of the famous app which reduces strain on the eyes by turning your screen a dim yellow from blue light after sunset. - -It is available in smartphones. The other known apps for the same purpose are flux and **[redshift][16]**. - -To enable this, navigate to **System Settings** >> **Devices** >> **Displays** and turn Nigh Light on. -![][17] - -Once it’s enabled and status icon will be placed on the top panel. -![][18] - -### 10) How to Show the Battery Percentage in GNOME 3 Desktop? - -Battery percentage will show you the exact battery usage. To enable this follow the below steps. - -Start GNOME Tweaks >> **Top Bar** >> **Battery Percentage** and switch it on. -![][19] - -After modification you can able to see the battery percentage icon on the top panel. -![][20] - -### 11) How to Enable Mouse Right Click in GNOME 3 Desktop? - -By default right click is disabled on GNOME 3 desktop environment. To enable this follow the below steps. - -Start GNOME Tweaks >> **Keyboard & Mouse** >> Mouse Click Emulation and select “Area” option. -![][21] - -### 12) How to Enable Minimize On Click in GNOME 3 Desktop? - -Enable one-click minimize feature which will help us to minimize opened window without using minimize option. - -``` -$ gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' -``` - -### 13) How to Customize Dock in GNOME 3 Desktop? - -If you would like to change your Dock similar to Deepin desktop or Mac then use the following set of commands. - -``` -$ gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM -$ gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false -$ gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode FIXED -$ gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 50 -``` - -![][22] - -### 14) How to Show Desktop in GNOME 3 Desktop? - -By default `Super Key+D` shortcut doesn’t show your desktop. To configure this follow the below steps. - -Settings >> **Devices** >> **Keyboard** >> Click **Hide all normal windows** under Navigation then Press `Super Key+D` finally hit `Set` button to enable it. -![][23] - -### 15) How to Customize Date and Time Format? - -By default GNOME 3 shows date and time with `Sun 04:48`. It’s not clear and if you want to get the output with following format `Sun Dec 2 4:49 AM` follow the below steps. - -**For Date Modification:** Start GNOME Tweaks >> **Top Bar** and enable `Weekday` option under Clock. -![][24] - -**For Time Modification:** Settings >> **Details** >> **Date & Time** then choose `AM/PM` option in the time format. -![][25] - -After modification you can able to see the date and time format same as below. -![][26] - -### 16) How to Permanently Disable Unused Services in Boot? - -In my case, i’m not going to use **Bluetooth** & **cpus a.k.a Printer service**. Hence, disabling these services on my laptop. To disable services on Arch based systems use **[Pacman Package Manager][27]**. -For Bluetooth - -``` -$ sudo systemctl stop bluetooth.service -$ sudo systemctl disable bluetooth.service -$ sudo systemctl mask bluetooth.service -$ systemctl status bluetooth.service -``` - -For cups - -``` -$ sudo systemctl stop org.cups.cupsd.service -$ sudo systemctl disable org.cups.cupsd.service -$ sudo systemctl mask org.cups.cupsd.service -$ systemctl status org.cups.cupsd.service -``` - -Finally verify whether these services are disabled or not in the boot using the following command. If you want to double confirm this, you can reboot once and check the same. Navigate to the following link to know more about **[systemctl][28]** usage, - -``` -$ systemctl list-unit-files --type=service | grep enabled -[email protected] enabled -dbus-org.freedesktop.ModemManager1.service enabled -dbus-org.freedesktop.NetworkManager.service enabled -dbus-org.freedesktop.nm-dispatcher.service enabled -display-manager.service enabled -gdm.service enabled -[email protected] enabled -linux-module-cleanup.service enabled -ModemManager.service enabled -NetworkManager-dispatcher.service enabled -NetworkManager-wait-online.service enabled -NetworkManager.service enabled -systemd-fsck-root.service enabled-runtime -tlp-sleep.service enabled -tlp.service enabled -``` - -### 17) Install Icons & Themes in GNOME 3 Desktop? - -Bunch of Icons and Themes are available for GNOME Desktop so, choose the desired **[GTK Themes][29]** and **[Icons Themes][30]** for you. To configure this further, navigate to the below links which makes your Desktop more elegant. - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/how-to-customize-the-gnome-3-desktop/ - -作者:[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]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[2]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-overview-screenshot.jpg -[3]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-unmaximize-the-window.jpg -[4]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-maximize-the-window.jpg -[5]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-fill-a-window-right-side.jpg -[6]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-fill-a-window-left-side.jpg -[7]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-split-screen.jpg -[8]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-display-applications.jpg -[9]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-add-applications-on-dash.jpg -[10]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-remove-applications-from-dash.jpg -[11]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-workspaces-screenshot.jpg -[12]: https://extensions.gnome.org/extension/1108/add-username-to-top-panel/ -[13]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-add-username-to-top-panel.jpg -[14]: https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/ -[15]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-add-microsoft-bings-wallpaper.jpg -[16]: https://www.2daygeek.com/install-redshift-reduce-prevent-protect-eye-strain-night-linux/ -[17]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-night-light.jpg -[18]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-night-light-1.jpg -[19]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-display-battery-percentage.jpg -[20]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-display-battery-percentage-1.jpg -[21]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-mouse-right-click.jpg -[22]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-dock-customization.jpg -[23]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-show-desktop.jpg -[24]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-customize-date.jpg -[25]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-customize-time.jpg -[26]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-customize-date-time.jpg -[27]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/ -[28]: https://www.2daygeek.com/sysvinit-vs-systemd-cheatsheet-systemctl-command-usage/ -[29]: https://www.2daygeek.com/category/gtk-theme/ -[30]: https://www.2daygeek.com/category/icon-theme/ diff --git a/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md b/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md new file mode 100644 index 0000000000..45a96c0ed8 --- /dev/null +++ b/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md @@ -0,0 +1,267 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: subject: (How To Customize The GNOME 3 Desktop?) +[#]: via: (https://www.2daygeek.com/how-to-customize-the-gnome-3-desktop/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) +[#]: url: ( ) + +如何自定义 GNOME 3 桌面? +====== + +我们收到很多来自用户的电子邮件来写一篇关于 GNOME 3 桌面自定义的文章,但是,我们没有时间来写这个主题。 + +在很长时间内,我一直在我的主要笔记本电脑上使用 Ubuntu 操作系统I,并且,我感到很无聊,我想测试一些与 Arch Linux 相关的其它的发行版。 + +我更喜欢 Majaro ,我在我的笔记本电脑中安装使用 GNOME 3 桌面的 Manjaro 18.0 。 + +我在自定义我的桌面,我想要它怎样。所以,我想抓住这个机会来详细撰写这篇文章,以帮助其他人。 + +这篇文章帮助其他人来不必头疼地自定义他们的桌面。 + +我不打算包括我所有的自定义,并且,我将强制性地添加一个必要的东西,对 Linux 桌面用户来说是有用的。 + +如果你觉得这篇文章中缺少一些调整,我请求你在评论区提到缺少的东西。对其它用户来说这是非常有用的 。 + +### 1) 如何在 GNOME 3 桌面中启动 Activities 概述? + +Activities 概述将显示所有运行的应用程序,或通过单击 `Super 键` ,或在左上角上单击 `Activities` 按钮来启动/打开窗口。 + +它允许你来启动一个新的应用程序,切换窗口,和在工作空间之间移动窗口。 + +你可以简单地退出 Activities 概述,通过选择下面任一操作,像选择一个窗口,应用程序或工作区间,或通过按 `Super 键` or `Esc 键`。 + +Activities 概述屏幕截图。 +![][2] + +### 2) 如何在 GNOME 3 桌面中重新调整窗口大小? + +通过下面的组合键来将启动的窗口最大化,非最大化,并捕捉到屏幕的一侧(左侧或右侧)。 + + * `Super Key+下箭头:` 来非最大化窗口。 + * `Super Key+上箭头:` 来最大化窗口。 + * `Super Key+右箭头:` 来在填充半个屏幕的右侧窗口。 + * `Super Key+作箭头:` 来在填充半个屏幕的左侧窗口。 + + + +使用 `Super Key+下箭头` 来非最大化窗口。 +![][3] + +使用 `Super Key+上箭头` 来最大化窗口。 +![][4] + +使用 `Super Key+右箭头` 来在填充半个屏幕的右侧窗口。 +![][5] + +使用 `Super Key+左箭头` 来在填充半个屏幕的左侧窗口。 +![][6] + +这个特色将帮助你一次查看两个应用程序,又名,拆分屏幕。 +![][7] + +### 3) 如何在 GNOME 3 桌面中显示应用程序? + +在 Dash 中,单击 `显示应用程序网格` 按钮来显示在你的系统上的所有已安装的应用程序。 +![][8] + +### 4) 如何在 GNOME 3 桌面中的 Dash 中添加应用程序? + +为加速你天天的活动,你可能想要添加频繁使用的应用程序到 Dash 中,或拖拽应用程序启动器到 Dash 中。 + +它将允许你直接启动你的收藏夹中的应用程序,而不用先去搜索应用程序。为做到这样,在应用程序上简单地右击,并使用选项 `添加到收藏夹` 。 +![][9] + +为移除一个应用程序启动器,又名,在 Dash 中的收藏夹,或者从 Dash 中拖拽应用程序到网格按钮,或者在应用程序上简单地右击,并使用选项 `从收藏夹中移除` 。 +![][10] + +### 5) 如何在 GNOME 3 桌面中的工作区间之间切换? + +工作区间允许你将窗口组合在一起。它将帮助你恰当地分隔你的工作。如果你正在做多项工作,并且你想对每项工作和相关的事物进行单独地分组,那么,它将是非常便利的,对你来说是一个完美的选项。 + +你可以用两种方法切换工作区间,打开 Activities 概述,并从右手边选择一个工作区间,或者使用下面的组合键。 + + * 使用 `Ctrl+Alt+Up` 切换到上一个工作区间。 + * 使用 `Ctrl+Alt+Down` 切换到下一个工作区间。 + + + +![][11] + +### 6) 如何在 GNOME 3 桌面中的应用程序之间切换 (应用程序切换器) ? + +使用 `Alt+Tab` 或 `Super+Tab` 来在应用程序之间切换。为启动应用程序切换器,使用 `Alt+Tab` 或 `Super+Tab` 。 + +在启动后,只需要按住 Alt 或 Super 键,按 Tab 键来从左到右的依次移动接下来的应用程序。 + +### 7) 如何在 GNOME 3 桌面中添加用户姓名到顶部面板? + +如果你想添加你的用户姓名到顶部面板,那么安装下面的[添加用户姓名到顶部面板][12] GNOME 扩展。 +![][13] + +### 8) 如何在 GNOME 3 桌面中添加微软 Bing 的桌面背景? + +安装下面的 [Bing 桌面背景更换器][14] GNOME shell 扩展,来每天更改你的桌面背景为微软 Bing 的桌面背景。 +![][15] + +### 9) 如何在 GNOME 3 桌面中启用夜光? + +夜光应用程序是著名的应用程序之一,它通过在日落后把你的屏幕从蓝光调成暗黄色,来减轻眼睛疲劳。 + +它在智能手机上是可用的。相同目标的其它已知应用程序是 flux 和 **[redshift][16]**. + +为启用这个特色,导航到**系统设置** >> **设备** >> **显示** ,并打开夜光。 +![][17] + +在它启用后,状态图标将被放置到顶部面板上。 +![][18] + +### 10) 如何在 GNOME 3 桌面中显示电池百分比? + +电池百分比将向你显示精确地电池使用情况。为启用这个特色,遵循下面的步骤。 + +启动 GNOME Tweaks >> **顶部栏** >> **电池百分比** ,并打开它。 +![][19] + +在修改后,你能够在顶部面板上看到电池百分比图标。 +![][20] + +### 11) 如何在 GNOME 3 桌面中启用鼠标右键单击? + +在 GNOME 3 桌面环境中右键单击是默认禁用的。为启用这个特色,遵循下面的步骤。 + +启动 GNOME Tweaks >> **键盘和鼠标** >> 鼠标点击硬件仿真,并选择“区域”选项。 +![][21] + +### 12) 如何在 GNOME 3 桌面中启用单击最小化? + +启用一次单击最小化特色,这将帮助我们最小化打开的窗口,而不比使用最小化选项。 + +``` +$ gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' +``` + +### 13) 如何在 GNOME 3 桌面中自定义 Dock ? + +如果你想更改你的 Dock ,类似于 Deepin 桌面或 Mac 桌面,那么使用下面的一组命令。 + +``` +$ gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM +$ gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false +$ gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode FIXED +$ gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 50 +``` + +![][22] + +### 14) 如何在 GNOME 3桌面中显示桌面? + +默认 `Super 键 + D` 快捷键不能显示你的桌面。为配置这种情况,遵循下面的步骤。 + +设置 >> **设备** >> **键盘** >> 单击在导航下的 **隐藏所有普通窗口** ,然后按 `Super 键 + D` ,最后按`设置`按钮来启用它。 +![][23] + +### 15) 如何自定义日期和时间格式? + + GNOME 3 默认用 `Sun 04:48` 的格式来显示日期和时间。它不是清晰易懂的,如果你想获得以下格式的输出: `Sun Dec 2 4:49 AM` ,遵循下面的步骤。 + +**对于日期修改:** 打开 GNOME Tweaks >> **顶部栏** ,并在时钟下启用`星期`选项。 +![][24] + +**对于时间修改:** 设置 >> **具体情况** >> **日期和时间** ,然后,在时间格式中选择 `AM/PM` 选项。 +![][25] + +在修改后,你能够看到与下面相同的日期和时间格式。 +![][26] + +### 16) 如何在启动程序中永久地禁用不使用的服务? + +就我来说,我将不使用 **蓝牙** & **cups 又名,打印机服务**。因此,在我的笔记本电脑上禁用这些服务。为在基于 Arch 的系统上禁用服务,使用 **[Pacman 软件包管理器][27]**。 + +对于蓝牙 + +``` +$ sudo systemctl stop bluetooth.service +$ sudo systemctl disable bluetooth.service +$ sudo systemctl mask bluetooth.service +$ systemctl status bluetooth.service +``` + +对于 cups + +``` +$ sudo systemctl stop org.cups.cupsd.service +$ sudo systemctl disable org.cups.cupsd.service +$ sudo systemctl mask org.cups.cupsd.service +$ systemctl status org.cups.cupsd.service +``` + +最后,使用以下命令验证这些服务是否在启动程序中被禁用。如果您想再次确认这一点,您可以重新启动一次,并检查相同的东西。导航到以下链接来了解更多关于 **[systemctl][28]** 的用法, + +``` +$ systemctl list-unit-files --type=service | grep enabled +[email protected] enabled +dbus-org.freedesktop.ModemManager1.service enabled +dbus-org.freedesktop.NetworkManager.service enabled +dbus-org.freedesktop.nm-dispatcher.service enabled +display-manager.service enabled +gdm.service enabled +[email protected] enabled +linux-module-cleanup.service enabled +ModemManager.service enabled +NetworkManager-dispatcher.service enabled +NetworkManager-wait-online.service enabled +NetworkManager.service enabled +systemd-fsck-root.service enabled-runtime +tlp-sleep.service enabled +tlp.service enabled +``` + +### 17) 在 GNOME 3 桌面中安装图标和主题? + +大量的图标和主题可供 GNOME 桌面使用,因此,选择吸引你的 **[GTK 主题][29]** 和 **[图标主题][30]**。为配置这个特色,导航到下面的使你的桌面更优美的链接。 + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/how-to-customize-the-gnome-3-desktop/ + +作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[2]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-overview-screenshot.jpg +[3]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-unmaximize-the-window.jpg +[4]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-maximize-the-window.jpg +[5]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-fill-a-window-right-side.jpg +[6]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-fill-a-window-left-side.jpg +[7]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-activities-split-screen.jpg +[8]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-display-applications.jpg +[9]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-add-applications-on-dash.jpg +[10]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-remove-applications-from-dash.jpg +[11]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-workspaces-screenshot.jpg +[12]: https://extensions.gnome.org/extension/1108/add-username-to-top-panel/ +[13]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-add-username-to-top-panel.jpg +[14]: https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/ +[15]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-add-microsoft-bings-wallpaper.jpg +[16]: https://www.2daygeek.com/install-redshift-reduce-prevent-protect-eye-strain-night-linux/ +[17]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-night-light.jpg +[18]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-night-light-1.jpg +[19]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-display-battery-percentage.jpg +[20]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-display-battery-percentage-1.jpg +[21]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-mouse-right-click.jpg +[22]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-dock-customization.jpg +[23]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-enable-show-desktop.jpg +[24]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-customize-date.jpg +[25]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-customize-time.jpg +[26]: https://www.2daygeek.com/wp-content/uploads/2018/12/how-to-customize-the-gnome-3-desktop-customize-date-time.jpg +[27]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/ +[28]: https://www.2daygeek.com/sysvinit-vs-systemd-cheatsheet-systemctl-command-usage/ +[29]: https://www.2daygeek.com/category/gtk-theme/ +[30]: https://www.2daygeek.com/category/icon-theme/ From 0c97bf2c1efd1273edae654675e02574680ff32f Mon Sep 17 00:00:00 2001 From: Valonia Kim <34000495+Valoniakim@users.noreply.github.com> Date: Wed, 21 Aug 2019 16:54:43 +0800 Subject: [PATCH 569/951] translating --- ... allowing myself to be vulnerable made me a better leader.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20180104 How allowing myself to be vulnerable made me a better leader.md b/sources/talk/20180104 How allowing myself to be vulnerable made me a better leader.md index 1cd6a22162..339003abe5 100644 --- a/sources/talk/20180104 How allowing myself to be vulnerable made me a better leader.md +++ b/sources/talk/20180104 How allowing myself to be vulnerable made me a better leader.md @@ -1,3 +1,5 @@ +translating by valoniakim + How allowing myself to be vulnerable made me a better leader ====== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/leaderscatalysts.jpg?itok=f8CwHiKm) From e083fb2e4450cb8fb09d71e2742d30a6465945a3 Mon Sep 17 00:00:00 2001 From: Liwen Jiang Date: Wed, 21 Aug 2019 07:52:10 -0500 Subject: [PATCH 570/951] Submit for Review Submit for Review --- ...tup Multilingual Input Method On Ubuntu.md | 184 ------------------ ...tup Multilingual Input Method On Ubuntu.md | 182 +++++++++++++++++ 2 files changed, 182 insertions(+), 184 deletions(-) delete mode 100644 sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md create mode 100644 translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md diff --git a/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md b/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md deleted file mode 100644 index d4f0243e74..0000000000 --- a/sources/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (tomjlw) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How To Setup Multilingual Input Method On Ubuntu) -[#]: via: (https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/) -[#]: author: (sk https://www.ostechnix.com/author/sk/) - -How To Setup Multilingual Input Method On Ubuntu -====== - -For those who don’t know, there are hundreds of spoken languages in India and 22 languages are listed as official languages in Indian constitution. I am not a native English speaker, so I often use **Google translate** if I ever needed to type and/or translate something from English to my native language, which is Tamil. Well, I guess I don’t need to rely on Google translate anymore. I just found way to type in Indian languages on Ubuntu. This guide explains how to setup multilingual input method. It has been exclusively written for Ubuntu 18.04 LTS, however it might work on other Ubuntu variants like Linux mint, Elementary OS. - -### Setup Multilingual Input Method On Ubuntu Linux - -With the help of **IBus** , we can easily setup multilingual input method on Ubuntu and its derivatives. Ibus, stands for **I** ntelligent **I** nput **Bus** , is an input method framework for multilingual input in Unix-like operating systems. It allows us to type in our native language in most GUI applications, for example LibreOffice. - -##### Install IBus On Ubuntu - -To install IBus package on Ubuntu, run: - -``` -$ sudo apt install ibus-m17n -``` - -The Ibus-m17n package provides a lot of Indian and other countries languages including amharic, arabic, armenian, assamese, athapascan languages, belarusian, bengali, burmese, central khmer, chamic languages, chinese, cree, croatian, czech, danish, divehi, dhivehi, maldivian, esperanto, french, georgian, ancient and modern greek, gujarati, hebrew, hindi, inuktitut, japanese, kannada, kashmiri, kazakh, korean, lao, malayalam, marathi, nepali, ojibwa, oriya, panjabi, punjabi, persian, pushto, pashto, russian, sanskrit, serbian, sichuan yi, nuosu, siksika, sindhi, sinhala, sinhalese, slovak, swedish, tai languages, tamil, telugu, thai, tibetan, uighur, uyghur, urdu, uzbek, vietnamese, as well as yiddish. - -##### Add input languages - -We can add languages in System **Settings** section. Click the drop down arrow on the top right corner of your Ubuntu desktop and choose Settings icon in the bottom left corner. - -![][2] - -Launch System’s settings from top panel - -From the Settings section, click on **Region & Language** option in the left pane. Then click the **+** (plus) sign button on the right side under **Input Sources** tab. - -![][3] - -Region & language section in Settings section - -In the next window, click on the **three vertical dots** button. - -![][4] - -Add input source in Ubuntu - -Search and choose the input language you’d like to add from the list. - -![][5] - -Add input language - -For the purpose of this guide, I am going to add **Tamil** language. After choosing the language, click **Add** button. - -![][6] - -Add Input Source - -Now you will see the selected input source has been added. You will see it in Region & Language section under Input Sources tab. - -![][7] - -Input sources section in Ubuntu - -Click the “Manage Installed Languages” button under Input Sources tab. - -![][8] - -Manage Installed Languages In Ubuntu - -Next you will be asked whether you want to install translation packs for the chosen language. You can install them if you want. Or, simply choose “Remind Me Later” button. You will be notified when you open this next time. - -![][9] - -The language support is not installed completely - -Once the translation packs are installed, Click **Install / Remove Languages** button. Also make sure IBus is selected in Keyboard input method system. - -![][10] - -Install / Remove Languages In Ubuntu - -Choose your desired language from the list and click Apply button. - -![][11] - -Choose input language - -That’s it. That’s we have successfully setup multilingual input method on Ubuntu 18.04 desktop. Similarly, add as many as input languages you want. - -After adding all language sources, log out and log in back. - -##### Type In Indian languages and/or your preferred languages - -Once you have added all languages, you will see them from the drop download on the top bar of your Ubuntu desktop. - -![][12] - -Choose input language from top bar in Ubuntu desktop - -Alternatively, you can use **SUPER+SPACE** keys from the Keyboard to switch between input languages. - -![][13] - -Choose input language using Super+Space keys in Ubuntu - -Open any GUI text editors/apps and start typing! - -![][14] - -Type in Indian languages in Ubuntu - -##### Add IBus to startup applications - -We need let IBus to start automatically on every reboot, so you need not to start it manually whenever you want to type in your preferred language. - -To do so, simply type “startup applications” in the dash and click on Startup Applications option. - -![][15] - -Launch startup applications in Ubuntu - -In the next window, click Add, type “Ibus” in the name field and “ibus-daemon” in the Command field and then click Add button. - -![][16] - -Add Ibus to startup applications on Ubuntu - -From now IBus will automatically start on system startup. - -* * * - -**Suggested read:** - - * [**How To Use Google Translate From Commandline In Linux**][17] - * [**How To Type Indian Rupee Sign (₹) In Linux**][18] - * [**How To Setup Japanese Language Environment In Arch Linux**][19] - - - -* * * - -So, it is your turn now. What application/tool you’re using to type in local Indian languages? Let us know them in the comment section below. - -**Reference:** - - * [**IBus – Ubuntu Community Wiki**][20] - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/ - -作者:[sk][a] -选题:[lujun9972][b] -译者:[tomjlw](https://github.com/tomjlw) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/sk/ -[b]: https://github.com/lujun9972 -[2]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-system-settings.png -[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/Region-language-in-Settings-ubuntu.png -[4]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-input-source-in-Ubuntu.png -[5]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-input-language.png -[6]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-Input-Source-Ubuntu.png -[7]: https://www.ostechnix.com/wp-content/uploads/2019/08/Input-sources-Ubuntu.png -[8]: https://www.ostechnix.com/wp-content/uploads/2019/08/Manage-Installed-Languages.png -[9]: https://www.ostechnix.com/wp-content/uploads/2019/08/The-language-support-is-not-installed-completely.png -[10]: https://www.ostechnix.com/wp-content/uploads/2019/08/Install-Remove-languages.png -[11]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-language.png -[12]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-input-language-from-top-bar-in-Ubuntu.png -[13]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-input-language-using-SuperSpace-keys.png -[14]: https://www.ostechnix.com/wp-content/uploads/2019/08/Setup-Multilingual-Input-Method-On-Ubuntu.png -[15]: https://www.ostechnix.com/wp-content/uploads/2019/08/Launch-startup-applications-in-ubuntu.png -[16]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-Ibus-to-startup-applications-on-Ubuntu.png -[17]: https://www.ostechnix.com/use-google-translate-commandline-linux/ -[18]: https://www.ostechnix.com/type-indian-rupee-sign-%e2%82%b9-linux/ -[19]: https://www.ostechnix.com/setup-japanese-language-environment-arch-linux/ -[20]: https://help.ubuntu.com/community/ibus diff --git a/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md b/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md new file mode 100644 index 0000000000..7a6d25f5e8 --- /dev/null +++ b/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md @@ -0,0 +1,182 @@ +[#]: collector: (lujun9972) +[#]: translator: (tomjlw) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Setup Multilingual Input Method On Ubuntu) +[#]: via: (https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/) +[#]: author: (sk https://www.ostechnix.com/author/sk/) + +如何在 Ubuntu 上设置多语言输入法 +====== + +在印度有数以百计的语言被使用,其中22中被印度机构列为官方语言。我的母语不是英语,因此当我需要从英语输入或者翻译到我的母语泰米尔语时我经常使用**谷歌翻译**。嗯,我估计我不再需要依靠谷歌翻译了。我刚发现在 Ubuntu 上输入印度语的好办法。这篇教程解释了如何配置多语输入法的方法。这个是为 Ubuntu 18.04 LTS 特别打造的,但是它可以在其它类 Ubuntu 系统例如 Linux mint,Elementary OS 上使用。 + +### 在 Ubuntu Linux 上设置多语言输入法 + +通过 **IBus** 的帮助,我们可以轻松在 Ubuntu 及其衍生物上配置多语言输入法。Ibus,代表 **I** ntelligent **I** nput **Bus**(智能输入总线),是一种针对类 Unix 操作系统下多语输入的输入法框架。它使得我们可以在大多数 GUI 应用例如 LibreOffice 下输入母语。 + +### 在 Ubuntu 上安装 IBus + +在 Ubuntu 上 安装 IBus 包,运行: + +``` +$ sudo apt install ibus-m17n +``` + +Ibus-m17n 包提供了许多印度语和其它国家语言包括阿姆哈拉语,阿拉伯语,阿美尼亚语,阿萨姆语,阿萨巴斯卡语,白俄罗斯语,孟加拉语,缅甸语,中高棉语,占文,汉语,克里语,克罗地亚语,捷克语,丹麦语,迪维希语,马尔代夫语,世界语,法语,格鲁吉亚语,古/现代希腊语,古吉拉特语,希伯来语,因纽特语,日语,卡纳达语,克什米尔语,哈萨克语,韩语,老挝语,马来语,马拉地语,尼泊尔语,欧吉布威语,欧瑞亚语,旁遮普语,波斯语,普什图语,俄语,梵语,塞尔维亚语,四川彝文,彝文,西格西卡语,信德语,僧伽罗语,斯洛伐克语,瑞典语,泰语,泰米尔语,泰卢固语,藏语,维吾尔语,乌都语,乌兹别克语,越语及意第绪语。 + +##### 添加输入语言 + +我们可以在系统里的**设置**部分添加语言。点击你的 Ubuntu 桌面右上角的下拉箭头选择底部左下角的设置图标。 + +![][2] + +从顶部面板启动系统设置 + +从设置部分,点击左侧面板的**区域及语言**选项。再点击右侧**输入来源**标签下的**+**(加号)按钮。 + +![][3] + +设置部分的区域及语言选项 + +在下个窗口,点击**三个垂直的点**按钮。 + +![][4] + +在 Ubuntu 里添加输入来源 + +搜寻并选择你想从列表中添加的输入语言。 + +![][5] + +添加输入语言 + +在本篇教程中,我将加入**泰米尔**语。在选择语言后,点击**添加**按钮。 + +![][6] + +添加输入来源 + +现在你会看到选中的输入来源已经被添加了。你会在输入来源标签下的区域及语言选项中看到它。 + +![][7] + +Ubuntu 里的输入来源选项 + +点击输入来源标签下的“管理安装的语言”按钮 + +![][8] + +在 Ubuntu 里管理安装的语言 + +接下来你会被询问是否想要为选定语言安装翻译包。如果你想的话你可以安装它们。或者仅仅选择“稍后提醒我”按钮。你下次打开的时候会收到统治。 + +![][9] + +语言支持没完全安装好 + +一旦翻译包安装好,点击**安装/移除语言**按钮。同时确保 IBus 在键盘输入法系统中被选中。 + +![][10] + +在 Ubuntu 中安装/移除语言 + +从列表中选择你想要的语言并点击采用按钮。 + +![][11] + +选择输入语言 + +到此为止了。我们已成功在 Ubuntu 18.04 桌面上配置好多语输入方法。同样的,你可以添加尽可能多的输入语言。 + +在添加完所有语言来源后,登出再登陆回去。 + +##### 用印度语或者你喜欢的语言输入 + +一旦你添加完所有语言后,你就会从你的 Ubuntu 桌面上的顶端菜单下载栏看到它们。 + +![][12] + +从 Ubuntu 桌面的顶端栏选择输入语言。 + +你也可以使用键盘上的**徽标键+空格键**在不同语言中切换。 + +![][13] + +在 Ubuntu 里用**徽标键+空格键**选择输入语言 + +打开任何 GUI 文本编辑器/应用开始打字吧! + +![][14] + +在 Ubuntu 中用印度语输入 + +##### 将 IBus 加入 开始应用 + +我们需要让 IBus 在每次重启后自动打开,这样每次你想要用自己喜欢的语言输入的时候就无须手动打开。 + +为此仅须在面板中输入“开机应用”点开开机应用选项。 + +![][15] + +在下个窗口,点击添加,在名字栏输入“Ibus”并在命令栏输入“ibus-daemon”点击添加按钮。 + +![][16] + +在 Ubuntu 中将 Ibus 添加进开机启动项 + +从现在起 IBus 将在系统启动后自动开始。 + +* * * + +**推荐阅读:** + + * [**如何从 Linux 中的命令行使用谷歌翻译**][17] + * [**如何在 Linux 中输入印度卢布符号 (₹) In Linux**][18] + * [**如何在 Arch Linux 中搭建日语环境**][19] + + + +* * * + +现在到你的回合了。在什么应用/工具中你用当地的印度语输入?在下方评论区让我们知道它们。 + +**参考:** + + * [**IBus – Ubuntu 社区百科**][20] + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/ + +作者:[sk][a] +选题:[lujun9972][b] +译者:[tomjlw](https://github.com/tomjlw) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[2]: https://www.ostechnix.com/wp-content/uploads/2019/07/Ubuntu-system-settings.png +[3]: https://www.ostechnix.com/wp-content/uploads/2019/08/Region-language-in-Settings-ubuntu.png +[4]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-input-source-in-Ubuntu.png +[5]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-input-language.png +[6]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-Input-Source-Ubuntu.png +[7]: https://www.ostechnix.com/wp-content/uploads/2019/08/Input-sources-Ubuntu.png +[8]: https://www.ostechnix.com/wp-content/uploads/2019/08/Manage-Installed-Languages.png +[9]: https://www.ostechnix.com/wp-content/uploads/2019/08/The-language-support-is-not-installed-completely.png +[10]: https://www.ostechnix.com/wp-content/uploads/2019/08/Install-Remove-languages.png +[11]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-language.png +[12]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-input-language-from-top-bar-in-Ubuntu.png +[13]: https://www.ostechnix.com/wp-content/uploads/2019/08/Choose-input-language-using-SuperSpace-keys.png +[14]: https://www.ostechnix.com/wp-content/uploads/2019/08/Setup-Multilingual-Input-Method-On-Ubuntu.png +[15]: https://www.ostechnix.com/wp-content/uploads/2019/08/Launch-startup-applications-in-ubuntu.png +[16]: https://www.ostechnix.com/wp-content/uploads/2019/08/Add-Ibus-to-startup-applications-on-Ubuntu.png +[17]: https://www.ostechnix.com/use-google-translate-commandline-linux/ +[18]: https://www.ostechnix.com/type-indian-rupee-sign-%e2%82%b9-linux/ +[19]: https://www.ostechnix.com/setup-japanese-language-environment-arch-linux/ +[20]: https://help.ubuntu.com/community/ibus From 6addcc64047b1d8b4af306296ba16542c4af51aa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Aug 2019 22:20:40 +0800 Subject: [PATCH 571/951] PRF @geekpi --- ... is corrupted, it has the wrong hash- Error In Ubuntu.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md b/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md index f7823538eb..5c0e0b8970 100644 --- a/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md +++ b/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu) @@ -35,13 +35,13 @@ E: The package cache file is corrupted, it has the wrong hash ![][2] -Ubuntu 中的 “The package cache file is corrupted, it has the wrong hash” 错误 +*Ubuntu 中的 “The package cache file is corrupted, it has the wrong hash” 错误* 经过一番谷歌搜索,我找到了解决此错误的方法。 如果你遇到过这个错误,不要惊慌。只需运行下面的命令修复。 -在运行命令之前,**请再次确认你在最后加入了 “\*”**。在命令最后加上 ***** 很重要。如果你没有添加,它会删除 **/var/lib/apt/lists/** 目录,而且无法恢复。我提醒过你了! +在运行命令之前,**请再次确认你在最后加入了 `*`**。在命令最后加上 `*` 很重要。如果你没有添加,它会删除 `/var/lib/apt/lists/`*目录,而且无法恢复。我提醒过你了! ``` $ sudo rm -rf /var/lib/apt/lists/* @@ -64,7 +64,7 @@ via: https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has- 作者:[sk][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 27b142dd8c47a293aab260cbd4270550fa4fd83b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Aug 2019 22:21:08 +0800 Subject: [PATCH 572/951] PUB @geekpi https://linux.cn/article-11254-1.html --- ...file is corrupted, it has the wrong hash- Error In Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md (97%) diff --git a/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md b/published/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md similarity index 97% rename from translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md rename to published/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md index 5c0e0b8970..3c5a6ef900 100644 --- a/translated/tech/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md +++ b/published/20190815 Fix ‘E- The package cache file is corrupted, it has the wrong hash- Error In Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11254-1.html) [#]: subject: (Fix ‘E: The package cache file is corrupted, it has the wrong hash’ Error In Ubuntu) [#]: via: (https://www.ostechnix.com/fix-e-the-package-cache-file-is-corrupted-it-has-the-wrong-hash-error-in-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From e595943c1756a468212191dc44da0a0dade722a0 Mon Sep 17 00:00:00 2001 From: darksun Date: Wed, 21 Aug 2019 23:00:23 +0800 Subject: [PATCH 573/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars=5F2.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2021=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E4=B8=89=2023:00:23=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...80116 Command Line Heroes- Season 1- OS Wars_2.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md index 59747b4d40..1e674c1b0d 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md @@ -7,17 +7,17 @@ [#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux) [#]: author: (redhat https://www.redhat.com) -Command Line Heroes: Season 1: OS Wars(Part2 Rise of Linux) +代码英雄: 第一季: 操作系统大战(第二部分 Linux 崛起) ====== -Saron Yitbarek: Is this thing on? Cue the epic Star Wars crawl, and, action. +Saron Yitbarek: 这玩意开着的吗? 让我们进一段史诗般的星球大战的开幕吧, 开始了. -Voice Actor: [00:00:30] Episode Two: Rise of Linux ® . The empire of Microsoft controls 90 % of desktop users . C omplete standardization of operating systems seems assured. However, the advent of the internet swerves the focus of the war from the desktop toward enterprise, where all businesses scramble to claim a server of their own. Meanwhile, an unlikely hero arises from amongst the band of open source rebels . Linus Torvalds, head strong, bespectacled, releases his Linux system free of charge. Microsoft reels — and regroups. +配音: [00:00:30] 第二集:Linux®的崛起。微软帝国控制着90%的桌面用户。操作系统的全面标准化似乎是板上钉钉的事了。然而,互联网的出现将战争的焦点从桌面转向了企业,在该领域,所有商业组织都争相构建自己的服务器。与此同时,一个不太可能的英雄出现在开源反叛组织中。绝顶聪明,头戴眼镜的Linus Torvalds免费发布了他的Linux系统。微软打了个趔趄-并且开始重组。 -Saron Yitbarek: [00:01:00] Oh, the nerd in me just loves that. So, where were we? Last time, Apple and Microsoft were trading blows, trying to dominate in a war over desktop users. By the end of e pisode o ne, we saw Microsoft claiming most of the prize. Soon, the entire landscape went through a seismic upheaval. That's all because of the rise of the internet and the army of developers that rose with it. The internet moves the battlefield from PC users in their home offices to giant business clients with hundreds of servers. +Saron Yitbarek: [00:01:00] 哦,我们书呆子就是喜欢那样。上一次我们讲到哪了?苹果和微软互相攻伐,试图在一场争夺桌面用户的战争中占据主导地位。在第一集的结尾,我们看到微软获得了大部分的市场份额。很快,由于互联网的兴起以及随之而来的开发者大军,整个市场都经历了一场地震。互联网将战场从在家庭和办公室中的个人电脑用户转移到拥有数百台服务器的大型商业客户中。 -[00:01:30] This is a huge resource shift. Not only does every company out there wanting to remain relevant suddenly have to pay for server space and get a website built — they also have to integrate software to track resources, monitor databases, et cetera, et cetera. You're going to need a lot of developers to help you with that. At least, back then you did. +[00:01:30] 这意味着巨量资源的迁移。突然间,所有相关企业不仅被迫为服务器空间和网站建设付费,而且还必须集成软件来进行资源跟踪和数据库监控等工作。你需要很多开发人员来帮助你。至少那时候大家都是这么做的。 -In p art t wo of the OS wars, we'll see how that enormous shift in priorities , and the work of a few open source rebels like Linus Torvalds and Richard Stallman , managed to strike fear in the heart of Microsoft, and an entire software industry. +在操作系统之战的第二部分,我们将看到优先级的巨大转变,以及像Linus Torvalds和Richard Stallman这样的开源叛逆者是如何成功地在微软和整个软件行业的核心地带引起恐惧的。 [00:02:00] I'm Saron Yitbarek and you're listening to Command Line Heroes, an original podcast from Red Hat. In each episode, we're bringing you stories about the people who transform technology from the command line up. From 2908abb9d862ee9e69ed3cf5c228374eb633e7c9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Aug 2019 23:20:29 +0800 Subject: [PATCH 574/951] PRF @tomjlw --- ...tup Multilingual Input Method On Ubuntu.md | 62 ++++++++----------- 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md b/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md index 7a6d25f5e8..e49f503188 100644 --- a/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md +++ b/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (tomjlw) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Setup Multilingual Input Method On Ubuntu) @@ -10,11 +10,13 @@ 如何在 Ubuntu 上设置多语言输入法 ====== -在印度有数以百计的语言被使用,其中22中被印度机构列为官方语言。我的母语不是英语,因此当我需要从英语输入或者翻译到我的母语泰米尔语时我经常使用**谷歌翻译**。嗯,我估计我不再需要依靠谷歌翻译了。我刚发现在 Ubuntu 上输入印度语的好办法。这篇教程解释了如何配置多语输入法的方法。这个是为 Ubuntu 18.04 LTS 特别打造的,但是它可以在其它类 Ubuntu 系统例如 Linux mint,Elementary OS 上使用。 +![](https://img.linux.net.cn/data/attachment/album/201908/21/231916g3gxbhybq0zv0q1h.jpg) + +或许你不知道,在印度有数以百计的语言被使用,其中 22 种被印度机构列为官方语言。我的母语不是英语,因此当我需要从英语输入或者翻译到我的母语泰米尔语时我经常使用**谷歌翻译**。嗯,我估计我不再需要依靠谷歌翻译了。我刚发现在 Ubuntu 上输入印度语的好办法。这篇教程解释了如何配置多语言输入法的方法。这个是为 Ubuntu 18.04 LTS 特别打造的,但是它可以在其它类 Ubuntu 系统例如 Linux mint、Elementary OS 上使用。 ### 在 Ubuntu Linux 上设置多语言输入法 -通过 **IBus** 的帮助,我们可以轻松在 Ubuntu 及其衍生物上配置多语言输入法。Ibus,代表 **I** ntelligent **I** nput **Bus**(智能输入总线),是一种针对类 Unix 操作系统下多语输入的输入法框架。它使得我们可以在大多数 GUI 应用例如 LibreOffice 下输入母语。 +通过 **IBus** 的帮助,我们可以轻松在 Ubuntu 及其衍生物上配置多语言输入法。Ibus,代表 **I** ntelligent **I** nput **Bus**(智能输入总线),是一种针对类 Unix 操作系统下多语言输入的输入法框架。它使得我们可以在大多数 GUI 应用例如 LibreOffice 下输入母语。 ### 在 Ubuntu 上安装 IBus @@ -24,7 +26,7 @@ $ sudo apt install ibus-m17n ``` -Ibus-m17n 包提供了许多印度语和其它国家语言包括阿姆哈拉语,阿拉伯语,阿美尼亚语,阿萨姆语,阿萨巴斯卡语,白俄罗斯语,孟加拉语,缅甸语,中高棉语,占文,汉语,克里语,克罗地亚语,捷克语,丹麦语,迪维希语,马尔代夫语,世界语,法语,格鲁吉亚语,古/现代希腊语,古吉拉特语,希伯来语,因纽特语,日语,卡纳达语,克什米尔语,哈萨克语,韩语,老挝语,马来语,马拉地语,尼泊尔语,欧吉布威语,欧瑞亚语,旁遮普语,波斯语,普什图语,俄语,梵语,塞尔维亚语,四川彝文,彝文,西格西卡语,信德语,僧伽罗语,斯洛伐克语,瑞典语,泰语,泰米尔语,泰卢固语,藏语,维吾尔语,乌都语,乌兹别克语,越语及意第绪语。 +Ibus-m17n 包提供了许多印度语和其它国家语言包括阿姆哈拉语,阿拉伯语,阿美尼亚语,阿萨姆语,阿萨巴斯卡语,白俄罗斯语,孟加拉语,缅甸语,中高棉语,占文,**汉语**,克里语,克罗地亚语,捷克语,丹麦语,迪维希语,马尔代夫语,世界语,法语,格鲁吉亚语,古/现代希腊语,古吉拉特语,希伯来语,因纽特语,日语,卡纳达语,克什米尔语,哈萨克语,韩语,老挝语,马来语,马拉地语,尼泊尔语,欧吉布威语,欧瑞亚语,旁遮普语,波斯语,普什图语,俄语,梵语,塞尔维亚语,四川彝文,彝文,西格西卡语,信德语,僧伽罗语,斯洛伐克语,瑞典语,泰语,泰米尔语,泰卢固语,藏语,维吾尔语,乌都语,乌兹别克语,越语及意第绪语。 ##### 添加输入语言 @@ -32,87 +34,87 @@ Ibus-m17n 包提供了许多印度语和其它国家语言包括阿姆哈拉语 ![][2] -从顶部面板启动系统设置 +*从顶部面板启动系统设置* 从设置部分,点击左侧面板的**区域及语言**选项。再点击右侧**输入来源**标签下的**+**(加号)按钮。 ![][3] -设置部分的区域及语言选项 +*设置部分的区域及语言选项* 在下个窗口,点击**三个垂直的点**按钮。 ![][4] -在 Ubuntu 里添加输入来源 +*在 Ubuntu 里添加输入来源* 搜寻并选择你想从列表中添加的输入语言。 ![][5] -添加输入语言 +*添加输入语言* 在本篇教程中,我将加入**泰米尔**语。在选择语言后,点击**添加**按钮。 ![][6] -添加输入来源 +*添加输入来源* 现在你会看到选中的输入来源已经被添加了。你会在输入来源标签下的区域及语言选项中看到它。 ![][7] -Ubuntu 里的输入来源选项 +*Ubuntu 里的输入来源选项* 点击输入来源标签下的“管理安装的语言”按钮 ![][8] -在 Ubuntu 里管理安装的语言 +*在 Ubuntu 里管理安装的语言* 接下来你会被询问是否想要为选定语言安装翻译包。如果你想的话你可以安装它们。或者仅仅选择“稍后提醒我”按钮。你下次打开的时候会收到统治。 ![][9] -语言支持没完全安装好 +*语言支持没完全安装好* 一旦翻译包安装好,点击**安装/移除语言**按钮。同时确保 IBus 在键盘输入法系统中被选中。 ![][10] -在 Ubuntu 中安装/移除语言 +*在 Ubuntu 中安装/移除语言* 从列表中选择你想要的语言并点击采用按钮。 ![][11] -选择输入语言 +*选择输入语言* 到此为止了。我们已成功在 Ubuntu 18.04 桌面上配置好多语输入方法。同样的,你可以添加尽可能多的输入语言。 在添加完所有语言来源后,登出再登陆回去。 -##### 用印度语或者你喜欢的语言输入 +### 用印度语或者你喜欢的语言输入 一旦你添加完所有语言后,你就会从你的 Ubuntu 桌面上的顶端菜单下载栏看到它们。 ![][12] -从 Ubuntu 桌面的顶端栏选择输入语言。 +*从 Ubuntu 桌面的顶端栏选择输入语言。* 你也可以使用键盘上的**徽标键+空格键**在不同语言中切换。 ![][13] -在 Ubuntu 里用**徽标键+空格键**选择输入语言 +*在 Ubuntu 里用**徽标键+空格键**选择输入语言* 打开任何 GUI 文本编辑器/应用开始打字吧! ![][14] -在 Ubuntu 中用印度语输入 +*在 Ubuntu 中用印度语输入* -##### 将 IBus 加入 开始应用 +### 将 IBus 加入启动应用 我们需要让 IBus 在每次重启后自动打开,这样每次你想要用自己喜欢的语言输入的时候就无须手动打开。 @@ -124,29 +126,15 @@ Ubuntu 里的输入来源选项 ![][16] -在 Ubuntu 中将 Ibus 添加进开机启动项 +*在 Ubuntu 中将 Ibus 添加进开机启动项* 从现在起 IBus 将在系统启动后自动开始。 -* * * - -**推荐阅读:** - - * [**如何从 Linux 中的命令行使用谷歌翻译**][17] - * [**如何在 Linux 中输入印度卢布符号 (₹) In Linux**][18] - * [**如何在 Arch Linux 中搭建日语环境**][19] - - - -* * * - 现在到你的回合了。在什么应用/工具中你用当地的印度语输入?在下方评论区让我们知道它们。 -**参考:** - - * [**IBus – Ubuntu 社区百科**][20] - +参考: + * [IBus – Ubuntu 社区百科][20] -------------------------------------------------------------------------------- @@ -155,7 +143,7 @@ via: https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/ 作者:[sk][a] 选题:[lujun9972][b] 译者:[tomjlw](https://github.com/tomjlw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6bce0851de3b42f1a76788f621ddbdaa9fa93ae7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Aug 2019 23:21:35 +0800 Subject: [PATCH 575/951] PUB @tomjlw https://linux.cn/article-11255-1.html --- ...190815 How To Setup Multilingual Input Method On Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190815 How To Setup Multilingual Input Method On Ubuntu.md (99%) diff --git a/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md b/published/20190815 How To Setup Multilingual Input Method On Ubuntu.md similarity index 99% rename from translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md rename to published/20190815 How To Setup Multilingual Input Method On Ubuntu.md index e49f503188..d2795355ee 100644 --- a/translated/tech/20190815 How To Setup Multilingual Input Method On Ubuntu.md +++ b/published/20190815 How To Setup Multilingual Input Method On Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (tomjlw) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11255-1.html) [#]: subject: (How To Setup Multilingual Input Method On Ubuntu) [#]: via: (https://www.ostechnix.com/how-to-setup-multilingual-input-method-on-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) From e9307fa43aa25d1bd826b434daa409add37907fe Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 22 Aug 2019 00:02:43 +0800 Subject: [PATCH 576/951] PRF @robsean --- ...02 How To Customize The GNOME 3 Desktop.md | 108 ++++++++++-------- 1 file changed, 63 insertions(+), 45 deletions(-) diff --git a/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md b/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md index 45a96c0ed8..cb0843c8dd 100644 --- a/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md +++ b/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: subject: (How To Customize The GNOME 3 Desktop?) [#]: via: (https://www.2daygeek.com/how-to-customize-the-gnome-3-desktop/) @@ -10,121 +10,134 @@ 如何自定义 GNOME 3 桌面? ====== -我们收到很多来自用户的电子邮件来写一篇关于 GNOME 3 桌面自定义的文章,但是,我们没有时间来写这个主题。 +我们收到很多来自用户的电子邮件,要我们写一篇关于 GNOME 3 桌面自定义的文章,但是,我们没有时间来写这个主题。 -在很长时间内,我一直在我的主要笔记本电脑上使用 Ubuntu 操作系统I,并且,我感到很无聊,我想测试一些与 Arch Linux 相关的其它的发行版。 +在很长时间内,我一直在我的主要笔记本电脑上使用 Ubuntu 操作系统,并且,渐感无聊,我想测试一些与 Arch Linux 相关的其它的发行版。 -我更喜欢 Majaro ,我在我的笔记本电脑中安装使用 GNOME 3 桌面的 Manjaro 18.0 。 +我比较喜欢 Majaro,我在我的笔记本电脑中安装使用了 GNOME 3 桌面的 Manjaro 18.0 。 -我在自定义我的桌面,我想要它怎样。所以,我想抓住这个机会来详细撰写这篇文章,以帮助其他人。 +我按照我想要的自定义我的桌面。所以,我想抓住这个机会来详细撰写这篇文章,以帮助其他人。 -这篇文章帮助其他人来不必头疼地自定义他们的桌面。 +这篇文章帮助其他人来轻松地自定义他们的桌面。 -我不打算包括我所有的自定义,并且,我将强制性地添加一个必要的东西,对 Linux 桌面用户来说是有用的。 +我不打算包括我所有的自定义,并且,我将强制性地添加一个对 Linux 桌面用户来说有用的必要的东西。 -如果你觉得这篇文章中缺少一些调整,我请求你在评论区提到缺少的东西。对其它用户来说这是非常有用的 。 +如果你觉得这篇文章中缺少一些调整,请你在评论区提到缺少的东西。对其它用户来说这是非常有用的 。 -### 1) 如何在 GNOME 3 桌面中启动 Activities 概述? +### 1) 如何在 GNOME 3 桌面中启动活动概述? -Activities 概述将显示所有运行的应用程序,或通过单击 `Super 键` ,或在左上角上单击 `Activities` 按钮来启动/打开窗口。 +活动概述将显示所有运行的应用程序,或通过单击 `Super` 键 ,或在左上角上单击“活动”按钮来启动/打开窗口。 -它允许你来启动一个新的应用程序,切换窗口,和在工作空间之间移动窗口。 +它允许你来启动一个新的应用程序、切换窗口,和在工作空间之间移动窗口。 -你可以简单地退出 Activities 概述,通过选择下面任一操作,像选择一个窗口,应用程序或工作区间,或通过按 `Super 键` or `Esc 键`。 +你可以通过选择如下任一操作简单地退出活动概述,如选择一个窗口、应用程序或工作区间,或通过按 `Super` 键或 `Esc` 键。 -Activities 概述屏幕截图。 ![][2] +*活动概述屏幕截图* + ### 2) 如何在 GNOME 3 桌面中重新调整窗口大小? -通过下面的组合键来将启动的窗口最大化,非最大化,并捕捉到屏幕的一侧(左侧或右侧)。 +通过下面的组合键来将启动的窗口最大化、取消最大化,并吸附到屏幕的一侧(左侧或右侧)。 - * `Super Key+下箭头:` 来非最大化窗口。 - * `Super Key+上箭头:` 来最大化窗口。 - * `Super Key+右箭头:` 来在填充半个屏幕的右侧窗口。 - * `Super Key+作箭头:` 来在填充半个屏幕的左侧窗口。 + * `Super Key+下箭头`:来非最大化窗口。 + * `Super Key+上箭头`:来最大化窗口。 + * `Super Key+右箭头`:来在填充半个屏幕的右侧窗口。 + * `Super Key+作箭头`:来在填充半个屏幕的左侧窗口。 - -使用 `Super Key+下箭头` 来非最大化窗口。 ![][3] -使用 `Super Key+上箭头` 来最大化窗口。 +*使用 `Super Key+下箭头` 来取消最大化窗口。* + ![][4] -使用 `Super Key+右箭头` 来在填充半个屏幕的右侧窗口。 +*使用 `Super Key+上箭头` 来最大化窗口。* + + ![][5] -使用 `Super Key+左箭头` 来在填充半个屏幕的左侧窗口。 +*使用 `Super Key+右箭头` 来在填充半个屏幕的右侧窗口。* + ![][6] -这个特色将帮助你一次查看两个应用程序,又名,拆分屏幕。 +*使用 `Super Key+左箭头` 来在填充半个屏幕的左侧窗口。* + +这个功能将帮助你可以一次查看两个应用程序,又名,拆分屏幕。 + ![][7] ### 3) 如何在 GNOME 3 桌面中显示应用程序? -在 Dash 中,单击 `显示应用程序网格` 按钮来显示在你的系统上的所有已安装的应用程序。 +在 Dash 中,单击“显示应用程序网格”按钮来显示在你的系统上的所有已安装的应用程序。 + ![][8] ### 4) 如何在 GNOME 3 桌面中的 Dash 中添加应用程序? -为加速你天天的活动,你可能想要添加频繁使用的应用程序到 Dash 中,或拖拽应用程序启动器到 Dash 中。 +为加速你的日常活动,你可能想要把频繁使用的应用程序添加到 Dash 中,或拖拽应用程序启动器到 Dash 中。 + +它将允许你直接启动你的收藏夹中的应用程序,而不用先去搜索应用程序。为做到这样,在应用程序上简单地右击,并使用选项“添加到收藏夹”。 -它将允许你直接启动你的收藏夹中的应用程序,而不用先去搜索应用程序。为做到这样,在应用程序上简单地右击,并使用选项 `添加到收藏夹` 。 ![][9] -为移除一个应用程序启动器,又名,在 Dash 中的收藏夹,或者从 Dash 中拖拽应用程序到网格按钮,或者在应用程序上简单地右击,并使用选项 `从收藏夹中移除` 。 +为从 Dash 中移除一个应用程序启动器(收藏的程序),要么从 Dash 中拖拽应用程序到网格按钮,或者在应用程序上简单地右击,并使用选项“从收藏夹中移除”。 + ![][10] ### 5) 如何在 GNOME 3 桌面中的工作区间之间切换? -工作区间允许你将窗口组合在一起。它将帮助你恰当地分隔你的工作。如果你正在做多项工作,并且你想对每项工作和相关的事物进行单独地分组,那么,它将是非常便利的,对你来说是一个完美的选项。 +工作区间允许你将窗口组合在一起。它将帮助你恰当地分隔你的工作。如果你正在做多项工作,并且你想对每项工作和相关的事物进行单独地分组,那么,它将是非常便利的,对你来说是一个非常方便和完美的选项。 -你可以用两种方法切换工作区间,打开 Activities 概述,并从右手边选择一个工作区间,或者使用下面的组合键。 +你可以用两种方法切换工作区间,打开活动概述,并从右手边选择一个工作区间,或者使用下面的组合键。 * 使用 `Ctrl+Alt+Up` 切换到上一个工作区间。 * 使用 `Ctrl+Alt+Down` 切换到下一个工作区间。 - - ![][11] ### 6) 如何在 GNOME 3 桌面中的应用程序之间切换 (应用程序切换器) ? 使用 `Alt+Tab` 或 `Super+Tab` 来在应用程序之间切换。为启动应用程序切换器,使用 `Alt+Tab` 或 `Super+Tab` 。 -在启动后,只需要按住 Alt 或 Super 键,按 Tab 键来从左到右的依次移动接下来的应用程序。 +在启动后,只需要按住 `Alt` 或 `Super` 键,按 `Tab` 键来从左到右的依次移动接下来的应用程序。 ### 7) 如何在 GNOME 3 桌面中添加用户姓名到顶部面板? 如果你想添加你的用户姓名到顶部面板,那么安装下面的[添加用户姓名到顶部面板][12] GNOME 扩展。 + ![][13] ### 8) 如何在 GNOME 3 桌面中添加微软 Bing 的桌面背景? 安装下面的 [Bing 桌面背景更换器][14] GNOME shell 扩展,来每天更改你的桌面背景为微软 Bing 的桌面背景。 + ![][15] ### 9) 如何在 GNOME 3 桌面中启用夜光? 夜光应用程序是著名的应用程序之一,它通过在日落后把你的屏幕从蓝光调成暗黄色,来减轻眼睛疲劳。 -它在智能手机上是可用的。相同目标的其它已知应用程序是 flux 和 **[redshift][16]**. +它在智能手机上也可用。相同目标的其它已知应用程序是 flux 和 [redshift][16]。 为启用这个特色,导航到**系统设置** >> **设备** >> **显示** ,并打开夜光。 + ![][17] 在它启用后,状态图标将被放置到顶部面板上。 + ![][18] ### 10) 如何在 GNOME 3 桌面中显示电池百分比? -电池百分比将向你显示精确地电池使用情况。为启用这个特色,遵循下面的步骤。 +电池百分比将向你精确地显示电池使用情况。为启用这个功能,遵循下面的步骤。 启动 GNOME Tweaks >> **顶部栏** >> **电池百分比** ,并打开它。 + ![][19] 在修改后,你能够在顶部面板上看到电池百分比图标。 + ![][20] ### 11) 如何在 GNOME 3 桌面中启用鼠标右键单击? @@ -132,11 +145,12 @@ Activities 概述屏幕截图。 在 GNOME 3 桌面环境中右键单击是默认禁用的。为启用这个特色,遵循下面的步骤。 启动 GNOME Tweaks >> **键盘和鼠标** >> 鼠标点击硬件仿真,并选择“区域”选项。 + ![][21] ### 12) 如何在 GNOME 3 桌面中启用单击最小化? -启用一次单击最小化特色,这将帮助我们最小化打开的窗口,而不比使用最小化选项。 +启用单击最小化功能,这将帮助我们最小化打开的窗口,而不必使用最小化选项。 ``` $ gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' @@ -144,7 +158,7 @@ $ gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' ### 13) 如何在 GNOME 3 桌面中自定义 Dock ? -如果你想更改你的 Dock ,类似于 Deepin 桌面或 Mac 桌面,那么使用下面的一组命令。 +如果你想更改你的 Dock,类似于 Deepin 桌面或 Mac 桌面,那么使用下面的一组命令。 ``` $ gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM @@ -160,26 +174,30 @@ $ gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 50 默认 `Super 键 + D` 快捷键不能显示你的桌面。为配置这种情况,遵循下面的步骤。 设置 >> **设备** >> **键盘** >> 单击在导航下的 **隐藏所有普通窗口** ,然后按 `Super 键 + D` ,最后按`设置`按钮来启用它。 + ![][23] ### 15) 如何自定义日期和时间格式? - GNOME 3 默认用 `Sun 04:48` 的格式来显示日期和时间。它不是清晰易懂的,如果你想获得以下格式的输出: `Sun Dec 2 4:49 AM` ,遵循下面的步骤。 +GNOME 3 默认用 `Sun 04:48` 的格式来显示日期和时间。它并不清晰易懂,如果你想获得以下格式的输出:`Sun Dec 2 4:49 AM` ,遵循下面的步骤。 + +**对于日期修改:** 打开 GNOME Tweaks >> **顶部栏** ,并在时钟下启用“星期”选项。 -**对于日期修改:** 打开 GNOME Tweaks >> **顶部栏** ,并在时钟下启用`星期`选项。 ![][24] **对于时间修改:** 设置 >> **具体情况** >> **日期和时间** ,然后,在时间格式中选择 `AM/PM` 选项。 + ![][25] 在修改后,你能够看到与下面相同的日期和时间格式。 + ![][26] ### 16) 如何在启动程序中永久地禁用不使用的服务? -就我来说,我将不使用 **蓝牙** & **cups 又名,打印机服务**。因此,在我的笔记本电脑上禁用这些服务。为在基于 Arch 的系统上禁用服务,使用 **[Pacman 软件包管理器][27]**。 +就我来说,我不使用 **蓝牙** & **cups(打印机服务)**。因此,在我的笔记本电脑上禁用这些服务。为在基于 Arch 的系统上禁用服务,使用 [Pacman 软件包管理器][27]。 -对于蓝牙 +对于蓝牙: ``` $ sudo systemctl stop bluetooth.service @@ -188,7 +206,7 @@ $ sudo systemctl mask bluetooth.service $ systemctl status bluetooth.service ``` -对于 cups +对于 cups: ``` $ sudo systemctl stop org.cups.cupsd.service @@ -197,7 +215,7 @@ $ sudo systemctl mask org.cups.cupsd.service $ systemctl status org.cups.cupsd.service ``` -最后,使用以下命令验证这些服务是否在启动程序中被禁用。如果您想再次确认这一点,您可以重新启动一次,并检查相同的东西。导航到以下链接来了解更多关于 **[systemctl][28]** 的用法, +最后,使用以下命令验证这些服务是否在启动程序中被禁用。如果你想再次确认这一点,你可以重新启动一次,并检查相同的东西。导航到以下链接来了解更多关于 [systemctl][28] 的用法, ``` $ systemctl list-unit-files --type=service | grep enabled @@ -220,7 +238,7 @@ tlp.service enabled ### 17) 在 GNOME 3 桌面中安装图标和主题? -大量的图标和主题可供 GNOME 桌面使用,因此,选择吸引你的 **[GTK 主题][29]** 和 **[图标主题][30]**。为配置这个特色,导航到下面的使你的桌面更优美的链接。 +有大量的图标和主题可供 GNOME 桌面使用,因此,选择吸引你的 [GTK 主题][29] 和 [图标主题][30]。 -------------------------------------------------------------------------------- @@ -229,7 +247,7 @@ via: https://www.2daygeek.com/how-to-customize-the-gnome-3-desktop/ 作者:[Magesh Maruthamuthu][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 e39eb7c731864dbdb32ca2440594c90d6482db8d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 22 Aug 2019 00:04:56 +0800 Subject: [PATCH 577/951] PUB @robsean https://linux.cn/article-11256-1.html --- .../20181202 How To Customize The GNOME 3 Desktop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181202 How To Customize The GNOME 3 Desktop.md (99%) diff --git a/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md b/published/20181202 How To Customize The GNOME 3 Desktop.md similarity index 99% rename from translated/tech/20181202 How To Customize The GNOME 3 Desktop.md rename to published/20181202 How To Customize The GNOME 3 Desktop.md index cb0843c8dd..5e89f068b4 100644 --- a/translated/tech/20181202 How To Customize The GNOME 3 Desktop.md +++ b/published/20181202 How To Customize The GNOME 3 Desktop.md @@ -1,11 +1,11 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) [#]: reviewer: (wxy) -[#]: publisher: ( ) +[#]: publisher: (wxy) [#]: subject: (How To Customize The GNOME 3 Desktop?) [#]: via: (https://www.2daygeek.com/how-to-customize-the-gnome-3-desktop/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -[#]: url: ( ) +[#]: url: (https://linux.cn/article-11256-1.html) 如何自定义 GNOME 3 桌面? ====== From 0b39d15eeabb38ae47d8e83b85312cc8c995d4ed Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:52:17 +0800 Subject: [PATCH 578/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190821=20Gettin?= =?UTF-8?q?g=20Started=20with=20Go=20on=20Fedora?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190821 Getting Started with Go on Fedora.md --- ...90821 Getting Started with Go on Fedora.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/tech/20190821 Getting Started with Go on Fedora.md diff --git a/sources/tech/20190821 Getting Started with Go on Fedora.md b/sources/tech/20190821 Getting Started with Go on Fedora.md new file mode 100644 index 0000000000..8cd00e0270 --- /dev/null +++ b/sources/tech/20190821 Getting Started with Go on Fedora.md @@ -0,0 +1,117 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting Started with Go on Fedora) +[#]: via: (https://fedoramagazine.org/getting-started-with-go-on-fedora/) +[#]: author: (Clément Verna https://fedoramagazine.org/author/cverna/) + +Getting Started with Go on Fedora +====== + +![][1] + +The [Go][2] programming language was first publicly announced in 2009, since then the language has become widely adopted. In particular Go has become a reference in the world of cloud infrastructure with big projects like [Kubernetes][3], [OpenShift][4] or [Terraform][5] for example. + +Some of the main reasons for Go’s increasing popularity are the performances, the ease to write fast concurrent application, the simplicity of the language and fast compilation time. So let’s see how to get started with Go on Fedora. + +### Install Go in Fedora + +Fedora provides an easy way to install the Go programming language via the official repository. + +``` +$ sudo dnf install -y golang +$ go version +go version go1.12.7 linux/amd64 +``` + +Now that Go is installed, let’s write a simple program, compile it and execute it. + +### First program in Go + +Let’s write the traditional “Hello, World!” program in Go. First create a _main.go_ file and type or copy the following. + +``` +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World!") +} +``` + +Running this program is quite simple. + +``` +$ go run main.go +Hello, World! +``` + +This will build a binary from main.go in a temporary directory, execute the binary, then delete the temporary directory. This command is really great to quickly run the program during development and it also highlights the speed of Go compilation. + +Building an executable of the program is as simple as running it. + +``` +$ go build main.go +$ ./main +Hello, World! +``` + +### Using Go modules + +Go 1.11 and 1.12 introduce preliminary support for modules. Modules are a solution to manage application dependencies. This solution is based on 2 files _go.mod_ and _go.sum_ used to explicitly define the version of the dependencies. + +To show how to use modules, let’s add a dependency to the hello world program. + +Before changing the code, the module needs to be initialized. + +``` +$ go mod init helloworld +go: creating new go.mod: module helloworld +$ ls +go.mod main main.go +``` + +Next modify the main.go file as follow. + +``` +package main + +import "github.com/fatih/color" + +func main () { + color.Blue("Hello, World!") +} +``` + +In the modified main.go, instead of using the standard library “_fmt_” to print the “Hello, World!”. The application uses an external library which makes it easy to print text in color. + +Let’s run this version of the application. + +``` +$ go run main.go +Hello, World! +``` + +Now that the application is depending on the _github.com/fatih/color_ library, it needs to download all the dependencies before compiling it. The list of dependencies is then added to _go.mod_ and the exact version and commit hash of these dependencies is recorded in _go.sum_. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/getting-started-with-go-on-fedora/ + +作者:[Clément Verna][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/cverna/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/08/go-article-816x345.jpg +[2]: https://golang.org/ +[3]: https://kubernetes.io/ +[4]: https://www.openshift.com/ +[5]: https://www.terraform.io/ From b80961576c421f1ee76ffde6e6f1b98e1c7a0183 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:55:03 +0800 Subject: [PATCH 579/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=2011=20E?= =?UTF-8?q?ssential=20Keyboard=20Shortcuts=20Google=20Chrome/Chromium=20Us?= =?UTF-8?q?ers=20Should=20Know?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190822 11 Essential Keyboard Shortcuts Google Chrome-Chromium Users Should Know.md --- ...oogle Chrome-Chromium Users Should Know.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 sources/tech/20190822 11 Essential Keyboard Shortcuts Google Chrome-Chromium Users Should Know.md diff --git a/sources/tech/20190822 11 Essential Keyboard Shortcuts Google Chrome-Chromium Users Should Know.md b/sources/tech/20190822 11 Essential Keyboard Shortcuts Google Chrome-Chromium Users Should Know.md new file mode 100644 index 0000000000..4e2693f079 --- /dev/null +++ b/sources/tech/20190822 11 Essential Keyboard Shortcuts Google Chrome-Chromium Users Should Know.md @@ -0,0 +1,141 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (11 Essential Keyboard Shortcuts Google Chrome/Chromium Users Should Know) +[#]: via: (https://itsfoss.com/google-chrome-shortcuts/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +11 Essential Keyboard Shortcuts Google Chrome/Chromium Users Should Know +====== + +_**Brief: Master these Google Chrome keyboard shortcuts for a better, smoother and more productive web browsing experience. Downloadable cheatsheet is also included.**_ + +Google Chrome is the [most popular web browser][1] and there is no denying it. It’s open source version [Chromium][2] is also getting popularity and some Linux distributions now include it as the default web browser. + +If you use it on desktop a lot, you can improve your browsing experience by using Google Chrome keyboard shortcuts. No need to go up to your mouse and spend time finding your way around. Just master these shortcuts and you’ll even save some time and be more productive. + +I am using the term Google Chrome but these shortcuts are equally applicable to the Chromium browser. + +### 11 Cool Chrome Keyboard shortcuts you should be using + +If you are a pro, you might know a few of these Chrome shortcuts already but the chances are that you may still find some hidden gems here. Let’s see. + +**Keyboard Shortcuts** | **Action** +---|--- +Ctrl+T | Open a new tab +Ctrl+N | Open a new window +Ctrl+Shift+N | Open incognito window +Ctrl+W | Close current tab +Ctrl+Shift+T | Reopen last closed tab +Ctrl+Shift+W | Close the window +Ctrl+Tab and Ctrl+Shift+Tab | Switch to right or left tab +Ctrl+L | Go to search/address bar +Ctrl+D | Bookmark the website +Ctrl+H | Access browsing history +Ctrl+J | Access downloads history +Shift+Esc | Open Chrome task manager + +You can [download this list of useful Chrome keyboard shortcut for quick reference][3]. + +#### 1\. Open a new tab with Ctrl+T + +Need to open a new tab? Just press Ctrl and T keys together and you’ll have a new tab opened. + +#### 2\. Open a new window with Ctrl+N + +Too many tabs opened already? Time to open a fresh new window. Use Ctrl and N keys to open a new browser window. + +#### 3\. Go incognito with Ctrl+Shift+N + +Checking flight or hotel prices online? Going incognito might help. Open an incognito window in Chrome with Ctrl+Shift+N. + +[][4] + +Suggested read  Best Text Editors for Linux Command Line + +#### 4\. Close a tab with Ctrl+W + +Close the current tab with Ctrl and W key. No need to take the mouse to the top and look for the x button. + +#### 5\. Accidentally closed a tab? Reopen it with Ctrl+Shift+T + +This is my favorite Google Chrome shortcut. No more ‘oh crap’ when you close a tab you didn’t mean to. Use the Ctrl+Shift+T and it will open the last closed tab. Keep hitting this key combination and it will keep on bringing the closed tabs. + +#### 6\. Close the entire browser window with Ctrl+Shift+W + +Done with you work? Time to close the entire browser window with all the tabs. Use the keys Ctrl+Shift+W and the browser window will disappear like it never existed. + +#### 7\. Switch between tabs with Ctrl+Tab + +Too many tabs open? You can move to right tab with Ctrl+Tab. Want to move left? Use Ctrl+Shift+Tab. Press these keys repeatedly and you can move between all the open tabs in the current browser window. + +You can also use Ctrl+0 till Ctrl+9 to go to one of the first 10 tabs. But this Chrome keyboard shortcut doesn’t work for the 11th tabs onward. + +#### 8\. Go to the search/address bar with Ctrl+L + +Want to type a new URL or search something quickly. You can use Ctrl+L and it will highlight the address bar on the top. + +#### 9\. Bookmark the current website with Ctrl+D + +Found something interesting? Save it in your bookmarks with Ctrl+D keys combination. + +#### 10\. Go back in history with Ctrl+H + +You can open up your browser history with Ctrl+H keys. Search through the history if you are looking for a page visited some time ago or delete something that you don’t want to be seen anymore. + +#### 11\. See your downloads with Ctrl+J + +Pressing the Ctrl+J keys in Chrome will take you to the Downloads page. This page will show you all the downloads action you performed. + +[][5] + +Suggested read  Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] + +#### Bonus shortcut: Open Chrome task manager with Shift+Esc + +Many people doesn’t even know that there is a task manager in Chrome browser. Chrome is infamous for eating up your system’s RAM. And when you have plenty of tabs opened, finding the culprit is not easy. + +With Chrome task manager, you can see all the open tabs and their system utilization stats. You can also see various hidden processes such as Chrome extensions and other services. + +![Google Chrome Task Manager][6] + +I am going to this table here for a quick reference. + +### Download Chrome shortcut cheatsheet + +I know that mastering keyboard shortcuts depends on habit and you can make it a habit by using it again and again. To help you in this task, I have created this Google Chrome keyboard shortcut cheatsheet. + +You can download the below image in PDF form, print it and put it on your desk. This way you can use practice the shortcuts all the time. + +![Google Chrome Keyboard Shortcuts Cheat Sheet][7] + +[Download Chrome Shortcut Cheatsheet][8] + +If you are interested in mastering shortcuts, you may also have a look at [Ubuntu keyboard shortcuts][9]. + +By the way, what’s your favorite Chrome shortcut? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/google-chrome-shortcuts/ + +作者:[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/Usage_share_of_web_browsers +[2]: https://www.chromium.org/Home +[3]: tmp.3qZNXSy2FC#download-cheatsheet +[4]: https://itsfoss.com/command-line-text-editors-linux/ +[5]: https://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/google-chrome-task-manager.png?resize=800%2C300&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/google-chrome-keyboard-shortcuts-cheat-sheet.png?ssl=1 +[8]: https://drive.google.com/open?id=1lZ4JgRuFbXrnEXoDQqOt7PQH6femIe3t +[9]: https://itsfoss.com/ubuntu-shortcuts/ From 63e4b563cf54114045114647868d10a27340bdf6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:55:33 +0800 Subject: [PATCH 580/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20A=20Ra?= =?UTF-8?q?spberry=20Pi=20Based=20Open=20Source=20Tablet=20is=20in=20Makin?= =?UTF-8?q?g=20and=20it=E2=80=99s=20Called=20CutiePi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190822 A Raspberry Pi Based Open Source Tablet is in Making and it-s Called CutiePi.md --- ...et is in Making and it-s Called CutiePi.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/tech/20190822 A Raspberry Pi Based Open Source Tablet is in Making and it-s Called CutiePi.md diff --git a/sources/tech/20190822 A Raspberry Pi Based Open Source Tablet is in Making and it-s Called CutiePi.md b/sources/tech/20190822 A Raspberry Pi Based Open Source Tablet is in Making and it-s Called CutiePi.md new file mode 100644 index 0000000000..ab12c95ddd --- /dev/null +++ b/sources/tech/20190822 A Raspberry Pi Based Open Source Tablet is in Making and it-s Called CutiePi.md @@ -0,0 +1,82 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A Raspberry Pi Based Open Source Tablet is in Making and it’s Called CutiePi) +[#]: via: (https://itsfoss.com/cutiepi-open-source-tab/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +A Raspberry Pi Based Open Source Tablet is in Making and it’s Called CutiePi +====== + +CutiePie is an 8-inch open-source tablet built on top of Raspberry Pi. For now, it is just a working prototype which they announced on [Raspberry Pi forums][1]. + +In this article, you’ll get to know more details on the specifications, price, and availability of CutiePi. + +They have made the Tablet using a custom-designed Compute Model (CM3) carrier board. The [official website][2] mentions the purpose of a custom CM3 carrier board as: + +> A custom CM3/CM3+ carrier board designed for portable use, with enhanced power management and Li-Po battery level monitoring features; works with selected HDMI or MIPI DSI displays. + +So, this is what makes the Tablet thin enough while being portable. + +### CutiePi Specifications + +![CutiePi Board][3] + +I was surprised to know that it rocks an 8-inch IPS LCD display – which is a good thing for starters. However, you won’t be getting a true HD screen because the resolution is 1280×800 – as mentioned officially. + +It is also planned to come packed with Li-Po 4800 mAh battery (the prototype had a 5000 mAh battery). Well, for a Tablet, that isn’t bad at all. + +Connectivity options include the support for Wi-Fi and Bluetooth 4.0. In addition to this, a USB Type-A, 6x GPIO pins, and a microSD card slot is present. + +![CutiePi Specifications][4] + +The hardware is officially compatible with [Raspbian OS][5] and the user interface is built with [Qt][6] for a fast and intuitive user experience. Also, along with the in-built apps, it is expected to support Raspbian PIXEL apps via XWayland. + +### CutiePi Source Code + +You can second-guess the pricing of this tablet by analyzing the bill for the materials used. CutiePi follows a 100% open-source hardware design for this project. So, if you are curious, you can check out their GitHub page for more information on the hardware design and stuff. + +[CutiePi on GitHub][7] + +### CutiePi Pricing, Release Date & Availability + +CutiePi plans to work on [DVT][8] batch PCBs in August (this month). And, they target to launch the final product by the end of 2019. + +Officially, they expect it to launch it at around $150-$250. This is just an approximate for the range and should be taken with a pinch of salt. + +Obviously, the price will be a major factor in order to make it a success – even though the product itself sounds promising. + +**Wrapping Up** + +CutiePi is not the first project to use a [single board computer like Raspberry Pi][9] to make a tablet. We have the upcoming [PineTab][10] which is based on Pine64 single board computer. Pine also has a laptop called [Pinebook][11] based on the same. + +Judging by the prototype – it is indeed a product that we can expect to work. However, the pre-installed apps and the apps that it will support may turn the tide. Also, considering the price estimate – it sounds promising. + +What do you think about it? Let us know your thoughts in the comments below or just play this interactive poll. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cutiepi-open-source-tab/ + +作者:[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.raspberrypi.org/forums/viewtopic.php?t=247380 +[2]: https://cutiepi.io/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/08/cutiepi-board.png?ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/cutiepi-specifications.jpg?ssl=1 +[5]: https://itsfoss.com/raspberry-pi-os-desktop/ +[6]: https://en.wikipedia.org/wiki/Qt_%28software%29 +[7]: https://github.com/cutiepi-io/cutiepi-board +[8]: https://en.wikipedia.org/wiki/Engineering_validation_test#Design_verification_test +[9]: https://itsfoss.com/raspberry-pi-alternatives/ +[10]: https://www.pine64.org/pinetab/ +[11]: https://itsfoss.com/pinebook-pro/ From 32138670a5006b4941ffb06d380261158906bdb6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:57:08 +0800 Subject: [PATCH 581/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20Go=20c?= =?UTF-8?q?ompiler=20intrinsics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190820 Go compiler intrinsics.md --- .../tech/20190820 Go compiler intrinsics.md | 307 ++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 sources/tech/20190820 Go compiler intrinsics.md diff --git a/sources/tech/20190820 Go compiler intrinsics.md b/sources/tech/20190820 Go compiler intrinsics.md new file mode 100644 index 0000000000..f381a0073a --- /dev/null +++ b/sources/tech/20190820 Go compiler intrinsics.md @@ -0,0 +1,307 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Go compiler intrinsics) +[#]: via: (https://dave.cheney.net/2019/08/20/go-compiler-intrinsics) +[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) + +Go compiler intrinsics +====== + +Go allows authors to write functions in assembly if required. This is called a _stub_ or _forward_ declaration. + +``` +package asm + +// Add returns the sum of a and b. +func Add(a int64, b int64) int64 +``` + +Here we’re declaring `Add`, a function which takes two `int64`‘s and returns their sum.`Add` is a normal Go function declaration, except it is missing the function body. + +If we were to try to compile this package the compiler, justifiably, complains; + +``` +% go build +examples/asm +./decl.go:4:6: missing function body +``` + +To satisfy the compiler we must supply a body for `Add` via assembly, which we do by adding a `.s` file in the same package. + +``` +TEXT ·Add(SB),$0-24 + MOVQ a+0(FP), AX + ADDQ b+8(FP), AX + MOVQ AX, ret+16(FP) + RET +``` + +Now we can build, test, and use our `Add` function just like normal Go code. But, there’s a problem, assembly functions cannot be inlined. + +This has long been a complaint by Go developers who want to use assembly either for performance or to access operations which are not exposed in the language. Some examples would be vector instructions, atomic instructions, and so on. Without the ability to inline assembly functions writing these functions in Go can have a relatively large overhead. + +``` +var Result int64 + +func BenchmarkAddNative(b *testing.B) { + var r int64 + for i := 0; i < b.N; i++ { + r = int64(i) + int64(i) + } + Result = r +} + +func BenchmarkAddAsm(b *testing.B) { + var r int64 + for i := 0; i < b.N; i++ { + r = Add(int64(i), int64(i)) + } + Result = r + } +``` + +``` +BenchmarkAddNative-8    1000000000               0.300 ns/op +BenchmarkAddAsm-8       606165915                1.93 ns/op +``` + +Over the years there have been various proposals for an inline assembly syntax similar to gcc’s `asm(...)` directive. None have been accepted by the Go team. Instead, Go has added _intrinsic functions_[1][1]. + +An intrinsic function is Go code written in regular Go. These functions are known the the Go compiler which contains replacements which it can substitute during compilation. As of Go 1.13 the packages which the compiler knows about are: + + * `math/bits` + * `sync/atomic` + + + +The functions in these packages have baroque signatures but this lets the compiler, if your architecture supports a more efficient way of performing the operation, transparently replace the function call with comparable native instructions. + +For the remainder of this post we’ll study two different ways the Go compiler produces more efficient code using intrinsics. + +### Ones count + +Population count, the number of `1` bits in a word, is an important cryptographic and compression primitive. Because this is an important operation most modern CPUs provide a native hardware implementation. + +The `math/bits` package exposes support for this operation via the `OnesCount` series of functions. The various `OnesCount` functions are recognised by the compiler and, depending on the CPU architecture and the version of Go, will be replaced with the native hardware instruction. + +To see how effective this can be lets compare three different ones count implementations. The first is Kernighan’s Algorithm[2][2]. + +``` +func kernighan(x uint64) int { + var count int + for ; x > 0; x &= (x - 1) { + count++ +       } +       return count                 +}     +``` + +This algorithm has a maximum loop count of the number of bits set; the more bits set, the more loops it will take. + +The second algorithm is taken from Hacker’s Delight via [issue 14813][3]. + +``` +func hackersdelight(x uint64) int { + const m1 = 0x5555555555555555 + const m2 = 0x3333333333333333 + const m4 = 0x0f0f0f0f0f0f0f0f + const h01 = 0x0101010101010101 + + x -= (x >> 1) & m1 + x = (x & m2) + ((x >> 2) & m2) + x = (x + (x >> 4)) & m4 + return int((x * h01) >> 56) + } +``` + +Lots of clever bit twiddling allows this version to run in constant time and optimises very well if the input is a constant (the whole thing optimises away if the compiler can figure out the answer at compiler time). + +Let’s benchmark these implementations against `math/bits.OnesCount64`. + +``` +var Result int + +func BenchmarkKernighan(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = kernighan(uint64(i)) + } + Result = r +} + +func BenchmarkPopcnt(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = hackersdelight(uint64(i)) + } + Result = r +} + +func BenchmarkMathBitsOnesCount64(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = bits.OnesCount64(uint64(i)) + } + Result = r +} +``` + +To keep it fair, we’re feeding each function under test the same input; a sequence of integers from zero to `b.N`. This is fairer to Kernighan’s method as its runtime increases with the number of one bits in the input argument.[3][4] + +``` +BenchmarkKernighan-8                    100000000               11.2 ns/op +BenchmarkPopcnt-8                       618312062                2.02 ns/op +BenchmarkMathBitsOnesCount64-8          1000000000               0.565 ns/op +``` + +The winner by nearly 4x is `math/bits.OnesCount64`, but is this really using a hardware instruction, or is the compiler just doing a better job at optimising this code? Let’s check the assembly + +``` +% go test -c +% go tool objdump -s MathBitsOnesCount popcnt-intrinsic.test +TEXT examples/popcnt-intrinsic.BenchmarkMathBitsOnesCount64(SB) /examples/popcnt-intrinsic/popcnt_test.go +   popcnt_test.go:45     0x10f8610               65488b0c2530000000      MOVQ GS:0x30, CX +   popcnt_test.go:45     0x10f8619               483b6110                CMPQ 0x10(CX), SP +   popcnt_test.go:45     0x10f861d               7668                    JBE 0x10f8687 +   popcnt_test.go:45     0x10f861f               4883ec20                SUBQ $0x20, SP +   popcnt_test.go:45     0x10f8623               48896c2418              MOVQ BP, 0x18(SP) +   popcnt_test.go:45     0x10f8628               488d6c2418              LEAQ 0x18(SP), BP +   popcnt_test.go:47     0x10f862d               488b442428              MOVQ 0x28(SP), AX +   popcnt_test.go:47     0x10f8632               31c9                    XORL CX, CX +   popcnt_test.go:47     0x10f8634               31d2                    XORL DX, DX +   popcnt_test.go:47     0x10f8636               eb03                    JMP 0x10f863b +   popcnt_test.go:47     0x10f8638               48ffc1                  INCQ CX +   popcnt_test.go:47     0x10f863b               48398808010000          CMPQ CX, 0x108(AX) +   popcnt_test.go:47     0x10f8642               7e32                    JLE 0x10f8676 +   popcnt_test.go:48     0x10f8644               803d29d5150000          CMPB $0x0, runtime.x86HasPOPCNT(SB) +   popcnt_test.go:48     0x10f864b               740a                    JE 0x10f8657 +   popcnt_test.go:48     0x10f864d               4831d2                  XORQ DX, DX +   popcnt_test.go:48     0x10f8650               f3480fb8d1              POPCNT CX, DX // math/bits.OnesCount64 +   popcnt_test.go:48     0x10f8655               ebe1                    JMP 0x10f8638 +   popcnt_test.go:47     0x10f8657               48894c2410              MOVQ CX, 0x10(SP) +   popcnt_test.go:48     0x10f865c               48890c24                MOVQ CX, 0(SP) +   popcnt_test.go:48     0x10f8660               e87b28f8ff              CALL math/bits.OnesCount64(SB) +   popcnt_test.go:48     0x10f8665               488b542408              MOVQ 0x8(SP), DX +   popcnt_test.go:47     0x10f866a               488b442428              MOVQ 0x28(SP), AX +   popcnt_test.go:47     0x10f866f               488b4c2410              MOVQ 0x10(SP), CX +   popcnt_test.go:48     0x10f8674               ebc2                    JMP 0x10f8638 +   popcnt_test.go:50     0x10f8676               48891563d51500          MOVQ DX, examples/popcnt-intrinsic.Result(SB) +   popcnt_test.go:51     0x10f867d               488b6c2418              MOVQ 0x18(SP), BP +   popcnt_test.go:51     0x10f8682               4883c420                ADDQ $0x20, SP +   popcnt_test.go:51     0x10f8686               c3                      RET +   popcnt_test.go:45     0x10f8687               e884eef5ff              CALL runtime.morestack_noctxt(SB) +   popcnt_test.go:45     0x10f868c               eb82                    JMP examples/popcnt-intrinsic.BenchmarkMathBitsOnesCount64(SB) +   :-1                   0x10f868e               cc                      INT $0x3 +   :-1                   0x10f868f               cc                      INT $0x3 +``` + +There’s quite a bit going on here, but the key take away is on line 48 (taken from the source code of the `_test.go` file) the program is using the x86 `POPCNT` instruction as we hoped. This turns out to be faster than bit twiddling. + +Of interest is the comparison two instructions prior to the `POPCNT`, + +``` +CMPB $0x0, runtime.x86HasPOPCNT(SB) +``` + +As not all intel CPUs support `POPCNT` the Go runtime records at startup if the CPU has the necessary support and stores the result in `runtime.x86HasPOPCNT`. Each time through the benchmark loop the program is checking _does the CPU have POPCNT support_ before it issues the `POPCNT` request. + +The value of `runtime.x86HasPOPCNT` isn’t expected to change during the life of the program’s execution so the result of the check should be highly predictable making the check relatively cheap. + +### Atomic counter + +As well as generating more efficient code, intrinsic functions are just regular Go code, the rules of inlining (including mid stack inlining) apply equally to them. + +Here’s an example of an atomic counter type. It’s got methods on types, method calls several layers deep, multiple packages, etc. + +``` +import ( + "sync/atomic" +) + +type counter uint64 + +func (c counter) get() uint64 { + return atomic.LoadUint64((uint64)(c)) +} + +func (c counter) inc() uint64 { + return atomic.AddUint64((uint64)(c), 1) +} + +func (c counter) reset() uint64 { + return atomic.SwapUint64((uint64)(c), 0) +} + +var c counter + +func f() uint64 { + c.inc() + c.get() + return c.reset() +} +``` + +You’d be forgiven for thinking this would have a lot of overhead. However, because of the interaction between inlining and compiler intrinsics, this code collapses down to efficient native code on most platforms. + +``` +TEXT main.f(SB) examples/counter/counter.go +   counter.go:23         0x10512e0               90                      NOPL +   counter.go:29         0x10512e1               b801000000              MOVL $0x1, AX +   counter.go:13         0x10512e6               488d0d0bca0800          LEAQ main.c(SB), CX +   counter.go:13         0x10512ed               f0480fc101              LOCK XADDQ AX, 0(CX) // c.inc +   counter.go:24         0x10512f2               90                      NOPL +   counter.go:10         0x10512f3               488b05fec90800          MOVQ main.c(SB), AX // c.get +   counter.go:25         0x10512fa               90                      NOPL +   counter.go:16         0x10512fb               31c0                    XORL AX, AX +   counter.go:16         0x10512fd               488701                  XCHGQ AX, 0(CX) // c.reset +   counter.go:16         0x1051300               c3                      RET +``` + +By way of explanation. The first operation, `counter.go:13` is `c.inc` a `LOCK`ed `XADDQ`, which on x86 is an atomic increment. The second, `counter.go:10` is `c.get` which on x86, due to its strong memory consistency model, is a regular load from memory. The final operation, `counter.go:16`, `c.reset` is an atomic exchange of the address in `CX` with `AX` which was zeroed on the previous line. This puts the value in `AX`, zero, into the address stored in `CX`. The value previously stored at `(CX)` is discarded. + +### Conclusion + +Intrinsics are a neat solution that give Go programmers access to low level architectural operations without having to extend the specification of the language. If an architecture doesn’t have a specific `sync/atomic` primitive (like some ARM variants), or a `math/bits` operation, then the compiler transparently falls back to the operation written in pure Go. + + 1. This may not be their official name, however the word is in common use inside the compiler and its tests[][5] + 2. The C Programming Language 2nd Ed, 1998[][6] + 3. As extra credit homework, try passing `0xdeadbeefdeadbeef` to each function under test and observe the results.[][7] + + + +#### Related posts: + + 1. [Notes on exploring the compiler flags in the Go compiler suite][8] + 2. [Padding is hard][9] + 3. [Should methods be declared on T or *T][10] + 4. [Wednesday pop quiz: spot the race][11] + + + +-------------------------------------------------------------------------------- + +via: https://dave.cheney.net/2019/08/20/go-compiler-intrinsics + +作者:[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]: tmp.OyARdRB2s8#easy-footnote-bottom-1-3803 (This may not be their official name, however the word is in common use inside the compiler and its tests) +[2]: tmp.OyARdRB2s8#easy-footnote-bottom-2-3803 (The C Programming Language 2nd Ed, 1998) +[3]: https://github.com/golang/go/issues/14813 +[4]: tmp.OyARdRB2s8#easy-footnote-bottom-3-3803 (As extra credit homework, try passing 0xdeadbeefdeadbeef to each function under test and observe the results.) +[5]: tmp.OyARdRB2s8#easy-footnote-1-3803 +[6]: tmp.OyARdRB2s8#easy-footnote-2-3803 +[7]: tmp.OyARdRB2s8#easy-footnote-3-3803 +[8]: https://dave.cheney.net/2012/10/07/notes-on-exploring-the-compiler-flags-in-the-go-compiler-suite (Notes on exploring the compiler flags in the Go compiler suite) +[9]: https://dave.cheney.net/2015/10/09/padding-is-hard (Padding is hard) +[10]: https://dave.cheney.net/2016/03/19/should-methods-be-declared-on-t-or-t (Should methods be declared on T or *T) +[11]: https://dave.cheney.net/2015/11/18/wednesday-pop-quiz-spot-the-race (Wednesday pop quiz: spot the race) From 2918d4b6d2ecb950574c4286608e25470fd859ca Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:57:39 +0800 Subject: [PATCH 582/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190821=20Build?= =?UTF-8?q?=20a=20distributed=20NoSQL=20database=20with=20Apache=20Cassand?= =?UTF-8?q?ra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190821 Build a distributed NoSQL database with Apache Cassandra.md --- ...ed NoSQL database with Apache Cassandra.md | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 sources/tech/20190821 Build a distributed NoSQL database with Apache Cassandra.md diff --git a/sources/tech/20190821 Build a distributed NoSQL database with Apache Cassandra.md b/sources/tech/20190821 Build a distributed NoSQL database with Apache Cassandra.md new file mode 100644 index 0000000000..bfb90d51a1 --- /dev/null +++ b/sources/tech/20190821 Build a distributed NoSQL database with Apache Cassandra.md @@ -0,0 +1,189 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Build a distributed NoSQL database with Apache Cassandra) +[#]: via: (https://opensource.com/article/19/8/how-set-apache-cassandra-cluster) +[#]: author: (James Farrell https://opensource.com/users/jamesfhttps://opensource.com/users/ben-bromhead) + +Build a distributed NoSQL database with Apache Cassandra +====== +Set up a basic three-node Cassandra cluster from scratch with some extra +bits for replication and future expansion. +![Woman programming][1] + +Recently, I got a rush request to get a three-node [Apache Cassandra][2] cluster with a replication factor of two working for a development job. I had little idea what that meant but needed to figure it out quickly—a typical day in a sysadmin's job. + +Here's how to set up a basic three-node Cassandra cluster from scratch with some extra bits for replication and future node expansion. + +### Basic nodes needed + +To start, you need some basic Linux machines. For a production install, you would likely put physical machines into racks, data centers, and diverse locations. For development, you just need something suitably sized for the scale of your development. I used three CentOS 7 virtual machines on VMware that have 20GB thin provisioned disks, two processors, and 4GB of RAM. These three machines are called: CS1 (192.168.0.110), CS2 (192.168.0.120), and CS3 (192.168.0.130). + +First, do a minimal install of CentOS 7 as an operating system on each machine. To run this in production with CentOS, consider [tweaking][3] your [firewalld][4] and [SELinux][5]. Since this cluster would be used just for initial development, I turned them off. + +The only other requirement is an OpenJDK 1.8 installation, which is available from the CentOS repository. + +### Installation + +Create a **cass** user account on each machine. To ensure no variation between nodes, force the same UID on each install: + + +``` +$ useradd --create-home \ +\--uid 1099 cass +$ passwd cass +``` + +[Download][6] the current version of Apache Cassandra (3.11.4 as I'm writing this). Extract the Cassandra archive in the **cass** home directory like this: + + +``` +`$ tar zfvx apache-cassandra-3.11.4-bin.tar.gz` +``` + +The complete software is contained in **~cass/apache-cassandra-3.11.4**. For a quick development trial, this is fine. The data files are there, and the **conf/** directory has the important bits needed to tune these nodes into a real cluster. + +### Configuration + +Out of the box, Cassandra runs as a localhost one-node cluster. That is convenient for a quick look, but the goal here is a real cluster that external clients can access and that provides the option to add additional nodes when development and tests need to broaden. The two configuration files to look at are **conf/cassandra.yaml** and **conf/cassandra-rackdc.properties**. + +First, edit **conf/cassandra.yaml** to set the cluster name, network, and remote procedure call (RPC) interfaces; define peers; and change the strategy for routing requests and replication. + +Edit **conf/cassandra.yaml** on each of the cluster nodes. + +Change the cluster name to be the same on each node:  + + +``` +`cluster_name: 'DevClust'` +``` + +Change the following two entries to match the primary IP address of the node you are working on: + + +``` +listen_address: 192.168.0.110 +rpc_address:  192.168.0.110 +``` + +Find the **seed_provider** entry and look for the **\- seeds:** configuration line. Edit each node to include all your nodes: + + +``` +`        - seeds: "192.168.0.110, 192.168.0.120, 192.168.0.130"` +``` + +This enables the local Cassandra instance to see all its peers (including itself). + +Look for the **endpoint_snitch** setting and change it to: + + +``` +`endpoint_snitch: GossipingPropertyFileSnitch` +``` + +The **endpoint_snitch** setting enables flexibility later on if new nodes need to be joined. The Cassandra documentation indicates that **GossipingPropertyFileSnitch** is the preferred setting for production use; it is also necessary to set the replication strategy that will be presented below. + +Save and close the **cassandra.yaml** file. + +Open the **conf/cassandra-rackdc.properties** file and change the default values for **dc=** and **rack=**. They can be anything that is unique and does not conflict with other local installs. For production, you would put more thought into how to organize your racks and data centers. For this example, I used generic names like: + + +``` +dc=NJDC +rack=rack001 +``` + +### Start the cluster + +On each node, log into the account where Cassandra is installed (**cass** in this example), enter **cd apache-cassandra-3.11.4/bin**, and run **./cassandra**. A long list of messages will print to the terminal, and the Java process will run in the background. + +### Confirm the cluster + +While logged into the Cassandra user account, go to the **bin** directory and run **$ ./nodetool status**. If everything went well, you would see something like: + + +``` +$ ./nodetool status +INFO  [main] 2019-08-04 15:14:18,361 Gossiper.java:1715 - No gossip backlog; proceeding +Datacenter: NJDC +================ +Status=Up/Down +|/ State=Normal/Leaving/Joining/Moving +\--  Address       Load       Tokens       Owns (effective)  Host ID                               Rack +UN  192.168.0.110  195.26 KiB  256          69.2%             0abc7ad5-6409-4fe3-a4e5-c0a31bd73349  rack001 +UN  192.168.0.120  195.18 KiB  256          63.0%             b7ae87e5-1eab-4eb9-bcf7-4d07e4d5bd71  rack001 +UN  192.168.0.130  117.96 KiB  256          67.8%             b36bb943-8ba1-4f2e-a5f9-de1a54f8d703  rack001 +``` + +This means the cluster sees all the nodes and prints some interesting information. + +Note that if **cassandra.yaml** uses the default **endpoint_snitch: SimpleSnitch**, the **nodetool** command above indicates the default locations as **Datacenter: datacenter1** and the racks as **rack1**. In the example output above, the **cassandra-racdc.properties** values are evident. + +### Run some CQL + +This is where the replication factor setting comes in. + +Create a keystore with a replication factor of two. From any one of the cluster nodes, go to the **bin** directory and run **./cqlsh 192.168.0.130** (substitute the appropriate cluster node IP address). You can see the default administrative keyspaces with the following: + + +``` +cqlsh> SELECT * FROM system_schema.keyspaces; + + keyspace_name      | durable_writes | replication +\--------------------+----------------+------------------------------------------------------------------------------------- +        system_auth |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1'} +      system_schema |           True |                             {'class': 'org.apache.cassandra.locator.LocalStrategy'} + system_distributed |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '3'} +             system |           True |                             {'class': 'org.apache.cassandra.locator.LocalStrategy'} +      system_traces |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '2'} +``` + +Create a new keyspace with replication factor two, insert some rows, then recall some data: + + +``` +cqlsh> CREATE KEYSPACE TestSpace WITH replication = {'class': 'NetworkTopologyStrategy', 'NJDC' : 2}; +cqlsh> select * from system_schema.keyspaces where keyspace_name='testspace'; + + keyspace_name | durable_writes | replication +\---------------+----------------+-------------------------------------------------------------------------------- +     testspace |           True | {'NJDC': '2', 'class': 'org.apache.cassandra.locator.NetworkTopologyStrategy'} +cqlsh> use testspace; +cqlsh:testspace> create table users ( userid int PRIMARY KEY, email text, name text ); +cqlsh:testspace> insert into users (userid, email, name) VALUES (1, '[jd@somedomain.com][7]', 'John Doe'); +cqlsh:testspace> select * from users; + + userid | email             | name +\--------+-------------------+---------- +      1 | [jd@somedomain.com][7] | John Doe +``` + +Now you have a basic three-node Cassandra cluster running and ready for some development and testing work. The CQL syntax is similar to standard SQL, as you can see from the familiar commands to create a table, insert, and query data. + +### Conclusion + +Apache Cassandra seems like an interesting NoSQL clustered database, and I'm looking forward to diving deeper into its use. This simple setup only scratches the surface of the options available. I hope this three-node primer helps you get started with it, too. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/how-set-apache-cassandra-cluster + +作者:[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/jamesfhttps://opensource.com/users/ben-bromhead +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) +[2]: http://cassandra.apache.org/ +[3]: https://opensource.com/article/19/7/make-linux-stronger-firewalls +[4]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[5]: https://opensource.com/business/13/11/selinux-policy-guide +[6]: https://cassandra.apache.org/download/ +[7]: mailto:jd@somedomain.com From a950c9b34a8748a61f91d4a71ee2865f7487955d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:58:15 +0800 Subject: [PATCH 583/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190821=205=20no?= =?UTF-8?q?table=20open=20source=203D=20printers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190821 5 notable open source 3D printers.md --- ...90821 5 notable open source 3D printers.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20190821 5 notable open source 3D printers.md diff --git a/sources/tech/20190821 5 notable open source 3D printers.md b/sources/tech/20190821 5 notable open source 3D printers.md new file mode 100644 index 0000000000..6424143ad2 --- /dev/null +++ b/sources/tech/20190821 5 notable open source 3D printers.md @@ -0,0 +1,104 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 notable open source 3D printers) +[#]: via: (https://opensource.com/article/19/8/3D-printers) +[#]: author: (Michael Weinberg https://opensource.com/users/mweinberg) + +5 notable open source 3D printers +====== +A roundup of the latest notable open source 3D printers. +![Open source 3D printed coin][1] + +Open source hardware and 3D printers go together like, well, open source hardware and 3D printers. Not only are 3D printers used to create all sorts of open source hardware—there are also a huge number of 3D printers that have been [certified as open source][2] by the [Open Source Hardware Association][3]. That fact means that they are freely available to improve and build upon. + +There are plenty of open source 3D printers out there, with more being certified on a regular basis. Here’s a look at some of the latest. + +### BigFDM + +![The BigFDM 3D printer by Daniele Ingrassia.][4] + +_The BigFDM 3D printer by Daniele Ingrassia._ + +German-designed and UAE-built, the [Big FDM][5] is both the second-newest and the biggest certified open 3D printer. It was certified on July 14, and has a massive 800x800x900mm printing area, making it possibly big enough to print a full replica of many of the other printers on this list. + +### Creatable 3D + +![The Creatable 3D printer by Creatable Labs.][6] + +_The Creatable 3D printer by Creatable Labs._ + +Certified on July 30, the [Creatable 3D][7] is the most recently certified printer on this list. It is the only [delta-style][8] 3D printer, which is a design that makes it faster. It is also the first piece of certified open source hardware from South Korea, sporting the certification UID SK000001. + +### Ender CR-10 + +![The Ender CR-10 3D printer by Creality3d.][9] + +_The Ender CR-10 3D printer by Creality3d._ + +[Ender’s CR-10][10] is a well-known certified as open source 3D printer. That means that this Chinese 3D printer is fully documented and licensed to allow others to build upon it. Ender also certified its [Ender 3][11] printer as open source hardware. + +### LulzBot TAZ Workhorse + +![The LulzBot TAZ Workhorse by Aleph Objects.][12] + +_The LulzBot TAZ Workhorse by Aleph Objects._ + +Colorado-based Aleph Objects—creators of the LulzBot line of 3D printers—is the most prolific certifier of open source 3D printers and printer components. Their [TAZ Workhorse][13] was just certified in June, making it the latest in a long line of printers and printer elements that LulzBot has certified as open source hardware. If you are in the market for a hot end, extruder, board, or pretty much any other 3D printer component, and want to make sure that it is certified open source hardware, you will likely find something from Aleph Objects in their [certification directory][2]. + +### Nautilus + +![The Nautilus 3D printer by Hydra Research.][14] + +_The Nautilus 3D printer by Hydra Research._ + +Hydra Research’s [Nautilus][15] was just certified on July 10, making it the third-most recently certified printer of the bunch. It features removable build plates and a fully enclosed build area and hails from Oregon. + +#### IC3D open source filament + +![IC3D open source 3D printer filament.][16] + +_The IC3D Open Source Filament._ + +What will you put in your open source 3D printer? Open source 3D printing filament, of course. Ohio’s IC3D certified a full line of open source 3D printing filament for all of your open source 3D printing needs, including their: + + * [ABS 3D Printing Filament][17] + * [PETG 3D Printing Filament][18] + * [PLA 3D Printing Filament][19] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/3D-printers + +作者:[Michael Weinberg][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/mweinberg +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_source_print_resize.jpg?itok=v6z2FtLS (Open source 3D printed coin) +[2]: https://certification.oshwa.org/list.html +[3]: https://www.oshwa.org/ +[4]: https://opensource.com/sites/default/files/uploads/bigfdm.png (The BigFDM 3D printer by Daniele Ingrassia.) +[5]: https://certification.oshwa.org/de000013.html +[6]: https://opensource.com/sites/default/files/uploads/creatable_3d.png (The Creatable 3D printer by Creatable Labs.) +[7]: https://certification.oshwa.org/kr000001.html +[8]: https://www.youtube.com/watch?v=BTU6UGm15Zc +[9]: https://opensource.com/sites/default/files/uploads/ender_cr-10.png (The Ender CR-10 3D printer by Creality3d.) +[10]: https://certification.oshwa.org/cn000005.html +[11]: https://certification.oshwa.org/cn000003.html +[12]: https://opensource.com/sites/default/files/uploads/lulzbot_taz_workhorse.png (The LulzBot TAZ Workhorse by Aleph Objects.) +[13]: https://certification.oshwa.org/us000161.html +[14]: https://opensource.com/sites/default/files/uploads/hydra_research_nautilus.png (The Nautilus 3D printer by Hydra Research.) +[15]: https://certification.oshwa.org/us000166.html +[16]: https://opensource.com/sites/default/files/uploads/ic3d_open_source_filament.png (The IC3D Open Source Filament.) +[17]: https://certification.oshwa.org/us000066.html +[18]: https://certification.oshwa.org/us000131.html +[19]: https://certification.oshwa.org/us000130.html From e6a64b3d91b5df7da7d7dca4c6e2934f6cfc1f9b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:58:59 +0800 Subject: [PATCH 584/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190821=20Open?= =?UTF-8?q?=20Policy=20Agent:=20Cloud-native=20security=20and=20compliance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190821 Open Policy Agent- Cloud-native security and compliance.md --- ...t- Cloud-native security and compliance.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20190821 Open Policy Agent- Cloud-native security and compliance.md diff --git a/sources/tech/20190821 Open Policy Agent- Cloud-native security and compliance.md b/sources/tech/20190821 Open Policy Agent- Cloud-native security and compliance.md new file mode 100644 index 0000000000..acde3fc805 --- /dev/null +++ b/sources/tech/20190821 Open Policy Agent- Cloud-native security and compliance.md @@ -0,0 +1,88 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Open Policy Agent: Cloud-native security and compliance) +[#]: via: (https://opensource.com/article/19/8/open-policy-agent) +[#]: author: (Tim Hinrichs https://opensource.com/users/thinrich) + +Open Policy Agent: Cloud-native security and compliance +====== +A look at three use cases where organizations used Open Policy Agent to +reliably automate cloud-based access policy control. +![clouds in the sky with blue pattern][1] + +Every product or service has a unique way of handling policy and authorization: who-can-do-what and what-can-do-what. In the cloud-native world, authorization and policy are more complex than ever before. As the cloud-native ecosystem evolves, there’s a growing need for DevOps and DevSecOps teams to identify and address security and compliance issues earlier in development and deployment cycles. Businesses need to release software on the order of minutes (instead of months). For this to happen, those security and compliance policies—which in the past were written in PDFs or email—need to be checked and enforced by machines. That way, every few minutes when software goes out the door, it’s obeying all of the necessary policies. + +This problem was at the top of our minds when Teemu Koponen, Torin Sandall, and I founded the [Open Policy Agent project (OPA)][2] as a practical solution for the critical security and policy challenges of the cloud-native ecosystem. As the list of OPA’s successful integrations grows—thanks to active involvement by the open source community—the time is right to re-introduce OPA and offer a look at how it addresses business and policy pain points in varied contexts. + +### What is OPA? + +OPA is a general-purpose policy engine that makes policy a first-class citizen within the cloud-native ecosystem, putting it on par with servers, networks, and storage. Its uses range from authorization and admission control to data filtering. The community uses OPA for Kubernetes admission control across all major cloud providers, as well as on on-premises deployments, along with HTTP API authorization, remote access policy, and data filtering. Since OPA’s RESTful APIs use JSON over HTTP, OPA can be integrated with any programming language, making it extremely flexible across services. + +OPA gives policy its own lifecycle and toolsets, so policy can be managed separately from the underlying systems that the policy applies to. Launched in 2016, OPA provides local enforcement for the sake of higher availability, better performance, greater flexibility, and more expressiveness than hard-coded service logic or ad-hoc domain-specific languages. With dedicated tooling for new users and experienced practitioners, combined with many integrations to third-party systems, OPA empowers administrators with unified, flexible, and granular policy control across their entire software stack. OPA also provides policy guardrails around Kubernetes admission control, HTTP API authorization, entitlement management, remote access, and data filtering. In 2018, we donated OPA to the [Cloud Native Computing Foundation][3], a vendor-neutral home, and since then it has graduated from the sandbox to the incubating stage. + +### What can OPA do in the real world? + +In short, OPA provides unified, context-aware policy controls for cloud-native environments. OPA policy is context-aware, meaning that the administrator can make policy decisions based on what is happening in the real world, such as: + + * Is there currently an outage? + * Is there a new vulnerability that’s been released? + * Who are the people on call right now? + + + +Its policies are flexible enough to accommodate arbitrary context and arbitrary. OPA has been proven in production in some of the largest cloud-native deployments in the world—from global financial firms with trillions under management to technology giants and household names—but is also in use at emerging startups and regional healthcare organizations. + +Beyond our own direct experiences, and thanks to the open source community’s innovations, OPA continues to mature and solve varied and evolving customer authorization and policy problems, such as Kubernetes admission control, microservice authorization, and entitlements management for both end-user and employee-facing applications. We’re thrilled by both the depth and breadth of innovative use cases unfolding in front of our eyes. To better articulate some of the real-world problems OPA is solving, we looked across OPA’s business-critical deployments in the user community to provide the following examples. + +#### Provide regulatory compliance that role-based access control (RBAC) can’t. + +This lesson came to us through a global bank with trillions in assets. Their problem: A breach that occurred because a third-party broker had too much access. The bank’s relationship with the public was under significant stress, and it was also penalized with nearly $100 million in fines. + +How did such a breach happen? In short, due to the complexity of trying to map decades of role-based access control (RBAC) onto every sprawling monolithic app. With literally millions of roles across thousands of internal and external applications, the bank’s situation was—not unlike most large, established corporations—impossible to manage or troubleshoot. What started out as a best practice (RBAC) could no longer scale. Static roles, based on business logic, cannot be tested. They can’t be deployed inline. They can’t be validated like today’s modern code can. Simply put, RBAC cannot alone manage access at cloud scale. + +OPA facilitated a solution: Rearchitect and simplify application access with a local context-based authorization that’s automated, tested, audited, and scalable. There are both technology and business benefits to this approach. The main technology benefit is that the authorization policy (rules that establish what a given user can do) is built, tested, and deployed as part of continuous integration and continuous delivery (CI/CD). Every decision is tied directly to microservices and apps for auditing and validation, and all access is based not on role, but on the current context. + +Instead of creating thousands of roles to cover every permutation of what’s allowed, a simple policy can determine whether or not the user should have access, and to a very fine degree. This simplified policy greatly, since context drives access decisions. Versioning and backtesting aren’t required, since every time a new policy is needed the entire policy set is re-created, eliminating nested issues and legacy role sprawl. The local-only policy also eliminates the presence of conflicting rules/roles across repositories. + +The major business benefit is that compliance became easier through the separation of duties (with security teams—not developers—writing policy) and by providing clear, testable visibility into access policy across applications. This process accelerated development since AppDev teams were freed from having to code Authz or policy directly into applications, and central RBAC repositories no longer need to be updated, maintained, and made available. + +#### Provide regulatory compliance and safety by default. + +Another large bank, with nearly 20,000 employees, was in the untenable scenario of managing policy with spreadsheets. This situation may sound comical, but it‘s far more common than you might think. Access is often "managed" via best effort and tribal knowledge. Teams document access policy in PDFs, on Wikis, or in spreadsheets. They then rely on well-intentioned developers to read, understand, and remember access rules and guidelines. The bank had business reasons to move from monolithic apps to Kubernetes (K8s)—primarily improving differentiation and time to market—but it's legacy compliance solutions weren’t compatible with K8s. + +The bank knew that while it was a financial institution, it was _really_ a software organization. Rather than relying on human memory and best effort, the staff started thinking of policy with a GitOps mindset (pull requests, comments, and peer review to get to consensus and commitment). OPA became the single source of truth behind what was (or wasn’t) allowed with policy, implementing a true policy-as-code solution where effort was removed from the equation entirely, thanks to automation. + +The K8s platform that the bank created was compliant by default, as it executed company regulatory policies exactly, every time. With OPA, the bank could build, deploy, and version its regulatory policy through an agile process, ensuring that all users, teams, and services were always obeying policy. The infrastructure is now compliant because compliance is literally built into the infrastructure. + +#### Streamline and strengthen institutional knowledge. + +A major telecommunications company had an education problem that was sapping time and money. Its pain points: It had created and maintained its own admission control (AC) service; had a slow, costly, HR-heavy support model that couldn’t scale as its developer base grew; and it had a hammer-like enforcement model that wasn’t efficient, slowing time to market. + +OPA was deployed to replace the custom AC, thereby saving resources. The guardrails OPA provided allowed management to discover and deploy key policies that they developed from world events (and problems) that they wanted to eliminate moving forward. + +Management has now become accustomed to using policy-as-code and is able to hone in on the specific policies that developers trip over most. The primary benefit for this company was in the person-hours saved by not having to talk to the same developers about the same problems over and over again, and by being able to educate about and enforce policies automatically. The insights from these efforts allow the company to target education (not enforcement) to the teams that need it, proactively focusing on providing help to struggling teams. + +### Learn More about OPA + +To learn how to use OPA to help with your authorization and policy or to learn how to contribute, check out the [Open Policy Agent on Github][4] or check out the tutorials on different usecases at the [OPA homepage][2]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/open-policy-agent + +作者:[Tim Hinrichs][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/thinrich +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) +[2]: https://www.openpolicyagent.org/ +[3]: https://www.cncf.io/ +[4]: https://github.com/open-policy-agent/opa From 7a1553f2aa219d8e286a56a31ce0cb579735964a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:59:15 +0800 Subject: [PATCH 585/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20Server?= =?UTF-8?q?less=20on=20Kubernetes,=20diverse=20automation,=20and=20more=20?= =?UTF-8?q?industry=20trends?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md --- ...se automation, and more industry trends.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md diff --git a/sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md b/sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md new file mode 100644 index 0000000000..881ac5410a --- /dev/null +++ b/sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Serverless on Kubernetes, diverse automation, and more industry trends) +[#]: via: (https://opensource.com/article/19/8/serverless-kubernetes-and-more) +[#]: author: (Tim Hildred https://opensource.com/users/thildred) + +Serverless on Kubernetes, diverse automation, 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. + +## [10 tips for creating robust serverless components][2] + +> There are some repeated patterns that we have seen after creating 20+ serverless components. We recommend that you browse through the [available component repos on GitHub][3] and check which one is close to what you’re building. Just open up the repo and check the code and see how everything fits together. +> +> All component code is open source, and we are striving to keep it clean, simple and easy to follow. After you look around you’ll be able to understand how our core API works, how we interact with external APIs, and how we are reusing other components. + +**The impact**: Serverless Inc is striving to take probably the most hyped architecture early on in the hype cycle and make it usable and practical today. For serverless to truly go mainstream, producing something useful has to be as easy for a developer as "Hello world!," and these components are a step in that direction. + +## [Kubernetes workloads in the serverless era: Architecture, platforms, and trends][4] + +> There are many fascinating elements of the Kubernetes architecture: the containers providing common packaging, runtime and resource isolation model within its foundation; the simple control loop mechanism that monitors the actual state of components and reconciles this with the desired state; the custom resource definitions. But the true enabler for extending Kubernetes to support diverse workloads is the concept of the pod. +> +> A pod provides two sets of guarantees. The deployment guarantee ensures that the containers of a pod are always placed on the same node. This behavior has some useful properties such as allowing containers to communicate synchronously or asynchronously over localhost, over inter-process communication ([IPC][5]), or using the local file system. + +**The impact**: If developer adoption of serverless architectures is largely driven by how easily they can be productive working that way, business adoption will be driven by the ability to place this trend in the operational and business context. IT decision-makers need to see a holistic picture of how serverless adds value alongside their existing investments, and operators and architects need to envision how they'll keep it all up and running. + +## [How developers can survive the Last Mile with CodeReady Workspaces][6] + +> Inside each cloud provider, a host of tools can address CI/CD, testing, monitoring, backing up and recovery problems. Outside of those providers, the cloud native community has been hard at work cranking out new tooling from [Prometheus][7], [Knative][8], [Envoy][9] and [Fluentd][10], to [Kubenetes][11] itself and the expanding ecosystem of Kubernetes Operators. +> +> Within all of those projects, cloud-based services and desktop utilities is one major gap, however: the last mile of software development is the IDE. And despite the wealth of development projects inside the community and Cloud Native Computing Foundation, it is indeed the Eclipse Foundation, as mentioned above, that has taken on this problem with a focus on the new cloud development landscape. + +**The impact**: Increasingly complex development workflows and deployment patterns call for increasingly intelligent IDEs. While I'm sure it is possible to push a button and redeploy your microservices to a Kubernetes cluster from emacs (or vi, relax), Eclipse Che (and CodeReady Workspaces) are being built from the ground up with these types of cloud-native workflows in mind. + +## [Automate security in increasingly complex hybrid environments][12] + +> According to the [Information Security Forum][13]’s [Global Security Threat Outlook for 2019][14], one of the biggest IT trends to watch this year is the increasing sophistication of cybercrime and ransomware. And even as the volume of ransomware attacks is dropping, cybercriminals are finding new, more potent ways to be disruptive. An [article in TechRepublic][15] points to cryptojacking malware, which enables someone to hijack another's hardware without permission to mine cryptocurrency, as a growing threat for enterprise networks. +> +> To more effectively mitigate these risks, organizations could invest in automation as a component of their security plans. That’s because it takes time to investigate and resolve issues, in addition to applying controlled remediations across bare metal, virtualized systems, and cloud environments -- both private and public -- all while documenting changes.  + +**The impact**: This one is really about our ability to trust that the network service providers that we rely upon to keep our phones and smart TVs full of stutter-free streaming HD content have what they need to protect the infrastructure that makes it all possible. I for one am rooting for you! + +## [AnsibleFest 2019 session catalog][16] + +> 85 Ansible automation sessions over 3 days in Atlanta, Georgia + +**The impact**: What struck me is the range of things that can be automated with Ansible. Windows? Check. Multicloud? Check. Security? Check. The real question after those three days are over will be: Is there anything in IT that can't be automated with Ansible? Seriously, I'm asking, let me know. + +_I hope you enjoyed this list of what stood out to me from last week and come back next Monday for more open source community, market, and industry trends._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/serverless-kubernetes-and-more + +作者:[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://serverless.com/blog/10-tips-creating-robust-serverless-components/ +[3]: https://github.com/serverless-components/ +[4]: https://www.infoq.com/articles/kubernetes-workloads-serverless-era/ +[5]: https://opensource.com/article/19/4/interprocess-communication-linux-networking +[6]: https://thenewstack.io/how-developers-can-survive-the-last-mile-with-codeready-workspaces/ +[7]: https://prometheus.io/ +[8]: https://knative.dev/ +[9]: https://www.envoyproxy.io/ +[10]: https://www.fluentd.org/ +[11]: https://kubernetes.io/ +[12]: https://www.redhat.com/en/blog/automate-security-increasingly-complex-hybrid-environments +[13]: https://www.securityforum.org/ +[14]: https://www.prnewswire.com/news-releases/information-security-forum-forecasts-2019-global-security-threat-outlook-300757408.html +[15]: https://www.techrepublic.com/article/top-4-security-threats-businesses-should-expect-in-2019/ +[16]: https://agenda.fest.ansible.com/sessions From a9e4541731fda464950cdf2f74c516dfe4bbc764 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 00:59:48 +0800 Subject: [PATCH 586/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20The=20?= =?UTF-8?q?cloud=20isn't=20killing=20open=20source=20software?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190820 The cloud isn-t killing open source software.md --- ...loud isn-t killing open source software.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20190820 The cloud isn-t killing open source software.md diff --git a/sources/tech/20190820 The cloud isn-t killing open source software.md b/sources/tech/20190820 The cloud isn-t killing open source software.md new file mode 100644 index 0000000000..d512e980b4 --- /dev/null +++ b/sources/tech/20190820 The cloud isn-t killing open source software.md @@ -0,0 +1,88 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The cloud isn't killing open source software) +[#]: via: (https://opensource.com/article/19/8/open-source-licensing) +[#]: author: (Peter Zaitsev https://opensource.com/users/peter-zaitsev) + +The cloud isn't killing open source software +====== +How the cloud motivates open source businesses to evolve quickly. +![Globe up in the clouds][1] + +Over the last few months, I participated in two keynote panels where people asked questions about open source licensing: + + * Do we need to redefine what open source means in the age of the cloud? + * Are cloud vendors abusing open source? + * Will open source, as we know it, survive? + + + +Last year was the most eventful in my memory for the usually very conservative open source licensing space: + + * [Elastic][2] and [Confluent][3] introduced their own licenses for a portion of their stack. + * [Redis Labs][4] changed its license for some extensions by adding "Commons Clause," then changed the entire license a few months later. + * [MongoDB][5] famously proposed a new license called Server-Side Public License (SSPL) to the Open Source Initiative (OSI) for approval, only to [retract][6] the proposal before the OSI had an opportunity to reach a decision. Many in the open source community regarded SSPL as failing to meet the standards of open source licenses. As a result, MongoDB is under a license that can be described as "[source-available][7]" but not open source, given that it has not been approved by the OSI. + + + +### Competition in the cloud + +The most common reason given for software vendors making these changes is "foul play" by cloud vendors. The argument is that cloud vendors unfairly offer open source software "as a service," capturing large portions of the revenue, while the original software vendor continues to carry most of the development costs. Market rumors claim Amazon Web Services (AWS) makes more revenue from MySQL than Oracle, which owns the product. + +So, who is claiming foul play is destroying the open source ecosystem? Typically, the loudest voices are venture-funded open source software companies. These companies require a very high growth rate to justify their hefty valuation, so it makes sense that they would prefer not to worry about additional competition. + +But I reject this argument. If you have an open source license for your software, you need to accept the benefits and drawbacks that go along with it. Besides, you are likely to have a much faster and larger adoption rate partly because other businesses, large and small, can make money from your software. You need to accept and even expect competition from these businesses. + +In simple terms, there will be a larger cake, but you will only get a slice of it. If you want a bigger slice of that cake, you can choose a proprietary license for all or some of your software (the latter is often called "open core"). Or, you can choose more or less permissive open source licensing. Choosing the right mix and adapting it as time goes by is critical for the success of businesses that produce open source software. + +### Open source communities + +But what about software users and the open source communities that surround these projects? These groups generally love to see their software available from cloud vendors, for example, database-as-a-service (DBaaS), as it makes the software much easier to access and gives users more choices than ever. This can have a very positive impact on the community. For example, the adoption of PostgreSQL, which was not easy to use, was dramatically boosted by its availability on Heroku and then as DBaaS on major cloud vendors. + +Another criticism leveled at cloud vendors is that they do not support open source communities. This is partly due to their reluctance to share software code. They do, however, contribute significantly to the community by pushing the boundaries of usability, and more and more, we see examples of cloud vendors contributing code. AWS, which gets most of the criticism, has multiple [open source projects][8] and contributes to other projects. Amazon [contributed Encryption in Transit to Redis][9] and recently released [Open Distro for Elasticsearch][10], which provides open source equivalents for many features not available in the open source version of the Elastic platform. + +### Open source now and in the future + +So, while open source companies impacted by cloud vendors continue to argue that such competition can kill their business—and consequently kill open source projects—this argument is misguided. Competition is not new. Weaker companies that fail to adjust to these new business realities may fail. Other companies will thrive or be acquired by stronger players. This process generally leads to better products and more choice. + +This is especially true for open source software, which, unlike proprietary software, cannot be wiped out by a company's failure. Once released, open source code is _always_ open (you can only change the license for new releases), so everyone can exercise the right to fork and continue development if there is demand. + +So, I believe open source software is working exactly as intended. + +Some businesses attempt to balance open and proprietary software licenses and are now changing to restrictive licenses. Time will tell whether this will protect them or result in their users seeking a more open alternative. + +But, what about "source-available" licenses? This is a new category and another option for software vendors and users. However, it can be confusing. The source-available category is not well defined. Some people even refer to this software as open source, as you can browse the source code on GitHub. When source-available code is mixed in with truly open source components in the same product, it can be problematic. If issues arise, they could damage the reputation of the open source software and even expose the user to potential litigation. I hope that standardized source-available licenses will be developed and adopted by software vendors, as was the case with open source licenses. + +At [Percona][11], we find ourselves in a unique position. We have spent years using the freedom of open source to develop better versions of existing software, with enhanced features, at no cost to our users. Percona Server for MySQL is as open as MySQL Community Edition but has many of the enhanced features available in MySQL Enterprise as well as additional benefits. This also applies to Percona Server for MongoDB. So, we compete with MongoDB and Oracle, while also being thankful for the amazing engineering work they are doing. + +We also compete with DBaaS on other cloud vendors. DBaaS is a great choice for smaller companies that aren't worried about vendor lock-in. It offers superb value without huge costs and is a great choice for some customers. This rivalry is sometimes unpleasant, but it is ultimately fair, and the competition pushes us to be a better company. + +In summary, there is no need to panic! The cloud is not going to kill open source software, but it should motivate open source software businesses to adjust and evolve their operations. It is clear that agility will be key, and businesses that can take advantage of new developments and adapt to changing market conditions will be more successful. The final result is likely to be more open software and also more non-open source software, all operating under a variety of licenses. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/open-source-licensing + +作者:[Peter Zaitsev][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/peter-zaitsev +[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://www.elastic.co/guide/en/elastic-stack-overview/current/license-management.html +[3]: https://www.confluent.io/blog/license-changes-confluent-platform +[4]: https://redislabs.com/blog/redis-labs-modules-license-changes/ +[5]: https://www.mongodb.com/licensing/server-side-public-license +[6]: http://lists.opensource.org/pipermail/license-review_lists.opensource.org/2019-March/003989.html +[7]: https://en.wikipedia.org/wiki/Source-available_software +[8]: https://aws.amazon.com/opensource/ +[9]: https://aws.amazon.com/blogs/opensource/open-sourcing-encryption-in-transit-redis/ +[10]: https://aws.amazon.com/blogs/opensource/keeping-open-source-open-open-distro-for-elasticsearch/ +[11]: https://www.percona.com/ From 19b9506f33e9e90d07293c2ca1d9acd8fdb8b4a4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 01:00:17 +0800 Subject: [PATCH 587/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20A=20pr?= =?UTF-8?q?oject=20manager's=20guide=20to=20Ansible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190820 A project manager-s guide to Ansible.md --- ...20 A project manager-s guide to Ansible.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/tech/20190820 A project manager-s guide to Ansible.md diff --git a/sources/tech/20190820 A project manager-s guide to Ansible.md b/sources/tech/20190820 A project manager-s guide to Ansible.md new file mode 100644 index 0000000000..e422740ed4 --- /dev/null +++ b/sources/tech/20190820 A project manager-s guide to Ansible.md @@ -0,0 +1,72 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A project manager's guide to Ansible) +[#]: via: (https://opensource.com/article/19/8/project-managers-guide-ansible) +[#]: author: (Rich Butkevic https://opensource.com/users/rich-butkevic) + +A project manager's guide to Ansible +====== +Ansible is best known for IT automation, but it can streamline +operations across the entire organization. +![Coding on a computer][1] + +From application deployment to provisioning, [Ansible][2] is a powerful open source tool for automating routine IT tasks. It can help an organization's IT run smoothly, with core IT processes networked and maintained. Ansible is an advanced IT orchestration solution, and it can be deployed even over a large, complex network infrastructure. + +### Project management applications for Ansible + +The Ansible platform can improve an entire business' operations by streamlining the company's infrastructure. Apart from directly contributing to the efficiency of the IT team, Ansible also contributes to the productivity and efficiency of development teams. + +As such, it can be used for a number of project management applications: + + * Ansible Tower helps teams manage the entirety of their application lifecycle. It can take applications from development into production, giving teams more control over applications being deployed. + * Ansible Playbook enables teams to keep their applications deployed and properly configured. A Playbook can be easily programmed using Ansible's simple markup language. + * Defined automated security policies allow Ansible to detect and remediate security issues automatically. By automating security policies, the company can improve its security substantially and without increasing its administrative burden. + * Automation and systemization of processes reduce project risk by improving the precision of [project and task estimation][3]. + * Ansible can update applications, reducing the time the team needs to manage and maintain its systems. Keeping applications updated can be a constant time sink, and failing to update applications reduces overall security and productivity. + + + +### Ansible's core benefits + +There are many IT solutions for automating tasks or managing IT infrastructure. But Ansible is so popular because of its advantages over other IT automation solutions: + + 1. Ansible is free. As an open source solution, you don't have to pay for Ansible. Many commercial products require per-seat licensing or annual licensing subscriptions, which can add up. + 2. Ansible doesn't require an agent. It can be installed server-side only, requiring less interaction from end users. Other solutions require both server-side and endpoint installations, which takes a significant amount of time to manage. Not only do end users have to install these solutions on their own devices, but they also need to keep them updated and patched. Ansible doesn't require this type of maintenance. + 3. Ansible is easy to install and manage out of the box. It can be quickly installed, configured, and customized, so organizations can begin reaping its benefits in managing and monitoring IT solutions immediately. + 4. Ansible is flexible and can automate and control many types of IT tasks. The Ansible Playbook makes it easy to quickly code new tasks in a human-readable scripting language. Many other automation solutions require in-depth knowledge of programming languages, possibly even learning a proprietary programming language. + 5. Ansible has an active community with nearly 3,000 contributors contributing to the project. The robust open source community provides pre-programmed solutions and answers for more niche problems. Ansible's community ensures that it is stable, reliable, and constantly growing. + 6. Ansible is versatile and can be used in virtually any IT environment. Since it is both reliable and scalable, it is suitable for rapidly growing network environments. + + + +### Ansible makes IT automation easier + +Ansible is an out-of-the-box, open source automation solution that can schedule tasks and manage configurations over complex networks. Although it's intuitive and easy to use, it's also very robust; it has its own scripting language that can be used to program more complex functionality. + +As an open source tool, Ansible is cost-effective and well-supported. The Ansible community is large and active, providing solutions for most common use cases and providing support as needed. Companies working towards IT automation can begin with an Ansible deployment and save a significant amount of money and time compared to commercial solutions. + +For project managers, it's important to know that deploying Ansible will improve the effectiveness of a company's IT. Employees will spend less time trying to troubleshoot their own configuration, deployment, and provisioning. Ansible is designed to be a straightforward, reliable way to automate a network's IT tasks. + +Further, development teams can use the Ansible Tower to track applications from development to production. Ansible Tower includes everything from role-based access to graphical inventory management and enables teams to remain on the same page even with complex tasks. + +Ansible has a number of fantastic use cases and provides substantial productivity gains for both internal teams and the IT infrastructure as a whole. It's free, easy to use, and robust. By automating IT with Ansible, project managers will find that their teams can work more effectively without the burden of having to manage their own IT—and that IT works more smoothly overall. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/project-managers-guide-ansible + +作者:[Rich Butkevic][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/rich-butkevic +[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.ansible.com/ +[3]: https://www.projecttimes.com/articles/avoiding-the-planning-fallacy-improving-your-project-estimates.html From 411a7d487e17e8c96d31c45389de055997d7d7b6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 01:01:02 +0800 Subject: [PATCH 588/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20The=20?= =?UTF-8?q?infrastructure=20is=20code:=20A=20story=20of=20COBOL=20and=20Go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md --- ...ucture is code- A story of COBOL and Go.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md diff --git a/sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md b/sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md new file mode 100644 index 0000000000..629d36ee31 --- /dev/null +++ b/sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md @@ -0,0 +1,84 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The infrastructure is code: A story of COBOL and Go) +[#]: via: (https://opensource.com/article/19/8/command-line-heroes-cobol-golang) +[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberg) + +The infrastructure is code: A story of COBOL and Go +====== +COBOL remains the dominant language of mainframes. What can Go learn +from its history to dominate the cloud? +![Listen to the Command Line Heroes Podcast][1] + +Old challenges are new again. In [this week's Command Line Heroes podcast][2] (Season 3, Episode 5), that thought comes with a twist of programming languages and platforms. + +### COBOL dominates the mainframe + +One of the most brilliant minds in all of computer science is [Grace Murray Hopper][3]. Every time we don't have to write in binary to talk to computers, I recommend saying out loud: "Thank you, Rear Admiral Grace Murray Hopper." Try it next time, for she is the one who invented the first compiler (the software that translates programming code to machine language). + +Hopper was essential to the invention and adoption of high-level programming languages, the first of which was COBOL. She helped create the **CO**mmon **B**usiness-**O**riented **L**anguage (COBOL for short) in 1959. As Ritika Trikha put it on [HackerRank][4]: + +> "Grace Hopper, the mother of COBOL, helped champion the creation of this brand-new programming language that aimed to function across all business systems, saving an immense amount of time and money. Hopper was also the first to believe that programming languages should read just like English instead of computer jargon. Hence why COBOL's syntax is so wordy. But it helped humanize the computing process for businesses during an era when computing was intensive and prevalent only in research facilities." + +In the early 1960s, mainframes were a wild new architecture for sharing powerful amounts of computation. And in the era of mainframe computing, COBOL dominated the landscape. + +### COBOL in today's world + +But what about today? With the decline of mainframes and the rise of newer and more innovative languages designed for the web and cloud, where does COBOL sit? + +As last week's episode of Command Line Heroes mentioned, in the late 1990s, [Perl][5] (as well as JavaScript and C++) was outpacing COBOL. And, as Perl's creator, [Larry Wall stated then][6]: "COBOL is no big deal these days since demand for COBOL seems to be trailing off, for some strange reason." + +Fast forward to 2019, and COBOL has far from "trailed off." As David Cassel wrote on [The New Stack][7] in 2017: + +> "About 95% of ATM swipes use COBOL code, Reuters [reported in April][8], and the 58-year-old language even powers 80% of in-person transactions. In fact, Reuters calculates that there's still 220 billion lines of COBOL code currently being used in production today, and that every day, COBOL systems handle $3 trillion in commerce." + +Given its continued significance in the business world, knowing COBOL can be a great career move. Top COBOL programmers can expect to [make six figures][9] due to the limited number of people who specialize in the language. + +### Go dominates in the cloud, for now + +That story of COBOL's early dominance rings a bell for me. If we survey the most influential projects of this cloud computing era, you'd be hard-pressed to miss Go sitting at the top of the pack. Kubernetes and much of its related technology—from Etcd to Prometheus—are written in Go. As [RedMonk explored][10] back in 2014: + +> "Go's rapidly closing in on 1% of total commits and half a percent of projects and contributors. While the trend is obviously interesting, at first glance, numbers well under one percent look inconsequential relative to overall adoption. To provide some context, however, each of the most popular languages on Ohloh (C, C++, Java, JavaScript) only constitute ~10% of commits and ~5% of projects and contributors. **That means Go, a seemingly very minor player, is already used nearly one-tenth as much in FOSS as the most popular languages in existence**." + +In two of my previous jobs, my team (re)wrote infrastructure software in Go to be part of this monumental wave. Influential projects continue to live in the space that Go can fill, as [Uday Hiwarale explained][11] well in 2018: + +> "Things that make Go a great language [are] its simple concurrency model, its package-based code management, and its non-strict (type inference) typing system. Go does not support out-of-the box object-oriented programming experience, but [its] support structures (structs) …, with the help of methods and pointers, can help us achieve the same [outcomes]." + +It looks to me like Go could be following in COBOL's footsteps, but questions remain about where it's going. In June 2019, [RedMonk ranked][12] Go in 16th place, with a future that could lead either direction. + +### What can Go learn from COBOL? + +If Go were to see into its future, would it look like COBOL's, with such staying power? + +The stories told this season by Command Line Heroes illustrate how languages are born, how communities form around them, how they rise in popularity and standardize, and how some slowly decline. What can we learn about the lifespan of programming languages? Do they have a similar arc? Or do they differ? + +I think this podcast is well worth [subscribing so that you don't miss a single one][2]. I would love to hear your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/command-line-heroes-cobol-golang + +作者:[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/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberg +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command-line-heroes-520x292.png?itok=s_F6YEoS (Listen to the Command Line Heroes Podcast) +[2]: https://www.redhat.com/en/command-line-heroes +[3]: https://www.biography.com/scientist/grace-hopper +[4]: https://blog.hackerrank.com/the-inevitable-return-of-cobol/ +[5]: https://opensource.com/article/19/8/command-line-heroes-perl +[6]: http://www.wall.org/~larry/onion3/talk.html +[7]: https://thenewstack.io/cobol-everywhere-will-maintain/ +[8]: http://fingfx.thomsonreuters.com/gfx/rngs/USA-BANKS-COBOL/010040KH18J/index.html +[9]: https://www.laserfiche.com/ecmblog/looking-job-hows-your-cobol/ +[10]: https://redmonk.com/dberkholz/2014/03/18/go-the-emerging-language-of-cloud-infrastructure/ +[11]: https://medium.com/rungo/introduction-to-go-programming-language-golang-89d16ca72bbf +[12]: https://redmonk.com/sogrady/2019/07/18/language-rankings-6-19/ From 90dcbba60b407285994fe4f0c6c490bf62ce2d1a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 01:01:30 +0800 Subject: [PATCH 589/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20A=20br?= =?UTF-8?q?ief=20introduction=20to=20learning=20agility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190820 A brief introduction to learning agility.md --- ... brief introduction to learning agility.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/tech/20190820 A brief introduction to learning agility.md diff --git a/sources/tech/20190820 A brief introduction to learning agility.md b/sources/tech/20190820 A brief introduction to learning agility.md new file mode 100644 index 0000000000..08ce7da414 --- /dev/null +++ b/sources/tech/20190820 A brief introduction to learning agility.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A brief introduction to learning agility) +[#]: via: (https://opensource.com/open-organization/19/8/introduction-learning-agility) +[#]: author: (Jen Kelchner https://opensource.com/users/jenkelchnerhttps://opensource.com/users/marcobravohttps://opensource.com/users/jenkelchner) + +A brief introduction to learning agility +====== +The ability to learn and adapt quickly isn't something our hiring +algorithms typically identify. But by ignoring it, we're overlooking +insightful and innovative job candidates. +![Teacher or learner?][1] + +I think everyone can agree that the workplace has changed dramatically in the last decade—or is in the process of changing, depending on where you're currently working. The landscape has evolved. Distributed leadership, project-based work models, and cross-functional solution building are commonplace. In essence, the world is going [open][2]. + +And yet our talent acquisition strategies, development models, and internal systems have shifted little (if at all) to meet the demands these shifts in our external work have created. + +In this three-part series, let's take a look at what is perhaps the game-changing key to acquisition, retention, engagement, innovation, problem-solving, and leadership in this emerging future: learning agility. We'll discuss not only what learning agility _is_, but how your organization's leaders can create space for agile learning on teams and in departments. + +### Algorithmed out of opportunities + +For the last decade, I've freelanced as an independent consultant. Occasionally, when the stress of entrepreneurial, project-based work gets heavy, I search out full-time positions. As I'm sure you know, job searching requires hours of research—and often concludes in dead-ends. On a rare occasion, you find a great fit (the culture looks right and you have every skill the role could need and more!), except for one small thing: a specific educational degree. + +Sticking with these outdated practices puts us in danger of overlooking amazing candidates capable of accelerating innovation and becoming amazing leaders in our organizations. + +More times than I can count, I've gotten "algorithmed out" of even an initial conversation about a new position. What do I mean by that exactly? + +If your specific degree—or, in my case, lack thereof—doesn't meet the one listed, the algorithmically driven job portal spits me back out. I've received a "no thank you" email within thirty seconds of hitting submit. + +So why is calling this out so important? + +Hiring practices have changed very little in both closed _and_ open organizations. Sticking with these outdated practices puts us in danger of overlooking amazing candidates capable of accelerating innovation and becoming amazing leaders in our organizations. + +Developing more inclusive and open hiring processes will require work. For starters, it'll require focus on a key competency so often overlooked as part of more traditional, "closed" processes: Learning agility. + +### Just another buzzword or key performance indicator? + +While "learning agility" [is not a new term][3], it's one that organizations clearly still need help taking into account. Even in open organizations, we tend to overlook this element by focusing too rigidly on a candidate's degree history or _current role_ when we should be taking a more holistic view of the individual. + +One crucial element of [adaptability][4] is learning agility. It is the capacity for adapting to situations and applying knowledge from prior experience—even when you don't know what to do. In short, it's a willingness to learn from all your experiences and then apply that knowledge to tackle new challenges in new situations. + +Every experience we encounter in life can teach us something if we pay attention to it. All of these experiences are educational and useful in organizational life. In fact, as Colin Willis notes in his recent article on [informal learning][5], 70%‒80% of all job-related knowledge isn't learned in formal training programs. And yet we're conditioned to think that _only what you were paid to do in a formal role_ or _the degree you once earned_ speaks solely to your potential value or fit for a particular role. + +Likewise, in extensive research conducted over years, Korn Ferry has shown that learning agility is also a [predictor of long-term performance][6] and leadership potential. In an [article on leadership][7], Korn Ferry notes that "individuals exhibiting high levels of learning agility can adapt quickly in unfamiliar situations and even thrive amid chaos." [Chaos][8]—there's a word I think we would all use to describe the world we live in today. + +Every experience we encounter in life can teach us something if pay attention to it. + +Organizations continue to overlook this critical skill ([too few U.S. companies consider candidates without college degrees][9]), even though it's a proven component of success in a volatile, complex, ambiguous world? Why? + +And as adaptability and collaboration—[two key open principles][2]—sit at the top of the list of job [skills needed in 2019][10], perhaps talent acquisition conversations should stop focusing on _how to measure adaptability_ and shift to _sourcing learning agile people_ so problems can get solved faster. + +### Learning agility has dimensions + +A key to unlocking our adaptability during rapid change is learning agility. Agile people are great at integrating information from their experiences and then using that information to navigate unfamiliar situations. This complex set of skills allows us to draw patterns from one context and apply them to another context. + +So when you're looking for an agile person to join your team, what exactly are you looking for? + +Start with getting to know someone _beyond_ a resume, because learning-agile people have more lessons, more tools, and more solutions in their history that can be valuable when your organization is facing new challenges. + +Next, understand the [five dimensions of learning agility][11], according to Korn Ferry's research. + +**Mental Agility:** This looks like _thinking critically to decipher complex problems and expanding possibilities by seeing new connections_. + +**People Agility:** This looks like _understanding and relating to other people to empower collective performance_. + +**Change Agility**: This looks like _experimentation, being curious, and effectively dealing with uncertainty_. + +**Results Agility:** This looks like _delivering results in first-time situations by inspiring teams and exhibiting a presence that builds confidence in themselves and others_. + +**Self-Awareness:** This looks like _the ability to reflect on oneself, knowing oneself well, and understanding how one's behaviors impact others._ + +While finding someone with all these traits may seem like sourcing a unicorn, you'll find learning agility is more common than you think. In fact, your organization is likely _already_ full of agile people, but your culture and systems don't support agile learning. + +In the next part of this series, we'll explore how you can tap into this crucial skill and create space for agile learning every day. Until then, do what you can to become more aware of the lessons you encounter _today_ that will help you solve problems _tomorrow_. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/19/8/introduction-learning-agility + +作者:[Jen Kelchner][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/jenkelchnerhttps://opensource.com/users/marcobravohttps://opensource.com/users/jenkelchner +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?) +[2]: https://opensource.com/open-organization/resources/open-org-definition +[3]: https://www.researchgate.net/publication/321438460_Learning_agility_Its_evolution_as_a_psychological_construct_and_its_empirical_relationship_to_leader_success +[4]: https://opensource.com/open-organization/resources/open-org-maturity-model +[5]: https://opensource.com/open-organization/19/7/informal-learning-adaptability +[6]: https://cmo.cm/2TDofV4 +[7]: https://focus.kornferry.com/leadership-and-talent/learning-agility-a-highly-prized-quality-in-todays-marketplace/ +[8]: https://opensource.com/open-organization/19/6/innovation-delusion +[9]: https://www.cnbc.com/2018/08/16/15-companies-that-no-longer-require-employees-to-have-a-college-degree.html +[10]: https://www.weforum.org/agenda/2019/01/the-hard-and-soft-skills-to-futureproof-your-career-according-to-linkedin/ +[11]: https://www.forbes.com/sites/kevincashman/2013/04/03/the-five-dimensions-of-learning-agile-leaders/#7b003b737457 From 83b3d2ad04fd310aef724fb8b3aa400a73ec7557 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 01:02:03 +0800 Subject: [PATCH 590/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190819=20An=20i?= =?UTF-8?q?ntroduction=20to=20bpftrace=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190819 An introduction to bpftrace for Linux.md --- ...9 An introduction to bpftrace for Linux.md | 353 ++++++++++++++++++ 1 file changed, 353 insertions(+) create mode 100644 sources/tech/20190819 An introduction to bpftrace for Linux.md diff --git a/sources/tech/20190819 An introduction to bpftrace for Linux.md b/sources/tech/20190819 An introduction to bpftrace for Linux.md new file mode 100644 index 0000000000..d5be0703b4 --- /dev/null +++ b/sources/tech/20190819 An introduction to bpftrace for Linux.md @@ -0,0 +1,353 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (An introduction to bpftrace for Linux) +[#]: via: (https://opensource.com/article/19/8/introduction-bpftrace) +[#]: author: (Brendan Gregg https://opensource.com/users/brendanghttps://opensource.com/users/marcobravo) + +An introduction to bpftrace for Linux +====== +New Linux tracer analyzes production performance problems and +troubleshoots software. +![Linux keys on the keyboard for a desktop computer][1] + +Bpftrace is a new open source tracer for Linux for analyzing production performance problems and troubleshooting software. Its users and contributors include Netflix, Facebook, Red Hat, Shopify, and others, and it was created by [Alastair Robertson][2], a talented UK-based developer who has won various coding competitions. + +Linux already has many performance tools, but they are often counter-based and have limited visibility. For example, [iostat(1)][3] or a monitoring agent may tell you your average disk latency, but not the distribution of this latency. Distributions can reveal multiple modes or outliers, either of which may be the real cause of your performance problems. [Bpftrace][4] is suited for this kind of analysis: decomposing metrics into distributions or per-event logs and creating new metrics for visibility into blind spots. + +You can use bpftrace via one-liners or scripts, and it ships with many prewritten tools. Here is an example that traces the distribution of read latency for PID 181 and shows it as a power-of-two histogram: + + +``` +# bpftrace -e 'kprobe:vfs_read /pid == 30153/ { @start[tid] = nsecs; } +kretprobe:vfs_read /@start[tid]/ { @ns = hist(nsecs - @start[tid]); delete(@start[tid]); }' +Attaching 2 probes... +^C + +@ns: +[256, 512)         10900 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                      | +[512, 1k)          18291 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| +[1k, 2k)            4998 |@@@@@@@@@@@@@@                                      | +[2k, 4k)              57 |                                                    | +[4k, 8k)             117 |                                                    | +[8k, 16k)             48 |                                                    | +[16k, 32k)           109 |                                                    | +[32k, 64k)             3 |                                                    | +``` + +This example instruments one event out of thousands available. If you have some weird performance problem, there's probably some bpftrace one-liner that can shed light on it. For large environments, this ability can help you save millions. For smaller environments, it can be of more use in helping to eliminate latency outliers. + +I [previously][5] wrote about bpftrace vs. other tracers, including [BCC][6] (BPF Compiler Collection). BCC is great for canned complex tools and agents. Bpftrace is best for short scripts and ad hoc investigations. In this article, I'll summarize the bpftrace language, variable types, probes, and tools. + +Bpftrace uses BPF (Berkeley Packet Filter), an in-kernel execution engine that processes a virtual instruction set. BPF has been extended (aka eBPF) in recent years for providing a safe way to extend kernel functionality. It also has become a hot topic in systems engineering, with at least 24 talks on BPF at the last [Linux Plumber's Conference][7]. BPF is in the Linux kernel, and bpftrace is the best way to get started using BPF for observability. + +See the bpftrace [INSTALL][8] guide for how to install it, and get the latest version; [0.9.2][9] was just released. For Kubernetes clusters, there is also [kubectl-trace][10] for running it. + +### Syntax + + +``` +`probe[,probe,...] /filter/ { action }` +``` + +The probe specifies what events to instrument. The filter is optional and can filter down the events based on a boolean expression, and the action is the mini-program that runs. + +Here's hello world: + + +``` +`# bpftrace -e 'BEGIN { printf("Hello eBPF!\n"); }'` +``` + +The probe is **BEGIN**, a special probe that runs at the beginning of the program (like awk). There's no filter. The action is a **printf()** statement. + +Now a real example: + + +``` +`# bpftrace -e 'kretprobe:sys_read /pid == 181/ { @bytes = hist(retval); }'` +``` + +This uses a **kretprobe** to instrument the return of the **sys_read()** kernel function. If the PID is 181, a special map variable **@bytes** is populated with a log2 histogram function with the return value **retval** of **sys_read()**. This produces a histogram of the returned read size for PID 181. Is your app doing lots of one byte reads? Maybe that can be optimized. + +### Probe types + +These are libraries of related probes. The currently supported types are (more will be added): + +Type | Description +---|--- +**tracepoint** | Kernel static instrumentation points +**usdt** | User-level statically defined tracing +**kprobe** | Kernel dynamic function instrumentation +**kretprobe** | Kernel dynamic function return instrumentation +**uprobe** | User-level dynamic function instrumentation +**uretprobe** | User-level dynamic function return instrumentation +**software** | Kernel software-based events +**hardware** | Hardware counter-based instrumentation +**watchpoint** | Memory watchpoint events (in development) +**profile** | Timed sampling across all CPUs +**interval** | Timed reporting (from one CPU) +**BEGIN** | Start of bpftrace +**END** | End of bpftrace + +Dynamic instrumentation (aka dynamic tracing) is the superpower that lets you trace any software function in a running binary without restarting it. This lets you get to the bottom of just about any problem. However, the functions it exposes are not considered a stable API, as they can change from one software version to another. Hence static instrumentation, where event points are hard-coded and become a stable API. When you write bpftrace programs, try to use the static types first, before the dynamic ones, so your programs are more stable. + +### Variable types + +Variable | Description +---|--- +**@name** | global +**@name[key]** | hash +**@name[tid]** | thread-local +**$name** | scratch + +Variables with an **@** prefix use BPF maps, which can behave like associative arrays. They can be populated in one of two ways: + + * Variable assignment: **@name = x;** + * Function assignment: **@name = hist(x);** + + + +Various map-populating functions are built in to provide quick ways to summarize data. + +### Built-in variables and functions + +Here are some of the built-in variables and functions, but there are many more. + +**Built-in variables:** + +Variable | Description +---|--- +**pid** | process ID +**comm** | Process or command name +**nsecs** | Current time in nanoseconds +**kstack** | Kernel stack trace +**ustack** | User-level stack trace +**arg0...argN** | Function arguments +**args** | Tracepoint arguments +**retval** | Function return value +**name** | Full probe name + +**Built-in functions:** + +Function | Description +---|--- +**printf("...")** | Print formatted string +**time("...")** | Print formatted time +**system("...")** | Run shell command +**@ = count()** | Count events +**@ = hist(x)** | Power-of-2 histogram for x +**@ = lhist(x, min, max, step)** | Linear histogram for x + +See the [reference guide][11] for details. + +### One-liners tutorial + +A great way to learn bpftrace is via one-liners, which I turned into a [one-liners tutorial][12] that covers the following: + +Listing probes | **bpftrace -l 'tracepoint:syscalls:sys_enter_*'** +---|--- +Hello world | **bpftrace -e 'BEGIN { printf("hello world\n") }'** +File opens | **bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm, str(args->filename)) }'** +Syscall counts by process | **bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count() }'** +Distribution of read() bytes | **bpftrace -e 'tracepoint:syscalls:sys_exit_read /pid == 18644/ { @bytes = hist(args->retval) }'** +Kernel dynamic tracing of read() bytes | **bpftrace -e 'kretprobe:vfs_read { @bytes = lhist(retval, 0, 2000, 200) }'** +Timing read()s | **bpftrace -e 'kprobe:vfs_read { @start[tid] = nsecs } kretprobe:vfs_read /@start[tid]/ { @ns[comm] = hist(nsecs - @start[tid]); delete(@start[tid]) }'** +Count process-level events | **bpftrace -e 'tracepoint:sched:sched* { @[name] = count() } interval:s:5 { exit() }'** +Profile on-CPU kernel stacks | **bpftrace -e 'profile:hz:99 { @[stack] = count() }'** +Scheduler tracing | **bpftrace -e 'tracepoint:sched:sched_switch { @[stack] = count() }'** +Block I/O tracing | **bpftrace -e 'tracepoint:block:block_rq_issue { @ = hist(args->bytes); }** +Kernel struct tracing (a script, not a one-liner) | Command: **bpftrace path.bt**, where the path.bt file is: + +**#include <linux/path.h> +#include <linux/dcache.h>** + +**kprobe:vfs_open { printf("open path: %s\n", str(((path *)arg0)->dentry->d_name.name)); }** + +See the tutorial for an explanation of each. + +### Provided tools + +Apart from one-liners, bpftrace programs can be multi-line scripts. Bpftrace ships with 28 of them as tools: + +![bpftrace/eBPF tools][13] + +These can be found in the **[/tools][14]** directory: + + +``` +tools# ls *.bt +bashreadline.bt  dcsnoop.bt         oomkill.bt    syncsnoop.bt   vfscount.bt +biolatency.bt    execsnoop.bt       opensnoop.bt  syscount.bt    vfsstat.bt +biosnoop.bt      gethostlatency.bt  pidpersec.bt  tcpaccept.bt   writeback.bt +bitesize.bt      killsnoop.bt       runqlat.bt    tcpconnect.bt  xfsdist.bt +capable.bt       loads.bt           runqlen.bt    tcpdrop.bt +cpuwalk.bt       mdflush.bt         statsnoop.bt  tcpretrans.bt +``` + +Apart from their use in diagnosing performance issues and general troubleshooting, they also provide another way to learn bpftrace. Here are some examples. + +#### Source + +Here's the code to **biolatency.bt**: + + +``` +tools# cat -n biolatency.bt +     1  /* +     2   * biolatency.bt    Block I/O latency as a histogram. +     3   *                  For Linux, uses bpftrace, eBPF. +     4   * +     5   * This is a bpftrace version of the bcc tool of the same name. +     6   * +     7   * Copyright 2018 Netflix, Inc. +     8   * Licensed under the Apache License, Version 2.0 (the "License") +     9   * +    10   * 13-Sep-2018  Brendan Gregg   Created this. +    11   */ +    12 +    13  BEGIN +    14  { +    15          printf("Tracing block device I/O... Hit Ctrl-C to end.\n"); +    16  } +    17 +    18  kprobe:blk_account_io_start +    19  { +    20          @start[arg0] = nsecs; +    21  } +    22 +    23  kprobe:blk_account_io_done +    24  /@start[arg0]/ +    25 +    26  { +    27          @usecs = hist((nsecs - @start[arg0]) / 1000); +    28          delete(@start[arg0]); +    29  } +    30  +    31  END +    32  { +    33          clear(@start); +    34  } +``` + +It's straightforward, easy to read, and short enough to include on a slide. This version uses kernel dynamic tracing to instrument the **blk_account_io_start()** and **blk_account_io_done()** functions, and it passes a timestamp between them keyed on **arg0** to each. **arg0** on **kprobe** is the first argument to that function, which is the struct request *****, and its memory address is used as a unique identifier. + +#### Example files + +You can see screenshots and explanations of these tools in the [GitHub repo][14] as ***_example.txt** files. For [example][15]: + + +``` +tools# more biolatency_example.txt +Demonstrations of biolatency, the Linux BPF/bpftrace version. + +This traces block I/O, and shows latency as a power-of-2 histogram. For example: + +# biolatency.bt +Attaching 3 probes... +Tracing block device I/O... Hit Ctrl-C to end. +^C + +@usecs: +[256, 512)             2 |                                                    | +[512, 1K)             10 |@                                                   | +[1K, 2K)             426 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| +[2K, 4K)             230 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@                        | +[4K, 8K)               9 |@                                                   | +[8K, 16K)            128 |@@@@@@@@@@@@@@@                                     | +[16K, 32K)            68 |@@@@@@@@                                            | +[32K, 64K)             0 |                                                    | +[64K, 128K)            0 |                                                    | +[128K, 256K)          10 |@                                                   | + +While tracing, this shows that 426 block I/O had a latency of between 1K and 2K +usecs (1024 and 2048 microseconds), which is between 1 and 2 milliseconds. +There are also two modes visible, one between 1 and 2 milliseconds, and another +between 8 and 16 milliseconds: this sounds like cache hits and cache misses. +There were also 10 I/O with latency 128 to 256 ms: outliers. Other tools and +instrumentation, like biosnoop.bt, can shed more light on those outliers. +[...] +``` + +Sometimes it can be most effective to switch straight to the example file when trying to understand these tools, since the output may be self-evident (by design!). + +#### Man pages + +There are also man pages for every tool in the GitHub repo under [/man/man8][16]. They include sections on the output fields and the tool's expected overhead. + + +``` +# nroff -man man/man8/biolatency.8 +biolatency(8)               System Manager's Manual              biolatency(8) + +NAME +       biolatency.bt - Block I/O latency as a histogram. Uses bpftrace/eBPF. + +SYNOPSIS +       biolatency.bt + +DESCRIPTION +       This  tool  summarizes  time  (latency) spent in block device I/O (disk +       I/O) as a power-of-2 histogram. This  allows  the  distribution  to  be +       studied,  including  modes and outliers. There are often two modes, one +       for device cache hits and one for cache misses, which can be  shown  by +       this tool. Latency outliers will also be shown. +[...] +``` + +Writing all these man pages was the least fun part of developing these tools, and some took longer to write than the tool took to develop, but it's nice to see the final result. + +### bpftrace vs. BCC + +Since eBPF has been merging in the kernel, most effort has been placed on the [BCC][6] frontend, which provides a BPF library and Python, C++, and Lua interfaces for writing programs. I've developed a lot of [tools][17] in BCC/Python; it works great, although coding in BCC is verbose. If you're hacking away at a performance issue, bpftrace is better for your one-off custom queries. If you're writing a tool with many command-line options or an agent that uses Python libraries, you'll want to consider using BCC. + +On the Netflix performance team, we use both: BCC for developing canned tools that others can easily use and for developing agents; and bpftrace for ad hoc analysis. The network engineering team has been using BCC to develop an agent for its needs. The security team is most interested in bpftrace for quick ad hoc instrumentation for detecting zero-day vulnerabilities. And I expect the developer teams will use both without knowing it, via the self-service GUIs we are building (Vector), and occasionally may SSH into an instance and run a canned tool or ad hoc bpftrace one-liner. + +### Learn more + + * The [bpftrace][4] repository on GitHub + * The bpftrace [one-liners tutorial][12] + * The bpftrace [reference guide][11] + * The [BCC][6] repository for more complex BPF-based tools + + + +I also have a book coming out this year that covers bpftrace: _[BPF Performance Tools: Linux System and Application Observability][18]_, to be published by Addison Wesley, and which contains many new bpftrace tools. + +* * * + +_Thanks to Alastair Robertson for creating bpftrace, and the bpftrace, BCC, and BPF communities for all the work over the past five years._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/introduction-bpftrace + +作者:[Brendan Gregg][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/brendanghttps://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: https://ajor.co.uk/bpftrace/ +[3]: https://linux.die.net/man/1/iostat +[4]: https://github.com/iovisor/bpftrace +[5]: http://www.brendangregg.com/blog/2018-10-08/dtrace-for-linux-2018.html +[6]: https://github.com/iovisor/bcc +[7]: https://www.linuxplumbersconf.org/ +[8]: https://github.com/iovisor/bpftrace/blob/master/INSTALL.md +[9]: https://github.com/iovisor/bpftrace/releases/tag/v0.9.2 +[10]: https://github.com/iovisor/kubectl-trace +[11]: https://github.com/iovisor/bpftrace/blob/master/docs/reference_guide.md +[12]: https://github.com/iovisor/bpftrace/blob/master/docs/tutorial_one_liners.md +[13]: https://opensource.com/sites/default/files/uploads/bpftrace_tools_early2019.png (bpftrace/eBPF tools) +[14]: https://github.com/iovisor/bpftrace/tree/master/tools +[15]: https://github.com/iovisor/bpftrace/blob/master/tools/biolatency_example.txt +[16]: https://github.com/iovisor/bcc/tree/master/man/man8 +[17]: https://github.com/iovisor/bcc#tools +[18]: http://www.brendangregg.com/blog/2019-07-15/bpf-performance-tools-book.html From f3ccb67e3e45a4d250a4ca3e87226fcd304209a8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 01:02:43 +0800 Subject: [PATCH 591/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190819=20Moving?= =?UTF-8?q?=20files=20on=20Linux=20without=20mv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190819 Moving files on Linux without mv.md --- ...190819 Moving files on Linux without mv.md | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 sources/tech/20190819 Moving files on Linux without mv.md diff --git a/sources/tech/20190819 Moving files on Linux without mv.md b/sources/tech/20190819 Moving files on Linux without mv.md new file mode 100644 index 0000000000..6bf44ff584 --- /dev/null +++ b/sources/tech/20190819 Moving files on Linux without mv.md @@ -0,0 +1,189 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Moving files on Linux without mv) +[#]: via: (https://opensource.com/article/19/8/moving-files-linux-without-mv) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/seth) + +Moving files on Linux without mv +====== +Sometimes the mv command isn't the best option when you need to move a +file. So how else do you do it? +![Hand putting a Linux file folder into a drawer][1] + +The humble **mv** command is one of those useful tools you find on every POSIX box you encounter. Its job is clearly defined, and it does it well: Move a file from one place in a file system to another. But Linux is nothing if not flexible, and there are other options for moving files. Using different tools can provide small advantages that fit perfectly with a specific use case. + +Before straying too far from **mv**, take a look at this command’s default results. First, create a directory and generate some files with permissions set to 777: + + +``` +$ mkdir example +$ touch example/{foo,bar,baz} +$ for i in example/*; do ls /bin > "${i}"; done +$ chmod 777 example/* +``` + +You probably don't think about it this way, but files exist as entries, called index nodes (commonly known as **inodes**), in a [filesystem][2]. You can see what inode a file occupies with the [ls command][3] and its **\--inode** option: + + +``` +$ ls --inode example/foo +7476868 example/foo +``` + +As a test, move that file from the example directory to your current directory and then view the file’s attributes: + + +``` +$ mv example/foo . +$ ls -l -G -g --inode +7476868 -rwxrwxrwx. 1 29545 Aug  2 07:28 foo +``` + +As you can see, the original file—along with its existing permissions—has been "moved", but its inode has not changed. + +That’s the way the **mv** tool is programmed to move a file: Leave the inode unchanged (unless the file is being moved to a different filesystem), and preserve its ownership and permissions. + +Other tools provide different options. + +### Copy and remove + +On some systems, the move action is a true move action: Bits are removed from one point in the file system and reassigned to another. This behavior has largely fallen out of favor. Move actions are now either attribute reassignments (an inode now points to a different location in your file organization) or amalgamations of a copy action followed by a remove action. +The philosophical intent of this design is to ensure that, should a move fail, a file is not left in pieces. + +The **cp** command, unlike **mv**, creates a brand new data object in your filesystem. It has a new inode location, and it is subject to your active umask. You can mimic a move using the **cp** and **rm** (or [trash][4] if you have it) commands: + + +``` +$ cp example/foo . +$ ls -l -G -g --inode +7476869 -rwxrwxr-x. 29545 Aug  2 11:58 foo +$ trash example/foo +``` + +The new **foo** file in this example got 775 permissions because the location’s umask specifically excludes write permissions: + + +``` +$ umask +0002 +``` + +For more information about umask, read Alex Juarez’s article about [file permissions][5]. + +### Cat and remove + +Similar to a copy and remove, using the [cat][6] (or **tac**, for that matter) command assigns different permissions when your "moved" file is created. Assuming a fresh test environment with no **foo** in the current directory: + + +``` +$ cat example/foo > foo +$ ls -l -G -g --inode +7476869 -rw-rw-r--. 29545 Aug 8 12:21 foo +$ trash example/foo +``` + +This time, a new file was created with no prior permissions set. The result is entirely subject to the umask setting, which blocks no permission bit for the user and group (the executable bit is not granted for new files regardless of umask), but it blocks the write (value two) bit from others. The result is a file with 664 permission. + +### Rsync + +The **rsync** command is a robust multipurpose tool to send files between hosts and file system locations. This command has many options available to it, including the ability to make its destination mirror its source. + +You can copy and then remove a file with **rsync** using the **\--remove-source-files** option, along with whatever other option you choose to perform the synchronization (a common, general-purpose one is **\--archive**): + + +``` +$ rsync --archive --remove-source-files example/foo . +$ ls example +bar  baz +$ ls -lGgi +7476870 -rwxrwxrwx. 1 seth users 29545 Aug 8 12:23 foo +``` + +Here you can see that file permission and ownership was retained, the timestamp was updated, and the source file was removed. + +**A word of warning:** Do not confuse this option for **\--delete**, which removes files from your _destination_ directory. Misusing **\--delete** can wipe out most of your data, and it’s recommended that you avoid this option except in a test environment. + +You can override some of these defaults, changing permission and modification settings: + + +``` +$ rsync --chmod=666 --times \ +\--remove-source-files example/foo . +$ ls example +bar  baz +$ ls -lGgi +7476871 -rw-rw-r--. 1 seth users 29545 Aug 8 12:55 foo +``` + +Here, the destination’s umask is respected, so the **\--chmod=666** option results in a file with 664 permissions. + +The benefits go beyond just permissions, though. The **rsync** command has [many][7] useful [options][8] (not the least of which is the **\--exclude** flag so you can exempt items from a large move operation) that make it a more robust tool than the simple **mv** command. For example, to exclude all backup files while moving a collection of files: + + +``` +$ rsync --chmod=666 --times \ +\--exclude '*~' \ +\--remove-source-files example/foo . +``` + +### Set permissions with install + +The **install** command is a copy command specifically geared toward developers and is mostly invoked as part of the install routine of software compiling. It’s not well known among users (and I do often wonder why it got such an intuitive name, leaving mere acronyms and pet names for package managers), but **install** is actually a useful way to put files where you want them. + +There are many options for the **install** command, including **\--backup** and **\--compare** command (to avoid "updating" a newer copy of a file). + +Unlike **cp** and **cat**, but exactly like **mv**, the **install** command can copy a file while preserving its timestamp: + + +``` +$ install --preserve-timestamp example/foo . +$ ls -l -G -g --inode +7476869 -rwxr-xr-x. 1 29545 Aug  2 07:28 foo +$ trash example/foo +``` + +Here, the file was copied to a new inode, but its **mtime** did not change. The permissions, however, were set to the **install** default of **755**. + +You can use **install** to set the file’s permissions, owner, and group: + + +``` +$ install --preserve-timestamp \ +\--owner=skenlon \ +\--group=dialout \ +\--mode=666 example/foo . +$ ls -li +7476869 -rw-rw-rw-. 1 skenlon dialout 29545 Aug  2 07:28 foo +$ trash example/foo +``` + +### Move, copy, and remove + +Files contain data, and the really important files contain _your_ data. Learning to manage them wisely is important, and now you have the toolkit to ensure that your data is handled in exactly the way you want. + +Do you have a different way of managing your data? Tell us your ideas in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/moving-files-linux-without-mv + +作者:[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/sethhttps://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://opensource.com/article/18/11/partition-format-drive-linux#what-is-a-filesystem +[3]: https://opensource.com/article/19/7/master-ls-command +[4]: https://gitlab.com/trashy +[5]: https://opensource.com/article/19/8/linux-permissions-101#umask +[6]: https://opensource.com/article/19/2/getting-started-cat-command +[7]: https://opensource.com/article/19/5/advanced-rsync +[8]: https://opensource.com/article/17/1/rsync-backup-linux From 5cbedabd4c0de39ef384d042f6ad16bf78ad3a9c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 01:03:47 +0800 Subject: [PATCH 592/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20Breakt?= =?UTF-8?q?hroughs=20bring=20a=20quantum=20Internet=20closer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190820 Breakthroughs bring a quantum Internet closer.md --- ...hroughs bring a quantum Internet closer.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/talk/20190820 Breakthroughs bring a quantum Internet closer.md diff --git a/sources/talk/20190820 Breakthroughs bring a quantum Internet closer.md b/sources/talk/20190820 Breakthroughs bring a quantum Internet closer.md new file mode 100644 index 0000000000..aeaf9a2c15 --- /dev/null +++ b/sources/talk/20190820 Breakthroughs bring a quantum Internet closer.md @@ -0,0 +1,64 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Breakthroughs bring a quantum Internet closer) +[#]: via: (https://www.networkworld.com/article/3432509/breakthroughs-bring-a-quantum-internet-closer.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Breakthroughs bring a quantum Internet closer +====== +Universities around the world are making discoveries that advance technologies needed to underpin quantum computing. +![Getty Images][1] + +Breakthroughs in the manipulation of light are making it more likely that we will, in due course, be seeing a significantly faster and more secure Internet. Adoption of optical circuits in chips, for example, to be driven by [quantum technologies][2] could be just around the corner. + +Physicists at the Technical University of Munich (TUM), have just announced a dramatic leap forward in the methods used to accurately place light sources in atom-thin layers. That fine positioning has been one block in the movement towards quantum chips. + +[See who's creating quantum computers][3] + +“Previous circuits on chips rely on electrons as the information carriers,” [the school explains in a press release][4]. However, by using light instead, it's possible to send data at the faster speed of light, gain power-efficiencies and take advantage of quantum entanglement, where the data is positioned in multiple states in the circuit, all at the same time. + +Roughly, quantum entanglement is highly secure because eavesdropping attempts can not only be spotted immediately anywhere along a circuit, due to the always-intertwined parts, but the keys can be automatically shut down at the same time, thus corrupting visibility for the hacker. + +The school says its light-source-positioning technique, using a three-atom-thick layer of the semiconductor molybdenum disulfide (MoS2) as the initial material and then irradiating it with a helium ion beam, controls the positioning of the light source better, in a chip, than has been achieved before. + +They say that the precision now opens the door to quantum sensor chips for smartphones, and also “new encryption technologies for data transmission.” Any smartphone sensor also has applications in IoT. + +The TUM quantum-electronics breakthrough is just one announced in the last few weeks. Scientists at Osaka University say they’ve figured a way to get information that’s encoded in a laser-beam to translate to a spin state of an electron in a quantum dot. They explain, [in their release][5], that they solve an issue where entangled states can be extremely fragile, in other words, petering out and not lasting for the required length of transmission. Roughly, they explain that their invention allows electron spins in distant, terminus computers to interact better with the quantum-data-carrying light signals. + +“The achievement represents a major step towards a ‘quantum internet,’ the university says. + +“There are those who think all computers, and other electronics, will eventually be run on light and forms of photons, and that we will see a shift to all-light,” [I wrote earlier this year][6]. + +That movement is not slowing. Unrelated to the aforementioned quantum-based light developments, we’re also seeing a light-based thrust that can be used in regular electronics too. + +Engineers may soon be designing with small photon diodes (not traditional LEDs, which are also diodes) that would allow light to flow in one direction only, [says Stanford University in a press release][7]. They are using materials science and have figured a way to trap light in nano-sized silicon. Diodes are basically a valve that stops electrical circuits running in reverse. Light-based diodes, for direction, haven’t been available in small footprints, such as would be needed in smartphone-sized form factors, or IoT sensing, for example. + +“One grand vision is to have an all-optical computer where electricity is replaced completely by light and photons drive all information processing,” Mark Lawrence of Stanford says. “The increased speed and bandwidth of light would enable faster solutions.” + +Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3432509/breakthroughs-bring-a-quantum-internet-closer.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://images.idgesg.net/images/article/2018/08/3_nodes-and-wires_servers_hardware-100769198-large.jpg +[2]: https://www.networkworld.com/article/3275367/what-s-quantum-computing-and-why-enterprises-need-to-care.html +[3]: https://www.networkworld.com/article/3275385/who-s-developing-quantum-computers.html +[4]: https://www.tum.de/nc/en/about-tum/news/press-releases/details/35627/ +[5]: https://resou.osaka-u.ac.jp/en/research/2019/20190717_1 +[6]: https://www.networkworld.com/article/3338081/light-based-computers-to-be-5000-times-faster.html +[7]: https://news.stanford.edu/2019/07/24/developing-technologies-run-light/ +[8]: https://www.facebook.com/NetworkWorld/ +[9]: https://www.linkedin.com/company/network-world From beb60cf90229513816a791b5616ed936eb9ada7f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Aug 2019 01:04:23 +0800 Subject: [PATCH 593/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190820=20A=20gu?= =?UTF-8?q?ided=20tour=20of=20Linux=20file=20system=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190820 A guided tour of Linux file system types.md --- ... guided tour of Linux file system types.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20190820 A guided tour of Linux file system types.md diff --git a/sources/tech/20190820 A guided tour of Linux file system types.md b/sources/tech/20190820 A guided tour of Linux file system types.md new file mode 100644 index 0000000000..750394631a --- /dev/null +++ b/sources/tech/20190820 A guided tour of Linux file system types.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A guided tour of Linux file system types) +[#]: via: (https://www.networkworld.com/article/3432990/a-guided-tour-of-linux-file-system-types.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +A guided tour of Linux file system types +====== +Linux file systems have evolved over the years, and here's a look at file system types +![Andreas Lehner / Flickr \(CC BY 2.0\)][1] + +While it may not be obvious to the casual user, Linux file systems have evolved significantly over the last decade or so to make them more resistant to corruption and performance problems. + +Most Linux systems today use a file system type called **ext4**. The “ext” part stands for “extended” and the 4 indicates that this is the 4th generation of this file system type. Features added over time include the ability to provide increasingly larger file systems (currently as large as 1,000,000 TiB) and much larger files (up to 16 TiB), more resistance to system crashes and less fragmentation (scattering single files as chunks in multiple locations) which improves performance. + +The **ext4** file system type also came with other improvements to performance, scalability and capacity. Metadata and journal checksums were implemented for reliability. Timestamps now track changes down to nanoseconds for better file time-stamping (e.g., file creation and last updates). And, with two additional bits in the timestamp field, the year 2038 problem (when the digitally stored date/time fields will roll over from maximum to zero) has been put off for more than 400 years (to 2446). + +### File system types + +To determine the type of file system on a Linux system, use the **df** command. The **T** option in the command shown below provides the file system type. The **h** makes the disk sizes “human-readable”; in other words, adjusting the reported units (such as M and G) in a way that makes the most sense to the people reading them. + +``` +$ df -hT | head -10 +Filesystem Type Size Used Avail Use% Mounted on +udev devtmpfs 2.9G 0 2.9G 0% /dev +tmpfs tmpfs 596M 1.5M 595M 1% /run +/dev/sda1 ext4 110G 50G 55G 48% / +/dev/sdb2 ext4 457G 642M 434G 1% /apps +tmpfs tmpfs 3.0G 0 3.0G 0% /dev/shm +tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock +tmpfs tmpfs 3.0G 0 3.0G 0% /sys/fs/cgroup +/dev/loop0 squashfs 89M 89M 0 100% /snap/core/7270 +/dev/loop2 squashfs 142M 142M 0 100% /snap/hexchat/42 +``` + +Notice that the **/** (root) and **/apps** file systems are both **ext4** file systems while **/dev** is a **devtmpfs** file system – one with automated device nodes populated by the kernel. Some of the other file systems shown are **tmpfs** – temporary file systems that reside in memory and/or swap partitions and **squashfs** – file systems that are read-only compressed file systems and are used for snap packages. + +There's also proc file systems that stores information on running processes. + +``` +$ df -T /proc +Filesystem Type 1K-blocks Used Available Use% Mounted on +proc proc 0 0 0 - /proc +``` + +There are a number of other file system types that you might encounter as you're moving around the overall file system. When you've moved into a directory, for example, and want to ask about the related file system, you can run a command like this: + +``` +$ cd /dev/mqueue; df -T . +Filesystem Type 1K-blocks Used Available Use% Mounted on +mqueue mqueue 0 0 0 - /dev/mqueue +$ cd /sys; df -T . +Filesystem Type 1K-blocks Used Available Use% Mounted on +sysfs sysfs 0 0 0 - /sys +$ cd /sys/kernel/security; df -T . +Filesystem Type 1K-blocks Used Available Use% Mounted on +securityfs securityfs 0 0 0 - /sys/kernel/security +``` + +As with other Linux commands, the . in these commands refers to the current location in the overall file system. + +These and other unique file-system types provide some special functions. For example, securityfs provides file system support for security modules. + +Linux file systems need to be resistant to corruption, have the ability to survive system crashes and provide fast and reliable performance. The improvements provided by the generations of **ext** file systems and the new generation on purpose-specific file system types have made Linux systems easier to manage and more reliable. + +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/3432990/a-guided-tour-of-linux-file-system-types.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://images.idgesg.net/images/article/2019/08/guided-tour-on-the-flaker_people-in-horse-drawn-carriage_germany-by-andreas-lehner-flickr-100808681-large.jpg +[2]: https://www.facebook.com/NetworkWorld/ +[3]: https://www.linkedin.com/company/network-world From c2a15c9fec9b2a09b8d51ab7e3d275b75c3a9727 Mon Sep 17 00:00:00 2001 From: Liwen Jiang Date: Wed, 21 Aug 2019 14:05:49 -0500 Subject: [PATCH 594/951] Apply for Translating Apply for Translating --- sources/tech/20190809 Copying files in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190809 Copying files in Linux.md b/sources/tech/20190809 Copying files in Linux.md index 04d20e3baa..981f989430 100644 --- a/sources/tech/20190809 Copying files in Linux.md +++ b/sources/tech/20190809 Copying files in Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (tomjlw) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -206,7 +206,7 @@ via: https://opensource.com/article/19/8/copying-files-linux 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[tomjlw](https://github.com/tomjlw) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dff742b0b0d0c046ac7a355d7b4c8a5a8a49967a Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 22 Aug 2019 08:51:02 +0800 Subject: [PATCH 595/951] translated --- ... (rc--1908)- VirtualBox Error In Ubuntu.md | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) rename {sources => translated}/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md (63%) diff --git a/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md b/translated/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md similarity index 63% rename from sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md rename to translated/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md index 9f977842f4..b7eddc11fb 100644 --- a/sources/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md +++ b/translated/tech/20190815 How To Fix -Kernel driver not installed (rc--1908)- VirtualBox Error In Ubuntu.md @@ -7,10 +7,10 @@ [#]: via: (https://www.ostechnix.com/how-to-fix-kernel-driver-not-installed-rc-1908-virtualbox-error-in-ubuntu/) [#]: author: (sk https://www.ostechnix.com/author/sk/) -How To Fix “Kernel driver not installed (rc=-1908)” VirtualBox Error In Ubuntu +如何在 Ubuntu 中修复 VirtualBox 的 “Kernel driver not installed (rc=-1908)” 错误 ====== -I use Oracle VirtualBox to test various Linux and Unix distributions. I’ve tested hundred of virtual machines in VirtualBox so far. Today, I started Ubuntu 18.04 server VM in my Ubuntu 18.04 desktop and I got the following error. +我使用 Oracle VirtualBox 来测试各种 Linux 和 Unix 发行版。到目前为止,我已经在 VirtualBox 中测试了上百个虚拟机。今天,我在我的 Ubuntu 18.04 桌面上启动了 Ubuntu 18.04 服务器版虚拟机,我收到了以下错误。 ``` Kernel driver not installed (rc=-1908) @@ -26,9 +26,9 @@ where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support d ![][2] -“Kernel driver not installed (rc=-1908)” Error in Ubuntu +Ubuntu 中的 “Kernel driver not installed (rc=-1908)” 错误 -I clicked OK to close the message box and and I saw another one in the background. +我点击了 OK 关闭消息框,然后在后台看到了另一条消息。 ``` Failed to open a session for the virtual machine Ubuntu 18.04 LTS Server. @@ -45,45 +45,35 @@ IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89} ![][3] -The virtual machine has terminated unexpectedly during startup with exit code 1 (0x1) +启动期间虚拟机意外终止,退出代码为 1(0x1) -I didn’t know what to do first. I ran the following command to check if it helps. +我不知道该先做什么。我运行以下命令来检查是否有用。 ``` $ sudo modprobe vboxdrv ``` -And, I got this error. +我收到了这个错误: ``` modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.0.0-23-generic ``` -After carefully reading the both error messages, I realized that I should update the Virtualbox application. +仔细阅读这两个错误消息后,我意识到我应该更新 Virtualbox 程序。 -If you ever run into this error in Ubuntu and its variants like Linux Mint, all you have to do is just reinstall or update the **“virtualbox-dkms”** package using command: +如果你在 Ubuntu 及其衍生版(如 Linux Mint)中遇到此错误,你只需使用以下命令重新安装或更新 **“virtualbox-dkms”** 包: ``` $ sudo apt install virtualbox-dkms ``` -Or, it is much better to update the whole system: +或者,最好更新整个系统: ``` $ sudo apt upgrade ``` -Now the error has gone and I could start VMs from VirtualBox without any issues. - -* * * - -**Related read:** - - * [**Solve “Result Code: NS_ERROR_FAILURE (0x80004005)” VirtualBox Error In Arch Linux**][4] - - - -* * * +错误消失了,我可以正常在 VirtualBox 中启动虚拟机了。 -------------------------------------------------------------------------------- @@ -91,7 +81,7 @@ via: https://www.ostechnix.com/how-to-fix-kernel-driver-not-installed-rc-1908-vi 作者:[sk][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 f4b3b6bc55012decd99a388737717d9b834e02ea Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 22 Aug 2019 09:12:20 +0800 Subject: [PATCH 596/951] translating --- ...d The Linux Distribution Name, Version And Kernel Details.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md b/sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md index b7f481bcb4..874f68e181 100644 --- a/sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md +++ b/sources/tech/20190805 Find The Linux Distribution Name, Version And Kernel Details.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 328ab47314bf3a81930ef04483b9613c0e5e0dc7 Mon Sep 17 00:00:00 2001 From: beamrolling <33046439+beamrolling@users.noreply.github.com> Date: Thu, 22 Aug 2019 17:50:49 +0800 Subject: [PATCH 597/951] Finish Translating. --- ...tion into a career as a DevOps engineer.md | 102 ------------------ ...tion into a career as a DevOps engineer.md | 101 +++++++++++++++++ 2 files changed, 101 insertions(+), 102 deletions(-) delete mode 100644 sources/talk/20190725 How to transition into a career as a DevOps engineer.md create mode 100644 translated/talk/20190725 How to transition into a career as a DevOps engineer.md diff --git a/sources/talk/20190725 How to transition into a career as a DevOps engineer.md b/sources/talk/20190725 How to transition into a career as a DevOps engineer.md deleted file mode 100644 index 05ae0f717e..0000000000 --- a/sources/talk/20190725 How to transition into a career as a DevOps engineer.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (beamrolling) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to transition into a career as a DevOps engineer) -[#]: via: (https://opensource.com/article/19/7/how-transition-career-devops-engineer) -[#]: author: (Conor Delanbanque https://opensource.com/users/cdelanbanquehttps://opensource.com/users/daniel-ohhttps://opensource.com/users/herontheclihttps://opensource.com/users/marcobravohttps://opensource.com/users/cdelanbanque) - -How to transition into a career as a DevOps engineer -====== -Whether you're a recent college graduate or a seasoned IT pro looking to -advance your career, these tips can help you get hired as a DevOps -engineer. -![technical resume for hiring new talent][1] - -DevOps engineering is a hot career with many rewards. Whether you're looking for your first job after graduating or seeking an opportunity to reskill while leveraging your prior industry experience, this guide should help you take the right steps to become a [DevOps engineer][2]. - -### Immerse yourself - -Begin by learning the fundamentals, practices, and methodologies of [DevOps][3]. Understand the "why" behind DevOps before jumping into the tools. A DevOps engineer's main goal is to increase speed and maintain or improve quality across the entire software development lifecycle (SDLC) to provide maximum business value. Read articles, watch YouTube videos, and go to local Meetup groups or conferences—become part of the welcoming DevOps community, where you'll learn from the mistakes and successes of those who came before you. - -### Consider your background - -If you have prior experience working in technology, such as a software developer, systems engineer, systems administrator, network operations engineer, or database administrator, you already have broad insights and useful experience for your future role as a DevOps engineer. If you're just starting your career after finishing your degree in computer science or any other STEM field, you have some of the basic stepping-stones you'll need in this transition. - -The DevOps engineer role covers a broad spectrum of responsibilities. Following are the three ways enterprises are most likely to use them: - - * **DevOps engineers with a dev bias** work in a software development role building applications. They leverage continuous integration/continuous delivery (CI/CD), shared repositories, cloud, and containers as part of their everyday work, but they are not necessarily responsible for building or implementing tooling. They understand infrastructure and, in a mature environment, will be able to push their own code into production. - * **DevOps engineers with an ops bias** could be compared to systems engineers or systems administrators. They understand software development but do not spend the core of their day building applications. Instead, they are more likely to be supporting software development teams to automate manual processes and increase efficiencies across human and technology systems. This could mean breaking down legacy code and using less cumbersome automation scripts to run the same commands, or it could mean installing, configuring, or maintaining infrastructure and tooling. They ensure the right tools are installed and available for any teams that need them. They also help to enable teams by teaching them how to leverage CI/CD and other DevOps practices. - * **Site reliability engineers (SRE)** are like software engineers that solve operations and infrastructure problems. SREs focus on creating scalable, highly available, and reliable software systems. - - - -In the ideal world, DevOps engineers will understand all of these areas; this is typical at mature technology companies. However, DevOps roles at top-tier banks and many Fortune 500 companies usually have biases towards dev or ops. - -### Technologies to learn - -DevOps engineers need to know a wide spectrum of technologies to do their jobs effectively. Whatever your background, start with the fundamental technologies you'll need to use and understand as a DevOps engineer. - -#### Operating systems - -The operating system is where everything runs, and having fundamental knowledge is important. [Linux is the operating system][4] you'll most likely use daily, although some organizations use Windows. To get started, you can install Linux at home, where you'll be able to break as much as you want and learn along the way. - -#### Scripting - -Next, pick a language to learn for scripting purposes. There are many to choose from ranging from Python, Go, Java, Bash, PowerShell, Ruby, and C/C++. I suggest [starting with Python][5]; it's one of the most popular for a reason, as it's relatively easy to learn and interpret. Python is often written to follow the fundamentals of object-oriented programming (OOP) and can be used for web development, software development, and creating desktop GUI and business applications. - -#### Cloud - -After [Linux][4] and [Python][5], I think the next thing to study is cloud computing. Infrastructure is no longer left to the "operations guys," so you'll need some exposure to a cloud platform such as Amazon Web Services, Azure, or Google Cloud Platform. I'd start with AWS, as it has an extensive collection of free learning tools that can take you down any track from using AWS as a developer, to operations, and even business-facing components. In fact, you might become overwhelmed by how much is on offer. Consider starting with EC2, S3, and VPC, and see where you want to go from there. - -#### Programming languages - -If you come to DevOps with a passion for software development, keep on improving your programming skills. Some good and commonly used languages in DevOps are the same as you would for scripting: Python, Go, Java, Bash, PowerShell, Ruby, and C/C++. You should also become familiar with Jenkins and Git/GitHub, which you'll use frequently within the CI/CD process. - -#### Containers - -Finally, start learning about [containerizing cod][6]e using tools such as Docker and orchestration platforms such as Kubernetes. There are extensive learning resources available for free online, and most cities will have local Meetup groups where you can learn from experienced people in a friendly environment (with pizza and beer!). - -#### What else? - -If you have less experience in development, you can still [get involved in DevOps][3] by applying your passion for automation, increasing efficiency, collaborating with others, and improving your work. I would still suggest learning the tooling described above, but with less emphasis on the coding/scripting languages. It will be useful to learn about Infrastructure-as-a-Service, Platform-as-a-Service, cloud platforms, and Linux. You'll likely be setting up the tools and learning how to build systems that are resilient and fault-tolerant, leveraging them while writing code. - -### Finding a DevOps job - -The job search process will differ depending on whether you've been working in tech and are moving into DevOps or you're a recent graduate beginning your career. - -#### If you're already working in technology - -If you're transitioning from one tech field into a DevOps role, start by exploring opportunities within your current company. Can you reskill by working with another team? Try to shadow other team members, ask for advice, and acquire new skills without leaving your current job. If this isn't possible, you may need to move to another company. If you can learn some of the practices, tools, and technologies listed above, you'll be in a good position to demonstrate relevant knowledge during interviews. The key is to be honest and not set yourself up for failure. Most hiring managers understand that you don't know all the answers; if you can show what you've been learning and explain that you're open to learning more, you should have a good chance to land a DevOps job. - -#### If you're starting your career - -Apply to open opportunities at companies hiring junior DevOps engineers. Unfortunately, many companies say they're looking for more experience and recommend you re-apply when you've gained some. It's the typical, frustrating scenario of "we want more experience," but nobody seems willing to give you the first chance. - -It's not all gloomy though; some companies focus on training and upskilling graduates directly out of the university. For example, [MThree][7], where I work, hires fresh graduates and trains them for eight weeks. When they complete training, participants have solid exposure to the entire SDLC and a good understanding of how it applies in a Fortune 500 environment. Graduates are hired as junior DevOps engineers with MThree's client companies—MThree pays their full-time salary and benefits for the first 18 to 24 months, after which they join the client as direct employees. This is a great way to bridge the gap from the university into a technology career. - -### Summary - -There are many ways to transition to become a DevOps engineer. It is a very rewarding career route that will likely keep you engaged and challenged—and increase your earning potential. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/how-transition-career-devops-engineer - -作者:[Conor Delanbanque][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/cdelanbanquehttps://opensource.com/users/daniel-ohhttps://opensource.com/users/herontheclihttps://opensource.com/users/marcobravohttps://opensource.com/users/cdelanbanque -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/hiring_talent_resume_job_career.png?itok=Ci_ulYAH (technical resume for hiring new talent) -[2]: https://opensource.com/article/19/7/devops-vs-sysadmin -[3]: https://opensource.com/resources/devops -[4]: https://opensource.com/resources/linux -[5]: https://opensource.com/resources/python -[6]: https://opensource.com/article/18/8/sysadmins-guide-containers -[7]: https://www.mthreealumni.com/ diff --git a/translated/talk/20190725 How to transition into a career as a DevOps engineer.md b/translated/talk/20190725 How to transition into a career as a DevOps engineer.md new file mode 100644 index 0000000000..9735ee727c --- /dev/null +++ b/translated/talk/20190725 How to transition into a career as a DevOps engineer.md @@ -0,0 +1,101 @@ +[#]: collector: (lujun9972) +[#]: translator: (beamrolling) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to transition into a career as a DevOps engineer) +[#]: via: (https://opensource.com/article/19/7/how-transition-career-devops-engineer) +[#]: author: (Conor Delanbanque https://opensource.com/users/cdelanbanquehttps://opensource.com/users/daniel-ohhttps://opensource.com/users/herontheclihttps://opensource.com/users/marcobravohttps://opensource.com/users/cdelanbanque) + +如何转职为 DevOps 工程师 +====== +无论你是刚毕业的大学生,还是想在职业中寻求进步的经验丰富的 IT 专家,这些提示都可以帮你成为 DevOps 工程师。 + +![technical resume for hiring new talent][1] + +DevOps 工程是一个备受称赞的热门职业。不管你是刚毕业正在找第一份工作,还是在利用之前的行业经验的同时寻求学习新技能的机会,本指南都能帮你通过正确的步骤成为[ DevOps 工程师][2]. + +### 让自己沉浸其中 + +首先学习 [DevOps][3] 的基本原理,实践以及方法。在使用工具之前,先了解 DevOps 背后的“为什么”。DevOps 工程师的主要目标是在整个软件开发生命周期(SDLC)中提高速度并保持或提高质量,以提供最大的业务价值。阅读文章,观看 YouTube 视频,参加当地小组聚会或者会议 — 成为热情的 DevOps 社区中的一员,在那里你将从先行者的错误和成功中学习。 + +### 考虑你的背景 + +如果你有从事技术工作的经历,例如软件开发人员,系统工程师,系统管理员,网络运营工程师或者数据库管理员,那么你已经拥有了广泛的见解和有用的经验,它们可以帮助你在未来成为 DevOps 工程师。如果你在完成计算机科学或任何其他 STEM(译者注,STEM 是科学 Science,技术 Technology,工程 Engineering 和数学 Math四个学科的首字母缩略字)领域的学业后刚开始职业生涯,那么你将拥有在这个过渡期间需要的一些基本踏脚石。 + +DevOps 工程师的角色涵盖了广泛的职责。以下是企业最有可能使用他们的三种方向: + +* **偏向于开发(Dev)的 DevOps 工程师**在构建应用中扮演软件开发的角色。他们日常工作的一部分是利用持续集成 / 持续交付(CI/CD),共享仓库,云和容器,但他们不一定负责构建或实施工具。他们了解基础架构,并且在成熟的环境中,能将自己的代码推向生产环境。 +* **偏向于运维技术(Ops)的 DevOps 工程师**可以与系统工程师或系统管理员进行比较。他们了解软件的开发,但并不会把一天的重心放在构建应用上。相反,他们更有可能支持软件开发团队将手动流程自动化的过程,并提高人员和技术系统的效率。这可能意味着分解遗留代码并用较少繁琐的自动化脚本来运行相同的命令,或者可能意味着安装,配置或维护基础结构和工具。他们确保为任何有需要的团队安装可使用的工具。他们也会通过教授如何利用 CI / CD 和其他 DevOps 实践来帮助团队。 +* **网站可靠性工程师(SRE)** 就像解决运维和基础设施的软件工程师。SRE 专注于创建可扩展,高度可用且可靠的软件系统。 + + + +在理想的世界中,DevOps 工程师将了解以上所有领域;这在成熟的科技公司中很常见。然而,顶级银行和许多财富 500 强企业的 DevOps 职位通常会偏向开发(Dev)或运营(Ops)。 + +### 要学习的技术 + +DevOps 工程师需要了解各种技术才能有效完成工作。无论你的背景如何,请从作为 DevOps 工程师使用和理解的基础技术入手。 + +#### 操作系统 + +操作系统是所有东西运行的地方,拥有相关的基础知识十分重要。 [Linux ][4]是你最有可能每天使用的操作系统,尽管有的组织会使用 Windows 操作系统。要开始使用,你可以在家中安装 Linux,在那里你可以随心所欲地打破并学习。 + +#### 脚本 + +接下来,选择一门语言来学习脚本。有很多语言可供选择,包括 Python,Go,Java,Bash,PowerShell,Ruby,和 C / C++。我建议[从 Python 开始][5],因为它相对容易学习和解释,是最受欢迎的语言之一。Python 通常是为了遵循面向对象编程(OOP)的基础而写的,可用于 Web 开发,软件开发以及创建桌面 GUI 和业务应用程序。 + +#### 云 + +学习了 [Linux][4] 和 [Python][5] 之后,我认为下一个该学习的是云计算。基础设施不再只是“运维小哥”的事情了,因此你需要接触云平台,例如 AWS 云服务,Azure 或者谷歌云平台。我会从 AWS 开始,因为它有大量免费学习工具,可以帮助你降低作为开发人员,运维,甚至面向业务的组件的任何障碍。事实上,你可能会被它提供的东西所淹没。考虑从 EC2, S3 和 VPC 开始,然后看看你从其中想学到什么。 + +#### 编程语言 + +如果你带着对软件开发的热情来到 DevOps,请继续提高你的编程技能。DevOps 中的一些优秀和常用语言与脚本相同:Python,Go,Java,Bash,PowerShell,Ruby 和 C / C++。你还应该熟悉 Jenkins 和 Git / Github,你将会在 CI / CD 过程中经常使用到它们。 + +#### 容器 + +最后,使用 Docker 和编排平台(如 Kubernetes)等工具开始学习[容器化][6]。网上有大量的免费学习资源,大多数城市都有本地的线下小组,你可以在友好的环境中向有经验的人学习(还有披萨和啤酒哦!)。 + +#### 其他的呢? + +如果你缺乏开发经验,你依然可以通过对自动化的热情,效率的提高,与他人协作以及改进自己的工作[参与到 DevOps 中][3]来。我仍然建议学习上述工具,但重点不要放在编程 / 脚本语言上。了解基础架构即服务,平台即服务,云平台和 Linux 会非常有用。你可能正在设置工具并学习如何构建有弹性和容错性的系统,并在写代码时利用它们。 + +### 找一份 DevOps 的工作 + +求职过程会有所不同,具体取决于你是否一直从事技术工作,并且正在进入 DevOps 领域,或者你是刚开始职业生涯的毕业生。 + +#### 如果你已经从事技术工作 + +如果你正在从一个技术领域转入 DevOps 角色,首先尝试在你当前的公司寻找机会。你可以和其他的团队一起工作吗?尝试影响其他团队成员,寻求建议,并在不离开当前工作的情况下获得新技能。如果做不到这一点,你可能需要换另一家公司。如果你能从上面列出的一些实践,工具和技术中学习,你将能在面试时展示相关知识中占据有利位置。关键是要诚实,不要让自己陷入失败中。大多数招聘主管都了解你不知道所有的答案;如果你能展示你所学到的东西,并解释你愿意学习更多,你应该有机会获得 DevOps 的工作。 + +#### 如果你刚开始职业生涯 + +申请雇用初级 DevOps 工程师的公司的开放机会。不幸的是,许多公司表示他们希望寻找更富有经验的人,并建议你在获得经验后再申请该职位。这是“我们需要经验丰富的人”的典型,令人沮丧的场景,并且似乎没人愿意给你第一次机会。 + +然而,并不是所有求职经历都那么令人沮丧;一些公司专注于培训和提升刚从大学毕业的学生。例如,我工作的 [MThree][7] 聘请来应届毕业生并且对其进行了 8 周的培训。当完成培训后,参与者们可以充分了解到整个 SDLC,并很好地了解它在财富 500 强公司相关环境中的应用。毕业生被聘为 MThree 的客户公司的初级 DevOps 工程师 — MThree 在前 18 - 24 个月内支付全职工资和福利,之后他们将作为直接雇员加入客户。这是弥合从大学到技术职业的间隙的好方法。 + +### 总结 + +转换成 DevOps 工程师的方法有很多种。这是一条非常有益的职业路线,可能会让你保持繁忙和挑战 — 并增加你的收入潜力。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/7/how-transition-career-devops-engineer + +作者:[Conor Delanbanque][a] +选题:[lujun9972][b] +译者:[beamrolling](https://github.com/beamrolling) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/cdelanbanquehttps://opensource.com/users/daniel-ohhttps://opensource.com/users/herontheclihttps://opensource.com/users/marcobravohttps://opensource.com/users/cdelanbanque +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/hiring_talent_resume_job_career.png?itok=Ci_ulYAH (technical resume for hiring new talent) +[2]: https://opensource.com/article/19/7/devops-vs-sysadmin +[3]: https://opensource.com/resources/devops +[4]: https://opensource.com/resources/linux +[5]: https://opensource.com/resources/python +[6]: https://opensource.com/article/18/8/sysadmins-guide-containers +[7]: https://www.mthreealumni.com/ From 62310a8a0bf91835b79398f9021f787a785f2ea3 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 22 Aug 2019 18:15:33 +0800 Subject: [PATCH 598/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars=5F2.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2022=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E5=9B=9B=2018:15:33=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ommand Line Heroes- Season 1- OS Wars_2.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md index 1e674c1b0d..ce6ace888d 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md @@ -11,7 +11,7 @@ ====== Saron Yitbarek: 这玩意开着的吗? 让我们进一段史诗般的星球大战的开幕吧, 开始了. -配音: [00:00:30] 第二集:Linux®的崛起。微软帝国控制着90%的桌面用户。操作系统的全面标准化似乎是板上钉钉的事了。然而,互联网的出现将战争的焦点从桌面转向了企业,在该领域,所有商业组织都争相构建自己的服务器。与此同时,一个不太可能的英雄出现在开源反叛组织中。绝顶聪明,头戴眼镜的Linus Torvalds免费发布了他的Linux系统。微软打了个趔趄-并且开始重组。 +配音: [00:00:30] 第二集:Linux®的崛起。微软帝国控制着90%的桌面用户。操作系统的全面标准化似乎是板上钉钉的事了。然而,互联网的出现将战争的焦点从桌面转向了企业,在该领域,所有商业组织都争相构建自己的服务器。与此同时,一个不太可能的英雄出现在开源反叛组织中。固执,戴着眼镜的Linus Torvalds免费发布了他的Linux系统。微软打了个趔趄-并且开始重组。 Saron Yitbarek: [00:01:00] 哦,我们书呆子就是喜欢那样。上一次我们讲到哪了?苹果和微软互相攻伐,试图在一场争夺桌面用户的战争中占据主导地位。在第一集的结尾,我们看到微软获得了大部分的市场份额。很快,由于互联网的兴起以及随之而来的开发者大军,整个市场都经历了一场地震。互联网将战场从在家庭和办公室中的个人电脑用户转移到拥有数百台服务器的大型商业客户中。 @@ -19,35 +19,35 @@ Saron Yitbarek: [00:01:00] 哦,我们书呆子就是喜欢那样。上一次 在操作系统之战的第二部分,我们将看到优先级的巨大转变,以及像Linus Torvalds和Richard Stallman这样的开源叛逆者是如何成功地在微软和整个软件行业的核心地带引起恐惧的。 -[00:02:00] I'm Saron Yitbarek and you're listening to Command Line Heroes, an original podcast from Red Hat. In each episode, we're bringing you stories about the people who transform technology from the command line up. +[00:02:00] 我是 Saron Yitbarek,您现在收听的是代码英雄,一款红帽公司原创的播客节目. 每一集,我们都会给您带来“从码开始”改变技术的人的故事. -[00:02:30] Okay. Imagine for a second that you're Microsoft in 1991. You're feeling pretty good, right? Pretty confident. Assured global domination feels nice. You've mastered the art of partnering with other businesses, but you're still pretty much cutting out the developers, programmers, and sys admins that are the real foot soldiers out there. There is this Finnish geek named Linus Torvalds. He and his team of open source programmers are starting to put out versions of Linux, this OS kernel that they're duct taping together. +[00:02:30] 好。假设你是1991年的微软。你自我感觉良好,对吧?满怀信心。确定全球主导的地位感觉不错。你已经掌握了与其他企业合作的艺术,但是仍然将大部分开发人员、程序员和系统管理员排除在联盟之外,而他们才是真正的步兵。这是出现了个叫Linus Torvalds的芬兰极客。他和他的开源程序员团队正在开始发布Linux,其操作系统内核是由他们一起编写出来的。 -[00:03:00] If you're Microsoft, frankly, you're not too concerned about Linux or even about open source in general, but eventually, the sheer size of Linux gets so big that it becomes impossible for Microsoft not to notice. The first version comes out in 1991 and it's got maybe 10,000 lines of code. A decade later, there will be three million lines of code. In case you're wondering, today it's at 20 million. +[00:03:00] 坦白地说,如果你是微软公司,你并不会太在意Linux,甚至是一般意义上的开源运动,但是最终,Linux的规模变得如此之大,以至于微软不可能不注意到。Linux第一个版本出现在1991年,当时大概有10000行代码。十年后,变成了300万行代码。如果你想知道,今天则是2000万行代码。 -[00:03:30] For a moment, let's stay in the early 90s. Linux hasn't yet become the behemoth we know now. It's just this strangely viral OS that's creeping across the planet, and the geeks and hackers of the world are falling in love with it. I was too young in those early days, but I sort of wish I'd been there. At that time, discovering Linux was like gaining access to a secret society. Programmers would share the Linux CD set with friends the same way other people would share mixtapes of underground music. +[00:03:30] 让我们停留在90年代初一会儿。那是Linux还没有成为我们现在所知道的庞然大物。只是这个奇怪的病毒式的操作系统正在这个星球上蔓延,全世界的极客和黑客都爱上了它。那时候我还太年轻,但依然希望加入他们。在那个时候,发现Linux就如同进入了一个秘密社会一样。程序员与朋友分享Linux CD集,就像其他人分享地下音乐混音带一样。 -Developer Tristram Oaten [00:03:40] tells the story of how he first encountered Linux when he was 16 years old. +Developer Tristram Oaten [00:03:40] 讲讲了你16岁时第一次接触Linux的故事吧。 -Tristram Oaten: [00:04:00] We went on a scuba diving holiday, my family and I, to Hurghada, which is on the Red Sea. Beautiful place, highly recommend it. The first day, I drank the tap water. Probably, my mom told me not to. I was really sick the whole week — didn't leave the hotel room. All I had with me was a laptop with a fresh install of Slackware Linux, this thing that I'd heard about and was giving it a try. There were no extra apps, just what came on the eight CDs. By necessity, all I had to do this whole week was to get to grips with this alien system. I read man pages, played around with the terminal. I remember not knowing the difference between a single dot, meaning the current directory, and two dots, meaning the previous directory. +Tristram Oaten: [00:04:00] 我和我的家人去了Red Sea上的Hurghada潜水度假。那是一个美丽的地方,强烈推荐。第一天,我喝了自来水。也许,我妈妈跟我说过不要这么做。我整个星期都病得很厉害,没有离开旅馆房间。当时我只带了一台新安装了Slackware Linux的笔记本电脑,我听说过这玩意并且正在尝试使用它。这台笔记本上没有额外的应用程序,只有8张cd。出于必要,整个星期我所做的就是去了解这个外星一般的系统。我阅读手册,摆弄着终端。我记得当时我甚至我不知道一个点(表示当前目录)和两个点(表示前一个目录)之间的区别。 -[00:04:30] I had no clue. I must have made so many mistakes, but slowly, over the course of this forcible solitude, I broke through this barrier and started to understand and figure out what this command line thing was all about. By the end of the holiday, I hadn't seen the pyramids, the Nile, or any Egyptian sites, but I had unlocked one of the wonders of the modern world. I'd unlocked Linux, and the rest is history. +[00:04:30] 我一点头绪都没有。犯过很多错误,但慢慢地,在这种强迫的孤独中,我突破了障碍,开始理解并明白命令行到底是怎么回事。假期结束时,我没有看过金字塔、尼罗河等任何埃及遗址,但我解锁了现代世界的一个奇迹。我解锁了Linux,接下来的事大家都知道了。 -Saron Yitbarek: You can hear some variation on that story from a lot of people. Getting access to that Linux command line was a transformative experience. +Saron Yitbarek: 你可以从很多人那里听到关于这个故事的不同说法。访问Linux命令行是一种革命性的体验。 -David Cantrell: This thing gave me the source code. I was like, "That's amazing." +David Cantrell: 它给了我源代码. 我当时的感觉是, "太神奇了." -Saron Yitbarek: We're at a 2017 Linux developers conference called Flock to Fedora. +Saron Yitbarek: 我们正在参加一个名为Flock to Fedora的2017年Linux开发者大会。 -David Cantrell: ... very appealing. I felt like I had more control over the system and it just drew me in more and more. From there, I guess, after my first Linux kernel compile in 1995, I was hooked, so, yeah. +David Cantrell: ... 非常有吸引力。我觉得我对这个系统有了更多的控制力,它越来越吸引我。我想,从那时起,1995年我第一次编译Linux内核时,我就迷上了它。 -Saron Yitbarek: Developers David Cantrell and Joe Brockmire. +Saron Yitbarek: 开发者 David Cantrell 与 Joe Brockmire. -Joe Brockmeier: I was going through the cheap software and found a four - CD set of Slackware Linux. It sounded really exciting and interesting so I took it home, installed it on a second computer, started playing with it, and really got excited about two things. One was, I was excited not to be running Windows, and I was excited by the open source nature of Linux. +Joe Brockmeier: 我寻遍了便宜软件最终找到一套四张CD的 Slackware Linux. 它看起来来非常令人兴奋而且很有趣,所以我把它带回家,安装在第二台电脑上,开始摆弄它,并为两件事情感到兴奋。一个是,我运行的不是Windows,另一个我Linux的开源特性。 -Saron Yitbarek: [00:06:00] That access to the command line was, in some ways, always there. Decades before open source really took off, there was always a desire to have complete control, at least among developers. Go way back to a time before the OS wars, before Apple and Microsoft were fighting over their GUIs. There were command line heroes then, too. Professor Paul Jones is the director of the online library ibiblio.org. He worked as a developer during those early days. +Saron Yitbarek: [00:06:00] 某种程度上来说,对命令行的访问总是存在的。在开源真正开始流行还要早几十年前,人们(至少在开发人员中是这样)总是希望能够做到完全控制。让我们回到操作系统大战之前的那个时代,在苹果和微软他们的GUI而战之前。那时也有代码英雄。保罗·琼斯(Paul Jones)教授(在线图书馆ibiblio.org负责人)在那个古老的时代,就是一名开发人员。 -Paul Jones: [00:07:00] The internet, by its nature, at that time, was less client server, totally, and more peer to peer. We're talking about, really, some sort of VAX to VAX, some sort of scientific workstation, the scientific workstation. That doesn't mean that client and server relationships and applications weren't there, but it does mean that the original design was to think of how to do peer - to - peer things, the opposite of what IBM had been doing, in which they had dumb terminals that had only enough intelligence to manage the user interface, but not enough intelligence to actually let you do anything in the terminal that would expose anything to it. +Paul Jones: [00:07:00] 从本质上讲,互联网在那个时候比较少是客户端-服务器架构的,而是更多是点对点架构的。讲真,当我们说,某种VAX到VAX,某科学工作站,科学工作站。这并不意味着没有客户端与服务端的关系以及没有应用程序,但这的确意味着,最初的设计是思考如何实现点对点,它与IBM一直在做的东西相对立. IBM给你的只有哑终端,这种终端只能让你管理用户界面,却无法让你像真正的终端一样为所欲为。 Saron Yitbarek: As popular as GUI was becoming among casual users, there was always a pull in the opposite direction for the engineers and developers. Before Linux in the 1970s and 80s, that resistance was there, with EMAX and GNU . W ith Stallman's free software foundation, certain folks were always begging for access to the command line, but it was Linux in the 1990s that delivered like no other. From 2e84e4acff86dd671313e87e23c8f45413ea207c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 22 Aug 2019 21:59:09 +0800 Subject: [PATCH 599/951] Rename sources/tech/20190820 The cloud isn-t killing open source software.md to sources/talk/20190820 The cloud isn-t killing open source software.md --- .../20190820 The cloud isn-t killing open source software.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190820 The cloud isn-t killing open source software.md (100%) diff --git a/sources/tech/20190820 The cloud isn-t killing open source software.md b/sources/talk/20190820 The cloud isn-t killing open source software.md similarity index 100% rename from sources/tech/20190820 The cloud isn-t killing open source software.md rename to sources/talk/20190820 The cloud isn-t killing open source software.md From c00e8fa14537ab98c7236b48e3dd131277b3f17d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 22 Aug 2019 22:01:44 +0800 Subject: [PATCH 600/951] Rename sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md to sources/news/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md --- ...on Kubernetes, diverse automation, and more industry trends.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md (100%) diff --git a/sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md b/sources/news/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md similarity index 100% rename from sources/tech/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md rename to sources/news/20190820 Serverless on Kubernetes, diverse automation, and more industry trends.md From 1cd44fcad003a15b0810e24db20432d49b0dcac6 Mon Sep 17 00:00:00 2001 From: Liwen Jiang Date: Thu, 22 Aug 2019 09:26:16 -0500 Subject: [PATCH 601/951] Submit for Review Submit for Review --- .../tech/20190809 Copying files in Linux.md | 222 ------------------ .../tech/20190809 Copying files in Linux.md | 219 +++++++++++++++++ 2 files changed, 219 insertions(+), 222 deletions(-) delete mode 100644 sources/tech/20190809 Copying files in Linux.md create mode 100644 translated/tech/20190809 Copying files in Linux.md diff --git a/sources/tech/20190809 Copying files in Linux.md b/sources/tech/20190809 Copying files in Linux.md deleted file mode 100644 index 981f989430..0000000000 --- a/sources/tech/20190809 Copying files in Linux.md +++ /dev/null @@ -1,222 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (tomjlw) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Copying files in Linux) -[#]: via: (https://opensource.com/article/19/8/copying-files-linux) -[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-p) - -Copying files in Linux -====== -Learn multiple ways to copy files on Linux, and the advantages of each. -![Filing papers and documents][1] - -Copying documents used to require a dedicated staff member in offices, and then a dedicated machine. Today, copying is a task computer users do without a second thought. Copying data on a computer is so trivial that copies are made without you realizing it, such as when dragging a file to an external drive. - -The concept that digital entities are trivial to reproduce is pervasive, so most modern computerists don’t think about the options available for duplicating their work. And yet, there are several different ways to copy a file on Linux. Each method has nuanced features that might benefit you, depending on what you need to get done. - -Here are a number of ways to copy files on Linux, BSD, and Mac. - -### Copying in the GUI - -As with most operating systems, you can do all of your file management in the GUI, if that's the way you prefer to work. - -Drag and drop - -The most obvious way to copy a file is the way you’re probably used to copying files on computers: drag and drop. On most Linux desktops, dragging and dropping from one local folder to another local folder _moves_ a file by default. You can change this behavior to a copy operation by holding down the **Ctrl** key after you start dragging the file. - -Your cursor may show an indicator, such as a plus sign, to show that you are in copy mode: - -![Copying a file.][2] - -Note that if the file exists on a remote system, whether it’s a web server or another computer on your own network that you access through a file-sharing protocol, the default action is often to copy, not move, the file. - -#### Right-click - -If you find dragging and dropping files around your desktop imprecise or clumsy, or doing so takes your hands away from your keyboard too much, you can usually copy a file using the right-click menu. This possibility depends on the file manager you use, but generally, a right-click produces a contextual menu containing common actions. - -The contextual menu copy action stores the [file path][3] (where the file exists on your system) in your clipboard so you can then _paste_ the file somewhere else: - -![Copying a file from the context menu.][4] - -In this case, you’re not actually copying the file’s contents to your clipboard. Instead, you're copying the [file path][3]. When you paste, your file manager looks at the path in your clipboard and then runs a copy command, copying the file located at that path to the path you are pasting into. - -### Copying on the command line - -While the GUI is a generally familiar way to copy files, copying in a terminal can be more efficient. - -#### cp - -The obvious terminal-based equivalent to copying and pasting a file on the desktop is the **cp** command. This command copies files and directories and is relatively straightforward. It uses the familiar _source_ and _target_ (strictly in that order) syntax, so to copy a file called **example.txt** into your **Documents** directory: - - -``` -$ cp example.txt ~/Documents -``` - -Just like when you drag and drop a file onto a folder, this action doesn’t replace **Documents** with **example.txt**. Instead, **cp** detects that **Documents** is a folder, and places a copy of **example.txt** into it. - -You can also, conveniently (and efficiently), rename the file as you copy it: - - -``` -$ cp example.txt ~/Documents/example_copy.txt -``` - -That fact is important because it allows you to make a copy of a file in the same directory as the original: - - -``` -$ cp example.txt example.txt -cp: 'example.txt' and 'example.txt' are the same file. -$ cp example.txt example_copy.txt -``` - -To copy a directory, you must use the **-r** option, which stands for --**recursive**. This option runs **cp** on the directory _inode_, and then on all files within the directory. Without the **-r** option, **cp** doesn’t even recognize a directory as an object that can be copied: - - -``` -$ cp notes/ notes-backup -cp: -r not specified; omitting directory 'notes/' -$ cp -r notes/ notes-backup -``` - -#### cat - -The **cat** command is one of the most misunderstood commands, but only because it exemplifies the extreme flexibility of a [POSIX][5] system. Among everything else **cat** does (including its intended purpose of con_cat_enating files), it can also copy. For instance, with **cat** you can [create two copies from one file][6] with just a single command. You can’t do that with **cp**. - -The significance of using **cat** to copy a file is the way the system interprets the action. When you use **cp** to copy a file, the file’s attributes are copied along with the file itself. That means that the file permissions of the duplicate are the same as the original: - - -``` -$ ls -l -G -g --rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg -$ cp foo.jpg bar.jpg --rw-r--r--. 1 57368 Jul 29 13:37  bar.jpg --rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg -``` - -Using **cat** to read the contents of a file into another file, however, invokes a system call to create a new file. These new files are subject to your default **umask** settings. To learn more about `umask`, read Alex Juarez’s article covering [umask][7] and permissions in general. - -Run **umask** to get the current settings: - - -``` -$ umask -0002 -``` - -This setting means that new files created in this location are granted **664** (**rw-rw-r--**) permission because nothing is masked by the first digits of the **umask** setting (and the executable bit is not a default bit for file creation), and the write permission is blocked by the final digit. - -When you copy with **cat**, you don’t actually copy the file. You use **cat** to read the contents of the file, and then redirect the output into a new file: - - -``` -$ cat foo.jpg > baz.jpg -$ ls -l -G -g --rw-r--r--. 1 57368 Jul 29 13:37  bar.jpg --rw-rw-r--. 1 57368 Jul 29 13:42  baz.jpg --rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg -``` - -As you can see, **cat** created a brand new file with the system’s default umask applied. - -In the end, when all you want to do is copy a file, the technicalities often don’t matter. But sometimes you want to copy a file and end up with a default set of permissions, and with **cat** you can do it all in one command**.** - -#### rsync - -The **rsync** command is a versatile tool for copying files, with the notable ability to synchronize your source and destination. At its most simple, **rsync** can be used similarly to **cp** command: - - -``` -$ rsync example.txt example_copy.txt -$ ls -example.txt    example_copy.txt -``` - -The command’s true power lies in its ability to _not_ copy when it’s not necessary. If you use **rsync** to copy a file into a directory, but that file already exists in that directory, then **rsync** doesn’t bother performing the copy operation. Locally, that fact doesn’t necessarily mean much, but if you’re copying gigabytes of data to a remote server, this feature makes a world of difference. - -What does make a difference even locally, though, is the command’s ability to differentiate files that share the same name but which contain different data. If you’ve ever found yourself faced with two copies of what is meant to be the same directory, then **rsync** can synchronize them into one directory containing the latest changes from each. This setup is a pretty common occurrence in industries that haven’t yet discovered the magic of version control, and for backup solutions in which there is one source of truth to propagate. - -You can emulate this situation intentionally by creating two folders, one called **example** and the other **example_dupe**: - - -``` -$ mkdir example example_dupe -``` - -Create a file in the first folder: - - -``` -$ echo "one" > example/foo.txt -``` - -Use **rsync** to synchronize the two directories. The most common options for this operation are **-a** (for _archive_, which ensures symlinks and other special files are preserved) and **-v** (for _verbose_, providing feedback to you on the command’s progress): - - -``` -$ rsync -av example/ example_dupe/ -``` - -The directories now contain the same information: - - -``` -$ cat example/foo.txt -one -$ cat example_dupe/foo.txt -one -``` - -If the file you are treating as the source diverges, then the target is updated to match: - - -``` -$ echo "two" >> example/foo.txt -$ rsync -av example/  example_dupe/ -$ cat example_dupe/foo.txt -one -two -``` - -Keep in mind that the **rsync** command is meant to copy data, not to act as a version control system. For instance, if a file in the destination somehow gets ahead of a file in the source, that file is still overwritten because **rsync** compares files for divergence and assumes that the destination is always meant to mirror the source: - - -``` -$ echo "You will never see this note again" > example_dupe/foo.txt -$ rsync -av example/  example_dupe/ -$ cat example_dupe/foo.txt -one -two -``` - -If there is no change, then no copy occurs. - -The **rsync** command has many options not available in **cp**, such as the ability to set target permissions, exclude files, delete outdated files that don’t appear in both directories, and much more. Use **rsync** as a powerful replacement for **cp**, or just as a useful supplement. - -### Many ways to copy - -There are many ways to achieve essentially the same outcome on a POSIX system, so it seems that open source’s reputation for flexibility is well earned. Have I missed a useful way to copy data? Share your copy hacks in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/copying-files-linux - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[tomjlw](https://github.com/tomjlw) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-p -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/documents_papers_file_storage_work.png?itok=YlXpAqAJ (Filing papers and documents) -[2]: https://opensource.com/sites/default/files/uploads/copy-nautilus.jpg (Copying a file.) -[3]: https://opensource.com/article/19/7/understanding-file-paths-and-how-use-them -[4]: https://opensource.com/sites/default/files/uploads/copy-files-menu.jpg (Copying a file from the context menu.) -[5]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[6]: https://opensource.com/article/19/2/getting-started-cat-command -[7]: https://opensource.com/article/19/7/linux-permissions-101 diff --git a/translated/tech/20190809 Copying files in Linux.md b/translated/tech/20190809 Copying files in Linux.md new file mode 100644 index 0000000000..73105ae150 --- /dev/null +++ b/translated/tech/20190809 Copying files in Linux.md @@ -0,0 +1,219 @@ +[#]: collector: (lujun9972) +[#]: translator: (tomjlw) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Copying files in Linux) +[#]: via: (https://opensource.com/article/19/8/copying-files-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-p) + +在 Linux 中复制文档 +====== + +了解在 Linux 中多种复制文档的方式以及各自的优点 +![归档文件][1] + +在办公室里复制文档过去需要专门的员工与机器。如今,复制是电脑用户无需多加思考的任务。在电脑里复制数据是如此微不足道的事以致于你还没有意识到复制就发生了,例如当拖动文档到外部硬盘的时候。 + +数字实体复制起来十分简单已是一个不争的事实,以致于大部分现代电脑用户未去考虑其它复制他们工作的可选方式。尽管如此,在 Linux 中复制文档仍有几种不同的方式。每种方法取决于你的目的不同都有其独到之处。 + +以下是一系列在 Linux,BSD 及 Mac 上复制文件的方式。 + +### 在 GUI 中复制 +如大多数操纵系统一样,如果你想的话,你可以完全用 GUI 来管理文件。 + +拖拽放下 + +复制文件最浅显的方式可能就是你在电脑中用来复制文件的方式:拖拽并放下。在大多数 Linux 桌面上,从一个本地文件夹拖拽放下到另一个本地文件夹是_移动_文件的默认方式/你可以通过在拖拽文件后按住 **Ctrl** 到复制区域改变这个行为。 + +你的鼠标指针可能会有一个指示,例如一个加号以显示你在复制模式。 + +![复制一个文件。][2] + +注意如果文件在原创系统上存在,不管它是一个网页服务器或者你自己网络里的用文件共享协议访问另一台电脑,默认动作经常是复制而不是移动文件。 + +### 右击 + +如果你觉得在你的桌面拖拽文档不够精准或者臃肿,或者这么做让你的手离开键盘太多,你可以经常使用右键菜单复制文件。这取决于你所用的文件管理器,但通常来说,右键产生的相关菜单会包括常见的操作。 + +相关菜单的复制动作将你的[文件路径][3](文件在系统的位置)保存在你的剪切板中,这样你可以将你的文件 _粘贴_ 到别处: + + +![从相关菜单复制文件][4] + +在这种情况下,你并没有将文件的内容复制到你的剪切版上。取而代之的是你复制了[文件路径][3]。当你粘贴时,你的文件管理器查看剪贴板上的路径并执行复制命令,将相应路径上的文件粘贴到你准备拷贝到的路径。 + +### 用命令行复制 + +虽然 GUI 通常是相对熟悉的拷贝文件方式,用终端拷贝却更有效率。 + +#### cp + +基于终端最显而易见的复制拷贝替代物就是 **cp** 命令。这个命令可以拷贝文件和目录,也相对直接。它使用熟悉的 _来源_ 和 _目的_(必须以这样的顺序)句法,因此拷贝一个叫 **example.txt** 的文件到你的 **Documents** 目录就像这样: + +``` +$ cp example.txt ~/Documents +``` + +就像当你拖拽文件放在文件夹里一样,这个动作并不将 **Documents** 替换为 **example.txt**。取而代之的是,**cp** 察觉到 **Documents** 是一个文件夹,就将 **example.txt** 的复件放进去。 + +你同样可以(便捷有效地)重命名你拷贝的文档: + +``` +$ cp example.txt ~/Documents/example_copy.txt +``` + +这很重要因为它使得你可以在于原文件相同的目录中生成一个复件: + +``` +$ cp example.txt example.txt +cp: 'example.txt' and 'example.txt' are the same file. +$ cp example.txt example_copy.txt +``` + +要复制一个目录,你必须使用 **-r** 选项,代表 --**递归式的**。这个选项在目录 _inode_ 中运行 **cp** 命令,然后作用到该目录下的所有文件。没有 **-r** 选项,**cp** 不会将目录当成一个可复制的对象: + +``` +$ cp notes/ notes-backup +cp: -r not specified; omitting directory 'notes/' +$ cp -r notes/ notes-backup +``` + +#### cat + +**cat** 命令是最易被误解的命令,但只是因为它表现了 [POSIX][5] 系统的极致灵活性。在 **cat** 可以做到的所有事情中,也包括拷贝。例如说使用 **cat** 你可以仅用一个命令就[从一个文件创建两个副本][6]。你用 **cp** 无法做到这一点。 + +使用 **cat** 复制文档的重要性在于系统解释该行为的方式。当你使用 **cp** 拷贝文件时,文件的属性跟着文件一起被拷贝。这代表复件的权限和原件一样。 + + +``` +$ ls -l -G -g +-rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg +$ cp foo.jpg bar.jpg +-rw-r--r--. 1 57368 Jul 29 13:37  bar.jpg +-rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg +``` + +然而用 **cat** 将一个文件的内容读取至另一个文件让系统创建了一个新文件。这些新文件取决于你的默认 **umansk** 设置。了解更多关于`umask`,阅读 Alex Juarez 包含 [umask][7] 以及权限概览的文章。 + +运行 **unmask** 获取当前设置: + + +``` +$ umask +0002 +``` + +这个设置代表在该处新创建的文档被给予**664**(**rw-rw-r--**)权限因为 **unmask** 设置的前几位数字没有遮掩任何东西(并且执行数位不是文件创建的默认数位)且写入权限被最终位屏蔽。 + +当你使用 **cat** 拷贝时,你并没有真正拷贝文件。你使用 **cat** 读取文件内容并将输出重新导向一个新文件: + + +``` +$ cat foo.jpg > baz.jpg +$ ls -l -G -g +-rw-r--r--. 1 57368 Jul 29 13:37  bar.jpg +-rw-rw-r--. 1 57368 Jul 29 13:42  baz.jpg +-rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg +``` + +如你所见,**cat** 使用系统默认的 umask 创建了一个全新的文件。 + +最后,当你仅仅想复制一个文件时,这些手段无关紧要。但如果你想以拷贝文件并保持默认权限时,你可以用一个命令 **cat** 完成一切。 + +#### rsync + +有着著名的同步源和目的文件的能力,**rsync** 命令是一个拷贝文件的多才多艺的工具。最为简单的,**rsync** 可以与 **cp** 命令相似般使用。 + + +``` +$ rsync example.txt example_copy.txt +$ ls +example.txt    example_copy.txt +``` + +这个命令真正的威力藏在其能不做不必要的拷贝的能力里。如果你使用 **rsync** 来将文件拷经目录里且其已经存在在该目录里,那么 **rsync** 和普通的拷贝在本地里并无二致。但如果你将从远程服务器拷贝海量数据,这个特性就完全不一样了。 + +甚至在本地中,真正不一样的地方在于它可以分辨具有相同名字但拥有不同数据的文件。如果你曾发现你面对着同一个目录里的两个相同副本时,**rsync** 可以将它们同步至一个包含每个最新修改的目录。这种配置在尚未发现版本控制威力的业界十分常见,同时也作为需要从同一个源拷贝的备选方案。 + +你可以通过创建两个文件夹有意识地模拟这种情况,一个叫做 **example** 另一个叫做 **example_dupe**: + + +``` +$ mkdir example example_dupe +``` + +在第一个文件夹里创建文件: + + +``` +$ echo "one" > example/foo.txt +``` + +用 **rsync** 同步两个目录。这种做法最常见的选项是 **-a**(代表 _archive_,保证符号链接和其它特殊文件保存下来)和 **-v**(代表 _verbose_,向你提供当前命令的进度反馈): + + +``` +$ rsync -av example/ example_dupe/ +``` + +两个目录现在包含同样的信息: + + +``` +$ cat example/foo.txt +one +$ cat example_dupe/foo.txt +one +``` + +如果你当作源的文件发生改变,目的文件也会随之跟新: + + +``` +$ echo "two" >> example/foo.txt +$ rsync -av example/  example_dupe/ +$ cat example_dupe/foo.txt +one +two +``` + +注意 **rsync** 命令是用来复制数据的,而不是充当版本管理系统的。例如假设有一个目的文件比源文件多了改变,那个文件仍将被覆盖因为 **rsync** 比较文件的分歧并假设目的文件总是反映着源文件: + + +``` +$ echo "You will never see this note again" > example_dupe/foo.txt +$ rsync -av example/  example_dupe/ +$ cat example_dupe/foo.txt +one +two +``` + +如果没有改变,那么就不会有拷贝。 + +**rsync** 命令有许多 **cp** 没有的选项,例如查看目标权限,排除文件,删除过时的文件不在两个目录中出现以及更多。使用 **rsync** 作为 **cp** 的强力替代或者有效补充。 + +### 许多拷贝的方式 + +在 POSIX 系统中有许多能够达成同样目的的方式,因此开源的灵活性名副其实。我忘了哪个复制数据的有效方式吗?在评论区分享你的拷贝神技。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/copying-files-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[tomjlw](https://github.com/tomjlw) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-p +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/documents_papers_file_storage_work.png?itok=YlXpAqAJ (Filing papers and documents) +[2]: https://opensource.com/sites/default/files/uploads/copy-nautilus.jpg (Copying a file.) +[3]: https://opensource.com/article/19/7/understanding-file-paths-and-how-use-them +[4]: https://opensource.com/sites/default/files/uploads/copy-files-menu.jpg (Copying a file from the context menu.) +[5]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[6]: https://opensource.com/article/19/2/getting-started-cat-command +[7]: https://opensource.com/article/19/7/linux-permissions-101 From 7c85812ba367c916f94596c0af08021501f9a4a5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:51:31 +0800 Subject: [PATCH 602/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190823=20Four?= =?UTF-8?q?=20Ways=20to=20Check=20How=20Long=20a=20Process=20Has=20Been=20?= =?UTF-8?q?Running=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190823 Four Ways to Check How Long a Process Has Been Running in Linux.md --- ...ong a Process Has Been Running in Linux.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 sources/tech/20190823 Four Ways to Check How Long a Process Has Been Running in Linux.md diff --git a/sources/tech/20190823 Four Ways to Check How Long a Process Has Been Running in Linux.md b/sources/tech/20190823 Four Ways to Check How Long a Process Has Been Running in Linux.md new file mode 100644 index 0000000000..457179609f --- /dev/null +++ b/sources/tech/20190823 Four Ways to Check How Long a Process Has Been Running in Linux.md @@ -0,0 +1,166 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Four Ways to Check How Long a Process Has Been Running in Linux) +[#]: via: (https://www.2daygeek.com/how-to-check-how-long-a-process-has-been-running-in-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Four Ways to Check How Long a Process Has Been Running in Linux +====== + +If you want to figure out how long a process has been running in Linux for some reason. + +Yes, it is possible and can be done with help of ps command. + +It shows, the given process uptime in the form of [[DD-]hh:]mm:ss, in seconds, and exact start date and time. + +There are multiple options are available in ps command to check this. + +Each options comes with different output, which can be used for different purpose. + +``` +# top -b -s -n 1 | grep httpd + +16337 root 20 0 228272 5160 3272 S 0.0 0.1 1:02.27 httpd +30442 apache 20 0 240520 3132 1232 S 0.0 0.1 0:00.00 httpd +30443 apache 20 0 240520 3132 1232 S 0.0 0.1 0:00.00 httpd +30444 apache 20 0 240520 3132 1232 S 0.0 0.1 0:00.00 httpd +30445 apache 20 0 240520 3132 1232 S 0.0 0.1 0:00.00 httpd +30446 apache 20 0 240520 3132 1232 S 0.0 0.1 0:00.00 httpd +``` + +**`Make a note:`**` ` You may think the same details can be found on **[top command output][1]**. No, It shows you the total CPU time the task has used since it started. But it doesn’t include elapsed time. So, don’t confuse on this. + +### What’s ps Command? + +ps stands for processes status, it is display information about the active/running processes on the system. + +It provides a snapshot of the current processes along with detailed information like username, user id, cpu usage, memory usage, process start date and time command name etc. + + * **`etime:`**` ` elapsed time since the process was started, in the form of [[DD-]hh:]mm:ss. + * **`etimes:`**` ` elapsed time since the process was started, in seconds. + + + +To do so, you need to **[find out the PID of a process][2]**, we can easily identify it by using pidof command. + +``` +# pidof httpd + +30446 30445 30444 30443 30442 16337 +``` + +### Method-1: Using etime Option + +Use the ps command with **`etime`**` ` option to get detailed elapsed time. + +``` +# ps -p 16337 -o etime + + ELAPSED +13-13:13:26 +``` + +As per the above output, the httpd process has been running in our server `13 days, 13 hours, 13 mins, and 26 sec`****. + +### Method-2: Using Process Name Instead of Process ID (PID) + +If you want to use process name instead of PID, use the following one. + +``` +# ps -eo pid,etime,cmd | grep httpd | grep -v grep + +16337 13-13:13:39 /usr/sbin/httpd -DFOREGROUND +30442 1-02:59:50 /usr/sbin/httpd -DFOREGROUND +30443 1-02:59:49 /usr/sbin/httpd -DFOREGROUND +30444 1-02:59:49 /usr/sbin/httpd -DFOREGROUND +30445 1-02:59:49 /usr/sbin/httpd -DFOREGROUND +30446 1-02:59:49 /usr/sbin/httpd -DFOREGROUND +``` + +### Method-3: Using etimes Option + +The following command will show you the elapsed time in seconds. + +``` +# ps -p 16337 -o etimes + +ELAPSED +1170810 +``` + +It shows the output in Seconds and you need to convert it as per your requirement. + +``` ++---------------------+-------------------------+ +| Human-Readable time | Seconds | ++---------------------+-------------------------+ +| 1 hour | 3600 seconds | +| 1 day | 86400 seconds | ++---------------------+-------------------------+ +``` + +If you would like to know how many hours the process has been running then use, **[Linux command line calculator][3]**. + +``` +# bc -l + +1170810/3600 +325.22500000000000000000 +``` + +If you would like to know how many days the process has been running then use the following format. + +``` +# bc -l + +1170810/86400 +13.55104166666666666666 +``` + +The above commands doesn’t show you the exact start date of the process and if you want to know those information then you can use the following command. As per the below output the httpd process has been running since **`Aug 05`**. + +``` +# ps -ef | grep httpd + +root 16337 1 0 Aug05 ? 00:01:02 /usr/sbin/httpd -DFOREGROUND +root 24999 24902 0 06:34 pts/0 00:00:00 grep --color=auto httpd +apache 30442 16337 0 Aug18 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND +apache 30443 16337 0 Aug18 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND +apache 30444 16337 0 Aug18 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND +apache 30445 16337 0 Aug18 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND +apache 30446 16337 0 Aug18 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND +``` + +### Method-4: Using proc filesystem (procfs) + +However, the above command doesn’t show you the exact start time of the process and use the following format to check that. As per the below output the httpd process has been running since **`Aug 05 at 17:20`**. + +The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information. + +It’s sometimes referred to as a process information pseudo-file system. It doesn’t contain ‘real’ files but run time system information (e.g. system memory, devices mounted, hardware configuration, etc). + +``` +# ls -ld /proc/16337 + +dr-xr-xr-x. 9 root root 0 Aug 5 17:20 /proc/16337/ +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/how-to-check-how-long-a-process-has-been-running-in-linux/ + +作者:[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/understanding-linux-top-command-output-usage/ +[2]: https://www.2daygeek.com/9-methods-to-check-find-the-process-id-pid-ppid-of-a-running-program-in-linux/ +[3]: https://www.2daygeek.com/linux-command-line-calculator-bc-calc-qalc-gcalccmd/ From 62f04bbc93c1342674a9058d1251dba9306000fb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:51:48 +0800 Subject: [PATCH 603/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190823=20How=20?= =?UTF-8?q?to=20Delete=20Lines=20from=20a=20File=20Using=20the=20sed=20Com?= =?UTF-8?q?mand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md --- ...Lines from a File Using the sed Command.md | 407 ++++++++++++++++++ 1 file changed, 407 insertions(+) create mode 100644 sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md diff --git a/sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md b/sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md new file mode 100644 index 0000000000..83028917fd --- /dev/null +++ b/sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md @@ -0,0 +1,407 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Delete Lines from a File Using the sed Command) +[#]: via: (https://www.2daygeek.com/linux-remove-delete-lines-in-file-sed-command/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +How to Delete Lines from a File Using the sed Command +====== + +Sed command stands for Stream Editor, is used to perform basic text transformations in Linux. + +sed is one of the important command, which plays major role for file manipulation. It can be used to delete or remove specific lines which matches a given pattern. + +Also, it’s used to remove a particular line in a file. + +It’s capable to delete expressions as well from a file, which can be identified by a specifying delimiter (such as a comma, tab, or space). + +There are fifteen examples are listed in this article, which helps you to become a master in sed command. + +If you understand and remember all these commands that can be useful in many ways. Also, it saves lot of time when you have some requirements to perform sed command. + +**`Note:`**` ` Since it’s demonstration purpose so, i use sed command without `-i` option which prints the contents of the file on Linux terminal by removing the lines. + +But, if you would like to remove the lines from the source file in real environment then use `-i` option with sed command. + +To test this, i have created the sed-demo.txt file and added the following contents with line number for better understanding. + +``` +# cat sed-demo.txt + +1 Linux Operating System +2 Unix Operating System +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 1) How to Delete First Line from a File? + +If you would like to delete first line from a file, use the following syntax. + +**`N`**` ` denotes Nth line in a file and d option in sed command is used to delete a line. + +**Syntax:** + +``` +sed 'Nd' file +``` + +The below sed command removes the first line in sed-demo.txt file. + +``` +# sed '1d' sed-demo.txt + +2 Unix Operating System +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 2) How to Delete Last Line from a File? + +If you would like to delete first line from a file, use the following syntax. + +The **`$`**` ` denotes the last line of a file. + +The below sed command removes the last line in sed-demo.txt file. + +``` +# sed '$d' sed-demo.txt + +1 Linux Operating System +2 Unix Operating System +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +``` + +### 3) How to Delete Particular Line from a File? + +The below sed command removes the third line in sed-demo.txt file. + +``` +# sed '3d' sed-demo.txt + +1 Linux Operating System +2 Unix Operating System +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 4) How to Delete Range of Lines from a File? + +The below sed command removes the lines ranging from 5 to 7. + +``` +# sed '5,7d' sed-demo.txt + +1 Linux Operating System +2 Unix Operating System +3 RHEL +4 Red Hat +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 5) How to Delete Multiple Lines from a File? + +The sed command is capable to removes set of given lines. + +In this example, the following sed command removes 1st line, 5th line, 9th line, and last line. + +``` +# sed '1d;5d;9d;$d' sed-demo.txt + +2 Unix Operating System +3 RHEL +4 Red Hat +6 Arch Linux +7 CentOS +8 Debian +``` + +### 5a) How to Delete Lines Other Than the Specified Range from a File? + +Use the following sed command to remove all the lines from the file only except specified range. + +``` +# sed '3,6!d' sed-demo.txt + +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +``` + +### 6) How to Delete Empty or Blank Lines from a File? + +The following sed command removes the empty or blank lines from sed-demo.txt file. + +``` +# sed '/^$/d' sed-demo.txt + +1 Linux Operating System +2 Unix Operating System +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 7) How to Delete Lines That Contain a Pattern from a File? + +The following sed command removes the lines in sed-demo.txt file which match the **`System`**` ` pattern. + +``` +# sed '/System/d' sed-demo.txt + +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 8) How to Delete Lines That Containing One of Multiple Strings from a File? + +The following sed command removes the lines in sed-demo.txt file which match the **`System`**` ` or **`Linux`**` ` pattern. + +``` +# sed '/System\|Linux/d' sed-demo.txt + +3 RHEL +4 Red Hat +5 Fedora +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 9) How to Delete Lines That Begin with Specified Character from a File? + +The following sed command removes all the lines that start with given character. + +To test this, i have created another file called sed-demo-1.txt with following contents. + +``` +# cat sed-demo-1.txt + +Linux Operating System +Unix Operating System +RHEL +Red Hat +Fedora +debian +ubuntu +Arch Linux - 1 +2 - Manjaro +3 4 5 6 +``` + +The following sed command removes all the lines that start with character **`R`**` `. + +``` +# sed '/^R/d' sed-demo-1.txt + +Linux Operating System +Unix Operating System +Fedora +debian +ubuntu +Arch Linux - 1 +2 - Manjaro +3 4 5 6 +``` + +The following sed command removes all the lines that start with character either **`R`**` ` or **`F`**` `. + +``` +# sed '/^[RF]/d' sed-demo-1.txt + +Linux Operating System +Unix Operating System +debian +ubuntu +Arch Linux - 1 +2 - Manjaro +3 4 5 6 +``` + +### 10) How to Delete Lines That End with Specified Character from a File? + +The following sed command removes all the lines that end with character **`m`**` `. + +``` +# sed '/m$/d' sed-demo.txt + +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +The following sed command removes all the lines that end with character either **`x`**` ` or **`m`**` `. + +``` +# sed '/[xm]$/d' sed-demo.txt + +3 RHEL +4 Red Hat +5 Fedora +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 11) How to Delete All Lines That Start with Capital Letters + +Use the following sed command to remove all the lines that start with entirely in capital letters. + +``` +# sed '/^[A-Z]/d' sed-demo-1.txt + +debian +ubuntu +2 - Manjaro +3 4 5 6 +``` + +### 12) How to Delete a Matching Pattern Lines with Specified Range in a File? + +The below sed command removes the pattern **`Linux`**` ` only if it is present in the lines from 1 to 6. + +``` +# sed '1,6{/Linux/d;}' sed-demo.txt + +2 Unix Operating System +3 RHEL +4 Red Hat +5 Fedora +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 13) How to Delete Pattern Matching Line and also the Next Line? + +Use the following sed command to delete the line which containing the pattern ‘System’ and also the next line. + +``` +# sed '/System/{N;d;}' sed-demo.txt + +3 RHEL +4 Red Hat +5 Fedora +6 Arch Linux +7 CentOS +8 Debian +9 Ubuntu +10 openSUSE +``` + +### 14) How Delete lines that contains Digits from a File? + +The below sed command removes all the lines that contains digits. + +``` +# sed '/[0-9]/d' sed-demo-1.txt + +Linux Operating System +Unix Operating System +RHEL +Red Hat +Fedora +debian +ubuntu +``` + +The below sed command removes all the lines Begin with digits. + +``` +# sed '/^[0-9]/d' sed-demo-1.txt + +Linux Operating System +Unix Operating System +RHEL +Red Hat +Fedora +debian +ubuntu +Arch Linux - 1 +``` + +The below sed command removes all the lines End with digits. + +``` +# sed '/[0-9]$/d' sed-demo-1.txt + +Linux Operating System +Unix Operating System +RHEL +Red Hat +Fedora +debian +ubuntu +2 - Manjaro +``` + +### 15) How Delete lines that contains Alphabetic Characters from a File? + +The below sed command removes all the lines that contains alphabetic characters. + +``` +# sed '/[A-Za-z]/d' sed-demo-1.txt + +3 4 5 6 +``` +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-remove-delete-lines-in-file-sed-command/ + +作者:[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 From 65f795e0e338186327a0451e4808d2474abaf000 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:52:58 +0800 Subject: [PATCH 604/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190823=20How=20?= =?UTF-8?q?To=20Check=20Your=20IP=20Address=20in=20Ubuntu=20[Beginner?= =?UTF-8?q?=E2=80=99s=20Tip]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190823 How To Check Your IP Address in Ubuntu -Beginner-s Tip.md --- ...ur IP Address in Ubuntu -Beginner-s Tip.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/tech/20190823 How To Check Your IP Address in Ubuntu -Beginner-s Tip.md diff --git a/sources/tech/20190823 How To Check Your IP Address in Ubuntu -Beginner-s Tip.md b/sources/tech/20190823 How To Check Your IP Address in Ubuntu -Beginner-s Tip.md new file mode 100644 index 0000000000..436dd84c37 --- /dev/null +++ b/sources/tech/20190823 How To Check Your IP Address in Ubuntu -Beginner-s Tip.md @@ -0,0 +1,117 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Check Your IP Address in Ubuntu [Beginner’s Tip]) +[#]: via: (https://itsfoss.com/check-ip-address-ubuntu/) +[#]: author: (Sergiu https://itsfoss.com/author/sergiu/) + +How To Check Your IP Address in Ubuntu [Beginner’s Tip] +====== + +Wonder what’s your IP address? Here are several ways to check IP address in Ubuntu and other Linux distributions. + +![][1] + +### What is an IP Address? + +An **Internet Protocol address** (commonly referred to as **IP address**) is a numerical label assigned to each device connected to a computer network (using the Internet Protocol). An IP address serves both the purpose of identification and localisation of a machine. + +The **IP address** is _unique_ within the network, allowing the communication between all connected devices. + +You should also know that there are two **types of IP addresses**: **public** and **private**. The **public IP address** is the address used to communicate over the Internet, the same way your physical address is used for postal mail. However, in the context of a local network (such as a home where are router is used), each device is assigned a **private IP address** unique within this sub-network. This is used inside this local network, without directly exposing the public IP (which is used by the router to communicate with the Internet). + +Another distinction can be made between **IPv4** and **IPv6** protocol. **IPv4** is the classic IP format,consisting of a basic 4 part structure, with four bytes separated by dots (e.g. 127.0.0.1). However, with the growing number of devices, IPv4 will soon be unable to offer enough addresses. This is why **IPv6** was invented, a format using **128-bit addresses** (compared to the **32-bit addresses** used by **IPv4**). + +## Checking your IP Address in Ubuntu [Terminal Method] + +The fastest and the simplest way to check your IP address is by using the ip command. You can use this command in the following fashion: + +``` +ip addr show +``` + +It will show you both IPv4 and IPv6 addresses: + +![Display IP Address in Ubuntu Linux][2] + +Actually, you can further shorten this command to just `ip a`. It will give you the exact same result. + +``` +ip a +``` + +If you prefer to get minimal details, you can also use **hostname**: + +``` +hostname -I +``` + +There are some other [ways to check IP address in Linux][3] but these two commands are more than enough to serve the purpose. + +[][4] + +Suggested read  How to Disable IPv6 on Ubuntu Linux + +What about ifconfig? + +Long-time users might be tempted to use ifconfig (part of net-tools), but that program is deprecated. Some newer Linux distributions don’t include this package anymore and if you try running it, you’ll see ifconfig command not found error. + +## Checking IP address in Ubuntu [GUI Method] + +If you are not comfortable with the command line, you can also check IP address graphically. + +Open up the Ubuntu Applications Menu (**Show Applications** in the bottom-left corner of the screen) and search for **Settings** and click on the icon: + +![Applications Menu Settings][5] + +This should open up the **Settings Menu**. Go to **Network**: + +![Network Settings Ubuntu][6] + +Pressing on the **gear icon** next to your connection should open up a window with more settings and information about your link to the network, including your IP address: + +![IP Address GUI Ubuntu][7] + +## Bonus Tip: Checking your Public IP Address (for desktop computers) + +First of all, to check your **public IP address** (used for communicating with servers etc.) you can [use curl command][8]. Open up a terminal and enter the following command: + +``` +curl ifconfig.me +``` + +This should simply return your IP address with no additional bulk information. I would recommend being careful when sharing this address, since it is the equivalent to giving out your personal address. + +**Note:** _If **curl** isn’t installed on your system, simply use **sudo apt install curl -y** to solve the problem, then try again._ + +Another simple way you can see your public IP address is by searching for **ip address** on Google. + +**Summary** + +In this article I went through the different ways you can find your IP address in Uuntu Linux, as well as giving you a basic overview of what IP addresses are used for and why they are so important for us. + +I hope you enjoyed this quick guide. Let us know if you found this explanation helpful in the comments section! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/check-ip-address-ubuntu/ + +作者:[Sergiu][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/sergiu/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/checking-ip-address-ubuntu.png?resize=800%2C450&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/ip_addr_show.png?fit=800%2C493&ssl=1 +[3]: https://linuxhandbook.com/find-ip-address/ +[4]: https://itsfoss.com/disable-ipv6-ubuntu-linux/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?fit=800%2C309&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/network_settings_ubuntu.jpg?fit=800%2C591&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/ip_address_gui_ubuntu.png?fit=800%2C510&ssl=1 +[8]: https://linuxhandbook.com/curl-command-examples/ From 06187af3dd0f6b9bf96e50453c7dc93d93351b38 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:53:14 +0800 Subject: [PATCH 605/951] add done: 20190823 How To Check Your IP Address in Ubuntu -Beginner-s Tip.md --- sources/tech/20190823 .md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sources/tech/20190823 .md diff --git a/sources/tech/20190823 .md b/sources/tech/20190823 .md new file mode 100644 index 0000000000..a5e77474a5 --- /dev/null +++ b/sources/tech/20190823 .md @@ -0,0 +1,25 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: () +[#]: via: (https://www.linux.com/news/vmware-in-talks-to-acquire-pivotal/) +[#]: author: ( ) + + +====== + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/vmware-in-talks-to-acquire-pivotal/ + +作者:[][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: +[b]: https://github.com/lujun9972 From 4e4d398dbeda84ef2be92810874c8284a5b9e16a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:53:48 +0800 Subject: [PATCH 606/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20How=20?= =?UTF-8?q?the=20Linux=20desktop=20has=20grown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190822 How the Linux desktop has grown.md --- ...0190822 How the Linux desktop has grown.md | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 sources/tech/20190822 How the Linux desktop has grown.md diff --git a/sources/tech/20190822 How the Linux desktop has grown.md b/sources/tech/20190822 How the Linux desktop has grown.md new file mode 100644 index 0000000000..e46b310502 --- /dev/null +++ b/sources/tech/20190822 How the Linux desktop has grown.md @@ -0,0 +1,201 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How the Linux desktop has grown) +[#]: via: (https://opensource.com/article/19/8/how-linux-desktop-grown) +[#]: author: (Jim Hall https://opensource.com/users/jim-hallhttps://opensource.com/users/jason-bakerhttps://opensource.com/users/jlacroixhttps://opensource.com/users/doni08521059https://opensource.com/users/etc-eterahttps://opensource.com/users/marcobravohttps://opensource.com/users/alanfdoss) + +How the Linux desktop has grown +====== +Since the early 1990s, the Linux desktop has matured from a simple +window manager to a full desktop. Join us on a journey through the +history of the Linux desktop. +![Person typing on a 1980's computer][1] + +I first installed Linux in 1993. At that time, you really didn't have many options for installing the operating system. In those early days, many people simply copied a running image from someone else. Then someone had the neat idea to create a "distribution" of Linux that let you customize what software you wanted to install. That was the Softlanding Linux System (SLS) and my first introduction to Linux. + +My '386 PC didn't have much memory, but it was enough. SLS 1.03 required 2MB of memory to run, or 4MB if you wanted to compile programs. If you wanted to run the X Window System, you needed a whopping 8MB of memory. And my PC had just enough memory to run X. + +As I'd grown up with the command line, a graphical user interface wasn't essential to me. But it sure was convenient. I could run applications in different windows and easily switch between tasks. + +From my first experiment with Linux, I was hooked. I've stuck with Linux on my desktop ever since. Like many people, I ran Linux in a dual-boot configuration for a while so I could jump back to MS-DOS and Windows to run certain programs. Until 1998, when I finally took the plunge and went all-in with Linux. + +Over the last 26 years, I have watched the Linux desktop mature. I've also tried an interesting combination of desktop environments over that time, which I'll share by taking a journey through the history of the Linux desktop. + +### X and window managers + +The first "desktops" on Linux weren't yet desktops. Instead, they were _window managers_ running on the X Window System. X provided the basic building blocks for a graphical user interface, such as creating windows on the screen and providing keyboard and mouse input. By itself, X didn't do much. To make the X graphical environment useful, you needed a way to manage all the windows in your session. That's where the _window manager_ came in. Running an X program like xterm or xclock opens that program in a window. The window manager keeps track of windows and does basic housekeeping, such as letting you move windows around and minimize them. The rest is up to you. You could launch programs when X started by listing them in the **~/.xinitrc** file, but usually, you'd run new programs from an xterm. + +The most common window manager in 1993 was TWM, which dates back to 1988. TWM was quite simple and provided only basic window management. + +![TWM on SLS 1.05][2] + +TWM on SLS 1.05 showing xterm, xclock, and the Emacs editor + +Yet another early window manager was the OpenLook Virtual Window Manager (OLVWM). OpenLook was a graphical user interface developed by Sun Microsystems in the 1980s and later ported to other Unix platforms. As a _virtual_ window manager, OLVWM supported multiple workspaces. + +![OLVWM on SLS 1.05][3] + +OLVWM on SLS 1.05 showing xterm and the Virtual Workspaces selector + +When Linux began to grow in popularity, it didn't take long for others to create new window managers with smoother performance and improved interfaces. The first of these new window managers was FVWM, a virtual window manager. FVWM sported a more modern look than TWM or OLVWM. But we didn't yet have a desktop. + +![FVWM on SLS 1.05][4] + +FVWM on SLS 1.05 showing xterm and a file manager + +To modern eyes, TWM and FVWM may look pretty plain. But it's important to remember what other graphical environments looked like at the time. The then-current version of Windows looked rather simple. Windows versions 1 through 3 used a plain launcher called the Program Manager. + +![Windows 3.11][5] + +Windows 3.11 showing the Program Manager and the Notepad editor + +In August 1995, Microsoft released Windows 95 and changed the modern PC desktop landscape. Certainly, I was impressed. I thought Windows 3.x was ungainly and ugly, but Windows 95 was smooth and pretty. More importantly, Windows 95 was what we now consider a _desktop_. The new desktop metaphor was a huge step forward. You could put icons on the desktop—and in fact, Windows 95 presented two default desktop icons, for My Computer (to open a file manager) and the Recycle Bin (where you put files to be deleted later). + +But more importantly, the Windows 95 desktop meant _integration_. The Program Manager was gone, replaced by a Taskbar at the bottom of the screen that let you launch new programs using a simpler Start menu. The Taskbar was multifunctional and also showed your running programs via a series of buttons and a dock showing the time, speaker volume, and other simple controls. You could right-click on any object on the new desktop, and Windows 95 would present you with a context-sensitive menu with actions you could perform. + +![Windows 95][6] + +Windows 95 showing the Notepad editor + +The Windows 95 interface was slick and much easier to use than previous versions of Windows—and even other Linux window managers. Not to be outdone, Linux developers created a new version of FVWM that mimicked the Windows 95 interface. Called FVWM95, the new window manager still wasn't a desktop, but it looked very nice. The new taskbar let you start new X programs using the Start menu. The taskbar also showed your running programs using buttons similar to Windows 95's. + +![FVWM95 on Red Hat Linux 5.2][7] + +FVWM95 on Red Hat Linux 5.2 showing xterm and a quick-access program launcher with icons for xterm, the file manager, and other programs + +While FVWM95 and other window managers were improving, the core problem remained: Linux didn't really have a desktop. It had a collection of window managers, and that was about it. Linux applications that used a graphical user interface (GUI, pretty much meaning they were X applications) all looked different and worked differently. You couldn't copy and paste from one application to another, except the simple text-only copy/paste provided by the X Window System. What Linux really needed was a complete redo in its GUI to create the first desktop. + +### The first Linux desktop + +In 1996, Matthias Ettrich was troubled by the inconsistency of Linux applications under X. He wanted to make the graphical environment easy to use. And more importantly, he wanted to make everything _integrated_—like an actual desktop. + +Matthias started work on the K Desktop Environment. That's K for "Kool." But the name KDE was also meant to be a play on the Common Desktop Environment (CDE) that was the standard in the "Big Unix" world. Although by 1996, CDE was looking pretty dated. CDE was based on the Motif widget set, which is the same design that FVWM mimicked. Finalized in July 1998, KDE 1.0 was a definite improvement over plain window managers like FVWM95. + +![KDE 1.0][8] + +K Desktop Environment (KDE) version 1.0 + +Image credit: Paul Brown / KDE + +KDE was a big step forward for Linux. Finally, Linux had a true desktop with application integration and more modern desktop icons. KDE's design was not dissimilar from Windows 95. You had a kind-of taskbar along the bottom of the screen that provided the equivalent of Windows 95's Start menu as well as several application shortcuts. KDE also supported virtual desktops, which were cleverly labeled One, Two, Three, and Four. Running applications were represented via buttons in a separate taskbar at the top of the screen. + +But not everyone was happy with KDE. To abstract the GUI from the system, KDE used Trolltech's Qt toolkit library. Unfortunately, Qt was not distributed under a free software license. Trolltech allowed Qt to be used at no charge in free software applications but charged a fee to use it in commercial or proprietary applications. And that dichotomy is not aligned with free software. This caused problems for Linux distributions: Should they include KDE? Or default to an older but free software graphical user interface like FVWM? + +In response, Miguel de Icaza and Federico Mena started work in 1997 on a new Linux desktop. The new project was dubbed GNOME, for GNU Network Object Model Environment. GNOME aimed to be completely free software and used a different toolkit, called GTK, from the GIMP image editor. GTK literally stood for GIMP Tool Kit. When GNOME 1.0 was finally released in 1999, Linux had another modern desktop environment. + +![GNOME 1.0][9] + +GNOME version 1.0 + +Image credit: GNOME Documentation Project + +While it was great to have two desktop environments for Linux, the "KDE versus GNOME" rivalry continued for some time. By 1999, Trolltech re-released the Qt library under a new public license, the Q Public License (QPL). But the new license carried its own baggage—the QPL only applied to Qt's use in open source software projects, not commercial projects. Thus the Free Software Foundation deemed the QPL [not compatible][10] with the GNU General Public License (GNU GPL). This licensing issue would remain until Trolltech re-re-released the Qt library under the GNU GPL version 2 in 2000. + +### Development over time + +The Linux desktop continued to mature. KDE and GNOME settled into a friendly competition that pushed both to add new features and to exchange ideas and concepts. By 2004, both GNOME and KDE had made significant strides, yet brought only incremental changes to the user interface. + +KDE 2 and 3 continued to rely on a taskbar concept at the bottom of the screen but incorporated the buttons for running applications. One of KDE's most visible changes was the addition of the Konqueror browser, which first appeared in KDE 2. + +![KDE 2.2.2 \(2001\) showing the Konqueror browser][11] + +KDE 2.2.2 (2001) showing the Konqueror browser + +Image credit: Paul Brown / KDE + +![KDE 3.2.2][12] + +KDE 3.2.2 (2004) on Fedora Core 2 showing the Konqueror file manager (using a Fedora Core 2 theme) + +GNOME 2 also used a taskbar concept but split the bar into two: a taskbar at the top of the screen to launch applications and respond to desktop alerts, and a taskbar at the bottom of the page to show running applications. On my own, I referred to the two taskbars as "things you can do" (top) and "things are you doing" (bottom). In addition to the streamlined user interface, GNOME also added an updated file manager called Nautilus, developed by Eazel. + +![GNOME 2.6.0][13] + +GNOME 2.6.0 (2004) on Fedora Core 2 showing the Nautilus file manager (using a Fedora Core 2 theme) + +Over time, KDE and GNOME have taken different paths. Both provide a feature-rich, robust, and modern desktop environment—but with different user interface goals. In 2011, there was a major deviation between how GNOME and KDE approached the desktop interface. KDE 4.6 (January 2011) and KDE 4.7 (July 2011) provided a more traditional desktop metaphor while continuing to rely on the taskbar concept familiar to many users. Of course, KDE saw lots of changes under the hood, but the familiar look and feel remained. + +![KDE 4.6][14] + +KDE 4.6 showing the Gwenview image viewer + +Image credit: KDE + +In 2011, GNOME completely changed gears with a new desktop concept. GNOME 3 aimed to create a simpler, more streamlined desktop experience, allowing users to focus on what they were working on. The taskbar disappeared, replaced by a black status bar at the top of the screen that included volume and network controls, displayed the time and battery status, and allowed users to launch new programs via a redesigned menu. + +The menu was the most dramatic change. Clicking the Activities menu or moving the mouse into the Activities "hot corner" showed all open applications as separate windows. Users could also click an Applications tab from the Overview to start a new program. The Overview also provided an integrated search function. + +![GNOME 3.0][15] + +GNOME 3.0 showing the GNOME Pictures application + +Image credit: GNOME + +![GNOME 3.0][16] + +GNOME 3.0 showing the Activities Overview + +Image credit: GNOME + +### Your choice of desktop + +Having two desktops for Linux means users have great choice. Some prefer KDE and others like GNOME. That's fine. Pick the desktop that best suits you. + +To be sure, both KDE and GNOME have fans and detractors. For example, GNOME received a fair bit of criticism for dropping the taskbar in favor of the Activities Overview. Perhaps the most well-known critic was Linus Torvalds, who [loudly denounced and abandoned][17] the new GNOME as an "unholy mess" in 2011—before [moving back][18] to GNOME two years later. + +Others have made similar criticisms of GNOME 3, to the point that some developers forked the GNOME 2 source code to create the MATE desktop. MATE (which stands for MATE Advanced Traditional Environment) continues the traditional taskbar interface from GNOME 2. + +Regardless, there's no doubt that the two most popular Linux desktops today are KDE and GNOME. Their current versions are both very mature and packed with features. Both KDE 5.16 (2019) and GNOME 3.32 (2019) try to simplify and streamline the Linux desktop experience—but in different ways. GNOME 3.32 continues to aim for a minimal appearance, removing all distracting user interface elements so users can focus on their applications and work. KDE 5.16 takes a more familiar approach with the taskbar but has added other visual improvements and flair, especially around improved widget handling and icons. + +![KDE 5.16 Plasma][19] + +KDE 5.16 Plasma + +Image credit: KDE + +![GNOME 3.32][20] + +GNOME 3.32 + +Image credit: GNOME + +At the same time, you don't completely lose out on compatibility. Every major Linux distribution provides compatibility libraries, so you can run applications from, say, KDE while running GNOME. This is immensely useful when an application you really want to use is written for the other desktop environment—not a problem; you can run KDE applications on GNOME and vice versa. + +I don't see this changing anytime soon. And I think that's a good thing. Healthy competition between KDE and GNOME has allowed developers in both camps to push the envelope. Whether you use KDE or GNOME, you have a modern desktop with great integration. And above all, this means Linux has the best feature in free software: choice. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/how-linux-desktop-grown + +作者:[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-hallhttps://opensource.com/users/jason-bakerhttps://opensource.com/users/jlacroixhttps://opensource.com/users/doni08521059https://opensource.com/users/etc-eterahttps://opensource.com/users/marcobravohttps://opensource.com/users/alanfdoss +[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://opensource.com/sites/default/files/uploads/twm-sls105.png (TWM on SLS 1.05) +[3]: https://opensource.com/sites/default/files/uploads/olvwm-sls105.png (OLVWM on SLS 1.05) +[4]: https://opensource.com/sites/default/files/uploads/fvwm-sls105.png (FVWM on SLS 1.05) +[5]: https://opensource.com/sites/default/files/uploads/win311.png (Windows 3.11) +[6]: https://opensource.com/sites/default/files/uploads/win95.png (Windows 95) +[7]: https://opensource.com/sites/default/files/uploads/fvwm95-rh52.png (FVWM95 on Red Hat Linux 5.2) +[8]: https://opensource.com/sites/default/files/uploads/kde1.png (KDE 1.0) +[9]: https://opensource.com/sites/default/files/uploads/gnome10.png (GNOME 1.0) +[10]: https://www.linuxtoday.com/developer/2000090500121OPLFKE +[11]: https://opensource.com/sites/default/files/uploads/kde_2.2.2.png (KDE 2.2.2 (2001) showing the Konqueror browser) +[12]: https://opensource.com/sites/default/files/uploads/kde322-fc2.png (KDE 3.2.2) +[13]: https://opensource.com/sites/default/files/uploads/gnome26-fc2.png (GNOME 2.6.0) +[14]: https://opensource.com/sites/default/files/uploads/kde46.png (KDE 4.6) +[15]: https://opensource.com/sites/default/files/uploads/gnome30.png (GNOME 3.0) +[16]: https://opensource.com/sites/default/files/uploads/gnome30-overview.png (GNOME 3.0) +[17]: https://www.theregister.co.uk/2011/08/05/linus_slams_gnome_three/ +[18]: https://www.phoronix.com/scan.php?page=news_item&px=MTMxNjc +[19]: https://opensource.com/sites/default/files/uploads/kde516.png (KDE 5.16 Plasma) +[20]: https://opensource.com/sites/default/files/uploads/gnome332.png (GNOME 3.32) From c0d6e0cedcf880193a9c54983742ea354f466fa8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:54:07 +0800 Subject: [PATCH 607/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20How=20?= =?UTF-8?q?to=20move=20a=20file=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190822 How to move a file in Linux.md --- .../20190822 How to move a file in Linux.md | 286 ++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 sources/tech/20190822 How to move a file in Linux.md diff --git a/sources/tech/20190822 How to move a file in Linux.md b/sources/tech/20190822 How to move a file in Linux.md new file mode 100644 index 0000000000..c38f9445e1 --- /dev/null +++ b/sources/tech/20190822 How to move a file in Linux.md @@ -0,0 +1,286 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to move a file in Linux) +[#]: via: (https://opensource.com/article/19/8/moving-files-linux-depth) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/doni08521059) + +How to move a file in Linux +====== +Whether you're new to moving files in Linux or experienced, you'll learn +something in this in-depth writeup. +![Files in a folder][1] + +Moving files in Linux can seem relatively straightforward, but there are more options available than most realize. This article teaches beginners how to move files in the GUI and on the command line, but also explains what’s actually happening under the hood, and addresses command line options that many experience users have rarely explored. + +### Moving what? + +Before delving into moving files, it’s worth taking a closer look at what actually happens when _moving_ file system objects. When a file is created, it is assigned to an _inode_, which is a fixed point in a file system that’s used for data storage. You can what inode maps to a file with the [ls][2] command: + + +``` +$ ls --inode example.txt +7344977 example.txt +``` + +When you move a file, you don’t actually move the data from one inode to another, you only assign the file object a new name or file path. In fact, a file retains its permissions when it’s moved, because moving a file doesn’t change or re-create it. + +File and directory inodes never imply inheritance and are dictated by the filesystem itself. Inode assignment is sequential based on when the file was created and is entirely independent of how you organize your computer. A file "inside" a directory may have a lower inode number than its parent directory, or a higher one. For example: + + +``` +$ mkdir foo +$ mv example.txt foo +$ ls --inode +7476865 foo +$ ls --inode foo +7344977 example.txt +``` + +When moving a file from one hard drive to another, however, the inode is very likely to change. This happens because the new data has to be written onto a new filesystem. For this reason, in Linux the act of moving and renaming files is literally the same action. Whether you move a file to another directory or to the same directory with a new name, both actions are performed by the same underlying program. + +This article focuses on moving files from one directory to another. + +### Moving with a mouse + +The GUI is a friendly and, to most people, familiar layer of abstraction on top of a complex collection of binary data. It’s also the first and most intuitive way to move files on Linux. If you’re used to the desktop experience, in a generic sense, then you probably already know how to move files around your hard drive. In the GNOME desktop, for instance, the default action when dragging and dropping a file from one window to another is to move the file rather than to copy it, so it’s probably one of the most intuitive actions on the desktop: + +![Moving a file in GNOME.][3] + +The Dolphin file manager in the KDE Plasma desktop defaults to prompting the user for an action. Holding the **Shift** key while dragging a file forces a move action: + +![Moving a file in KDE.][4] + +### Moving on the command line + +The shell command intended for moving files on Linux, BSD, Illumos, Solaris, and MacOS is **mv**. A simple command with a predictable syntax, **mv <source> <destination>** moves a source file to the specified destination, each defined by either an [absolute][5] or [relative][6] file path. As mentioned before, **mv** is such a common command for [POSIX][7] users that many of its additional modifiers are generally unknown, so this article brings a few useful modifiers to your attention whether you are new or experienced. + +Not all **mv** commands were written by the same people, though, so you may have GNU **mv**, BSD **mv**, or Sun **mv**, depending on your operating system. Command options differ from implementation to implementation (BSD **mv** has no long options at all) so refer to your **mv** man page to see what’s supported, or install your preferred version instead (that’s the luxury of open source). + +#### Moving a file + +To move a file from one folder to another with **mv**, remember the syntax **mv <source> <destination>**. For instance, to move the file **example.txt** into your **Documents** directory: + + +``` +$ touch example.txt +$ mv example.txt ~/Documents +$ ls ~/Documents +example.txt +``` + +Just like when you move a file by dragging and dropping it onto a folder icon, this command doesn’t replace **Documents** with **example.txt**. Instead, **mv** detects that **Documents** is a folder, and places the **example.txt** file into it. + +You can also, conveniently, rename the file as you move it: + + +``` +$ touch example.txt +$ mv example.txt ~/Documents/foo.txt +$ ls ~/Documents +foo.txt +``` + +That’s important because it enables you to rename a file even when you don’t want to move it to another location, like so: + + +``` +`$ touch example.txt $ mv example.txt foo2.txt $ ls foo2.txt` +``` + +#### Moving a directory + +The **mv** command doesn’t differentiate a file from a directory the way [**cp**][8] does. You can move a directory or a file with the same syntax: + + +``` +$ touch file.txt +$ mkdir foo_directory +$ mv file.txt foo_directory +$ mv foo_directory ~/Documents +``` + +#### Moving a file safely + +If you copy a file to a directory where a file of the same name already exists, the **mv** command replaces the destination file with the one you are moving, by default. This behavior is called _clobbering_, and sometimes it’s exactly what you intend. Other times, it is not. + +Some distributions _alias_ (or you might [write your own][9]) **mv** to **mv --interactive**, which prompts you for confirmation. Some do not. Either way, you can use the **\--interactive** or **-i** option to ensure that **mv** asks for confirmation in the event that two files of the same name are in conflict: + + +``` +$ mv --interactive example.txt ~/Documents +mv: overwrite '~/Documents/example.txt'? +``` + +If you do not want to manually intervene, use **\--no-clobber** or **-n** instead. This flag silently rejects the move action in the event of conflict. In this example, a file named **example.txt** already exists in **~/Documents**, so it doesn't get moved from the current directory as instructed: + + +``` +$ mv --no-clobber example.txt ~/Documents +$ ls +example.txt +``` + +#### Moving with backups + +If you’re using GNU **mv**, there are backup options offering another means of safe moving. To create a backup of any conflicting destination file, use the **-b** option: + + +``` +$ mv -b example.txt ~/Documents +$ ls ~/Documents +example.txt    example.txt~ +``` + +This flag ensures that **mv** completes the move action, but also protects any pre-existing file in the destination location. + +Another GNU backup option is **\--backup**, which takes an argument defining how the backup file is named: + + * **existing**: If numbered backups already exist in the destination, then a numbered backup is created. Otherwise, the **simple** scheme is used. + * **none**: Does not create a backup even if **\--backup** is set. This option is useful to override a **mv** alias that sets the backup option. + * **numbered**: Appends the destination file with a number. + * **simple**: Appends the destination file with a **~**, which can conveniently be hidden from your daily view with the **\--ignore-backups** option for **[ls][2]**. + + + +For example: + + +``` +$ mv --backup=numbered example.txt ~/Documents +$ ls ~/Documents +-rw-rw-r--. 1 seth users 128 Aug  1 17:23 example.txt +-rw-rw-r--. 1 seth users 128 Aug  1 17:20 example.txt.~1~ +``` + +A default backup scheme can be set with the environment variable VERSION_CONTROL. You can set environment variables in your **~/.bashrc** file or dynamically before your command: + + +``` +$ VERSION_CONTROL=numbered mv --backup example.txt ~/Documents +$ ls ~/Documents +-rw-rw-r--. 1 seth users 128 Aug  1 17:23 example.txt +-rw-rw-r--. 1 seth users 128 Aug  1 17:20 example.txt.~1~ +-rw-rw-r--. 1 seth users 128 Aug  1 17:22 example.txt.~2~ +``` + +The **\--backup** option still respects the **\--interactive** or **-i** option, so it still prompts you to overwrite the destination file, even though it creates a backup before doing so: + + +``` +$ mv --backup=numbered example.txt ~/Documents +mv: overwrite '~/Documents/example.txt'? y +$ ls ~/Documents +-rw-rw-r--. 1 seth users 128 Aug  1 17:24 example.txt +-rw-rw-r--. 1 seth users 128 Aug  1 17:20 example.txt.~1~ +-rw-rw-r--. 1 seth users 128 Aug  1 17:22 example.txt.~2~ +-rw-rw-r--. 1 seth users 128 Aug  1 17:23 example.txt.~3~ +``` + +You can override **-i** with the **\--force** or **-f** option. + + +``` +$ mv --backup=numbered --force example.txt ~/Documents +$ ls ~/Documents +-rw-rw-r--. 1 seth users 128 Aug  1 17:26 example.txt +-rw-rw-r--. 1 seth users 128 Aug  1 17:20 example.txt.~1~ +-rw-rw-r--. 1 seth users 128 Aug  1 17:22 example.txt.~2~ +-rw-rw-r--. 1 seth users 128 Aug  1 17:24 example.txt.~3~ +-rw-rw-r--. 1 seth users 128 Aug  1 17:25 example.txt.~4~ +``` + +The **\--backup** option is not available in BSD **mv**. + +#### Moving many files at once + +When moving multiple files, **mv** treats the final directory named as the destination: + + +``` +$ mv foo bar baz ~/Documents +$ ls ~/Documents +foo   bar   baz +``` + +If the final item is not a directory, **mv** returns an error: + + +``` +$ mv foo bar baz +mv: target 'baz' is not a directory +``` + +The syntax of GNU **mv** is fairly flexible. If you are unable to provide the **mv** command with the destination as the final argument, use the **\--target-directory** or **-t** option: + + +``` +$ mv --target-directory=~/Documents foo bar baz +$ ls ~/Documents +foo   bar   baz +``` + +This is especially useful when constructing **mv** commands from the output of some other command, such as the **find** command, **xargs**, or [GNU Parallel][10]. + +#### Moving based on mtime + +With GNU **mv**, you can define a move action based on whether the file being moved is newer than the destination file it would replace. This option is possible with the **\--update** or **-u** option, and is not available in BSD **mv**: + + +``` +$ ls -l ~/Documents +-rw-rw-r--. 1 seth users 128 Aug  1 17:32 example.txt +$ ls -l +-rw-rw-r--. 1 seth users 128 Aug  1 17:42 example.txt +$ mv --update example.txt ~/Documents +$ ls -l ~/Documents +-rw-rw-r--. 1 seth users 128 Aug  1 17:42 example.txt +$ ls -l +``` + +This result is exclusively based on the files’ modification time, not on a diff of the two files, so use it with care. It’s easy to fool **mv** with a mere **touch** command: + + +``` +$ cat example.txt +one +$ cat ~/Documents/example.txt +one +two +$ touch example.txt +$ mv --update example.txt ~/Documents +$ cat ~/Documents/example.txt +one +``` + +Obviously, this isn’t the most intelligent update function available, but it offers basic protection against overwriting recent data. + +### Moving + +There are more ways to move data than just the **mv** command, but as the default program for the job, **mv** is a good universal option.  Now that you know what options you have available, you can use **mv** smarter than ever before. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/moving-files-linux-depth + +作者:[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/sethhttps://opensource.com/users/doni08521059 +[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://opensource.com/article/19/7/master-ls-command +[3]: https://opensource.com/sites/default/files/uploads/gnome-mv.jpg (Moving a file in GNOME.) +[4]: https://opensource.com/sites/default/files/uploads/kde-mv.jpg (Moving a file in KDE.) +[5]: https://opensource.com/article/19/7/understanding-file-paths-and-how-use-them +[6]: https://opensource.com/article/19/7/navigating-filesystem-relative-paths +[7]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[8]: https://opensource.com/article/19/7/copying-files-linux +[9]: https://opensource.com/article/19/7/bash-aliases +[10]: https://opensource.com/article/18/5/gnu-parallel From 976f2f32cb11ac3a998c140246e3b2150607ab69 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:54:39 +0800 Subject: [PATCH 608/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20What?= =?UTF-8?q?=20piece=20of=20advice=20had=20the=20greatest=20impact=20on=20y?= =?UTF-8?q?our=20career=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190822 What piece of advice had the greatest impact on your career.md --- ... had the greatest impact on your career.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20190822 What piece of advice had the greatest impact on your career.md diff --git a/sources/tech/20190822 What piece of advice had the greatest impact on your career.md b/sources/tech/20190822 What piece of advice had the greatest impact on your career.md new file mode 100644 index 0000000000..54bfba29ca --- /dev/null +++ b/sources/tech/20190822 What piece of advice had the greatest impact on your career.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What piece of advice had the greatest impact on your career?) +[#]: via: (https://opensource.com/article/19/8/what-devops-principle-changed-your-career) +[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberghttps://opensource.com/users/juliegundhttps://opensource.com/users/mbbroberghttps://opensource.com/users/don-watkins) + +What piece of advice had the greatest impact on your career? +====== +See what practices, principles, and patterns have influenced DevOps +leaders' careers, and share your own wisdom. +![Question and answer.][1] + +I love learning the what, why, and how of new open source projects, especially when they gain popularity in the [DevOps][2] space. Classification as a "DevOps technology" tends to mean scalable, collaborative systems that go across a broad range of challenges—from message bus to monitoring and back again. There is always something new to explore, install, spin up, and explore. + +That said, you don't have DevOps without principles. Some of these concepts are intuitive truths we have known from the start but needed a movement to help us adopt them. Others are quite different and help us acknowledge and grow beyond our [cognitive biases][3]. + +While not strictly DevOps, one principle that changed everything for me is [kanban][4]. The simple idea of work being visible and optimized for flow was radical for a chronic multi-tasker like me. To this day, I keep work in progress visible, and it's been a huge relief to not worry about losing a task along the way. Not only that, I no longer celebrate work in progress: I celebrate completed tasks. + +To find out what things have influenced my colleagues, I asked members of the [Open Source DevOps Team][5] to share their thoughts on this question: + +> **What is one DevOps concept (practice, principle, pattern) that changed your career?** + +Here's what they had to say. + +#### [Alex Bunardzic][6] + +**Fail fast, fail early, fail as frequently as you possibly can.** Before I clued into this amazing concept, I was toiling miserably in vain under the traditional waterfall model. My career was a series of botched projects; all of them commencing with the "failure is not an option!" cheer. It is an extremely tiresome way that always results in working inefficiently and lurching from one frustration to the next. + +Embracing the fast and furious flurries of failure was the best thing that happened to my career. Frustration got replaced by the feeling of soaring. That lead to the wholesale adoption/embracing of [TDD][7] [test-driven development] practices and to the realization that TDD is NOT about testing, it is about DRIVING! + +#### [Catherine Louis][8] + +**Culture hacking.** I had no idea there was a name for the method I had (subversively) used to change a culture, but then I saw [Seb Paquet's "Ignite Montreal" video][9] and rejoiced that there were others out there. + +#### [Clement Verna][10] + +**Continuous improvement.** Until I was introduced to continuous improvement, I was not really looking at ways to improve in my job or in my career. Continuous improvement made me realize that it was up to me to challenge myself with learning new things and getting out of my comfort zone. That led me to start contributing to an open source project (Fedora) and then led me to work for Red Hat. So that definitely changed my career. + +#### [Jason Hibbets][11] + +It started with _**The Lean Startup**_ at [my first Code for America Summit][12]. In 2012, I distinctly remember a career-changing moment. Eric Ries, author of _The Lean Startup_ and Code for America board member, was on stage with Tim O'Reilly. The topic they were talking about was hacking on code, and culture and failure as validating learning. My biggest takeaway was discovering _The Lean Startup_. I downloaded the book and read most of it on the plane ride home. It changed how I approach my work and how I lead my team. + +The biggest change I made was to **incorporate feedback loops**. This was a critical difference in how I transformed my work style and my team. I shifted my team habits to making data-driven decisions and sharing information and insights to create those feedback loops. We hold weekly health-check meetings and constantly examine our processes and assumptions. In addition to that, we experiment with new ideas and evaluate how those experiments went. We'll conduct start, stop, and continue sessions to help us understand what to tackle next or what didn't work so we can move on. + +#### [Willy-Peter Schaub][13] + +During a two-month sabbatical in 2018, it dawned on me that the fear of failure had paralyzed my energy and passion for software engineering, a career I used to love. **Realizing that failure is not bad, but an enabler for innovation, collaboration, and continuous learning that fuels DevOps, was a key moment in my career.** Transparent collaboration, progressive exposure, hypothesis-driven development, test-driven development, and continuous delivery of value are some of the core practices that generate frequent opportunities to fail fast, inspect, and adapt the solution (and the career) we are working on. + +### Your turn + +There are so many ways DevOps can teach us without ever opening a terminal or user interface. So, I ask you the same question: **What DevOps concept made the most impact on your career?** Please share your thoughts in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/what-devops-principle-changed-your-career + +作者:[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/mbbroberghttps://opensource.com/users/juliegundhttps://opensource.com/users/mbbroberghttps://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_HowToFish_520x292.png?itok=DHbdxv6H (Question and answer.) +[2]: https://opensource.com/resources/devops +[3]: https://commons.wikimedia.org/wiki/File:Cognitive_Bias_Codex_-_180%2B_biases,_designed_by_John_Manoogian_III_(jm3).jpg +[4]: https://en.wikipedia.org/wiki/Kanban +[5]: https://opensource.com/devops-team +[6]: https://opensource.com/users/alex-bunardzic +[7]: https://en.wikipedia.org/wiki/Test-driven_development +[8]: https://opensource.com/users/catherinelouis +[9]: https://www.youtube.com/watch?v=ojQT6U-gRAM +[10]: https://opensource.com/users/cverna +[11]: https://opensource.com/users/jhibbets +[12]: https://medium.com/@jhibbets/where-civic-tech-gets-inspired-rejuvenated-c77ae75af24b +[13]: https://opensource.com/users/wpschaub From 7c6138251ba751cc7b367bdba435bfa87ffe8422 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:54:58 +0800 Subject: [PATCH 609/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20Don?= =?UTF-8?q?=E2=80=99t=20worry=20about=20shadow=20IT.=20Shadow=20IoT=20is?= =?UTF-8?q?=20much=20worse.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190822 Don-t worry about shadow IT. Shadow IoT is much worse..md --- ...ut shadow IT. Shadow IoT is much worse..md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/talk/20190822 Don-t worry about shadow IT. Shadow IoT is much worse..md diff --git a/sources/talk/20190822 Don-t worry about shadow IT. Shadow IoT is much worse..md b/sources/talk/20190822 Don-t worry about shadow IT. Shadow IoT is much worse..md new file mode 100644 index 0000000000..40c18b2554 --- /dev/null +++ b/sources/talk/20190822 Don-t worry about shadow IT. Shadow IoT is much worse..md @@ -0,0 +1,82 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Don’t worry about shadow IT. Shadow IoT is much worse.) +[#]: via: (https://www.networkworld.com/article/3433496/dont-worry-about-shadow-it-shadow-iot-is-much-worse.html) +[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) + +Don’t worry about shadow IT. Shadow IoT is much worse. +====== +Shadow IoT – the use of unauthorized internet-of-things devices and networks – poses a new level of threats for enterprises +![Air Force photo illustration by Margo Wright][1] + +For years, IT departments have been railing about the dangers of shadow IT and bring-your-own-device. The worry is that these unauthorized practices bring risks to corporate systems, introducing new vulnerabilities and increasing the attack surface. + +That may be true, but it’s not the whole story. As I’ve long argued, shadow IT may increase risks, but it can also cut costs, boost productivity and speed innovation. That’s why users are often [so eager to circumvent what they see as slow and conservative IT departments][2] by adopting increasingly powerful and affordable consumer and cloud-based alternatives, with or without the blessing of the powers that be. Just as important, there’s plenty of evidence of that [enlightened IT departments should work to leverage those new approaches][3] to serve their internal customers in a more agile manner. + +**Also on Network World:** [**5 key enterprise IoT security recommendations**][4] + +### Shadow IoT takes shadow IT to the next level + +So far so good. But this reasoning emphatically does not carry over to the [emerging practice of shadow IoT][5], which has become a growing concern in the last year or so. Basically, we are talking about when people in your organization connect internet-connected devices (or worse, entire [IoT][6] networks!) without IT’s knowledge. + +Those renegades are likely seeking the same speed and flexibility that drove shadow IT, but they are taking a far bigger risk for a much smaller reward. Shadow IoT takes shadow IT to another level, with the potential for many more devices as well as new types of devices and use cases, not to mention the addition of wholly new networks and technologies. + +### Why shadow IoT is worse than shadow IT + +According to a 2018 report from [802 Secure][7], “IoT introduces [new operating systems, protocols and wireless frequencies][8]. Companies that rely on legacy security technologies are blind to this rampant IoT threat. Organizations need to broaden their view into these invisible devices and networks to identify rogue IoT devices on the network, visibility into shadow-IoT networks, and detection of nearby threats such as drones and spy cameras.” + +The report noted that _all_ of the organizations surveyed had rogue consumer IoT wireless devices on their enterprise networks, and nine out of 10 had shadow IoT/[IIoT][9] wireless networks, defined as “undetected company-deployed wireless networks separate from the enterprise infrastructure.” + +**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]** + +Similarly, a 2018 [Infoblox report][11] found that a third of companies have more than 1,000 shadow-IoT devices connected to their networks on a typical day, including fitness trackers, digital assistants, smart TVs, smart appliances and gaming consoles. (And yes, Infoblox is talking about _enterprise_ networks.) + +It gets worse. Many of these consumer IoT devices don’t even _try_ to be secure. And, per Microsoft, criminal and [state-sponsored actors][12] are already weaponizing these devices and networks (both shadow and IT-approved), as shown by the [Mirai botnet][13] and many others. + +One more thing: Unlike cloud and consumer shadow IT, shadow IoT implementations often don’t provide additional levels of speed, agility or usability, meaning that organizations are not getting much benefit in exchange for the heightened risks. But that doesn’t seem to be stopping people from using them on corporate networks. + +### Security basics + +Fortunately, protecting your organization from shadow IoT isn’t so different from security best practices for other threats, including shadow IT. + +**Education:** Make sure your team is aware of the threat and try to get their buy-in on key IOT policies and security measures. According to that 802 Secure report, “88 percent of IT leaders in the US and UK believed they had an effective policy in place for mitigating security risks from connected devices. But a full 24 percent of employees represented in the survey said they did not even know such policies existed, while a bare 20 percent of the people who professed knowledge of these policies actually abided by them.” Sure, you’ll never get 100 percent participation, but people can’t follow a policy they don’t know exists. + +**Assimilation:** Create policies to let team members easily connect their IoT devices and networks to the enterprise network with the IT department’s approval and support. It’s extra work, and some folks will inevitably go rogue anyway, but the more devices you know about, the better. + +**Isolation:** Set up separate networks so you can support approved and shadow IoT devices while protecting your core corporate networks as much as possible. + +**Monitoring:** Make regular checks of connected devices and networks, and proactively search for unknown devices on all your networks. + +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/3433496/dont-worry-about-shadow-it-shadow-iot-is-much-worse.html + +作者:[Fredric 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://www.networkworld.com/author/Fredric-Paul/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/02/fight-shadow-100787429-large.jpg +[2]: http://www.networkworld.com/cms/article/6%20ways%20'shadow%20IT'%20can%20actually%20help%20IT +[3]: https://www.networkworld.com/article/2885758/6-ways-shadow-it-can-actually-help-it.html +[4]: https://www.networkworld.com/article/3269247/5-key-enterprise-iot-security-recommendations.html +[5]: https://www.bbntimes.com/en/technology/shadow-iot-is-a-threat-to-your-business-here-s-how-to-deal-with-it +[6]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html +[7]: https://www.prnewswire.com/news/802-secure%2C-inc +[8]: https://www.networkworld.com/article/3235124/internet-of-things-definitions-a-handy-guide-to-essential-iot-terms.html +[9]: https://www.networkworld.com/article/3243928/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html +[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr +[11]: https://www.infoblox.com/company/news-events/press-releases/infoblox-research-finds-explosion-of-personal-and-iot-devices-on-enterprise-networks-introduces-immense-security-risk/ +[12]: https://diginomica.com/state-sponsored-cyber-spies-targeting-iot-warning-microsoft +[13]: https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/antonakakis +[14]: https://www.facebook.com/NetworkWorld/ +[15]: https://www.linkedin.com/company/network-world From b626ffc6dc563a94011f49dfb53ce569067cbe91 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Aug 2019 00:55:22 +0800 Subject: [PATCH 610/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20Back?= =?UTF-8?q?=20to=20School:=20Your=20SD-WAN=20Reading=20List?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190822 Back to School- Your SD-WAN Reading List.md --- ...ack to School- Your SD-WAN Reading List.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/talk/20190822 Back to School- Your SD-WAN Reading List.md diff --git a/sources/talk/20190822 Back to School- Your SD-WAN Reading List.md b/sources/talk/20190822 Back to School- Your SD-WAN Reading List.md new file mode 100644 index 0000000000..d1270cdd9f --- /dev/null +++ b/sources/talk/20190822 Back to School- Your SD-WAN Reading List.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Back to School: Your SD-WAN Reading List) +[#]: via: (https://www.networkworld.com/article/3433618/back-to-school-your-sd-wan-reading-list.html) +[#]: author: (Cato Networks https://www.networkworld.com/author/Matt-Conran/) + +Back to School: Your SD-WAN Reading List +====== +Summer is about to end. Time to head back to work, understand next year’s projects and plans, and set your IT infrastructure objectives accordingly. +![baona][1] + +Summer is about to end. Time to head back to work, understand next year’s projects and plans, and set your IT infrastructure objectives accordingly. SD-WAN and MPLS transformation are huge trends that cannot be overlooked. How will it impact your existing IT? + +MPLS transformations can send chills down any IT pro’s spine but these suggested readings will help calm the nerves. They’re a series of clear, concise, and practical manuals divided into lessons on how to migrate from the prehistoric world of MPLS into the light of [SD-WAN][2].  Finish all of them and you’ll have an A+ in WAN Transformation 101. + +**Lesson 1 – SD-WAN as an MPLS Alternative ** + +Are you still running MPLS to your branch offices? If so, you’re probably undermining cloud performance, wasting expensive bandwidth backhauling branch office Internet and cloud traffic, and taking far too long to open new locations. [**How to Re-evaluate your MPLS Provider**][3] delves into all the issues to consider when replacing or supplementing your MPLS. If nothing else, the table comparing MPLS, basic SD-WAN, and cloud-based SD-WAN is a gem you shouldn’t miss. + +**Lesson 2 – Why the Internet Is Broken ** + +Public Internet connections work — sort of — but everyone knows that they’re not always as fast and reliable as they could be. If you’ve ever wondered why and what to do about it,  [The Secrets Behind Internet Routing][4] dives into the gory details of Internet routing and the BGP protocol, including why their fragmented, opaque workings are not ideal for today’s business uses. It does the same for MPLS, for those of you with hybrid networks, clarifying two complicated subjects and outlining exactly why you might want to consider alternatives. + +**Lesson 3** **–** **How to Transition from MPLS to SD-WAN** + +You’re probably aware of the cost, flexibility, and cloud benefits of SD-WAN but you may not have a clear idea of what it takes to get from here to there.  [**How to Migrate from MPLS to SD-WAN**][5] is a high-level overview — based on insights from SD-WAN adopters, industry best practices, and years of network transition experience — of the steps you need to take to get from MPLS to SD-WAN. It’s a good start if you’re looking for a quick read to get you thinking about how to do your own migration. + +**Lesson 4** **–** **How to Migrate Your Sites to SD-WAN** + +If you’ve read the previous high-level view and are ready for more specifics on site migration to SD-WAN, check out** **[**How to Migrate Sites to SD-WAN**][6]. It takes step one from the first e-book and delves deeply into the issues and sub-steps involved in transforming each site. The steps it covers in depth include:  + + * Categorize Your Locations  + * Select the Right Last Mile  + * Decide on the Middle Mile  + * Engineer your End-To-End Network Architecture  + * Procure Your Last Mile Services + + + +**Lesson 5 – SD-WAN Security, Cloud, and Mobility Challenges** + +Once you have a solid grasp of the steps for migrating your sites to SD-WAN, it’s time to start thinking about how to handle security, mobility, and the cloud. [**The Security, Cloud and Mobility Challenges Facing SD-WAN and How to Address Them**][7]  addresses these topics, including: + + * **Transform Security**, which compares security appliances and cloud security services.  + * **Connect the Cloud to SD-WAN**, including agent-based vs. agentless cloud deployments, routing optimization, and security.  + * **Optimize the Mobile experience**, including SD-WAN mobile access considerations. + * **Determine the right SD-WAN Management Model**, which compares SD-WAN appliances and services and discusses four SD-WAN management models.  + + + +**Lesson 6 – SD-WAN Migration Realities** + +You’ve done your homework on the MPLS to SD-WAN transition, but really, wouldn’t it be a big help to hear from someone who has lived it? Definitely. Which is why you should listen to this exciting “reality show,” [Nick Dell Webinar: How I Migrated from MPLS to SD-WAN. ][8] + +Nick Dell, an IT manager at a leading automotive manufacturer with 2,000 employees and nine locations, describes his experience transitioning to SD-WAN for just-in-time manufacturing, including connecting to his company’s critical cloud-based ERP and VoIP applications. He covers the problems and heartbreaks of his MPLS deployment, the alternatives he considered, the migration process, questions he asked, and how he got 5X to 20X the bandwidth and better availability and security for less. + +**Lesson 7 – MPLS or SLA-Backed Affordable Backbone** + +Enterprises that depend on global network backbone connections may think that their choice is only between reliable but expensive MPLS and flexible but unreliable SD-WAN Internet routing. Think again. [MPLS or SLA-backed Affordable Backbone: Which is Right for Your Global Network? ][9]digs into the challenges of MPLS and traditional SD-WAN global backbones and presents a potentially superior alternative: the SLA-backed Affordable Backbone. This new architecture combines global IP transit services from Tier-1 providers, an SD-WAN overlay, and commercial off-the-shelf hardware to deliver a much less expensive, more reliable, and agile alternative to MPLS. Get the details of how you can take advantage of this new global WAN alternative. + +**Lesson 8 – How to Migrate from MPLS to Cato** + +If you yearn for a less complex, more transformational alternative to traditional SD-WAN edge appliances and services, check out [**How to Migrate from MPLS to the Cat**][10]**o Cloud.** This e-book tells you how moving to the Cato Cloud can achieve a simpler, more agile infrastructure that connects any user to any resource quickly and securely. It covers each step necessary for transitioning your network to Cato and how Cato slashes WAN costs, doubles throughput, and decreases deployment times from months to as little as 30 minutes.   + +**Lesson 9 – SD-WAN Use Cases and Success Stories** + +In this on-demand webinar,  [5 MPLS Migration Challenges SD-WAN Solves][11], learn how SD-WAN can help you slash remote office latency without paying MPLS prices, secure Internet access without appliance sprawl, optimize voice and unified communications, enhance branch office and mobile user cloud performance, and manage last mile communications intelligently. It includes six case studies of how real companies solved these issues using SD-WAN. + +**Bonus** **–** **SD-WAN Cheat Sheet** + +Are you ready to make the leap to SD-WAN, but feel a little lost about how to choose an SD-WAN vendor and what questions to ask? Believe it or not, the answers can be found on a single page. Based on Nick Dell’s own experience and adventures migrating his company to SD-WAN, [Nick Dell’s Questions to Ask Yourself about SD-WAN ][12]spells out the questions you need to ask your vendor and yourself before embarking on an SD-WAN journey, such as what do you want to replace, how important is high availability, does you SD-WAN vendor fulfill your future needs, and who provides support? + +Finish one of these e-books and you’ll feel enlightened. Finish all of them and you’ll get a solid SD-WAN education in surprisingly little time. But don’t get so immersed in SD-WAN that you forget to enjoy the rest of your time off. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3433618/back-to-school-your-sd-wan-reading-list.html + +作者:[Cato Networks][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/Matt-Conran/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2019/08/istock-1065824638-100809025-large.jpg +[2]: https://www.catonetworks.com/glossary-use-cases/sd-wan?utm_source=IDG&utm_campaign=IDG +[3]: https://go.catonetworks.com/What-to-consider-before-renewing-your-MPLS-contract?utm_source=IDG&utm_campaign=IDG +[4]: https://go.catonetworks.com/The_Internet_is_Broken?utm_source=IDG&utm_campaign=IDG +[5]: https://go.catonetworks.com/How-to-Migrate-from-MPLS-to-SD-WAN?utm_source=IDG&utm_campaign=IDG +[6]: https://go.catonetworks.com/How-to-Migrate-Sits-to-SD-WAN?utm_source=IDG&utm_campaign=IDG +[7]: https://go.catonetworks.com/Challenges-Facing-SD-WAN-and-How-to-Address-Them?utm_source=IDG&utm_campaign=IDG +[8]: https://go.catonetworks.com/VOD-How-I-Migrated-From-MPLS-to-SD-WAN?utm_source=IDG&utm_campaign=IDG +[9]: https://go.catonetworks.com/MPLS-or-SLA-backed-Affordable-Backbone?utm_source=IDG&utm_campaign=IDG +[10]: https://go.catonetworks.com/How-to-Migrate-from-MPLS-to-Cato-Cloud?utm_source=IDG&utm_campaign=IDG +[11]: https://go.catonetworks.com/VOD-5-MPLS-migration-challenges?utm_source=IDG&utm_campaign=IDG +[12]: https://go.catonetworks.com/LP-Questions-to-ask-yourself-before-purchasing-SD-WAN?utm_source=IDG&utm_campaign=IDG From 20426811292a3dbb642ba9f3eb70c4747ebe1d5c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Aug 2019 04:11:21 +0800 Subject: [PATCH 611/951] PRF @geekpi --- ...Change Linux Console Font Type And Size.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/translated/tech/20190815 How To Change Linux Console Font Type And Size.md b/translated/tech/20190815 How To Change Linux Console Font Type And Size.md index 9fd5d51523..f3abd91ecf 100644 --- a/translated/tech/20190815 How To Change Linux Console Font Type And Size.md +++ b/translated/tech/20190815 How To Change Linux Console Font Type And Size.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How To Change Linux Console Font Type And Size) @@ -10,7 +10,7 @@ 如何更改 Linux 控制台字体类型和大小 ====== -如果你有图形桌面环境,那么就很容易更改文本的字体以及大小。你如何在没有图形环境的 Ubuntu 无头服务器中做到?别担心!本指南介绍了如何更改 Linux 控制台的字体和大小。这对于那些不喜欢默认字体类型/大小或者喜欢不同字体的人来说非常有用。 +如果你有图形桌面环境,那么就很容易更改文本的字体以及大小。但你如何在没有图形环境的 Ubuntu 无头服务器中做到?别担心!本指南介绍了如何更改 Linux 控制台的字体和大小。这对于那些不喜欢默认字体类型/大小或者喜欢不同字体的人来说非常有用。 ### 更改 Linux 控制台字体类型和大小 @@ -18,13 +18,13 @@ ![][2] -Ubuntu Linux 控制台 +*Ubuntu Linux 控制台* -据我所知,我们可以[**列出已安装的字体**][3],但是没有选项可以像在 Linux 桌面终端仿真器中那样更改 Linux 控制台字体类型或大小。 +据我所知,我们可以[列出已安装的字体][3],但是没有办法可以像在 Linux 桌面终端仿真器中那样更改 Linux 控制台字体类型或大小。 但这并不意味着我们无法改变它。我们仍然可以更改控制台字体。 -如果你正在使用 Debian、Ubuntu 和其他基于 DEB 的系统,你可以使用 **“console-setup”** 配置文件来设置 **setupcon**,它用于配置控制台的字体和键盘布局。控制台设置的配置文件位于 **/etc/default/console-setup**。 +如果你正在使用 Debian、Ubuntu 和其他基于 DEB 的系统,你可以使用 `console-setup` 配置文件来设置 `setupcon`,它用于配置控制台的字体和键盘布局。该控制台设置的配置文件位于 `/etc/default/console-setup`。 现在,运行以下命令来设置 Linux 控制台的字体。 @@ -36,25 +36,25 @@ $ sudo dpkg-reconfigure console-setup ![][4] -选择要在 Ubuntu 控制台上设置的编码 +*选择要在 Ubuntu 控制台上设置的编码* -接下来,在列表中选择受支持的字符集。默认情况下,这是我系统中的最后一个选项,即 **Guess optimal character set**。只需保留默认值,然后按回车键。 +接下来,在列表中选择受支持的字符集。默认情况下,它是最后一个选项,即在我的系统中 **Guess optimal character set**(猜测最佳字符集)。只需保留默认值,然后按回车键。 ![][5] -在 Ubuntu 中选择字符集 +*在 Ubuntu 中选择字符集* 接下来选择控制台的字体,然后按回车键。我这里选择 “TerminusBold”。 ![][6] -选择 Linux 控制台的字体 +*选择 Linux 控制台的字体* 这里,我们为 Linux 控制台选择所需的字体大小。 ![][7] -选择 Linux 控制台的字体大小 +*选择 Linux 控制台的字体大小* 几秒钟后,所选的字体及大小将应用于你的 Linux 控制台。 @@ -66,9 +66,9 @@ $ sudo dpkg-reconfigure console-setup ![][9] -如你所见,文本更大、更好,字体类型不同于默认。 +如你所见,文本更大、更好,字体类型也不同于默认。 -你也可以直接编辑 **/etc/default/console-setup**,并根据需要设置字体类型和大小。根据以下示例,我的 Linux 控制台字体类型为 “Terminus Bold”,字体大小为 32。 +你也可以直接编辑 `/etc/default/console-setup`,并根据需要设置字体类型和大小。根据以下示例,我的 Linux 控制台字体类型为 “Terminus Bold”,字体大小为 32。 ``` ACTIVE_CONSOLES="/dev/tty[1-6]" @@ -78,8 +78,7 @@ FONTFACE="TerminusBold" FONTSIZE="16x32" ``` - -##### 显示控制台字体 +### 附录:显示控制台字体 要显示你的控制台字体,只需输入: @@ -91,11 +90,11 @@ $ showconsolefont ![][11] -显示控制台字体 +*显示控制台字体* -如果你的 Linux 发行版没有 “console-setup”,你可以从[**这里**][12]获取它。 +如果你的 Linux 发行版没有 `console-setup`,你可以从[这里][12]获取它。 -在使用 **Systemd** 的 Linux 发行版上,你可以通过编辑 **“/etc/vconsole.conf”** 来更改控制台字体。 +在使用 Systemd 的 Linux 发行版上,你可以通过编辑 `/etc/vconsole.conf` 来更改控制台字体。 以下是德语键盘的示例配置。 @@ -115,7 +114,7 @@ via: https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/ 作者:[sk][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 2674a47e9a63508423173abcaa9a1f0e0599171b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Aug 2019 04:22:32 +0800 Subject: [PATCH 612/951] PUB @geekpi https://linux.cn/article-11258-1.html --- ...190815 How To Change Linux Console Font Type And Size.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190815 How To Change Linux Console Font Type And Size.md (96%) diff --git a/translated/tech/20190815 How To Change Linux Console Font Type And Size.md b/published/20190815 How To Change Linux Console Font Type And Size.md similarity index 96% rename from translated/tech/20190815 How To Change Linux Console Font Type And Size.md rename to published/20190815 How To Change Linux Console Font Type And Size.md index f3abd91ecf..0a92a2ebd8 100644 --- a/translated/tech/20190815 How To Change Linux Console Font Type And Size.md +++ b/published/20190815 How To Change Linux Console Font Type And Size.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11258-1.html) [#]: subject: (How To Change Linux Console Font Type And Size) [#]: via: (https://www.ostechnix.com/how-to-change-linux-console-font-type-and-size/) [#]: author: (sk https://www.ostechnix.com/author/sk/) @@ -10,6 +10,8 @@ 如何更改 Linux 控制台字体类型和大小 ====== +![](https://img.linux.net.cn/data/attachment/album/201908/23/041741x6qiajjijupjyjsp.jpg) + 如果你有图形桌面环境,那么就很容易更改文本的字体以及大小。但你如何在没有图形环境的 Ubuntu 无头服务器中做到?别担心!本指南介绍了如何更改 Linux 控制台的字体和大小。这对于那些不喜欢默认字体类型/大小或者喜欢不同字体的人来说非常有用。 ### 更改 Linux 控制台字体类型和大小 From 436f48959fb8ce84574c3f99533e4a79acfb13a9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Aug 2019 05:35:58 +0800 Subject: [PATCH 613/951] PRF @tomjlw --- .../tech/20190809 Copying files in Linux.md | 101 ++++++++---------- 1 file changed, 46 insertions(+), 55 deletions(-) diff --git a/translated/tech/20190809 Copying files in Linux.md b/translated/tech/20190809 Copying files in Linux.md index 73105ae150..af3b7e6b56 100644 --- a/translated/tech/20190809 Copying files in Linux.md +++ b/translated/tech/20190809 Copying files in Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (tomjlw) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Copying files in Linux) @@ -10,60 +10,61 @@ 在 Linux 中复制文档 ====== -了解在 Linux 中多种复制文档的方式以及各自的优点 +> 了解在 Linux 中多种复制文档的方式以及各自的优点。 + ![归档文件][1] -在办公室里复制文档过去需要专门的员工与机器。如今,复制是电脑用户无需多加思考的任务。在电脑里复制数据是如此微不足道的事以致于你还没有意识到复制就发生了,例如当拖动文档到外部硬盘的时候。 +在办公室里复印文档过去需要专门的员工与机器。如今,复制是电脑用户无需多加思考的任务。在电脑里复制数据是如此微不足道的事,以致于你还没有意识到复制就发生了,例如当拖动文档到外部硬盘的时候。 -数字实体复制起来十分简单已是一个不争的事实,以致于大部分现代电脑用户未去考虑其它复制他们工作的可选方式。尽管如此,在 Linux 中复制文档仍有几种不同的方式。每种方法取决于你的目的不同都有其独到之处。 +数字实体复制起来十分简单已是一个不争的事实,以致于大部分现代电脑用户从未考虑过其它的复制他们工作的方式。无论如何,在 Linux 中复制文档仍有几种不同的方式。每种方法取决于你的目的不同而都有其独到之处。 -以下是一系列在 Linux,BSD 及 Mac 上复制文件的方式。 +以下是一系列在 Linux、BSD 及 Mac 上复制文件的方式。 ### 在 GUI 中复制 -如大多数操纵系统一样,如果你想的话,你可以完全用 GUI 来管理文件。 -拖拽放下 +如大多数操作系统一样,如果你想的话,你可以完全用 GUI 来管理文件。 -复制文件最浅显的方式可能就是你在电脑中用来复制文件的方式:拖拽并放下。在大多数 Linux 桌面上,从一个本地文件夹拖拽放下到另一个本地文件夹是_移动_文件的默认方式/你可以通过在拖拽文件后按住 **Ctrl** 到复制区域改变这个行为。 +#### 拖拽放下 + +最浅显的复制文件的方式可能就是你以前在电脑中复制文件的方式:拖拽并放下。在大多数 Linux 桌面上,从一个本地文件夹拖拽放下到另一个本地文件夹是*移动*文件的默认方式,你可以通过在拖拽文件开始后按住 `Ctrl` 来改变这个行为。 你的鼠标指针可能会有一个指示,例如一个加号以显示你在复制模式。 -![复制一个文件。][2] +![复制一个文件][2] -注意如果文件在原创系统上存在,不管它是一个网页服务器或者你自己网络里的用文件共享协议访问另一台电脑,默认动作经常是复制而不是移动文件。 +注意如果文件是放在远程系统上的,不管它是一个 Web 服务器还是在你自己网络里用文件共享协议访问的另一台电脑,默认动作经常是复制而不是移动文件。 -### 右击 +#### 右击 -如果你觉得在你的桌面拖拽文档不够精准或者臃肿,或者这么做让你的手离开键盘太多,你可以经常使用右键菜单复制文件。这取决于你所用的文件管理器,但通常来说,右键产生的相关菜单会包括常见的操作。 +如果你觉得在你的桌面拖拽文档不够精准或者有点笨拙,或者这么做会让你的手离开键盘太久,你可以经常使用右键菜单来复制文件。这取决于你所用的文件管理器,但通常来说,右键弹出的关联菜单会包括常见的操作。 -相关菜单的复制动作将你的[文件路径][3](文件在系统的位置)保存在你的剪切板中,这样你可以将你的文件 _粘贴_ 到别处: +关联菜单的“复制”动作将你的[文件路径][3](即文件在系统的位置)保存在你的剪切板中,这样你可以将你的文件*粘贴*到别处:(LCTT 译注:此处及下面的描述不确切,这里并非复制的文件路径的“字符串”,而是复制了代表文件实体的对象/指针) +![从右键菜单复制文件][4] -![从相关菜单复制文件][4] - -在这种情况下,你并没有将文件的内容复制到你的剪切版上。取而代之的是你复制了[文件路径][3]。当你粘贴时,你的文件管理器查看剪贴板上的路径并执行复制命令,将相应路径上的文件粘贴到你准备拷贝到的路径。 +在这种情况下,你并没有将文件的内容复制到你的剪切版上。取而代之的是你复制了[文件路径][3]。当你粘贴时,你的文件管理器会查看剪贴板上的路径并执行复制命令,将相应路径上的文件粘贴到你准备复制到的路径。 ### 用命令行复制 -虽然 GUI 通常是相对熟悉的拷贝文件方式,用终端拷贝却更有效率。 +虽然 GUI 通常是相对熟悉的复制文件方式,用终端复制却更有效率。 #### cp -基于终端最显而易见的复制拷贝替代物就是 **cp** 命令。这个命令可以拷贝文件和目录,也相对直接。它使用熟悉的 _来源_ 和 _目的_(必须以这样的顺序)句法,因此拷贝一个叫 **example.txt** 的文件到你的 **Documents** 目录就像这样: +在终端上等同于在桌面上复制和粘贴文件的最显而易见的方式就是 `cp` 命令。这个命令可以复制文件和目录,也相对直接。它使用熟悉的*来源*和*目的*(必须以这样的顺序)句法,因此复制一个名为 `example.txt` 的文件到你的 `Documents` 目录就像这样: ``` $ cp example.txt ~/Documents ``` -就像当你拖拽文件放在文件夹里一样,这个动作并不将 **Documents** 替换为 **example.txt**。取而代之的是,**cp** 察觉到 **Documents** 是一个文件夹,就将 **example.txt** 的复件放进去。 +就像当你拖拽文件放在文件夹里一样,这个动作并不会将 `Documents` 替换为 `example.txt`。取而代之的是,`cp` 察觉到 `Documents` 是一个文件夹,就将 `example.txt` 的副本放进去。 -你同样可以(便捷有效地)重命名你拷贝的文档: +你同样可以便捷有效地重命名你复制的文档: ``` $ cp example.txt ~/Documents/example_copy.txt ``` -这很重要因为它使得你可以在于原文件相同的目录中生成一个复件: +重要的是,它使得你可以在与原文件相同的目录中生成一个副本: ``` $ cp example.txt example.txt @@ -71,7 +72,7 @@ cp: 'example.txt' and 'example.txt' are the same file. $ cp example.txt example_copy.txt ``` -要复制一个目录,你必须使用 **-r** 选项,代表 --**递归式的**。这个选项在目录 _inode_ 中运行 **cp** 命令,然后作用到该目录下的所有文件。没有 **-r** 选项,**cp** 不会将目录当成一个可复制的对象: +要复制一个目录,你必须使用 `-r` 选项(代表 `--recursive`,递归)。以这个选项对目录 `nodes` 运行 `cp` 命令,然后会作用到该目录下的所有文件。没有 `-r` 选项,`cp` 不会将目录当成一个可复制的对象: ``` $ cp notes/ notes-backup @@ -81,10 +82,9 @@ $ cp -r notes/ notes-backup #### cat -**cat** 命令是最易被误解的命令,但只是因为它表现了 [POSIX][5] 系统的极致灵活性。在 **cat** 可以做到的所有事情中,也包括拷贝。例如说使用 **cat** 你可以仅用一个命令就[从一个文件创建两个副本][6]。你用 **cp** 无法做到这一点。 - -使用 **cat** 复制文档的重要性在于系统解释该行为的方式。当你使用 **cp** 拷贝文件时,文件的属性跟着文件一起被拷贝。这代表复件的权限和原件一样。 +`cat` 命令是最易被误解的命令,但这只是因为它表现了 [POSIX][5] 系统的极致灵活性。在 `cat` 可以做到的所有事情中(包括其原意的连接文件的用途),它也能复制。例如说使用 `cat` 你可以仅用一个命令就[从一个文件创建两个副本][6]。你用 `cp` 无法做到这一点。 +使用 `cat` 复制文档要注意的是系统解释该行为的方式。当你使用 `cp` 复制文件时,该文件的属性跟着文件一起被复制,这意味着副本的权限和原件一样。 ``` $ ls -l -G -g @@ -94,20 +94,18 @@ $ cp foo.jpg bar.jpg -rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg ``` -然而用 **cat** 将一个文件的内容读取至另一个文件让系统创建了一个新文件。这些新文件取决于你的默认 **umansk** 设置。了解更多关于`umask`,阅读 Alex Juarez 包含 [umask][7] 以及权限概览的文章。 - -运行 **unmask** 获取当前设置: +然而用 `cat` 将一个文件的内容读取至另一个文件是让系统创建了一个新文件。这些新文件取决于你的默认 umask 设置。要了解 umask 更多的知识,请阅读 Alex Juarez 讲述 [umask][7] 以及权限概览的文章。 +运行 `unmask` 获取当前设置: ``` $ umask 0002 ``` -这个设置代表在该处新创建的文档被给予**664**(**rw-rw-r--**)权限因为 **unmask** 设置的前几位数字没有遮掩任何东西(并且执行数位不是文件创建的默认数位)且写入权限被最终位屏蔽。 - -当你使用 **cat** 拷贝时,你并没有真正拷贝文件。你使用 **cat** 读取文件内容并将输出重新导向一个新文件: +这个设置代表在该处新创建的文档被给予 `664`(`rw-rw-r--`)权限,因为该 `unmask` 设置的前几位数字没有遮掩任何权限(而且执行位不是文件创建的默认位),并且写入权限被最终位所屏蔽。 +当你使用 `cat` 复制时,实际上你并没有真正复制文件。你使用 `cat` 读取文件内容并将输出重定向到了一个新文件: ``` $ cat foo.jpg > baz.jpg @@ -117,14 +115,13 @@ $ ls -l -G -g -rw-r--r--. 1 57368 Jul 25 23:57  foo.jpg ``` -如你所见,**cat** 使用系统默认的 umask 创建了一个全新的文件。 +如你所见,`cat` 应用系统默认的 umask 设置创建了一个全新的文件。 -最后,当你仅仅想复制一个文件时,这些手段无关紧要。但如果你想以拷贝文件并保持默认权限时,你可以用一个命令 **cat** 完成一切。 +最后,当你只是想复制一个文件时,这些手段无关紧要。但如果你想复制文件并保持默认权限时,你可以用一个命令 `cat` 完成一切。 #### rsync -有着著名的同步源和目的文件的能力,**rsync** 命令是一个拷贝文件的多才多艺的工具。最为简单的,**rsync** 可以与 **cp** 命令相似般使用。 - +有着著名的同步源和目的文件的能力,`rsync` 命令是一个复制文件的多才多艺的工具。最为简单的,`rsync` 可以类似于 `cp` 命令一样使用。 ``` $ rsync example.txt example_copy.txt @@ -132,12 +129,11 @@ $ ls example.txt    example_copy.txt ``` -这个命令真正的威力藏在其能不做不必要的拷贝的能力里。如果你使用 **rsync** 来将文件拷经目录里且其已经存在在该目录里,那么 **rsync** 和普通的拷贝在本地里并无二致。但如果你将从远程服务器拷贝海量数据,这个特性就完全不一样了。 +这个命令真正的威力藏在其能够*不做*不必要的复制的能力里。如果你使用 `rsync` 来将文件复制进目录里,且其已经存在在该目录里,那么 `rsync` 不会做复制操作。在本地这个差别不是很大,但如果你将海量数据复制到远程服务器,这个特性的意义就完全不一样了。 -甚至在本地中,真正不一样的地方在于它可以分辨具有相同名字但拥有不同数据的文件。如果你曾发现你面对着同一个目录里的两个相同副本时,**rsync** 可以将它们同步至一个包含每个最新修改的目录。这种配置在尚未发现版本控制威力的业界十分常见,同时也作为需要从同一个源拷贝的备选方案。 - -你可以通过创建两个文件夹有意识地模拟这种情况,一个叫做 **example** 另一个叫做 **example_dupe**: +甚至在本地中,真正不一样的地方在于它可以分辨具有相同名字但拥有不同数据的文件。如果你曾发现你面对着同一个目录的两个相同副本时,`rsync` 可以将它们同步至一个包含每一个最新修改的目录。这种配置在尚未发现版本控制威力的业界十分常见,同时也作为需要从一个可信来源复制的备份方案。 +你可以通过创建两个文件夹有意识地模拟这种情况,一个叫做 `example` 另一个叫做 `example_dupe`: ``` $ mkdir example example_dupe @@ -145,13 +141,11 @@ $ mkdir example example_dupe 在第一个文件夹里创建文件: - ``` -$ echo "one" > example/foo.txt +$ echo "one" > example/foo.txt ``` -用 **rsync** 同步两个目录。这种做法最常见的选项是 **-a**(代表 _archive_,保证符号链接和其它特殊文件保存下来)和 **-v**(代表 _verbose_,向你提供当前命令的进度反馈): - +用 `rsync` 同步两个目录。这种做法最常见的选项是 `-a`(代表 “archive”,可以保证符号链接和其它特殊文件保留下来)和 `-v`(代表 “verbose”,向你提供当前命令的进度反馈): ``` $ rsync -av example/ example_dupe/ @@ -159,7 +153,6 @@ $ rsync -av example/ example_dupe/ 两个目录现在包含同样的信息: - ``` $ cat example/foo.txt one @@ -167,19 +160,17 @@ $ cat example_dupe/foo.txt one ``` -如果你当作源的文件发生改变,目的文件也会随之跟新: - +如果你当作源分支的文件发生改变,目的文件也会随之跟新: ``` -$ echo "two" >> example/foo.txt +$ echo "two" >> example/foo.txt $ rsync -av example/  example_dupe/ $ cat example_dupe/foo.txt one two ``` -注意 **rsync** 命令是用来复制数据的,而不是充当版本管理系统的。例如假设有一个目的文件比源文件多了改变,那个文件仍将被覆盖因为 **rsync** 比较文件的分歧并假设目的文件总是反映着源文件: - +注意 `rsync` 命令是用来复制数据的,而不是充当版本管理系统的。例如假设有一个目的文件比源文件多了改变,那个文件仍将被覆盖,因为 `rsync` 比较文件的分歧并假设目的文件总是应该镜像为源文件: ``` $ echo "You will never see this note again" > example_dupe/foo.txt @@ -189,13 +180,13 @@ one two ``` -如果没有改变,那么就不会有拷贝。 +如果没有改变,那么就不会有复制动作发生。 -**rsync** 命令有许多 **cp** 没有的选项,例如查看目标权限,排除文件,删除过时的文件不在两个目录中出现以及更多。使用 **rsync** 作为 **cp** 的强力替代或者有效补充。 +`rsync` 命令有许多 `cp` 没有的选项,例如设置目标权限、排除文件、删除没有在两个目录中出现的过时文件,以及更多。可以使用 `rsync` 作为 `cp` 的强力替代或者有效补充。 -### 许多拷贝的方式 +### 许多复制的方式 -在 POSIX 系统中有许多能够达成同样目的的方式,因此开源的灵活性名副其实。我忘了哪个复制数据的有效方式吗?在评论区分享你的拷贝神技。 +在 POSIX 系统中有许多能够达成同样目的的方式,因此开源的灵活性名副其实。我忘了哪个复制数据的有效方式吗?在评论区分享你的复制神技。 -------------------------------------------------------------------------------- @@ -204,7 +195,7 @@ via: https://opensource.com/article/19/8/copying-files-linux 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[tomjlw](https://github.com/tomjlw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -214,6 +205,6 @@ via: https://opensource.com/article/19/8/copying-files-linux [2]: https://opensource.com/sites/default/files/uploads/copy-nautilus.jpg (Copying a file.) [3]: https://opensource.com/article/19/7/understanding-file-paths-and-how-use-them [4]: https://opensource.com/sites/default/files/uploads/copy-files-menu.jpg (Copying a file from the context menu.) -[5]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[5]: https://linux.cn/article-11222-1.html [6]: https://opensource.com/article/19/2/getting-started-cat-command [7]: https://opensource.com/article/19/7/linux-permissions-101 From 07673fabdc8d6f83bc55bfa6ff7cd02922191d55 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Aug 2019 05:39:42 +0800 Subject: [PATCH 614/951] PUB @tomjlw https://linux.cn/article-11259-1.html --- .../tech => published}/20190809 Copying files in Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20190809 Copying files in Linux.md (98%) diff --git a/translated/tech/20190809 Copying files in Linux.md b/published/20190809 Copying files in Linux.md similarity index 98% rename from translated/tech/20190809 Copying files in Linux.md rename to published/20190809 Copying files in Linux.md index af3b7e6b56..d657449899 100644 --- a/translated/tech/20190809 Copying files in Linux.md +++ b/published/20190809 Copying files in Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (tomjlw) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11259-1.html) [#]: subject: (Copying files in Linux) [#]: via: (https://opensource.com/article/19/8/copying-files-linux) [#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/greg-p) @@ -12,7 +12,7 @@ > 了解在 Linux 中多种复制文档的方式以及各自的优点。 -![归档文件][1] +![](https://img.linux.net.cn/data/attachment/album/201908/23/053859f1stcjezllmj28e8.jpg) 在办公室里复印文档过去需要专门的员工与机器。如今,复制是电脑用户无需多加思考的任务。在电脑里复制数据是如此微不足道的事,以致于你还没有意识到复制就发生了,例如当拖动文档到外部硬盘的时候。 From 867a53d9983409805ec57ee30bcd9a6d7707873c Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 23 Aug 2019 09:02:41 +0800 Subject: [PATCH 615/951] translated --- ...Ubuntu in Dual Boot or Single Boot Mode.md | 105 ------------------ ...Ubuntu in Dual Boot or Single Boot Mode.md | 95 ++++++++++++++++ 2 files changed, 95 insertions(+), 105 deletions(-) delete mode 100644 sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md create mode 100644 translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md diff --git a/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md b/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md deleted file mode 100644 index 08e0784009..0000000000 --- a/sources/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Reinstall Ubuntu in Dual Boot or Single Boot Mode) -[#]: via: (https://itsfoss.com/reinstall-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Reinstall Ubuntu in Dual Boot or Single Boot Mode -====== - -If you have messed up your Ubuntu system and after trying numerous ways to fix it, you finally give up and take the easy way out: you reinstall Ubuntu. - -We have all been in a situation when reinstalling Linux seems a better idea than try to troubleshoot and fix the issue for good. Troubleshooting a Linux system teaches you a lot but you cannot always afford to spend more time fixing a broken system. - -There is no Windows like recovery drive system in Ubuntu as far as I know. So, the question then arises: how to reinstall Ubuntu? Let me show you how can you reinstall Ubuntu. - -Warning! - -Playing with disk partitions is always a risky task. I strongly recommend to make a backup of your data on an external disk. - -### How to reinstall Ubuntu Linux - -![][1] - -Here are the steps to follow for reinstalling Ubuntu. - -#### Step 1: Create a live USB - -First, download Ubuntu from its website. You can download [whichever Ubuntu version][2] you want to use. - -[Download Ubuntu][3] - -Once you have got the ISO image, it’s time to create a live USB from it. If your Ubuntu system is still accessible, you can create a live disk using the startup disk creator tool provided by Ubuntu. - -If you cannot access your Ubuntu system, you’ll have to use another system. You can refer to this article to learn [how to create live USB of Ubuntu in Windows][4]. - -#### Step 2: Reinstall Ubuntu - -Once you have got the live USB of Ubuntu, plugin the USB. Reboot your system. At boot time, press F2/10/F12 key to go into the BIOS settings and make sure that you have set Boot from Removable Devices/USB option at the top. Save and exit BIOS. This will allow you to boot into live USB. - -Once you are in the live USB, choose to install Ubuntu. You’ll get the usual option for choosing your language and keyboard layout. You’ll also get the option to download updates etc. - -![Go ahead with regular installation option][5] - -The important steps comes now. You should see an “Installation Type” screen. What you see on your screen here depends heavily on how Ubuntu sees the disk partitioning and installed operating systems on your system. - -[][6] - -Suggested read  How to Update Ubuntu Linux [Beginner's Tip] - -Be very careful in reading the options and its details at this step. Pay attention to what each options says. The screen options may look different in different systems. - -![Reinstall Ubuntu option in dual boot mode][7] - -In my case, it finds that I have Ubuntu 18.04.2 and Windows installed on my system and it gives me a few options. - -The first option here is to erase Ubuntu 18.04.2 and reinstall it. It tells me that it will delete my personal data but it says nothing about deleting all the operating systems (i.e. Windows). - -If you are super lucky or in single boot mode, you may see an option where you can see a “Reinstall Ubuntu”. This option will keep your existing data and even tries to keep the installed software. If you see this option, you should go for it it. - -Attention for Dual Boot System - -If you are dual booting Ubuntu and Windows and during reinstall, your Ubuntu system doesn’t see Windows, you must go for Something else option and install Ubuntu from there. I have described the [process of reinstalling Linux in dual boot in this tutorial][8]. - -For me, there was no reinstall and keep the data option so I went for “Erase Ubuntu and reinstall”option. This will install Ubuntu afresh even if it is in dual boot mode with Windows. - -The reinstalling part is why I recommend using separate partitions for root and home. With that, you can keep your data in home partition safe even if you reinstall Linux. I have already demonstrated it in this video: - -Once you have chosen the reinstall Ubuntu option, the rest of the process is just clicking next. Select your location and when asked, create your user account. - -![Just go on with the installation options][9] - -Once the procedure finishes, you’ll have your Ubuntu reinstalled afresh. - -In this tutorial, I have assumed that you know things because you already has Ubuntu installed before. If you need clarification at any step, please feel free to ask in the comment section. - -[][10] - -Suggested read  How To Fix No Wireless Network In Ubuntu - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/reinstall-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/2019/08/Reinstall-Ubuntu.png?resize=800%2C450&ssl=1 -[2]: https://itsfoss.com/which-ubuntu-install/ -[3]: https://ubuntu.com/download/desktop -[4]: https://itsfoss.com/create-live-usb-of-ubuntu-in-windows/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-1.jpg?resize=800%2C473&ssl=1 -[6]: https://itsfoss.com/update-ubuntu/ -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-dual-boot.jpg?ssl=1 -[8]: https://itsfoss.com/replace-linux-from-dual-boot/ -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-3.jpg?ssl=1 -[10]: https://itsfoss.com/fix-no-wireless-network-ubuntu/ diff --git a/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md b/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md new file mode 100644 index 0000000000..c75e0f9016 --- /dev/null +++ b/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md @@ -0,0 +1,95 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Reinstall Ubuntu in Dual Boot or Single Boot Mode) +[#]: via: (https://itsfoss.com/reinstall-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在双启动或单启动模式下重新安装 Ubuntu +====== + +如果你弄坏了你的 Ubuntu 系统,并尝试了很多方法来修复,你最终放弃并采取简单的方法:重新安装 Ubuntu。 + +我们一直遇到这样一种情况,重新安装 Linux 似乎比找出问题并解决来得更好。排查 Linux 故障能教你很多,但你不会总是花费更多时间来修复损坏的系统。 + +据我所知,Ubuntu 中没有像 Windows 那样的系统恢复分区。那么,问题出现了:如何重新安装 Ubuntu?让我告诉你如何重新安装 Ubuntu。 + +警告! + +磁盘分区始终是一项危险的任务。我强烈建议你在外部磁盘上备份数据。 + +### 如何重新安装 Ubuntu Linux + +![][1] + +以下是重新安装 Ubuntu 的步骤。 + +#### 步骤 1:创建一个 live USB + +首先,在网站上下载 Ubuntu。你可以下载[任何需要的 Ubuntu 版本][2]。 + +[Download Ubuntu][3] + +获得 ISO 镜像后,就可以创建 live USB 了。如果 Ubuntu 系统仍然可以使用,那么可以使用 Ubuntu 提供的启动盘创建工具创建它。 + +如果无法使用你的 Ubuntu,那么你可以使用其他系统。你可以参考这篇文章来学习[如何在 Windows 中创建 Ubuntu的 live USB][4]。 + +#### 步骤 2:重新安装 Ubuntu + +有了 Ubuntu 的 live USB 之后插入 USB。重新启动系统。在启动时,按下 F2/10/F12 键进入 BIOS 设置,并确保已在顶部设置 “Boot from Removable Devices/USB”。保存并退出 BIOS。这将启动进入 live USB。 + +进入 live USB 后,选择安装 Ubuntu。你将看到选择语言和键盘布局这些常用选项。你还可以选择下载更新等。 + +![Go ahead with regular installation option][5] + +现在是重要的步骤。你应该看到一个“安装类型”页面。你在屏幕上看到的内容在很大程度上取决于 Ubuntu 如何处理系统上的磁盘分区和安装的操作系统。 + +在此步骤中仔细阅读选项及它的细节。注意每个选项的说明。屏幕上的选项可能在不同的系统中看上去不同。 + +![Reinstall Ubuntu option in dual boot mode][7] + +在这里,它发现我的系统上安装了 Ubuntu 18.04.2 和 Windows,它给了我一些选项。 + +第一个选项是擦除 Ubuntu 18.04.2 并重新安装它。它告诉我它将删除我的个人数据,但它没有说删除所有操作系统(即 Windows)。 + +如果你非常幸运或处于单一启动模式,你可能会看到一个“重新安装 Ubuntu” 的选项。此选项将保留现有数据,甚至尝试保留已安装的软件。如果你看到这个选项,那么就用它吧。 + +双启动系统注意 + +如果你是双启动 Ubuntu 和 Windows,并且在重新安装中,你的 Ubuntu 系统看不到 Windows,你必须选择 “Something else” 选项并从那里安装 Ubuntu。我已经在[在双启动下安装 Linux 的过程][8]这篇文章中说明了。 + +对我来说,没有重新安装并保留数据的选项,因此我选择了“擦除 Ubuntu 并重新安装”。该选项即使在 Windows 的双启动模式下,也将重新安装 Ubuntu。 + +我建议为 root 和 home 使用单独分区就是为了重新安装。这样,即使重新安装 Linux,也可以保证 home 分区中的数据安全。我已在此视频中演示过: + +选择重新安装 Ubuntu 后,剩下就是单击下一步。选择你的位置、创建用户账户。 + +![Just go on with the installation options][9] + +以上完成后,你就完成重装 Ubuntu 了。 + +在本教程中,我假设你已经知道我说的东西,因为你之前已经安装过 Ubuntu。如果需要澄清任何一个步骤,请随时在评论栏询问。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/reinstall-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://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/Reinstall-Ubuntu.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/which-ubuntu-install/ +[3]: https://ubuntu.com/download/desktop +[4]: https://itsfoss.com/create-live-usb-of-ubuntu-in-windows/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-1.jpg?resize=800%2C473&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-dual-boot.jpg?ssl=1 +[8]: https://itsfoss.com/replace-linux-from-dual-boot/ +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/reinstall-ubuntu-3.jpg?ssl=1 From 20722ebfe00802d9112562547c439364850a6fa5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 23 Aug 2019 09:07:11 +0800 Subject: [PATCH 616/951] translating --- .../tech/20190820 A guided tour of Linux file system types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190820 A guided tour of Linux file system types.md b/sources/tech/20190820 A guided tour of Linux file system types.md index 750394631a..8d8916a08e 100644 --- a/sources/tech/20190820 A guided tour of Linux file system types.md +++ b/sources/tech/20190820 A guided tour of Linux file system types.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7cf57ac5bd29080d385b7b70bde1e38ef9c94b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Fri, 23 Aug 2019 09:43:41 +0800 Subject: [PATCH 617/951] Translating --- ...0180727 4 Ways to Customize Xfce and Give it a Modern Look.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md b/sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md index c4372724f7..bd91604a7f 100644 --- a/sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md +++ b/sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md @@ -1,3 +1,4 @@ +Translating by robsean 4 Ways to Customize Xfce and Give it a Modern Look ====== **Brief: Xfce is a great lightweight desktop environment with one drawback. It looks sort of old. But you don’t have to stick with the default looks. Let’s see various ways you can customize Xfce to give it a modern and beautiful look.** From 5382fe48c76f0d4eccfe0cc25807205e30c29908 Mon Sep 17 00:00:00 2001 From: beamrolling <33046439+beamrolling@users.noreply.github.com> Date: Fri, 23 Aug 2019 10:06:04 +0800 Subject: [PATCH 618/951] Translating --- ... How to Install VirtualBox on Ubuntu -Beginner-s Tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190225 How to Install VirtualBox on Ubuntu -Beginner-s Tutorial.md b/sources/tech/20190225 How to Install VirtualBox on Ubuntu -Beginner-s Tutorial.md index 4ba0580ece..5bfa0fa915 100644 --- a/sources/tech/20190225 How to Install VirtualBox on Ubuntu -Beginner-s Tutorial.md +++ b/sources/tech/20190225 How to Install VirtualBox on Ubuntu -Beginner-s Tutorial.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (beamrolling) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f232f167c2126a9a791340c457b68d8677e35692 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 23 Aug 2019 11:22:37 +0800 Subject: [PATCH 619/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars=5F2.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2023=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E4=BA=94=2011:22:37=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ommand Line Heroes- Season 1- OS Wars_2.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md index ce6ace888d..0fba2329ef 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md @@ -49,33 +49,33 @@ Saron Yitbarek: [00:06:00] 某种程度上来说,对命令行的访问总是 Paul Jones: [00:07:00] 从本质上讲,互联网在那个时候比较少是客户端-服务器架构的,而是更多是点对点架构的。讲真,当我们说,某种VAX到VAX,某科学工作站,科学工作站。这并不意味着没有客户端与服务端的关系以及没有应用程序,但这的确意味着,最初的设计是思考如何实现点对点,它与IBM一直在做的东西相对立. IBM给你的只有哑终端,这种终端只能让你管理用户界面,却无法让你像真正的终端一样为所欲为。 -Saron Yitbarek: As popular as GUI was becoming among casual users, there was always a pull in the opposite direction for the engineers and developers. Before Linux in the 1970s and 80s, that resistance was there, with EMAX and GNU . W ith Stallman's free software foundation, certain folks were always begging for access to the command line, but it was Linux in the 1990s that delivered like no other. +Saron Yitbarek: 图形用户界面在普通用户中普及的同时,在工程师和开发人员中总是存在和一股相反的力量。早在20世纪70年代和80年代的Linux出现之前,这股力量就存在于EMAX和GNU中。有了斯托尔曼的自由软件基金会后,总有某些人想要使用命令行,但上世纪90年代的Linux的交付方式是独一无二的。 -[00:07:30] The early lovers of Linux and other open source software were pioneers. I'm standing on their shoulders. We all are. +[00:07:30] Linux和其他开源软件的早期爱好者是都是先驱。我正站在他们的肩膀上。我们都是。 -You're listening to Command Line Heroes, an original podcast from Red Hat. This is part two of the OS wars: Rise of Linux. +您现在收听的是代码英雄, 一款由红帽公司原创的播客. 这是操作系统大战的第二部分: Linux 崛起. -Steven Vaughan-Nichols: By 1998, things have changed. +Steven Vaughan-Nichols: 1998年的时候, 情况发生了变化. -Saron Yitbarek: Steven Vaughan-Nichols is a contributing editor at zdnet.com, and he's been writing for decades about the business side of technology. He describes how Linux slowly became more and more popular until the number of volunteer contributors was way larger than the number of Microsoft developers working on Windows. Linux never really went after Microsoft's desktop customers, though, and maybe that's why Microsoft ignored them at first. Where Linux did shine was in the server room. When businesses went online, each one required a unique programming solution for their needs. +Saron Yitbarek: Steven Vaughan-Nichols 是zdnet.com的特约编辑,他已经写了几十年关于技术商业方面的文章了。他将向我们讲述Linux是如何慢慢变得越来越流行,直到自愿贡献者的数量远远超过了在Windows上工作的微软开发人员的数量的。不过,Linux从来没有真正关注过微软的台式机客户,这也许就是微软最开始时忽略了Linux及其开发者的原因。Linux真正大放光彩的地方是在服务器机房。当企业开始线上业务时,每个企业都需要一个独特的编程解决方案来满足其需求。 -[00:08:30] Windows NT comes out in 1993 and it's competing with other server operating systems, but lots of developers are thinking, "Why am I going to buy an AIX box or a large windows box when I could set up a cheap Linux-based system with Apache?" Point is, Linux code started seeping into just about everything online. +[00:08:30] WindowsNT于1993年问世,当时它已经在与其他的服务器操作系统展开竞争了,但是许多开发人员都在想,“既然我可以通过Apache构建出基于Linux的廉价系统,那我为什么要购买AIX设备或大型Windows设备呢?”关键点在于,Linux代码已经开始渗透到几乎所有在线的东西中。 -Steven Vaughan-Nichols: [00:09:00] Microsoft realizes that Linux, quite to their surprise, is actually beginning to get some of the business, not so much on the desktop, but on business servers. As a result of that, they start a campaign, what we like to call FUD — fear, uncertainty and doubt — saying, "Oh this Linux stuff, it's really not that good. It's not very reliable. You can't trust it with anything." +Steven Vaughan-Nichols: [00:09:00] 令微软感到惊讶的是,它开始意识到,Linux实际上已经开始有一些商业应用,不是在桌面环境,而是在商业服务器上。因此,他们发起了一场运动,我们称之为FUD-恐惧、不确定和怀疑(fear,uncertainty和double).他们说,“哦,Linux这玩意,真的没有那么好。它不太可靠。你一点都不能相信它”。 -Saron Yitbarek: [00:09:30] That soft propaganda style attack goes on for a while. Microsoft wasn't the only one getting nervous about Linux, either. It was really a whole industry versus that weird new guy. For example, anyone with a stake in UNIX was likely to see Linux as a usurper. Famously, the SCO Group, which had produced a version of UNIX, waged lawsuits for over a decade to try and stop the spread of Linux. SCO ultimately failed and went bankrupt. Meanwhile, Microsoft kept searching for their opening. They were a company that needed to make a move. It just wasn't clear what that move was going to be. +Saron Yitbarek: [00:09:30] 这种软宣传式的攻击持续了一段时间。微软也不是唯一一个对Linux感到紧张的公司。这其实是整个行业在对抗这个奇怪新人的挑战。例如,任何与UNIX有利害关系的人都可能将Linux视为篡夺者。有一个案例很著名,那就是SCO组织(它发行过一种版本的UNIX)在过去10多年里发起一系列的诉讼,试图阻止Linux的传播。SCO最终失败而且破产了。与此同时,微软一直在寻找机会。他们势在必行。只不过目前还不清楚具体要怎么做。 -Steven Vaughan-Nichols: [00:10:30] What will make Microsoft really concerned about it is the next year, in 2000, IBM will announce that they will invest a billion dollars in Linux in 2001. Now, IBM is not really in the PC business anymore. They're not out yet, but they're going in that direction, but what they are doing is they see Linux as being the future of servers and mainframe computers, which, spoiler alert, IBM was correct. Linux is going to dominate the server world. +Steven Vaughan-Nichols: [00:10:30] 让微软真正担心的是,第二年,在2000年的时候,IBM宣布,他们将于2001年投资10亿美元在Linux上。现在,IBM已经不再涉足个人电脑业务。他们还没有走出去,但他们正朝着这个方向前进,他们将Linux视为服务器和大型计算机的未来,在这一点上,剧透警告,IBM是正确的。Linux将主宰服务器世界。 -Saron Yitbarek: This was no longer just about a bunch of hackers loving their Jedi-like control of the command line. This was about the money side working in Linux's favor in a major way. John "Mad Dog" Hall, the executive director of Linux International, has a story that explains why that was. We reached him by phone. +Saron Yitbarek: 这已经不再仅仅是一群黑客喜欢命令行的Jedi式的控制了。金钱的投入对Linux助力极大。Linux国际的执行董事John "Mad Dog" Hall有一个故事可以解释为什么会这样。我们通过电话与他取得了联系。 -John Hall: [00:11:30] A friend of mine named Dirk Holden [00:10:56] was a German systems administrator at Deutsche Bank in Germany, and he also worked in the graphics projects for the early days of the X Windows system for PCs. I visited him one day at the bank, and I said, "Dirk, you have 3,000 servers here at the bank and you use Linux. Why don't you use Microsoft NT?" He looked at me and he said, "Yes, I have 3,000 servers , and if I used Microsoft Windows NT, I would need 2,999 systems administrators." He says, "With Linux, I only need four." That was the perfect answer. +John Hall: [00:11:30] 我的一个朋友名叫Dirk Holden[00:10:56],他是德国德意志银行的一名系统管理员,他也参与了个人电脑上早期X Windows系统的图形项目中的工作。有一天我去银行拜访他,我说:“Dirk,你银行里有3000台服务器,用的都是Linux。为什么不用Microsoft NT呢?”他看着我说:“是的,我有3000台服务器,如果使用微软的Windows NT系统,我需要2999名系统管理员。”他继续说道:“而使用Linux,我只需要四个。”这真是完美的答案。 -Saron Yitbarek: [00:12:00] The thing programmers are getting obsessed with also happens to be deeply attractive to big business. Some businesses were wary. The FUD was having an effect. They heard open source and thought, "Open. That doesn't sound solid. It's going to be chaotic, full of bugs," but as that bank manager pointed out, money has a funny way of convincing people to get over their hangups. Even little businesses, all of which needed websites, were coming on board. The cost of working with a cheap Linux system over some expensive proprietary option, there was really no comparison. If you were a shop hiring a pro to build your website, you wanted them to use Linux. +Saron Yitbarek: [00:12:00] 程序员们着迷的这些东西恰好对大公司也极具吸引力。但由于FUD的作用,一些企业对此持谨慎态度。他们听到开源,就想:"开源。这看起来不太可靠,很混乱,充满了BUG".但正如那位银行经理所指出的,金钱听过一种有趣的方式,说服人们克服困境。甚至那些需要网站的小公司也加入了Linux阵营。与一些昂贵的专有选择相比,使用一个廉价的Linux系统在成本上是无法比拟的。如果您是一家雇佣专业人员来构建网站的商店,那么您很定想让他们使用Linux。 -[00:12:30] Fast forward a few years. Linux runs everybody's website. Linux has conquered the server world, and then, along comes the smartphone. Apple and their iPhones take a sizeable share of the market, of course, and Microsoft hoped to get in on that, except, surprise, Linux was there, too, ready and raring to go. +[00:12:30] 让我们快进几年. Linux运行每个人的网站上。Linux已经征服了服务器世界,然后智能手机也随之诞生。当然,苹果和他们的iPhone占据了相当大的市场份额,而且微软页希望能进入这个市场,但令人惊讶的是,Linux也在那,已经做好准备了,迫不及待要大展拳脚。 -Author and journalist James Allworth. +作家兼记者 James Allworth. James Allworth: [00:13:00] There was certainly room for a second player, and that could well have been Microsoft, but for the fact of Android, which was fundamentally based on Linux, and because Android, famously acquired by Google, and now running a majority of the world's smartphones, Google built it on top of that. They were able to start with a very sophisticated operating system and a cost basis of zero. They managed to pull it off, and it ended up locking Microsoft out of the next generation of devices, by and large, at least from an operating system perspective. From 5bcb625c27d935681c49f3d06064fda83fbc8658 Mon Sep 17 00:00:00 2001 From: cycoe Date: Fri, 23 Aug 2019 15:14:54 +0800 Subject: [PATCH 620/951] translated by cycoe --- ...ory of text-based games and open source.md | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/sources/talk/20180720 A brief history of text-based games and open source.md b/sources/talk/20180720 A brief history of text-based games and open source.md index a16799d551..3cba19ebcb 100644 --- a/sources/talk/20180720 A brief history of text-based games and open source.md +++ b/sources/talk/20180720 A brief history of text-based games and open source.md @@ -7,83 +7,83 @@ [#]: via: (https://opensource.com/article/18/7/interactive-fiction-tools) [#]: author: (Jason Mclntosh https://opensource.com/users/jmac) -A brief history of text-based games and open source +关于文字游戏与开源的简史 ====== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/compass_map_explore_adventure.jpg?itok=ecCoVTrZ) -The [Interactive Fiction Technology Foundation][1] (IFTF) is a non-profit organization dedicated to the preservation and improvement of technologies enabling the digital art form we call interactive fiction. When a Community Moderator for Opensource.com suggested an article about IFTF, the technologies and services it supports, and how it all intersects with open source, I found it a novel angle to the decades-long story I’ve so often told. The history of IF is longer than—but quite enmeshed with—the modern FOSS movement. I hope you’ll enjoy my sharing it here. +[互动小说技术基金会(IFTF: Interactive Fiction Technology Foundation)][1] 是一个非营利组织,致力于保护那些用来生成我们称之为互动小说的数字艺术形式的技术。当 Opensource.com 的一位社区版主提出一篇关于 IFTF、它支持的技术与服务,以及它如何与开源相交织的文章时,我发现这对于我经常讲的几十的故事来说,是个新颖的视角。互动小说的历史比自由及开源软件(FOSS: Free and Open Source Software)运动的历史要长,但同时也与之密切相关。希望你们能喜欢我在这里的分享。 -### Definitions and history +### 定义和历史 -To me, the term interactive fiction includes any video game or digital artwork whose audience interacts with it primarily through text. The term originated in the 1980s when parser-driven text adventure games—epitomized in the United States by [Zork][2], [The Hitchhiker’s Guide to the Galaxy][3], and the rest of [Infocom][4]’s canon—defined home-computer entertainment. Its mainstream commercial viability had guttered by the 1990s, but online hobbyist communities carried on the tradition, releasing both games and game-creation tools. +对于我来说,交互式小说这个术语包括了读者主要通过文本与之交互的任何视频游戏或数字化艺术作品。这个术语起源于 20 世纪 80 年代,当时由语法解析器驱动的文本冒险游戏在美国主要体现在,[魔域][2]、[银河系漫游指南][3],以及 [Infocom][4] 正规定义的家用电脑娱乐。在 20 世纪 90 年代,它的主流商业价值被挖掘出来,但在线爱好者社区还是依照传统,发布游戏和游戏创建工具。 -After a quarter century, interactive fiction now comprises a broad and sparkling variety of work, from puzzle-laden text adventures to sprawling and introspective hypertexts. Regular online competitions and festivals provide a great place to peruse and play new work: The English-language IF world enjoys annual events including [Spring Thing][5] and [IFComp][6], the latter a centerpiece of modern IF since 1995—which also makes it the longest-lived continually running game showcase event of its kind in any genre. [IFComp’s crop of judged-and-ranked entries from 2017][7] shows the amazing diversity in form, style, and subject matter that text-based games boast today. +在四分之一个世纪之后的今天,互动小说包括了品种繁多并且妙趣橫生的作品,如从充满谜题的文字冒险游戏到衍生改良的超文本类型。定期的在线竞赛和节日为品鉴试玩新作品提供了个好地方---英语互动小说世界每年都会举办一次活动,包括 [Spring Thing][5] 和 [IFComp][6]。后者是自 1995 年以来现代互动小说的核心活动,这也使它成为在同类型中持续举办时间最长的游戏展示活动。[IFComp 从 2017 年开始的评选和排名记录][7] 展示了如今基于文本的游戏在形式、风格和主题方面的惊人多样性。 -(I specify "English-language" above because IF communities tend to self-segregate by language, perhaps due to the technology's focus on writing. There are also annual IF events in [French][8] and [Italian][9], for example, and I've heard of at least one Chinese IF festival. Happily, these borders are porous; during the four years I managed IFComp, it has welcomed English-translated work from all international communities.) +(作者注:以上我特指英语,因为可能出于写作方面的技术原因,互动小说社区倾向于按语言进行区分。当然也有 [法语][8] 或 [意大利语][9] 的互动小说年度活动,比如我就听说过至少一届中文互动小说节。幸运的是,这些边界易于打破。在我管理 IFComp 的四年中,我们很欢迎来自国际社区的英语翻译作品。) -![counterfeit monkey game screenshot][11] +![”假冒的猴子“游戏截图][11] -Starting a new game of Emily Short's "Counterfeit Monkey," running on the interpreter Lectrote (both open source software). +在解释器 Lectrote 上启动 Emily Short 的”假冒的猴子“新游戏(二者皆为开源软件)。 -Also due to its focus on text, IF presents some of the most accessible platforms for both play and authorship. Almost anyone who can read digital text—including users of assistive technology such as text-to-speech software—can play most IF works. Likewise, IF creation is open to all writers willing to learn and work with its tools and techniques. +此外由于互动小说专注于文本,它为玩家和作者都提供了最方便的平台。几乎所有能阅读数字化文本的人(包括能通过文字转语音软件等辅助技术阅读的用户)都能玩大部分的互动小说作品。互动小说创作对所有愿意学习和使用其工具和技术的作家开放。 -This brings us to IF’s long relationship with open source, which has helped enable the art form’s availability since its commercial heyday. I'll provide an overview of contemporary open-source IF creation tools, and then discuss the ancient and sometimes curious tradition of IF works that share their source code. +这使我们了解了互动小说与开源的长期关系,以及从它的全盛时期以来,对于艺术形式可用性的积极影响。接下来我将提供现代开源互动小说创建工具的概览,并讨论关于共享源代码这个古老且有点稀奇的互动小说作品传统。 -### The world of open source IF tools +### 开源互动小说工具的世界 -A number of development platforms, most of which are open source, are available to create traditional parser-driven IF in which the user types commands—for example, `go north,` `get lamp`, `pet the cat`, or `ask Zoe about quantum mechanics`—to interact with the game’s world. The early 1990s saw the emergence of several hacker-friendly parser-game development kits; those still in use today include [TADS][12], [Alan][13], and [Quest][14]—all open, with the latter two bearing FOSS licenses. +一些开发平台(其中大部分是开源的)可用于创建传统的语法解析器驱动互动小说,其中用户可通过输入命令(如 `向北走`、`拾取提灯`、`收养小猫` 或 `向 Zoe 询问量子机械学`)来与游戏世界交互。20 世纪 90 年代初期出现了几个黑客(此处指拥有友好的语法解析器)游戏开发工具箱,其中目前还在使用的有 [TADS][12]、[Alan][13] 和 [Quest][14],它们都是开源的,并且后两者兼容 FOSS 许可证。 -But by far the most prominent of these is [Inform][15], first released by Graham Nelson in 1993 and now maintained by a team Nelson still leads. Inform source is semi-open, in an unusual fashion: Inform 6, the previous major version, [makes its source available through the Artistic License][16]. This has more immediate relevance than may be obvious, since the otherwise proprietary Inform 7 holds Inform 6 at its core, translating its [remarkable natural-language syntax][17] into its predecessor’s more C-like code before letting it compile the work down into machine code. +其中最出名的是 [Inform][15],1993 年 Graham Nelson 发布了第一个版本,目前由 Nelson 领导的一个团队进行维护。Inform 的源代码是半开源的:Inform 6 是前一个主要版本,[它通过 Artistic 许可证开放源码][16]。这其中蕴涵比我们所看到的更直接的相关性,因为其它专有的 Inform 7 将 Inform 6 作为其核心,在让它将作品编译为机器码之前,将其 [杰出的自然语言语法][17] 翻译为其前身那种更类似 C 的代码。 -![inform 7 IDE screenshot][19] +![inform 7 集成式开发环境截图][19] -The Inform 7 IDE, loaded up with documentation and a sample project. +包含文档以及一个示例项目的 Inform 7 集成式开发环境 -Inform games run on a virtual machine, a relic of the Infocom era when that publisher targeted a VM so that it could write a single game that would run on Apple II, Commodore 64, Atari 800, and other flavors of the "[home computer][20]." Fewer popular operating systems exist today, but Inform’s virtual machines—the relatively modern [Glulx][21] or the charmingly antique [Z-machine][22], a reverse-engineered clone of Infocom’s historical VM—let Inform-created work run on any computer with an Inform interpreter. Currently, popular cross-platform interpreters include desktop programs like [Lectrote][23] and [Gargoyle][24] or browser-based ones like [Quixe][25] and [Parchment][26]. All are open source. +Inform 游戏运行在虚拟机上,这是 Inform 时代的遗留产物。当时的发行者为了让同一个游戏运行在 Apple II、Commodore 4、Atari 800 以及其它种类的“[家用计算机][20]”上,将虚拟机作为解决方案。这些原本流行的操作系统中只有少数至今仍存在,但 Inform 的虚拟机使得 Inform 创建的作品能够通过 Inform 解释器运行在任何的计算机上。这些虚拟机包括相对现代的 [Glulx][21],或者通过对 Inform 过去的虚拟机进行逆向工程克隆得到的可爱的古董 [Z-machine][22]。现在,流行的跨平台解释器包括如 [lectrote][23] 和 [Gargoyle][24] 等桌面程序,以及如 [Quixe][25] 和 [Parchment][26] 等基于浏览器的程序。以上所有均为开源软件。 -If the pace of Inform’s development has slowed in its maturity, it remains vital through an active and transparent ecosystem—just like any other popular open source project. In Inform’s case, this includes the aforementioned interpreters, [a collection of language extensions][27] (usually written in a mix of Inform 6 and 7), and of course, all the work created with it and shared with the world, sometimes with source included (I’ll return to that topic later in this article). +如其它的流行开源项目一样,如果 Inform 的发展进程随着它的成熟而逐渐变缓,它为我们留下的最重要的财富就是其活跃透明的生态环境。对于 Inform 来说,(这些财富)包括前面提到的解释器、[语言扩展集合][27](通常混合使用 Inform 6 和 Inform 7 写成),当然也包括所有用它们写成并分享于世界的作品,有的时候也包括那些源代码。(在这篇文章的后半部分我会回到这个话题) -IF creation tools invented in the 21st century tend to explore player interactions outside of the traditional parser, generating hypertext-driven work that any modern web browser can load. Chief among these is [Twine][28], originally developed by Chris Klimas in 2009 and under active development by many contributors today as [a GNU-licensed open source project][29]. (In fact, [Twine][30] can trace its OSS lineage back to [TiddlyWiki][31], the project from which Klimas initially derived it.) +互动小说创建工具在 21 世纪被发明,力求在传统的语法解析器之外探索一种新的玩家交互方式,即创建任何现代 Web 浏览器都能加载的超文本驱动作品。其中的领头羊是 [Twine][28],原本由 Klimas 在 2009 年开发,目前作为 [GNU 许可证开源项目][29] 由许多贡献者进行活跃开发。(事实上,[Twine][30] 的开源软件血统可追溯到 [TiddlyWiki][31],一个由 Klimas 最初继承的项目) -Twine represents a sort of maximally [open and accessible approach][30] to IF development: Beyond its own FOSS nature, it renders its output as self-contained websites, relying not on machine code requiring further specialized interpretation but the open and well-exercised standards of HTML, CSS, and JavaScript. As a creative tool, Twine can match its own exposed complexity to the creator’s skill level. Users with little or no programming knowledge can create simple but playable IF work, while those with more coding and design skills—including those developing these skills by making Twine games—can develop more sophisticated projects. Little wonder that Twine’s visibility and popularity in educational contexts has grown quite a bit in recent years. +对于互动小说开发来说,Twine 代表一系列最开放及最可用的方法。由于它的 FOSS 天性,它通过完备的网页来展示渲染输出,不依赖于需要进一步特殊编译的机器码,而是使用开放并且成熟的 HTML、CSS 和 JavaScript 标准。作为一个创建工具,Twine 能够根据创建者的技能等级,暴露与之相匹配的复杂度。拥有很少或没有编程知识的用户能够创建简单但是可玩的互动小说作品,但那些拥有更多编码和设计技能(包括通过开发 Twine 游戏获得的技能提升)的用户能够创建更复杂的项目。近几年 Twine 在教育领域的可见度和流行度有不小的提升,对此你不要感到太惊讶哦。 -Other noteworthy open source IF development projects include the MIT-licensed [Undum][32] by Ian Millington, and [ChoiceScript][33] by Dan Fabulich and the [Choice of Games][34] team—both of which also target the web browser as the gameplay platform. Looking beyond strict development systems like these, web-based IF gives us a rich and ever-churning ecosystem of open source work, such as furkle’s [collection of Twine-extending tools][35] and Liza Daly’s [Windrift][36], a JavaScript framework purpose-built for her own IF games. +另一些值得注意的开源互动小说开发项目包括由 Ian Millington 开发的以 MIT 许可证发布的 [Undum][32],以及由 Dan Fabulich 和 [Choice of Games][34] 团队开发的 [ChoiceScript][33],两者也专注于将 Web 浏览器作为游戏平台。除了以上严格的开发系统以外,基于 Web 的互动小说也呈现给我们以开源作品的丰富、变幻的生态。比如 Furkle 的 [Twine 扩展工具集][35],以及 Liza Daly 为自己的互动小说游戏创建的名为 [Windrift][36] 的 JavaScript 框架。 -### Programs, games, and game-programs +### 程序、游戏,以及游戏程序 -Twine benefits from [a standing IFTF program dedicated to its support][37], allowing the public to help fund its maintenance and development. IFTF also directly supports two long-time public services, IFComp and the IF Archive, both of which depend upon and contribute back into open software and technologies. +Twine 受益于 [一个致力于提供支持的长期 IFTF 计划][37],它允许公众为其维护和发展提供资助。IFTF 还直接支持两个长期公共服务,IFComp 和互动小说归档,这两个服务都依赖并回馈开放软件和技术。 -![Harmonia opening screen shot][39] +![Harmonia 开场截图][39] -The opening of Liza Daly's "Harmonia," created with the Windrift open source IF-creation framework. +由 Liza Daly 开发的“Harmonia”的开场画面,该游戏使用 Windrift 开源互动小说创建框架创建。 -The Perl- and JavaScript-based application that runs the IFComp’s website has been [a shared-source project][40] since 2014, and it reflects [the stew of FOSS licenses used by its IF-specific sub-components][41], including the various code libraries that allow parser-driven competition entries to run in a web browser. [The IF Archive][42]—online since 1992 and [an IFTF project since 2017][43]—is a set of mirrored repositories based entirely on ancient and stable internet standards, with [a little open source Python script][44] to handle indexing. +自 2014 年以来,用于运行 IFComp 网站的基于 Perl 和 JavaScript 的应用程序一直是 [一个共享源代码项目][40],它反映了 [互动小说特有子组件使用的 FOSS 许可证是个大杂烩][41],其中包括那些允许解析器驱动的竞争条目在 Web 浏览器中运行的各式各样的代码库。在 1992 年上线并 [在 2017 年成为一个 IFTF 项目][43] 的 [互动小说归档][42],是一套完全基于古老且稳定的互联网标准的镜像仓库,只使用了 [一点开源 Pyhon 脚本][44] 用来处理索引。 -### At last, the fun part: Let's talk about open source text games +### 最后,也是最有趣的部分,让我们聊聊开源文字游戏 -The bulk of the archive [comprises games][45], of course—years and years of games, reflecting decades of evolving game-design trends and IF tool development. +归档的主体 [由游戏组成][45],当然,是那些历经岁月的游戏。它们反映了数十年来不断发展的游戏设计趋势和互动小说工具发展。 -Lots of IF work shares its source code, and the community’s quick-start solution for finding it is simple: [Search the IFDB for the tag "source available"][46]. (The IFDB is yet another long-running IF community service, run privately by TADS creator Mike Roberts.) Users who are comfortable with a more bare-bones interface may also wish to browse [the `/games/source` directory][47] of the IF Archive, which groups content by development platform and written language (there's also a lot of work either too miscellaneous or too ancient to categorize floating at the top). +许多互动小说作品都共享其源代码,社区对于找到它们的快速入门解决方案很简单---[在 IFDB 中搜索标签“source available”][46]。IFDB 是另一个长期运行的互动小说社区服务,由 TADS 的创立者 Mike Roberts 私人运营。对更加简单的界面感到舒适的用户,也可能希望浏览互动小说归档的 [`games/source` 目录][47],该目录按开发平台和编写语言对内容运行分组(也有很多作品,由于太繁杂或太古老而无法分类,只能浮于列表的开头)。 -A little bit of random sampling of these code-sharing games reveals an interesting dilemma: Unlike the wider world of open source software, the IF community lacks a generally agreed-upon way of licensing all the code that it generates. Unlike a software tool—including all the tools we use to build IF—an interactive fiction game is a work of art in the most literal sense, meaning that an open source license intended for software would fit it no better than it would any other work of prose or poetry. But then again, an IF game is also a piece of software, and it exhibits source-code patterns and techniques that its creator may legitimately wish to share with the world. What is an open source-aware IF creator to do? +对这些代码共享游戏随机抽取的几个样本,揭示了一个有趣的窘境:与更广阔的开源软件世界不同,互动小说社区缺少一种普遍认同的方式来授权它生成的所有代码。与软件工具(包括我们用来创建互动小说的所有工具)不同的是,从字面意思上讲,交互式小说游戏是一件艺术作品。这意味着,将面向软件的开源许可证用于交互式小说游戏,并没有比用于其它像散文或诗歌作品更适合。但同样,互动小说游戏也是一个软件,它展示了创建者希望合法地与世界分享的源代码模式和技术。一个拥有开源意识的互动小说创建者会怎么做呢? -Some games address this by passing their code into the public domain, either through explicit license or—as in the case of [the original 42-year-old Adventure by Crowther and Woods][48]—through community fiat. Some try to split the difference, rolling their own license that allows for free re-use of a game’s exposed business logic but prohibits the creation of work derived specifically from its prose. This is the tack I took when I opened up the source of my own game, [The Warbler’s Nest][49]. Lord knows how well that’d stand up in court, but I didn’t have any better ideas at the time. +有些游戏通过将其代码传递到公共领域来解决这一问题,或者通过明确的许可证,亦或者如 [42 年前由 Crowther 和 Woods 开发的”冒险之旅“][48] 一样通过社区发布。一些人试图将其中的不同部分分开,应用他们自己的许可证,允许免费复用游戏公开的业务逻辑,但禁止针对其散文内容的再创作。这是我在开源自己的游戏 [莺巢][49] 时采取的策略。天知道这是否能在法律上站得住脚,但我当时没有更好的主意。 -Naturally, you can find work that simply puts everything under a single common license and never mind the naysayers. A prominent example is [Emily Short’s epic Counterfeit Monkey][50], released in its entirety under a Creative Commons 4.0 license. [CC frowns at its application to code][51], but you could argue that [the strangely prose-like nature of Inform 7 source][52] makes it at least a little more compatible with a CC license than a more traditional software project would be. +当然,你会发现一些作品对所有部分使用单一的许可证,而不介意反对者。一个突出的例子就是 [Emily Short 的史诗作品”假冒的猴子“][50],其全部采用 Creative Commons 4.0 许可证发布。[CC 对其应用于代码感到不满][51],但你可以认为 [Inform 7 源码这种不寻常的散文风格特性][52] 至少比传统的软件项目更适合 CC 许可证。 -### What now, adventurer? +### 接下来要做什么呢,冒险者? -If you are eager to start exploring the world of interactive fiction, here are a few links to check out: +如果你希望开始探索互动小说的世界,这里有几个链接可供你参考: -+ As mentioned above, IFDB and the IF Archive both present browsable interfaces to more than 40 years worth of collected interactive fiction work. Much of this is playable in a web browser, but some require additional interpreter programs. IFDB can help you find and install these. ++ 如上所述,IFDB 和互动小说归档都提供了可浏览的界面,用于浏览超过 40 年价值的互动小说作品。其中大部分可以在 Web 浏览器中播放,但有些需要额外的解释器程序。IFDB 能帮助你找到并安装它们。 - IFComp’s annual results pages provide another view into the best of this free and archive-available work. + IFComp 的年度结果页面展现了另一个视图,帮助你了解最佳的免费和归档可用作品。 -+ The Interactive Fiction Technology Foundation is a charitable non-profit organization that helps support Twine, IFComp, and the IF Archive, as well as improve the accessibility of IF, explore IF’s use in education, and more. Join its mailing list to receive IFTF’s monthly newsletter, peruse its blog, and browse some thematic merchandise. ++ 互动小说技术基金会是一个非营利的慈善组织,主要帮助并支持 Twine、IFComp 和互动小说归档的发展,以及提升互动小说的无障碍功能、探索互动小说在教育领域中的应用等等。加入其邮件列表,可以接收 IFTF 的每月资讯,浏览其博客,亦或浏览一些主题商品。 -+ John Paul Wohlscheid wrote this article about open-source IF tools earlier this year. It covers some platforms not mentioned here, so if you’re still hungry for more, have a look. ++ 在今年的早些时候,John Paul Wohlscheid 写了这篇关于开源互动小说工具的文章。它涵盖了一些这里没有提及的平台,所以如果你还想了解更多,请看一看这篇文章。 -------------------------------------------------------------------------------- @@ -91,7 +91,7 @@ via: https://opensource.com/article/18/7/interactive-fiction-tools 作者:[Jason Mclntosh][a] 选题:[lujun9972](https://github.com/lujun9972) -译者:[译者ID](https://github.com/译者ID) +译者:[cycoe](https://github.com/cycoe) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9b22a95585f7bf530491df54a2589ce1b8ce3891 Mon Sep 17 00:00:00 2001 From: cycoe Date: Fri, 23 Aug 2019 15:20:43 +0800 Subject: [PATCH 621/951] move translated article to translated directory --- ...0180720 A brief history of text-based games and open source.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20180720 A brief history of text-based games and open source.md (100%) diff --git a/sources/talk/20180720 A brief history of text-based games and open source.md b/translated/talk/20180720 A brief history of text-based games and open source.md similarity index 100% rename from sources/talk/20180720 A brief history of text-based games and open source.md rename to translated/talk/20180720 A brief history of text-based games and open source.md From 2f33d8a1fa3c77e84cfb452cb710058b09eacfa0 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 23 Aug 2019 18:53:21 +0800 Subject: [PATCH 622/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars=5F2.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2023=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E4=BA=94=2018:53:21=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ommand Line Heroes- Season 1- OS Wars_2.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md index 0fba2329ef..7fcbeb38d7 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md @@ -73,43 +73,43 @@ John Hall: [00:11:30] 我的一个朋友名叫Dirk Holden[00:10:56],他是德 Saron Yitbarek: [00:12:00] 程序员们着迷的这些东西恰好对大公司也极具吸引力。但由于FUD的作用,一些企业对此持谨慎态度。他们听到开源,就想:"开源。这看起来不太可靠,很混乱,充满了BUG".但正如那位银行经理所指出的,金钱听过一种有趣的方式,说服人们克服困境。甚至那些需要网站的小公司也加入了Linux阵营。与一些昂贵的专有选择相比,使用一个廉价的Linux系统在成本上是无法比拟的。如果您是一家雇佣专业人员来构建网站的商店,那么您很定想让他们使用Linux。 -[00:12:30] 让我们快进几年. Linux运行每个人的网站上。Linux已经征服了服务器世界,然后智能手机也随之诞生。当然,苹果和他们的iPhone占据了相当大的市场份额,而且微软页希望能进入这个市场,但令人惊讶的是,Linux也在那,已经做好准备了,迫不及待要大展拳脚。 +[00:12:30] 让我们快进几年. Linux运行每个人的网站上。Linux已经征服了服务器世界,然后智能手机也随之诞生。当然,苹果和他们的iPhone占据了相当大的市场份额,而且微软也希望能进入这个市场,但令人惊讶的是,Linux也在那,已经做好准备了,迫不及待要大展拳脚。 作家兼记者 James Allworth. -James Allworth: [00:13:00] There was certainly room for a second player, and that could well have been Microsoft, but for the fact of Android, which was fundamentally based on Linux, and because Android, famously acquired by Google, and now running a majority of the world's smartphones, Google built it on top of that. They were able to start with a very sophisticated operating system and a cost basis of zero. They managed to pull it off, and it ended up locking Microsoft out of the next generation of devices, by and large, at least from an operating system perspective. +James Allworth: [00:13:00] 当然还有容纳第二个竞争者的空间,那本可以是微软,但是实际上却是Android,而Andrid基本上是基于Linux的. 众所周知,Android被谷歌所收购,现在运行在世界上大部分的智能手机上,谷歌在Linux的基础上创建了Android。Linux使他们能够以零成本从一个非常复杂的操作系统开始。他们成功地实现了这一目标,最终将微软挡在了下一代设备之外,至少从操作系统的角度来看是这样。 -Saron Yitbarek: [00:13:30] The ground was breaking up, big time, and Microsoft was in danger of falling into the cracks. John Gossman is the chief architect on the Azure team at Microsoft. He remembers the confusion that gripped the company at that time. +Saron Yitbarek: [00:13:30] 天崩地裂了,很大程度上,微软有被埋没的风险。John Gossman是微软Azure团队的首席架构师。他还记得当时困扰公司的困惑。 -John Gossman: [00:14:00] Like a lot of companies, Microsoft was very concerned about IP pollution. They thought that if you let developers use open source they would likely just copy and paste bits of code into some product and then some sort of a viral license might take effect that ... They were also very confused, I think, it was just culturally, a lot of companies, Microsoft included, were confused on the difference between what open source development meant and what the business model was. There was this idea that open source meant that all your software was free and people were never going to pay anything. +John Gossman: [00:14:00] 像许多公司一样,微软也非常担心知识产权污染。他们认为,如果允许开发人员使用开源代码,那么很可能只是复制并粘贴一些代码到某些产品中,就会让某种病毒式的许可证生效从而引发未知的风险…,我认为,这跟公司文化有关,很多公司,包括微软,都对开源开发的意义和商业模式之间的分歧感到困惑。有一种观点认为,开源意味着你所有的软件都是免费的,人们永远不会付钱。 -Saron Yitbarek: [00:14:30] Anybody invested in the old, proprietary model of software is going to feel threatened by what's happening here. When you threaten an enormous company like Microsoft, yeah, you can bet they're going to react. It makes sense they were pushing all that FUD — fear, uncertainty and doubt. At the time, an “ us versus them ” attitude was pretty much how business worked. If they'd been any other company, though, they might have kept that old grudge, that old thinking, but then, in 2013, everything changes. +Saron Yitbarek: [00:14:30] 任何投资于旧的、专有软件模型的人都会觉得这里发生的一切对他们构成了威胁。当你威胁到像微软这样的大公司时,是的,他们一定会做出反应。他们推动所有这些FUD(fear,uncertainty,doubt)-恐惧,不确定性和怀疑是有道理的。当时,商业运作的方式基本上就是相互竞争。不过,如果他们是其他公司的话(If they'd been any other company,看不懂什么意思),他们可能还会怀恨在心,抱着旧有的想法,但到了2013年,一切都变了。 -[00:15:00] Microsoft's cloud computing service, Azure, goes online and, shockingly, it offers Linux virtual machines from day one. Steve Ballmer, the CEO who called Linux a cancer, he's out, and a new forward - thinking CEO, Satya Nadella, has been brought in. +[00:15:00] 微软的云计算服务Azure上线了,令人震惊的是,它从第一天开始就提供了Linux虚拟机。Steve Ballmer,这位把Linux称为癌症的首席执行官,已经离开了,代替他的是一位新的有远见的首席执行官Satya Nadella. -John Gossman: Satya has a different attitude. He's another generation. He's a generation younger than Paul and Bill and Steve were, and had a different perspective on open source. +John Gossman: Satya 有不同的看法. 他属于另一个世代. 比Paul , Bill 和 Steve 更年轻的世代 , 他对开源有不同的看法. -Saron Yitbarek: John Gossman, again, from Microsoft's Azure team. +Saron Yitbarek: John Gossman, 再说一次, 来自于 微软的Azure 团队. -John Gossman: [00:16:00] We added Linux support into Azure about four years ago, and that was for very pragmatic reasons. If you go to any enterprise customer, you will find that they are not trying to decide whether to use Windows or to use Linux or to use .net or to use Java TM . They made all those decisions a long time ago — about 15 years or so ago, there was some of this argument. Now, every company that I have ever seen has a mix of Linux and Java and Windows and .net and SQL Server and Oracle and MySQL — proprietary source code - based products and open source code products. +John Gossman: [00:16:00] 大约四年前,处于实际需要,我们在Azure中添加了Linux支持。如果访问任何一家企业客户,你都会发现他们并没有试图决定是使用Windows还是使用Linux、使用.net还是使用Java TM。他们在很久以前就做出了决定——大约15年前才有这样的一些争论。现在,我见过的每一家公司都混合了Linux和Java、Windows和.net、SQL Server、Oracle和MySQL——基于专有源代码的产品和开放源代码的产品。 -If you're going to operate a cloud and you're going to allow and enable those companies to run their businesses on the cloud, you simply cannot tell them, "You can use this software but you can't use this software." +如果你正在运维着一个云,允许这些公司在云上运行他们的业务,那么你就不能简单地告诉他们,“你可以使用这个软件,但你不能使用那个软件。” -Saron Yitbarek: [00:16:30] That's exactly the philosophy that Satya Nadella adopted. In the fall of 2014, he gets up on stage and he wants to get across one big, fat point. Microsoft loves Linux. He goes on to say that 20 % of Azure is already Linux and that Microsoft will always have first - class support for Linux distros. There's not even a whiff of that old antagonism toward open source. +Saron Yitbarek: [00:16:30] 这正是 Satya Nadella 采纳的哲学思想. 2014年秋季,他站在舞台上,希望传递一个重要信息。微软爱Linux。他接着说,Azure 20%的业务量已经是Linux了,微软将始终对Linux发行版提供一流的支持。没有哪怕一丝对开源的宿怨。 -To drive the point home, there's literally a giant sign behind them that reads, "Microsoft hearts Linux." Aww. For some of us, that turnaround was a bit of a shock, but really, it shouldn't have been. Here's Steven Levy, a tech journalist and author. +为了说明这一点,在他们的背后有一个巨大的标志,上面写着:“Microsoft hearts Linux”。哇哇哇。对我们中的一些人来说,这种转变有点令人震惊,但实际上,无需如此震惊。下面是Steven Levy,一名科技记者兼作家。 -Steven Levy: [00:17:30] When you're playing a football game and the turf becomes really slick, maybe you switch to a different kind of footwear in order to play on that turf. That's what they were doing. They can't deny reality and there are smart people there so they had to realize that this is the way the world is and put aside what they said earlier, even though they might be a little embarrassed at their earlier statements, but it would be crazy to let their statements about how horrible open source was earlier, affect their smart decisions now. +Steven Levy: [00:17:30] 当你在踢足球的时候,如果草坪变滑了,那么你也许会换一种不同的鞋子。他们当初就是这么做的。他们不能否认现实而且他们之间也有有聪明人,所以他们必须意识到,这就是世界的运行方式,不管他们早些时候说了什么,即使他们对之前的言论感到尴尬,但是让他们之前关于开源多么可怕的言论影响到现在明智的决策那才真的是疯了。 -Saron Yitbarek: [00:18:00] Microsoft swallowed its pride in a big way. You might remember that Apple, after years of splendid isolation, finally shifted toward a partnership with Microsoft. Now it was Microsoft's turn to do a 180. After years of battling the open source approach, they were reinventing themselves. It was change or perish. Steven Vaughan-Nichols. +Saron Yitbarek: [00:18:00] 微软低下了它高傲的头. 你可能还记得苹果公司, 经过多年的孤立无援, 最终转向与微软构建合作伙伴关系. 现在轮到微软进行180度转变了. 经过多年的与开源方法的战斗后,他们正在重塑自己。要么改变,要么死亡. Steven Vaughan-Nichols. -Steven Vaughan-Nichols: [00:18:30] Even a company the size of Microsoft simply can't compete with the thousands of open source developers working on all these other major projects , including Linux. They were very loath e to do so for a long time. The former Microsoft CEO, Steve Ballmer, hated Linux with a passion. Because of its GPL license, it was a cancer, but once Ballmer was finally shown the door, the new Microsoft leadership said, "This is like trying to order the tide to stop coming in. The tide is going to keep coming in. We should work with Linux, not against it." +Steven Vaughan-Nichols: [00:18:30] 即使是像微软这样规模的公司也无法与成千上万的开源开发者竞争,这些开发者开发这包括Linux在内的其他大项目。很长时间以来他们都不愿意这么做。前微软首席执行官史蒂夫·鲍尔默(SteveBallmer)对Linux深恶痛绝。由于它的GPL许可证,让Linux称为一种癌症,但一旦鲍尔默被扫地出门,新的微软领导层说,“这就好像试图命令潮流不要过来,但潮水依然会不断涌进来。我们应该与Linux合作,而不是与之对抗。” -Saron Yitbarek: [00:19:00] Really, one of the big wins in the history of online tech is the way Microsoft was able to make this pivot, when they finally decided to. Of course, older, hardcore Linux supporters were pretty skeptical when Microsoft showed up at the open source table. They weren't sure if they could embrace these guys, but, as Vaughan-Nichols points out, today's Microsoft simply is not your mom and dad's Microsoft. +Saron Tiebreak: [00:19:00] 真的,在线技术历史上最大的胜利之一就是微软能够做出这样的转变,当他们最终决定这么做的时候。当然,当微软出现在开源的桌子上时,老的、铁杆Linux支持者是相当怀疑的。他们不确定自己是否能接受这些家伙,但正如沃恩-尼科尔斯所指出的,今天的微软根本不是你父母的微软。事实上, 互联网技术历史上最大的胜利之一就是让微软最终做出如此转变. 当然,当微软出现在开源桌上时,老一代的、铁杆Linux支持者是相当怀疑的。他们不确定自己是否能接受这些家伙,但正如Vaughan-Nichols 所指出的,今天的微软已经不是你父母那一代时的微软了。 -Steven Vaughan-Nichols : [00:19:30] Microsoft 2017 is not Steve Ballmer's Microsoft, nor is it Bill Gates' Microsoft. It's an entirely different company with a very different approach and, again, once you start using open source, it's not like you can really pull back. Open source has devoured the entire technology world. People who have never heard of Linux as such, don't know it, but every time they're on Facebook , they're running Linux. Every time you do a Google search , you're running Linux. +Steven Vaughan-Nichols : [00:19:30] 2017年的微软既不是史蒂夫•鲍尔默(Steve Ballmer)的微软,也不是比尔•盖茨(Bill Gates)的微软。这是一家完全不同的公司,有着完全不同的方法,而且,开源软件一旦被放出,就无法被收回。开源已经吞噬了整个技术世界。从未听说过Linux的人可能对它并不了解,但是每次他们访问Facebook,他们都在运行Linux。每次执行谷歌搜索时,你都在运行Linux。 -[00:20:00] Every time you do anything with your Android phone , you're running Linux again. It literally is everywhere, and Microsoft can't stop that, and thinking that Microsoft can somehow take it all over, I think is naïve. +[00:20:00] 每次你用Android手机,你都在运行Linux。它确实无处不在,微软无法阻止它,我认为以为微软可以以某种方式接管它的想法,太天真了。 Saron Yitbarek: [00:20:30] Open source supporters might have been worrying about Microsoft coming in like a wolf in the flock, but the truth is, the very nature of open source software protects it from total domination. No single company can own Linux and control it in any specific way. Greg Kroah-Hartman is a fellow at the Linux Foundation. From 61075cd3b99379dbcaa37a23c6442d83d3197c8b Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 23 Aug 2019 19:15:43 +0800 Subject: [PATCH 623/951] =?UTF-8?q?take=20a=20break:=2020180116=20Command?= =?UTF-8?q?=20Line=20Heroes-=20Season=201-=20OS=20Wars=5F2.md=20at=202019?= =?UTF-8?q?=E5=B9=B4=2008=E6=9C=88=2023=E6=97=A5=20=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E4=BA=94=2019:15:43=20HKT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md index 7fcbeb38d7..fe598d2f3f 100644 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md +++ b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md @@ -111,9 +111,9 @@ Steven Vaughan-Nichols : [00:19:30] 2017年的微软既不是史蒂夫•鲍尔 [00:20:00] 每次你用Android手机,你都在运行Linux。它确实无处不在,微软无法阻止它,我认为以为微软可以以某种方式接管它的想法,太天真了。 -Saron Yitbarek: [00:20:30] Open source supporters might have been worrying about Microsoft coming in like a wolf in the flock, but the truth is, the very nature of open source software protects it from total domination. No single company can own Linux and control it in any specific way. Greg Kroah-Hartman is a fellow at the Linux Foundation. +Saron Yitbarek: [00:20:30] 开源支持者可能一直担心微软会像混入羊群中的狼一样,但事实是,开源软件的本质保护了它无法被完全控制。没有一家公司能够拥有Linux并以某种特定的方式控制它。Greg Kroah-Hartman是Linux基金会的一名成员。 -Greg Kroah-Hartman: Every company and every individual contributes to Linux in a selfish manner. They're doing so because they want to solve a problem that they have, be it hardware isn't working , or they want to add a new feature to do something else , or want to take it in a direction that they'll build that they can use for their product. That's great, because then everybody benefits from that because they're releasing the code back, so that everybody can use it. It's because of that selfishness that all companies and all people have, everybody benefits. +Greg Kroah-Hartman: 每个公司和个人都以自私的方式为Linux做出贡献。他们之所以这样做是因为他们想要解决他们所面临的问题,可能是硬件无法工作,或者是他们想要添加一个新功能来做其他事情,又或者想在他们的产品中使用它。这很棒,因为他们会把代码贡献回去,此后每个人都会从中受益,这样每个人都可以用到这份代码。正是因为这种自私,所有的公司,所有的人,所有的人都能从中受益。 Saron Yitbarek: [00:21:30] Microsoft has realized that in the coming cloud wars, fighting Linux would be like going to war with, well, a cloud. Linux and open source aren't the enemy, they're the atmosphere. Today, Microsoft has joined the Linux Foundation as a platinum member. They became the number one contributor to open source on GitHub. In September, 2017, they even joined the Open Source Initiative. These days, Microsoft releases a lot of its code under open licenses. Microsoft's John Gossman describes what happened when they open sourced .net. At first, they didn't really think they'd get much back. From 1fe0ea7dc45705fd6e3b3b55a680a8548fc4d4ec Mon Sep 17 00:00:00 2001 From: MjSeven Date: Fri, 23 Aug 2019 20:35:14 +0800 Subject: [PATCH 624/951] Translating by MjSeven --- sources/tech/20190701 Get modular with Python functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190701 Get modular with Python functions.md b/sources/tech/20190701 Get modular with Python functions.md index a424323503..57d363f4e6 100644 --- a/sources/tech/20190701 Get modular with Python functions.md +++ b/sources/tech/20190701 Get modular with Python functions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f7e2ad23804e689b7ea07f152861e484ecd98c70 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 23 Aug 2019 20:53:45 +0800 Subject: [PATCH 625/951] Rename sources/tech/20190822 How the Linux desktop has grown.md to sources/talk/20190822 How the Linux desktop has grown.md --- .../{tech => talk}/20190822 How the Linux desktop has grown.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190822 How the Linux desktop has grown.md (100%) diff --git a/sources/tech/20190822 How the Linux desktop has grown.md b/sources/talk/20190822 How the Linux desktop has grown.md similarity index 100% rename from sources/tech/20190822 How the Linux desktop has grown.md rename to sources/talk/20190822 How the Linux desktop has grown.md From d8da59397ccafb9000134e879b5340319ba70562 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 23 Aug 2019 20:55:21 +0800 Subject: [PATCH 626/951] Rename sources/tech/20190822 What piece of advice had the greatest impact on your career.md to sources/talk/20190822 What piece of advice had the greatest impact on your career.md --- ...What piece of advice had the greatest impact on your career.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20190822 What piece of advice had the greatest impact on your career.md (100%) diff --git a/sources/tech/20190822 What piece of advice had the greatest impact on your career.md b/sources/talk/20190822 What piece of advice had the greatest impact on your career.md similarity index 100% rename from sources/tech/20190822 What piece of advice had the greatest impact on your career.md rename to sources/talk/20190822 What piece of advice had the greatest impact on your career.md From 74a204c65f200c4aa7ace343e517c22d7da6d29c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Aug 2019 21:26:42 +0800 Subject: [PATCH 627/951] APL --- .../tech/20181030 Podman- A more secure way to run containers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20181030 Podman- A more secure way to run containers.md b/sources/tech/20181030 Podman- A more secure way to run containers.md index a6252d87cc..622ba45825 100644 --- a/sources/tech/20181030 Podman- A more secure way to run containers.md +++ b/sources/tech/20181030 Podman- A more secure way to run containers.md @@ -1,3 +1,4 @@ +wxy has applied Podman: A more secure way to run containers ====== Podman uses a traditional fork/exec model (vs. a client/server model) for running containers. From 8b9b2f0fc4c2028caf2641f208f641afb6d63597 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 23 Aug 2019 21:34:54 +0800 Subject: [PATCH 628/951] Delete 20190823 .md --- sources/tech/20190823 .md | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 sources/tech/20190823 .md diff --git a/sources/tech/20190823 .md b/sources/tech/20190823 .md deleted file mode 100644 index a5e77474a5..0000000000 --- a/sources/tech/20190823 .md +++ /dev/null @@ -1,25 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: () -[#]: via: (https://www.linux.com/news/vmware-in-talks-to-acquire-pivotal/) -[#]: author: ( ) - - -====== - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/vmware-in-talks-to-acquire-pivotal/ - -作者:[][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[b]: https://github.com/lujun9972 From f9d2f2d08abe729a1bb96865533de34d275b727b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Aug 2019 23:45:46 +0800 Subject: [PATCH 629/951] TSL&PRF --- ...an- A more secure way to run containers.md | 131 ------------------ ...an- A more secure way to run containers.md | 128 +++++++++++++++++ 2 files changed, 128 insertions(+), 131 deletions(-) delete mode 100644 sources/tech/20181030 Podman- A more secure way to run containers.md create mode 100644 translated/tech/20181030 Podman- A more secure way to run containers.md diff --git a/sources/tech/20181030 Podman- A more secure way to run containers.md b/sources/tech/20181030 Podman- A more secure way to run containers.md deleted file mode 100644 index 622ba45825..0000000000 --- a/sources/tech/20181030 Podman- A more secure way to run containers.md +++ /dev/null @@ -1,131 +0,0 @@ -wxy has applied -Podman: A more secure way to run containers -====== -Podman uses a traditional fork/exec model (vs. a client/server model) for running containers. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-cloud-safe.png?itok=yj2TFPzq) - -Before I get into the main topic of this article, [Podman][1] and containers, I need to get a little technical about the Linux audit feature. - -### What is audit? - -The Linux kernel has an interesting security feature called **audit**. It allows administrators to watch for security events on a system and have them logged to the audit.log, which can be stored locally or remotely on another machine to prevent a hacker from trying to cover his tracks. - -The **/etc/shadow** file is a common security file to watch, since adding a record to it could allow an attacker to get return access to the system. Administrators want to know if any process modified the file. You can do this by executing the command: - -``` -# auditctl -w /etc/shadow -``` - -Now let's see what happens if I modify the /etc/shadow file: - -``` -# touch /etc/shadow -# ausearch -f /etc/shadow -i -ts recent - -type=PROCTITLE msg=audit(10/10/2018 09:46:03.042:4108) : proctitle=touch /etc/shadow type=SYSCALL msg=audit(10/10/2018 09:46:03.042:4108) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x7ffdb17f6704 a2=O_WRONLY|O_CREAT|O_NOCTTY| O_NONBLOCK a3=0x1b6 items=2 ppid=2712 pid=3727 auid=dwalsh uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts1 ses=3 comm=touch exe=/usr/bin/touch subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)` -``` - -There's a lot of information in the audit record, but I highlighted that it recorded that root modified the /etc/shadow file and the owner of the process' audit UID ( **auid** ) was **dwalsh**. - -Did the kernel do that? - -#### Tracking the login UID - -**loginuid** , stored in **/proc/self/loginuid** , that is part of the proc struct of every process on the system. This field can be set only once; after it is set, the kernel will not allow any process to reset it. - -There is a field called, stored in, that is part of the proc struct of every process on the system. This field can be set only once; after it is set, the kernel will not allow any process to reset it. - -When I log into the system, the login program sets the loginuid field for my login process. - -My UID, dwalsh, is 3267. - -``` -$ cat /proc/self/loginuid -3267 -``` - -Now, even if I become root, my login UID stays the same. - -``` -$ sudo cat /proc/self/loginuid -3267 -``` - -Note that every process that's forked and executed from the initial login process automatically inherits the loginuid. This is how the kernel knew that the person who logged was dwalsh. - -### Containers - -Now let's look at containers. - -``` -sudo podman run fedora cat /proc/self/loginuid -3267 -``` - -Even the container process retains my loginuid. Now let's try with Docker. - -``` -sudo docker run fedora cat /proc/self/loginuid -4294967295 -``` - -### Why the difference? - -Podman uses a traditional fork/exec model for the container, so the container process is an offspring of the Podman process. Docker uses a client/server model. The **docker** command I executed is the Docker client tool, and it communicates with the Docker daemon via a client/server operation. Then the Docker daemon creates the container and handles communications of stdin/stdout back to the Docker client tool. - -The default loginuid of processes (before their loginuid is set) is 4294967295. Since the container is an offspring of the Docker daemon and the Docker daemon is a child of the init system, we see that systemd, Docker daemon, and the container processes all have the same loginuid, 4294967295, which audit refers to as the unset audit UID. - -``` -cat /proc/1/loginuid -4294967295 -``` - -### How can this be abused? - -Let's look at what would happen if a container process launched by Docker modifies the /etc/shadow file. - -``` -$ sudo docker run --privileged -v /:/host fedora touch /host/etc/shadow -$ sudo ausearch -f /etc/shadow -i type=PROCTITLE msg=audit(10/10/2018 10:27:20.055:4569) : proctitle=/usr/bin/coreutils --coreutils-prog-shebang=touch /usr/bin/touch /host/etc/shadow type=SYSCALL msg=audit(10/10/2018 10:27:20.055:4569) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x7ffdb6973f50 a2=O_WRONLY|O_CREAT|O_NOCTTY| O_NONBLOCK a3=0x1b6 items=2 ppid=11863 pid=11882 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=touch exe=/usr/bin/coreutils subj=system_u:system_r:spc_t:s0 key=(null) -``` - -In the Docker case, the auid is unset (4294967295); this means the security officer might know that a process modified the /etc/shadow file but the identity was lost. - -If that attacker then removed the Docker container, there would be no trace on the system of who modified the /etc/shadow file. - -Now let's look at the exact same scenario with Podman. - -``` -$ sudo podman run --privileged -v /:/host fedora touch /host/etc/shadow -$ sudo ausearch -f /etc/shadow -i type=PROCTITLE msg=audit(10/10/2018 10:23:41.659:4530) : proctitle=/usr/bin/coreutils --coreutils-prog-shebang=touch /usr/bin/touch /host/etc/shadow type=SYSCALL msg=audit(10/10/2018 10:23:41.659:4530) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x7fffdffd0f34 a2=O_WRONLY|O_CREAT|O_NOCTTY| O_NONBLOCK a3=0x1b6 items=2 ppid=11671 pid=11683 auid=dwalsh uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=3 comm=touch exe=/usr/bin/coreutils subj=unconfined_u:system_r:spc_t:s0 key=(null) -``` - -Everything is recorded correctly with Podman since it uses traditional fork/exec. - -This was just a simple example of watching the /etc/shadow file, but the auditing system is very powerful for watching what processes do on a system. Using a fork/exec container runtime for launching containers (instead of a client/server container runtime) allows you to maintain better security through audit logging. - -### Final thoughts - -There are many other nice features about the fork/exec model versus the client/server model when launching containers. For example, systemd features include: - - * **SD_NOTIFY:** If you put a Podman command into a systemd unit file, the container process can return notice up the stack through Podman that the service is ready to receive tasks. This is something that can't be done in client/server mode. - * **Socket activation:** You can pass down connected sockets from systemd to Podman and onto the container process to use them. This is impossible in the client/server model. - - - -The nicest feature, in my opinion, is **running Podman and containers as a non-root user**. This means you never have give a user root privileges on the host, while in the client/server model (like Docker employs), you must open a socket to a privileged daemon running as root to launch the containers. There you are at the mercy of the security mechanisms implemented in the daemon versus the security mechanisms implemented in the host operating systems—a dangerous proposition. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/10/podman-more-secure-way-run-containers - -作者:[Daniel J Walsh][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/rhatdan -[b]: https://github.com/lujun9972 -[1]: https://podman.io diff --git a/translated/tech/20181030 Podman- A more secure way to run containers.md b/translated/tech/20181030 Podman- A more secure way to run containers.md new file mode 100644 index 0000000000..1d9a0e7a05 --- /dev/null +++ b/translated/tech/20181030 Podman- A more secure way to run containers.md @@ -0,0 +1,128 @@ +Podman:一个更安全的运行容器的方式 +====== + +> Podman 使用传统的 fork/exec 模型(相对于客户端/服务器模型)来运行容器。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-cloud-safe.png?itok=yj2TFPzq) + +在进入本文的主要主题 [Podman][1] 和容器之前,我需要了解一点 Linux 审计功能的技术。 + +### 什么是审计? + +Linux 内核有一个有趣的安全功能,叫做**审计**。它允许管理员在系统上监视安全事件,并将它们记录到`audit.log` 中,该文件可以本地存储或远程存储在另一台机器上,以防止黑客试图掩盖他的踪迹。 + +`/etc/shadow` 文件是一个经常要监控的安全文件,因为向其添加记录可能允许攻击者获得对系统的访问权限。管理员想知道是否有任何进程修改了该文件,你可以通过执行以下命令来执行此操作: + +``` +# auditctl -w /etc/shadow +``` + +现在让我们看看当我修改了 `/etc/shadow` 文件会发生什么: + +``` +# touch /etc/shadow +# ausearch -f /etc/shadow -i -ts recent + +type=PROCTITLE msg=audit(10/10/2018 09:46:03.042:4108) : proctitle=touch /etc/shadow type=SYSCALL msg=audit(10/10/2018 09:46:03.042:4108) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x7ffdb17f6704 a2=O_WRONLY|O_CREAT|O_NOCTTY| O_NONBLOCK a3=0x1b6 items=2 ppid=2712 pid=3727 auid=dwalsh uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts1 ses=3 comm=touch exe=/usr/bin/touch subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)` +``` + +审计记录中有很多信息,但我重点注意到它记录了 root 修改了 `/etc/shadow` 文件,并且该进程的审计 UID(`auid`)的所有者是 `dwalsh`。 + +内核修改了这个文件了么? + +#### 跟踪登录 UID + +登录 UID(`loginuid`),存储在 `/proc/self/loginuid` 中,它是系统上每个进程的 proc 结构的一部分。该字段只能设置一次;设置后,内核将不允许任何进程重置它。 + +当我登录系统时,登录程序会为我的登录过程设置 `loginuid` 字段。 + +我(`dwalsh`)的 UID 是 3267。 + +``` +$ cat /proc/self/loginuid +3267 +``` + +现在,即使我变成了 root,我的登录 UID 仍将保持不变。 + +``` +$ sudo cat /proc/self/loginuid +3267 +``` + +请注意,从初始登录过程 fork 并 exec 的每个进程都会自动继承 `loginuid`。这就是内核知道登录的人是 `dwalsh` 的方式。 + +### 容器 + +现在让我们来看看容器。 + +``` +sudo podman run fedora cat /proc/self/loginuid +3267 +``` + +甚至容器进程也保留了我的 `loginuid`。 现在让我们用 Docker 试试。 + +``` +sudo docker run fedora cat /proc/self/loginuid +4294967295 +``` + +### 为什么不一样? + +Podman 对于容器使用传统的 fork/exec 模型,因此容器进程是 Podman 进程的后代。Docker 使用客户端/服务器模型。我执行的 `docker` 命令是 Docker 客户端工具,它通过客户端/服务器操作与 Docker 守护进程通信。然后 Docker 守护程序创建容器并处理 stdin/stdout 与 Docker 客户端工具的通信。 + +进程的默认 `loginuid`(在设置 `loginuid` 之前)是 `4294967295`(LCTT 译注:2^32 - 1)。由于容器是 Docker 守护程序的后代,而 Docker 守护程序是 init 系统的子代,所以,我们看到 systemd、Docker 守护程序和容器进程全部具有相同的 `loginuid`:`4294967295`,审计系统视其为未设置审计 UID。 + +``` +cat /proc/1/loginuid +4294967295 +``` + +### 怎么会被滥用? + +让我们来看看如果 Docker 启动的容器进程修改 `/etc/shadow` 文件会发生什么。 + +``` +$ sudo docker run --privileged -v /:/host fedora touch /host/etc/shadow +$ sudo ausearch -f /etc/shadow -i type=PROCTITLE msg=audit(10/10/2018 10:27:20.055:4569) : proctitle=/usr/bin/coreutils --coreutils-prog-shebang=touch /usr/bin/touch /host/etc/shadow type=SYSCALL msg=audit(10/10/2018 10:27:20.055:4569) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x7ffdb6973f50 a2=O_WRONLY|O_CREAT|O_NOCTTY| O_NONBLOCK a3=0x1b6 items=2 ppid=11863 pid=11882 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=touch exe=/usr/bin/coreutils subj=system_u:system_r:spc_t:s0 key=(null) +``` + +在 Docker 情形中,`auid` 是未设置的(`4294967295`);这意味着安全人员可能知道有进程修改了 `/etc/shadow` 文件但身份丢失了。 + +如果该攻击者随后删除了 Docker 容器,那么在系统上谁修改 `/etc/shadow` 文件将没有任何跟踪信息。 + +现在让我们看看相同的场景在 Podman 下的情况。 + +``` +$ sudo podman run --privileged -v /:/host fedora touch /host/etc/shadow +$ sudo ausearch -f /etc/shadow -i type=PROCTITLE msg=audit(10/10/2018 10:23:41.659:4530) : proctitle=/usr/bin/coreutils --coreutils-prog-shebang=touch /usr/bin/touch /host/etc/shadow type=SYSCALL msg=audit(10/10/2018 10:23:41.659:4530) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x7fffdffd0f34 a2=O_WRONLY|O_CREAT|O_NOCTTY| O_NONBLOCK a3=0x1b6 items=2 ppid=11671 pid=11683 auid=dwalsh uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=3 comm=touch exe=/usr/bin/coreutils subj=unconfined_u:system_r:spc_t:s0 key=(null) +``` + +由于它使用传统的 fork/exec 方式,因此 Podman 正确记录了所有内容。 + +这只是观察 `/etc/shadow` 文件的一个简单示例,但审计系统对于观察系统上的进程非常有用。使用 fork/exec 容器运行时(而不是客户端/服务器容器运行时)来启动容器允许你通过审计日志记录保持更好的安全性。 + +### 最后的想法 + +在启动容器时,与客户端/服务器模型相比,fork/exec 模型还有许多其他不错的功能。例如,systemd 功能包括: + +* `SD_NOTIFY`:如果将 Podman 命令放入 systemd 单元文件中,容器进程可以通过 Podman 返回通知,表明服务已准备好接收任务。这是在客户端/服务器模式下无法完成的事情。 +* 套接字激活:你可以将连接的套接字从 systemd 传递到 Podman,并传递到容器进程以便使用它们。这在客户端/服务器模型中是不可能的。 + +在我看来,其最好的功能是**作为非 root 用户运行 Podman 和容器**。这意味着你永远不会在宿主机上授予用户 root 权限,而在客户端/服务器模型中(如 Docker 使用的),你必须打开以 root 身份运行的特权守护程序的套接字来启动容器。在那里,你将受到守护程序中实现的安全机制与宿主机操作系统中实现的安全机制的支配 —— 这是一个危险的主张。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/10/podman-more-secure-way-run-containers + +作者:[Daniel J Walsh][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://opensource.com/users/rhatdan +[b]: https://github.com/lujun9972 +[1]: https://podman.io From 238defea385b33ac0d64ba674899567ebbfbfad0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Aug 2019 23:53:50 +0800 Subject: [PATCH 630/951] PUB @wxy https://linux.cn/article-11261-1.html --- .../20181030 Podman- A more secure way to run containers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20181030 Podman- A more secure way to run containers.md (98%) diff --git a/translated/tech/20181030 Podman- A more secure way to run containers.md b/published/20181030 Podman- A more secure way to run containers.md similarity index 98% rename from translated/tech/20181030 Podman- A more secure way to run containers.md rename to published/20181030 Podman- A more secure way to run containers.md index 1d9a0e7a05..50e64225a4 100644 --- a/translated/tech/20181030 Podman- A more secure way to run containers.md +++ b/published/20181030 Podman- A more secure way to run containers.md @@ -3,7 +3,7 @@ Podman:一个更安全的运行容器的方式 > Podman 使用传统的 fork/exec 模型(相对于客户端/服务器模型)来运行容器。 -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-cloud-safe.png?itok=yj2TFPzq) +![](https://img.linux.net.cn/data/attachment/album/201908/23/234924m55sn8zt3b5q8815.jpg) 在进入本文的主要主题 [Podman][1] 和容器之前,我需要了解一点 Linux 审计功能的技术。 From a9212fba6211d58219c85fd684c4673c4b574215 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 24 Aug 2019 00:14:11 +0800 Subject: [PATCH 631/951] PRF @geekpi --- ...Ubuntu in Dual Boot or Single Boot Mode.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md b/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md index c75e0f9016..ee2e7f9e83 100644 --- a/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md +++ b/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Reinstall Ubuntu in Dual Boot or Single Boot Mode) @@ -16,9 +16,9 @@ 据我所知,Ubuntu 中没有像 Windows 那样的系统恢复分区。那么,问题出现了:如何重新安装 Ubuntu?让我告诉你如何重新安装 Ubuntu。 -警告! +**警告!** -磁盘分区始终是一项危险的任务。我强烈建议你在外部磁盘上备份数据。 +> **磁盘分区始终是一项危险的任务。我强烈建议你在外部磁盘上备份数据。** ### 如何重新安装 Ubuntu Linux @@ -30,21 +30,21 @@ 首先,在网站上下载 Ubuntu。你可以下载[任何需要的 Ubuntu 版本][2]。 -[Download Ubuntu][3] +- [下载 Ubuntu][3] 获得 ISO 镜像后,就可以创建 live USB 了。如果 Ubuntu 系统仍然可以使用,那么可以使用 Ubuntu 提供的启动盘创建工具创建它。 -如果无法使用你的 Ubuntu,那么你可以使用其他系统。你可以参考这篇文章来学习[如何在 Windows 中创建 Ubuntu的 live USB][4]。 +如果无法使用你的 Ubuntu,那么你可以使用其他系统。你可以参考这篇文章来学习[如何在 Windows 中创建 Ubuntu 的 live USB][4]。 #### 步骤 2:重新安装 Ubuntu -有了 Ubuntu 的 live USB 之后插入 USB。重新启动系统。在启动时,按下 F2/10/F12 键进入 BIOS 设置,并确保已在顶部设置 “Boot from Removable Devices/USB”。保存并退出 BIOS。这将启动进入 live USB。 +有了 Ubuntu 的 live USB 之后将其插入 USB 端口。重新启动系统。在启动时,按下 `F2`/`F10`/`F12` 之类的键进入 BIOS 设置,并确保已设置 “Boot from Removable Devices/USB”。保存并退出 BIOS。这将启动进入 live USB。 进入 live USB 后,选择安装 Ubuntu。你将看到选择语言和键盘布局这些常用选项。你还可以选择下载更新等。 ![Go ahead with regular installation option][5] -现在是重要的步骤。你应该看到一个“安装类型”页面。你在屏幕上看到的内容在很大程度上取决于 Ubuntu 如何处理系统上的磁盘分区和安装的操作系统。 +现在是重要的步骤。你应该看到一个“安装类型Installation Type”页面。你在屏幕上看到的内容在很大程度上取决于 Ubuntu 如何处理系统上的磁盘分区和安装的操作系统。 在此步骤中仔细阅读选项及它的细节。注意每个选项的说明。屏幕上的选项可能在不同的系统中看上去不同。 @@ -54,15 +54,15 @@ 第一个选项是擦除 Ubuntu 18.04.2 并重新安装它。它告诉我它将删除我的个人数据,但它没有说删除所有操作系统(即 Windows)。 -如果你非常幸运或处于单一启动模式,你可能会看到一个“重新安装 Ubuntu” 的选项。此选项将保留现有数据,甚至尝试保留已安装的软件。如果你看到这个选项,那么就用它吧。 +如果你非常幸运或处于单一启动模式,你可能会看到一个“重新安装 UbuntuReinstall Ubuntu”的选项。此选项将保留现有数据,甚至尝试保留已安装的软件。如果你看到这个选项,那么就用它吧。 -双启动系统注意 +**双启动系统注意** -如果你是双启动 Ubuntu 和 Windows,并且在重新安装中,你的 Ubuntu 系统看不到 Windows,你必须选择 “Something else” 选项并从那里安装 Ubuntu。我已经在[在双启动下安装 Linux 的过程][8]这篇文章中说明了。 +> **如果你是双启动 Ubuntu 和 Windows,并且在重新安装中,你的 Ubuntu 系统看不到 Windows,你必须选择 “Something else” 选项并从那里安装 Ubuntu。我已经在[在双启动下安装 Linux 的过程][8]这篇文章中说明了。** -对我来说,没有重新安装并保留数据的选项,因此我选择了“擦除 Ubuntu 并重新安装”。该选项即使在 Windows 的双启动模式下,也将重新安装 Ubuntu。 +对我来说,没有重新安装并保留数据的选项,因此我选择了“擦除 Ubuntu 并重新安装Erase Ubuntu and reinstall”。该选项即使在 Windows 的双启动模式下,也将重新安装 Ubuntu。 -我建议为 root 和 home 使用单独分区就是为了重新安装。这样,即使重新安装 Linux,也可以保证 home 分区中的数据安全。我已在此视频中演示过: +我建议为 `/` 和 `/home` 使用单独分区就是为了重新安装。这样,即使重新安装 Linux,也可以保证 `/home` 分区中的数据安全。我已在此视频中演示过: 选择重新安装 Ubuntu 后,剩下就是单击下一步。选择你的位置、创建用户账户。 @@ -79,7 +79,7 @@ via: https://itsfoss.com/reinstall-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 f3b592e516b4477008e46b458beca0de5cd626a2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 24 Aug 2019 00:14:34 +0800 Subject: [PATCH 632/951] PUB @geekpi https://linux.cn/article-11262-1.html --- ...ow to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md (98%) diff --git a/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md b/published/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md similarity index 98% rename from translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md rename to published/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md index ee2e7f9e83..62cd5beb4d 100644 --- a/translated/tech/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md +++ b/published/20190814 How to Reinstall Ubuntu in Dual Boot or Single Boot Mode.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-11262-1.html) [#]: subject: (How to Reinstall Ubuntu in Dual Boot or Single Boot Mode) [#]: via: (https://itsfoss.com/reinstall-ubuntu/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 997bc43e7478f9a4eeadf07143c4d77e64ede8d5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Aug 2019 00:51:33 +0800 Subject: [PATCH 633/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190823=20Managi?= =?UTF-8?q?ng=20credentials=20with=20KeePassXC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190823 Managing credentials with KeePassXC.md --- ...823 Managing credentials with KeePassXC.md | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 sources/tech/20190823 Managing credentials with KeePassXC.md diff --git a/sources/tech/20190823 Managing credentials with KeePassXC.md b/sources/tech/20190823 Managing credentials with KeePassXC.md new file mode 100644 index 0000000000..9e48eceb3f --- /dev/null +++ b/sources/tech/20190823 Managing credentials with KeePassXC.md @@ -0,0 +1,122 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Managing credentials with KeePassXC) +[#]: via: (https://fedoramagazine.org/managing-credentials-with-keepassxc/) +[#]: author: (Marco Sarti https://fedoramagazine.org/author/msarti/) + +Managing credentials with KeePassXC +====== + +![][1] + +A [previous article][2] discussed password management tools that use server-side technology. These tools are very interesting and suitable for a cloud installation. +In this article we will talk about KeePassXC, a simple multi-platform open source software that uses a local file as a database. +The main advantage of this type of password management is simplicity. No server-side technology expertise is required and can therefore be used by any type of user. + +### Introducing KeePassXC + +KeePassXC is an open source cross platform password manager: its development started as a fork of KeePassX, a good product but with a not very active development. It saves the secrets in an encrypted database with AES algorithm using 256 bit key, this makes it reasonably safe to save the database in a cloud drive storage such as pCloud or Dropbox. + +In addition to the passwords, KeePassXC allows you to save various information and attachments in the encrypted wallet. It also has a valid password generator that helps the user to correctly manage his credentials. + +### Installation + +The program is available both in the standard Fedora repository and in the Flathub repository. Unfortunately the integration with the browser does not work with the application running in the sandbox, so I suggest to install the program via dnf: +``` + +``` + +sudo dnf install keepassxc +``` + +``` + +### Creating your wallet + +To create a new database there are two important steps: + + * Choose the encryption settings: the default settings are reasonably safe, increasing the transform rounds also increases the decryption time. + * Choose the master key and additional protections: the master key must be easy to remember (if you lose it your wallet is lost!) but strong enough, a passphrase with at least 4 random words can be a good choice. As additional protection you can choose a key file (remember: you must always have it available otherwise you cannot open the wallet) and / or a YubiKey hardware key. + + + +![][3] + +![][4] + +The database file will be saved to the file system. If you want to share with other computers / devices you can save it on a USB key or in a cloud storage like pCloud or Dropbox. Of course, if you choose a cloud storage, a particularly strong master password is recommended, better if accompanied by additional protection. + +### Creating your first entry + +Once the database has been created, you can start creating your first entry. For a web login specify a username, password and url in the Entry tab. Optionally you can specify an expiration date for the credentials based on your personal policy: also by pressing the button on the right the favicon of the site is downloaded and associated as an icon of the entry, this is a nice feature. + +![][5] + +![][6] + +KeePassXC also offers a good password / passphrase generator, you can choose length and complexity and check the degree of resistance to a brute force attack: + +![][7] + +### Browser integration + +KeePassXC has an extension available for all major browsers. The extension allows you to fill in the login information for all the entries whose URL is specified. + +Browser integration must be enabled on KeePassXC (Tools menu -> Settings) specifying which browsers you intend to use: + +![][8] + +Once the extension is installed, it is necessary to create a connection with the database. To do this, press the extension button and then the Connect button: if the database is open and unlocked the extension will create an association key and save it in the database, the key is unique to the browser so I suggest naming it appropriately : + +![][9] + +When you reach the login page specified in the Url field and the database is unlocked, the extension will offer you all the credentials you have associated with that page: + +![][10] + +In this way, browsing with KeePassXC running you will have your internet credentials available without necessarily saving them in the browser. + +### SSH agent integration + +Another interesting feature of KeePassXC is the integration with SSH. If you have ssh-agent running KeePassXC is able to interact and add the ssh keys that you have uploaded as attachments to your entries. + +First of all in the general settings (Tools menu -> Settings) you have to enable the ssh agent and restart the program: + +![][11] + +At this point it is required to upload your ssh key pair as an attachment to your entry. Then in the “SSH agent” tab select the private key in the attachment drop-down list, the public key will be populated automatically. Don’t forget to select the two checkboxes above to allow the key to be added to the agent when the database is opened / unlocked and removed when the database is closed / locked: + +![][12] + +Now with the database open and unlocked you can log in ssh using the keys saved in your wallet. + +The only limitation is in the maximum number of keys that can be added to the agent: ssh servers do not accept by default more than 5 login attempts, for security reasons it is not recommended to increase this value. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/managing-credentials-with-keepassxc/ + +作者:[Marco Sarti][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/msarti/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/08/keepassxc-816x345.png +[2]: https://fedoramagazine.org/manage-your-passwords-with-bitwarden-and-podman/ +[3]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-07-33-27.png +[4]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-07-48-21.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-08-30-07.png +[6]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-08-43-11.png +[7]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-08-49-22.png +[8]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-09-48-09.png +[9]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-09-05-57.png +[10]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-09-13-29.png +[11]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-09-47-21.png +[12]: https://fedoramagazine.org/wp-content/uploads/2019/08/Screenshot-from-2019-08-17-09-46-35.png From 54d4dbab600e6d75744a67333f22287781b1f5a5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Aug 2019 00:52:32 +0800 Subject: [PATCH 634/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190823=20The=20?= =?UTF-8?q?Linux=20kernel:=20Top=205=20innovations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190823 The Linux kernel- Top 5 innovations.md --- ...823 The Linux kernel- Top 5 innovations.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20190823 The Linux kernel- Top 5 innovations.md diff --git a/sources/tech/20190823 The Linux kernel- Top 5 innovations.md b/sources/tech/20190823 The Linux kernel- Top 5 innovations.md new file mode 100644 index 0000000000..95e35bc309 --- /dev/null +++ b/sources/tech/20190823 The Linux kernel- Top 5 innovations.md @@ -0,0 +1,105 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The Linux kernel: Top 5 innovations) +[#]: via: (https://opensource.com/article/19/8/linux-kernel-top-5-innovations) +[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/mhaydenhttps://opensource.com/users/mralexjuarez) + +The Linux kernel: Top 5 innovations +====== +Want to know what the actual (not buzzword) innovations are when it +comes to the Linux kernel? Read on. +![Penguin with green background][1] + +The word _innovation_ gets bandied about in the tech industry almost as much as _revolution_, so it can be difficult to differentiate hyperbole from something that’s actually exciting. The Linux kernel has been called innovative, but then again it’s also been called the biggest hack in modern computing, a monolith in a micro world. + +Setting aside marketing and modeling, Linux is arguably the most popular kernel of the open source world, and it’s introduced some real game-changers over its nearly 30-year life span. + +### Cgroups (2.6.24) + +Back in 2007, Paul Menage and Rohit Seth got the esoteric [_control groups_ (cgroups)][2] feature added to the kernel (the current implementation of cgroups is a rewrite by Tejun Heo.) This new technology was initially used as a way to ensure, essentially, quality of service for a specific set of tasks. + +For example, you could create a control group definition (cgroup) for all tasks associated with your web server, another cgroup for routine backups, and yet another for general operating system requirements. You could then control a percentage of resources for each cgroup, such that your OS and web server gets the bulk of system resources while your backup processes have access to whatever is left. + +What cgroups has become most famous for, though, is its role as the technology driving the cloud today: containers. In fact, cgroups were originally named [process containers][3]. It was no great surprise when they were adopted by projects like [LXC][4], [CoreOS][5], and Docker. + +The floodgates being opened, the term _containers_ justly became synonymous with Linux, and the concept of microservice-style cloud-based “apps” quickly became the norm. These days, it’s hard to get away from cgroups, they’re so prevalent. Every large-scale infrastructure (and probably your laptop, if you run Linux) takes advantage of cgroups in a meaningful way, making your computing experience more manageable and more flexible than ever. + +For example, you might already have installed [Flathub][6] or [Flatpak][7] on your computer, or maybe you’ve started using [Kubernetes][8] and/or [OpenShift][9] at work. Regardless, if the term “containers” is still hazy for you, you can gain a hands-on understanding of containers from [Behind the scenes with Linux containers][10]. + +### LKMM (4.17) + +In 2018, the hard work of Jade Alglave, Alan Stern, Andrea Parri, Luc Maranget, Paul McKenney, and several others, got merged into the mainline Linux kernel to provide formal memory models. The Linux Kernel Memory [Consistency] Model (LKMM) subsystem is a set of tools describing the Linux memory coherency model, as well as producing _litmus tests_ (**klitmus**, specifically) for testing. + +As systems become more complex in physical design (more CPU cores added, cache and RAM grow, and so on), the harder it is for them to know which address space is required by which CPU, and when. For example, if CPU0 needs to write data to a shared variable in memory, and CPU1 needs to read that value, then CPU0 must write before CPU1 attempts to read. Similarly, if values are written in one order to memory, then there’s an expectation that they are also read in that same order, regardless of which CPU or CPUs are doing the reading. + +Even on a single CPU, memory management requires a specific task order. A simple action such as **x = y** requires a CPU to load the value of **y** from memory, and then store that value in **x**. Placing the value stored in **y** into the **x** variable cannot occur _before_ the CPU has read the value from memory. There are also address dependencies: **x[n] = 6** requires that **n** is loaded before the CPU can store the value of six. + +LKMM helps identify and trace these memory patterns in code. It does this in part with a tool called **herd**, which defines the constraints imposed by a memory model (in the form of logical axioms), and then enumerates all possible outcomes consistent with these constraints. + +### Low-latency patch (2.6.38) + +Long ago, in the days before 2011, if you wanted to do "serious" [multimedia work on Linux][11], you had to obtain a low-latency kernel. This mostly applied to [audio recording][12] while adding lots of real-time effects (such as singing into a microphone and adding reverb, and hearing your voice in your headset with no noticeable delay). There were distributions, such as [Ubuntu Studio][13], that reliably provided such a kernel, so in practice it wasn't much of a hurdle, just a significant caveat when choosing your distribution as an artist. + +However, if you weren’t using Ubuntu Studio, or you had some need to update your kernel before your distribution got around to it, you had to go to the rt-patches web page, download the kernel patches, apply them to your kernel source code, compile, and install manually. + +And then, with the release of kernel version 2.6.38, this process was all over. The Linux kernel suddenly, as if by magic, had low-latency code (according to benchmarks, latency decreased by a factor of 10, at least) built-in by default. No more downloading patches, no more compiling. Everything just worked, and all because of a small 200-line patch implemented by Mike Galbraith. + +For open source multimedia artists the world over, it was a game-changer. Things got so good from 2011 on that in 2016, I challenged myself to [build a Digital Audio Workstation (DAW) on a Raspberry Pi v1 (model B)][14] and found that it worked surprisingly well. + +### RCU (2.5) + +RCU, or Read-Copy-Update, is a system defined in computer science that allows multiple processor threads to read from shared memory. It does this by deferring updates, but also marking them as updated, to ensure that the data’s consumers read the latest version. Effectively, this means that reads happen concurrently with updates. + +The typical RCU cycle is a little like this: + + 1. Remove pointers to data to prevent other readers from referencing it. + 2. Wait for readers to complete their critical processes. + 3. Reclaim the memory space. + + + +Dividing the update stage into removal and reclamation phases means the updater performs the removal immediately while deferring reclamation until all active readers are complete (either by blocking them or by registering a callback to be invoked upon completion). + +While the concept of read-copy-update was not invented for the Linux kernel, its implementation in Linux is a defining example of the technology. + +### Collaboration (0.01) + +The final answer to the question of what the Linux kernel innovated will always be, above all else, collaboration. Call it good timing, call it technical superiority, call it hackability, or just call it open source, but the Linux kernel and the many projects that it enabled is a glowing example of collaboration and cooperation. + +And it goes well beyond just the kernel. People from all walks of life have contributed to open source, arguably _because_ of the Linux kernel. The Linux was, and remains to this day, a major force of [Free Software][15], inspiring users to bring their code, art, ideas, or just themselves, to a global, productive, and diverse community of humans. + +### What’s your favorite innovation? + +This list is biased toward my own interests: containers, non-uniform memory access (NUMA), and multimedia. I’ve surely left your favorite kernel innovation off the list. Tell me about it in the comments! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/linux-kernel-top-5-innovations + +作者:[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/sethhttps://opensource.com/users/mhaydenhttps://opensource.com/users/mralexjuarez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_penguin_green.png?itok=ENdVzW22 (Penguin with green background) +[2]: https://en.wikipedia.org/wiki/Cgroups +[3]: https://lkml.org/lkml/2006/10/20/251 +[4]: https://linuxcontainers.org +[5]: https://coreos.com/ +[6]: http://flathub.org +[7]: http://flatpak.org +[8]: http://kubernetes.io +[9]: https://www.redhat.com/sysadmin/learn-openshift-minishift +[10]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[11]: http://slackermedia.info +[12]: https://opensource.com/article/17/6/qtractor-audio +[13]: http://ubuntustudio.org +[14]: https://opensource.com/life/16/3/make-music-raspberry-pi-milkytracker +[15]: http://fsf.org From 709488ce25c7f2d8aafdd50256b81985d2994627 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Aug 2019 00:52:46 +0800 Subject: [PATCH 635/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190823=20Dive?= =?UTF-8?q?=20into=20the=20life=20and=20legacy=20of=20Alan=20Turing:=205?= =?UTF-8?q?=20books=20and=20more?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190823 Dive into the life and legacy of Alan Turing- 5 books and more.md --- ...legacy of Alan Turing- 5 books and more.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20190823 Dive into the life and legacy of Alan Turing- 5 books and more.md diff --git a/sources/tech/20190823 Dive into the life and legacy of Alan Turing- 5 books and more.md b/sources/tech/20190823 Dive into the life and legacy of Alan Turing- 5 books and more.md new file mode 100644 index 0000000000..92b6cfe2b2 --- /dev/null +++ b/sources/tech/20190823 Dive into the life and legacy of Alan Turing- 5 books and more.md @@ -0,0 +1,97 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Dive into the life and legacy of Alan Turing: 5 books and more) +[#]: via: (https://opensource.com/article/19/8/who-was-alan-turing) +[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) + +Dive into the life and legacy of Alan Turing: 5 books and more +====== +Turing's theories had a huge impact on the development of the field of +computer science. +![Fire fist breaking glass][1] + +Recently, Bank of England Governor, Mark Carney, [announced][2] that Alan Turning would be the new face on the UK£ 50 note. The name _Alan Turing_ should be familiar to anyone in open source communities: His theories had a huge impact on the development of the field of computer science, and his code-breaking work at [Bletchley Park][3] during World War II was the focus of the 2014 film, [_The Imitation Game_][4], which starred Benedict Cumberbatch as Alan Turing. + +Another well-known fact about Turing was his conviction for "gross indecency" because of his homosexuality, and the posthumous [apology][5] and [pardon][6] issued over more a half a decade after Turing’s death. + +But beyond all of this, who was Alan Turing? + +Here are five books and archival material that delve deeply into the life and legacy of Alan Turing. Collectively, these resources cover his life, both professional and personal, and work others have done to build upon Turing’s ideas. Individually, or collectively, these works allow the reader to learn who Alan Turing was beyond just a few well-known, broad-stroke themes. + +### Alan Turing: The Enigma + +![Alan Turing: The Enigma][7] + +One of the most expansive biographies of Alan Turing, [_Alan Turing: The Enigma_][8], by Andrew Hodges, states on its cover that it is the inspiration for the film _The Imitation Game_. Weighing in at over 750 pages, this is no quick read, but it covers much of Turing’s life. The only drawback is the fact that the first edition was published in 1983. Even the updated edition does not make use of information that has become declassified in the past few years. + +Despite that, if you only read one book from this list, _Alan Turing: The Enigma_ is still an excellent choice. Hodges’s work is the gold standard when it comes to Alan Turing biographies. + +### The Imitation Game: Alan Turing Decoded + +![The Imitation Game: Alan Turing Decoded][9] + +_[The Imitation Game: Alan Turing Decoded][10]_, by Jim Ottaviani and illustrated by Leland Purvis, presents the life of Alan Turing as a graphic novel. Well told and partnered with lovely artwork, this book covers all the major facets of Alan Turing’s life but lacks the depth of a biography like Hodges’. + +That is not to say that there is anything wrong or deficient with Ottaviani’s writing, just that the graphic novel form requires a more streamlined narrative. For anyone wanting a quick introduction to Turing, this graphic novel is the quickest way to read an overview of Turing’s life and works. + +### Prof: Alan Turing Decoded + +![Prof: Alan Turing Decoded][11] + +Written by Alan Turing’s nephew, Durmot Turing, _[Prof: Alan Turing Decoded][12]_ draws upon material from the family, plus declassified material that was not available when Hodges researched his book. This shorter biography provides a more personal look at Alan Turing’s life while still being scholarly. + +Dermot Turing does an excellent job of telling the story of Alan Turing the man, not the myth born from public perceptions based on various dramatic interpretations. _Prof: Alan Turing Decoded_ is an interesting biography owing to its use of letters from members of the Turing family, including Alan Turing himself. + +### The Turing Digital Archive + +Nothing beats archival materials for really learning about a subject. Biographers have done masterful jobs at turning primary sources about Alan Turing’s life into compelling biographies, but reading Turing’s own writings and exploring other material in [The Turing Digital Archive][13]—maintained by King’s College, Cambridge—provides a more intimate look at Turing’s life and works. This archive contains Turing’s scholar papers, personal correspondence, photographs, and more. The collection is well-organized and the site is easy to use, making it simple for anyone to conduct their own archival research about the life of Alan Turing. + +### Turing’s Cathedral + +![Turing’s Cathedral][14] + +In [_Turing’s Cathedral_][15], George Dyson explores the efforts by John von Neumann and his collaborators to construct a computer based on Alan Turing’s theory of a Universal Machine. John von Neumann made many, many contributions to computer science, which are also covered in this book, but the transition of Alan Turing’s Universal Machine from theory to practice is the facet that concerns readers wishing to learn more about Alan Turing’s legacy. + +_Turing’s Cathedral_ is the story of von Neumann constructing one of the earliest modern computers, but it is, like all modern computing, the story of Alan Turing’s influence on everything that developed from his theories. + +### Turing’s Vision: The Birth of Computer Science + +![Turing’s Vision: The Birth of Computer Science][16] + +[_Turing’s Vision: The Birth of Computer Science_][17], like its title states, explores the birth of the field of computer science. Full of diagrams and complex examples, this book might not be for everyone, but it does a masterful job of explaining computer science concepts and Turing’s place in the birth of the discipline. Chris Bernhardt does an excellent job of weaving together the biographical aspects with the technical, but the technical material can be very, very technical. There are mathematical proofs and other things that make this book a poor choice for the non-technical reader, but an excellent choice for someone with a background in computer science. + +For a very technical book, it is an enjoyable read. The biographical aspects are not as broad or as deep as pure biographies, but it is the synthesis of the biographical and the technical that make this book so interesting. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/who-was-alan-turing + +作者:[Joshua Allen Holm][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/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fire_fist_break_glass_smash_fail.jpg?itok=S6hQNLtB (Fire fist breaking glass) +[2]: https://www.bankofengland.co.uk/news/2019/july/50-pound-banknote-character-announcement +[3]: https://www.bletchleypark.org.uk/ +[4]: https://www.imdb.com/title/tt2084970/ +[5]: https://www.telegraph.co.uk/news/politics/gordon-brown/6170112/Gordon-Brown-Im-proud-to-say-sorry-to-a-real-war-hero.html +[6]: https://www.bbc.com/news/technology-25495315 +[7]: https://opensource.com/sites/default/files/uploads/alan_turing-_the_enigma_125.jpeg (Alan Turing: The Enigma) +[8]: https://press.princeton.edu/titles/10413.html +[9]: https://opensource.com/sites/default/files/uploads/the_imitation_game-_alan_turing_decoded_125.jpg (The Imitation Game: Alan Turing Decoded) +[10]: https://www.abramsbooks.com/product/imitation-game_9781419718939/ +[11]: https://opensource.com/sites/default/files/uploads/prof-_alan_turing_decoded_125.jpg (Prof: Alan Turing Decoded) +[12]: https://dermotturing.com/my-recent-books/alan-turing/ +[13]: http://www.turingarchive.org/ +[14]: https://opensource.com/sites/default/files/uploads/turing_s_cathedral_125.jpg (Turing’s Cathedral) +[15]: https://www.penguinrandomhouse.com/books/44425/turings-cathedral-by-george-dyson/9781400075997/ +[16]: https://opensource.com/sites/default/files/uploads/turing_s_vision-_the_birth_of_computer_science_125.jpg (Turing’s Vision: The Birth of Computer Science) +[17]: https://mitpress.mit.edu/books/turings-vision From ff1c9e4ca0cc5009c480cf99fbc06b999e808205 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Aug 2019 00:53:04 +0800 Subject: [PATCH 636/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190823=20The=20?= =?UTF-8?q?lifecycle=20of=20Linux=20kernel=20testing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20190823 The lifecycle of Linux kernel testing.md --- ...3 The lifecycle of Linux kernel testing.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/tech/20190823 The lifecycle of Linux kernel testing.md diff --git a/sources/tech/20190823 The lifecycle of Linux kernel testing.md b/sources/tech/20190823 The lifecycle of Linux kernel testing.md new file mode 100644 index 0000000000..65bab32536 --- /dev/null +++ b/sources/tech/20190823 The lifecycle of Linux kernel testing.md @@ -0,0 +1,78 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The lifecycle of Linux kernel testing) +[#]: via: (https://opensource.com/article/19/8/linux-kernel-testing) +[#]: author: (Major Hayden https://opensource.com/users/mhaydenhttps://opensource.com/users/mhaydenhttps://opensource.com/users/marcobravohttps://opensource.com/users/mhayden) + +The lifecycle of Linux kernel testing +====== +The Continuous Kernel Integration (CKI) project aims to prevent bugs +from entering the Linux kernel. +![arrows cycle symbol for failing faster][1] + +In _[Continuous integration testing for the Linux kernel][2]_, I wrote about the [Continuous Kernel Integration][3] (CKI) project and its mission to change how kernel developers and maintainers work. This article is a deep dive into some of the more technical aspects of the project and how all the pieces fit together. + +### It all starts with a change + +Every exciting feature, improvement, and bug in the kernel starts with a change proposed by a developer. These changes appear on myriad mailing lists for different kernel repositories. Some repositories focus on certain subsystems in the kernel, such as storage or networking, while others focus on broad aspects of the kernel. The CKI project springs into action when developers propose a change, or patchset, to the kernel or when a maintainer makes changes in the repository itself. + +The CKI project maintains triggers that monitor these patchsets and take action. Software projects such as [Patchwork][4] make this process much easier by collating multi-patch contributions into a single patch series. This series travels as a unit through the CKI system and allows for publishing a single report on the series. + +Other triggers watch the repository for changes. This occurs when kernel maintainers merge patchsets, revert patches, or create new tags. Testing these critical changes ensures that developers always have a solid baseline to use as a foundation for writing new patches. + +All of these changes make their way into a GitLab pipeline and pass through multiple stages and multiple systems. + +### Prepare the build + +Everything starts with getting the source ready for compile time. This requires cloning the repository, applying the patchset proposed by the developer, and generating a kernel config file. These config files have thousands of options that turn features on or off, and config files differ incredibly between different system architectures. For example, a fairly standard x86_64 system may have a ton of options available in its config file, but an s390x system (IBM zSeries mainframes) likely has much fewer options. Some options might make sense on that mainframe but they have no purpose on a consumer laptop. + +The kernel moves forward and transforms into a source artifact. The artifact contains the entire repository, with patches applied, and all kernel configuration files required for compiling. Upstream kernels move on as a tarball, while Red Hat kernels become a source RPM for the next step. + +### Piles of compiles + +Compiling the kernel turns the source code into something that a computer can boot up and use. The config file describes what to build, scripts in the kernel describe how to build it, and tools on the system (like GCC and glibc) do the building. This process takes a while to complete, but the CKI project needs it done quickly for four architectures: aarch64 (64-bit ARM), ppc64le (POWER), s390x (IBM zSeries), and x86_64. It's important that we compile kernels quickly so that we keep our backlog manageable and developers receive prompt feedback. + +Adding more CPUs provides plenty of speed improvements, but every system has its limits. The CKI project compiles kernels within containers in an OpenShift deployment; although OpenShift allows for tons of scalability, the deployment still has a finite number of CPUs available. The CKI team allocates 20 virtual CPUs for compiling each kernel. With four architectures involved, this balloons to 80 CPUs! + +Another speed increase comes from a tool called [ccache][5]. Kernel development moves quickly, but a large amount of the kernel remains unchanged even between multiple releases. The ccache tool caches the built objects (small pieces of the overall kernel) during the compile on a disk. When another kernel compile comes along later, ccache looks for unchanged pieces of the kernel that it saw before. Ccache pulls the cached object from the disk and reuses it. This allows for faster compiles and lower overall CPU usage. Kernels that took 20 minutes to compile now race to the finish line in less than a few minutes. + +### Testing time + +The kernel moves onto its last step: testing on real hardware. Each kernel boots up on its native architecture using Beaker, and myriad tests begin poking it to find problems. Some tests look for simple problems, such as issues with containers or error messages on boot-up. Other tests dive deep into various kernel subsystems to find regressions in system calls, memory allocation, and threading. + +Large testing frameworks, such as the [Linux Test Project][6] (LTP), contain tons of tests that look for troublesome regressions in the kernel. Some of these regressions could roll back critical security fixes, and there are tests to ensure those improvements remain in the kernel. + +One critical step remains when tests finish: reporting. Kernel developers and maintainers need a concise report that tells them exactly what worked, what did not work, and how to get more information. Each CKI report contains details about the source code used, the compile parameters, and the testing output. That information helps developers know where to begin looking to fix an issue. Also, it helps maintainers know when a patchset needs to be held for another look before a bug makes its way into their kernel repository. + +### Summary + +The CKI project team strives to prevent bugs from entering the Linux kernel by providing timely, automated feedback to kernel developers and maintainers. This work makes their job easier by finding the low-hanging fruit that leads to kernel bugs, security issues, and performance problems. + +* * * + +_To learn more, you can attend the [CKI Hackfest][7] on September 12-13 following the [Linux Plumbers Conference][8] September 9-11 in Lisbon, Portugal._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/8/linux-kernel-testing + +作者:[Major Hayden][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/mhaydenhttps://opensource.com/users/mhaydenhttps://opensource.com/users/marcobravohttps://opensource.com/users/mhayden +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_progress_cycle_momentum_arrow.png?itok=q-ZFa_Eh (arrows cycle symbol for failing faster) +[2]: https://opensource.com/article/19/6/continuous-kernel-integration-linux +[3]: https://cki-project.org/ +[4]: https://github.com/getpatchwork/patchwork +[5]: https://ccache.dev/ +[6]: https://linux-test-project.github.io +[7]: https://cki-project.org/posts/hackfest-agenda/ +[8]: https://www.linuxplumbersconf.org/ From 95df1d8c5ac9f78d6824fcc8017d234d3a9e11be Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Aug 2019 00:53:42 +0800 Subject: [PATCH 637/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20Semico?= =?UTF-8?q?nductor=20startup=20Cerebras=20Systems=20launches=20massive=20A?= =?UTF-8?q?I=20chip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190822 Semiconductor startup Cerebras Systems launches massive AI chip.md --- ...rebras Systems launches massive AI chip.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sources/talk/20190822 Semiconductor startup Cerebras Systems launches massive AI chip.md diff --git a/sources/talk/20190822 Semiconductor startup Cerebras Systems launches massive AI chip.md b/sources/talk/20190822 Semiconductor startup Cerebras Systems launches massive AI chip.md new file mode 100644 index 0000000000..91685c8501 --- /dev/null +++ b/sources/talk/20190822 Semiconductor startup Cerebras Systems launches massive AI chip.md @@ -0,0 +1,57 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Semiconductor startup Cerebras Systems launches massive AI chip) +[#]: via: (https://www.networkworld.com/article/3433617/semiconductor-startup-cerebras-systems-launches-massive-ai-chip.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Semiconductor startup Cerebras Systems launches massive AI chip +====== + +![Cerebras][1] + +There are a host of different AI-related solutions for the data center, ranging from add-in cards to dedicated servers, like the Nvidia DGX-2. But a startup called Cerebras Systems has its own server offering that relies on a single massive processor rather than a slew of small ones working in parallel. + +Cerebras has taken the wraps off its Wafer Scale Engine (WSE), an AI chip that measures 8.46x8.46 inches, making it almost the size of an iPad and more than 50 times larger than a CPU or GPU. A typical CPU or GPU is about the size of a postage stamp. + +[Now see how AI can boost data-center availability and efficiency.][2] + +Cerebras won’t sell the chips to ODMs due to the challenges of building and cooling such a massive chip. Instead, it will come as part of a complete server to be installed in data centers, which it says will start shipping in October. + +The logic behind the design is that AI requires huge amounts of data just to run a test and current technology, even GPUs, are not fast or powerful enough. So Cerebras supersized the chip. + +The numbers are just incredible. The company’s WSE chip has 1.2 trillion transistors, 400,000 computing cores and 18 gigabytes of memory. A typical PC processor has about 2 billion transistors, four to six cores and a few megabytes of cache memory. Even a high-end GPU has 21 billion transistors and a few thousand cores. + +The 400,000 cores on the WSE are connected via the Swarm communication fabric in a 2D mesh with 100 Pb/s of bandwidth. The WSE has 18 GB of on-chip memory, all accessible within a single clock cycle, and provides 9 PB/s memory bandwidth. This is 3000x more capacity and 10,000x greater bandwidth than the best Nvidia has to offer. More to the point it eliminates the need to move data in and out of memory to and from the CPU. + +“A vast array of programmable cores provides cluster-scale compute on a single chip. High-speed memory close to each core ensures that cores are always occupied doing calculations. And by connecting everything on-die, communication is many thousands of times faster than what is possible with off-chip technologies like InfiniBand,” the company said in a [blog post][3] announcing the processor. + +The cores are called Sparse Linear Algebra Cores, or SLA. They are optimized for the sparse linear algebra that is fundamental to neural network calculation. These cores are designed specifically for AI work. They are small and fast, contain no caches, and have eliminated other features and overheads that are needed in general purpose cores but play no useful role in a deep learning processor. + +The chip is the brainchild of Andrew Feldman, who created the SeaMicro high density Atom-based server a decade ago as an alternative to overpowered Xeons for doing simple tasks like file and print or serving LAMP stacks. Feldman is a character, one of the more interesting people [I’ve interviewed][4]. He definitely thinks outside the box. + +Feldman sold SeaMicro to AMD for $334 million in 2012, which turned out to be a colossal waste of money on AMD’s part, as the product shortly disappeared from the market. Since then he’s raised $100 million in VC money. + +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/3433617/semiconductor-startup-cerebras-systems-launches-massive-ai-chip.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://images.idgesg.net/images/article/2019/08/cerebras-wafer-scale-engine-100809084-large.jpg +[2]: https://www.networkworld.com/article/3274654/ai-boosts-data-center-availability-efficiency.html +[3]: https://www.cerebras.net/hello-world/ +[4]: https://www.serverwatch.com/news/article.php/3887471/SeaMicro-Launches-an-AtomPowered-Cloud-Computing-Server.htm +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 69c6826bf1fe674fcd9d11939dbacc815d3d0454 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Aug 2019 00:53:58 +0800 Subject: [PATCH 638/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190822=20Things?= =?UTF-8?q?=20You=20Didn't=20Know=20About=20GNU=20Readline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190822 Things You Didn-t Know About GNU Readline.md --- ...ings You Didn-t Know About GNU Readline.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/talk/20190822 Things You Didn-t Know About GNU Readline.md diff --git a/sources/talk/20190822 Things You Didn-t Know About GNU Readline.md b/sources/talk/20190822 Things You Didn-t Know About GNU Readline.md new file mode 100644 index 0000000000..189f1152b9 --- /dev/null +++ b/sources/talk/20190822 Things You Didn-t Know About GNU Readline.md @@ -0,0 +1,136 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Things You Didn't Know About GNU Readline) +[#]: via: (https://twobithistory.org/2019/08/22/readline.html) +[#]: author: (Two-Bit History https://twobithistory.org) + +Things You Didn't Know About GNU Readline +====== + +I sometimes think of my computer as a very large house. I visit this house every day and know most of the rooms on the ground floor, but there are bedrooms I’ve never been in, closets I haven’t opened, nooks and crannies that I’ve never explored. I feel compelled to learn more about my computer the same way anyone would feel compelled to see a room they had never visited in their own home. + +GNU Readline is an unassuming little software library that I relied on for years without realizing that it was there. Tens of thousands of people probably use it every day without thinking about it. If you use the Bash shell, every time you auto-complete a filename, or move the cursor around within a single line of input text, or search through the history of your previous commands, you are using GNU Readline. When you do those same things while using the command-line interface to Postgres (`psql`), say, or the Ruby REPL (`irb`), you are again using GNU Readline. Lots of software depends on the GNU Readline library to implement functionality that users expect, but the functionality is so auxiliary and unobtrusive that I imagine few people stop to wonder where it comes from. + +GNU Readline was originally created in the 1980s by the Free Software Foundation. Today, it is an important if invisible part of everyone’s computing infrastructure, maintained by a single volunteer. + +### Feature Replete + +The GNU Readline library exists primarily to augment any command-line interface with a common set of keystrokes that allow you to move around within and edit a single line of input. If you press `Ctrl-A` at a Bash prompt, for example, that will jump your cursor to the very beginning of the line, while pressing `Ctrl-E` will jump it to the end. Another useful command is `Ctrl-U`, which will delete everything in the line before the cursor. + +For an embarrassingly long time, I moved around on the command line by repeatedly tapping arrow keys. For some reason, I never imagined that there was a faster way to do it. Of course, no programmer familiar with a text editor like Vim or Emacs would deign to punch arrow keys for long, so something like Readline was bound to be created. Using Readline, you can do much more than just jump around—you can edit your single line of text as if you were using a text editor. There are commands to delete words, transpose words, upcase words, copy and paste characters, etc. In fact, most of Readline’s keystrokes/shortcuts are based on Emacs. Readline is essentially Emacs for a single line of text. You can even record and replay macros. + +I have never used Emacs, so I find it hard to remember what all the different Readline commands are. But one thing about Readline that is really neat is that you can switch to using a Vim-based mode instead. To do this for Bash, you can use the `set` builtin. The following will tell Readline to use Vim-style commands for the current shell: + +``` +$ set -o vi +``` + +With this option enabled, you can delete words using `dw` and so on. The equivalent to `Ctrl-U` in the Emacs mode would be `d0`. + +I was excited to try this when I first learned about it, but I’ve found that it doesn’t work so well for me. I’m happy that this concession to Vim users exists, and you might have more luck with it than me, particularly if you haven’t already used Readline’s default command keystrokes. My problem is that, by the time I heard about the Vim-based interface, I had already learned several Readline keystrokes. Even with the Vim option enabled, I keep using the default keystrokes by mistake. Also, without some sort of indicator, Vim’s modal design is awkward here—it’s very easy to forget which mode you’re in. So I’m stuck at a local maximum using Vim as my text editor but Emacs-style Readline commands. I suspect a lot of other people are in the same position. + +If you feel, not unreasonably, that both Vim and Emacs’ keyboard command systems are bizarre and arcane, you can customize Readline’s key bindings and make them whatever you like. This is not hard to do. Readline reads a `~/.inputrc` file on startup that can be used to configure various options and key bindings. One thing I’ve done is reconfigured `Ctrl-K`. Normally it deletes from the cursor to the end of the line, but I rarely do that. So I’ve instead bound it so that pressing `Ctrl-K` deletes the whole line, regardless of where the cursor is. I’ve done that by adding the following to `~/.inputrc`: + +``` +Control-k: kill-whole-line +``` + +Each Readline command (the documentation refers to them as _functions_) has a name that you can associate with a key sequence this way. If you edit `~/.inputrc` in Vim, it turns out that Vim knows the filetype and will help you by highlighting valid function names but not invalid ones! + +Another thing you can do with `~/.inputrc` is create canned macros by mapping key sequences to input strings. [The Readline manual][1] gives one example that I think is especially useful. I often find myself wanting to save the output of a program to a file, which means that I often append something like `> output.txt` to Bash commands. To save some time, you could make this a Readline macro: + +``` +Control-o: "> output.txt" +``` + +Now, whenever you press `Ctrl-O`, you’ll see that `> output.txt` gets added after your cursor on the command line. Neat! + +But with macros you can do more than just create shortcuts for strings of text. The following entry in `~/.inputrc` means that, every time I press `Ctrl-J`, any text I already have on the line is surrounded by `$(` and `)`. The macro moves to the beginning of the line with `Ctrl-A`, adds `$(`, then moves to the end of the line with `Ctrl-E` and adds `)`: + +``` +Control-j: "\C-a$(\C-e)" +``` + +This might be useful if you often need the output of one command to use for another, such as in: + +``` +$ cd $(brew --prefix) +``` + +The `~/.inputrc` file also allows you to set different values for what the Readline manual calls _variables_. These enable or disable certain Readline behaviors. You can use these variables to change, for example, how Readline auto-completion works or how the Readline history search works. One variable I’d recommend turning on is the `revert-all-at-newline` variable, which by default is off. When the variable is off, if you pull a line from your command history using the reverse search feature, edit it, but then decide to search instead for another line, the edit you made is preserved in the history. I find this confusing because it leads to lines showing up in your Bash command history that you never actually ran. So add this to your `~/.inputrc`: + +``` +set revert-all-at-newline on +``` + +When you set options or key bindings using `~/.inputrc`, they apply wherever the Readline library is used. This includes Bash most obviously, but you’ll also get the benefit of your changes in other programs like `irb` and `psql` too! A Readline macro that inserts `SELECT * FROM` could be useful if you often use command-line interfaces to relational databases. + +### Chet Ramey + +GNU Readline is today maintained by Chet Ramey, a Senior Technology Architect at Case Western Reserve University. Ramey also maintains the Bash shell. Both projects were first authored by a Free Software Foundation employee named Brian Fox beginning in 1988. But Ramey has been the sole maintainer since around 1994. + +Ramey told me via email that Readline, far from being an original idea, was created to implement functionality prescribed by the POSIX specification, which in the late 1980s had just been created. Many earlier shells, including the Korn shell and at least one version of the Unix System V shell, included line editing functionality. The 1988 version of the Korn shell (`ksh88`) provided both Emacs-style and Vi/Vim-style editing modes. As far as I can tell from [the manual page][2], the Korn shell would decide which mode you wanted to use by looking at the `VISUAL` and `EDITOR` environment variables, which is pretty neat. The parts of POSIX that specified shell functionality were closely modeled on `ksh88`, so GNU Bash was going to have to implement a similarly flexible line-editing system to stay compliant. Hence Readline. + +When Ramey first got involved in Bash development, Readline was a single source file in the Bash project directory. It was really just a part of Bash. Over time, the Readline file slowly moved toward becoming an independent project, though it was not until 1994 (with the 2.0 release of Readline) that Readline became a separate library entirely. + +Readline is closely associated with Bash, and Ramey usually pairs Readline releases with Bash releases. But as I mentioned above, Readline is a library that can be used by any software implementing a command-line interface. And it’s really easy to use. This is a simple example, but here’s how you would you use Readline in your own C program. The string argument to the `readline()` function is the prompt that you want Readline to display to the user: + +``` +#include +#include +#include "readline/readline.h" + +int main(int argc, char** argv) +{ + char* line = readline("my-rl-example> "); + printf("You entered: \"%s\"\n", line); + + free(line); + + return 0; +} +``` + +Your program hands off control to Readline, which is responsible for getting a line of input from the user (in such a way that allows the user to do all the fancy line-editing things). Once the user has actually submitted the line, Readline returns it to you. I was able to compile the above by linking against the Readline library, which I apparently have somewhere in my library search path, by invoking the following: + +``` +$ gcc main.c -lreadline +``` + +The Readline API is much more extensive than that single function of course, and anyone using it can tweak all sorts of things about the library’s behavior. Library users can even add new functions that end users can configure via `~/.inputrc`, meaning that Readline is very easy to extend. But, as far as I can tell, even Bash ultimately calls the simple `readline()` function to get input just as in the example above, though there is a lot of configuration beforehand. (See [this line][3] in the source for GNU Bash, which seems to be where Bash hands off responsibility for getting input to Readline.) + +Ramey has now worked on Bash and Readline for well over a decade. He has never once been compensated for his work—he is and has always been a volunteer. Bash and Readline continue to be actively developed, though Ramey said that Readline changes much more slowly than Bash does. I asked Ramey what it was like being the sole maintainer of software that so many people use. He said that millions of people probably use Bash without realizing it (because every Apple device runs Bash), which makes him worry about how much disruption a breaking change might cause. But he’s slowly gotten used to the idea of all those people out there. He said that he continues to work on Bash and Readline because at this point he is deeply invested and because he simply likes to make useful software available to the world. + +_You can find more information about Chet Ramey at [his website][4]._ + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][5] on Twitter or subscribe to the [RSS feed][6] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> Please enjoy my long overdue new post, in which I use the story of the BBC Micro and the Computer Literacy Project as a springboard to complain about Codecademy. +> +> — TwoBitHistory (@TwoBitHistory) [March 31, 2019][7] + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/08/22/readline.html + +作者:[Two-Bit History][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://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://tiswww.case.edu/php/chet/readline/readline.html +[2]: https://web.archive.org/web/20151105130220/http://www2.research.att.com/sw/download/man/man1/ksh88.html +[3]: https://github.com/bminor/bash/blob/9f597fd10993313262cab400bf3c46ffb3f6fd1e/parse.y#L1487 +[4]: https://tiswww.case.edu/php/chet/ +[5]: https://twitter.com/TwoBitHistory +[6]: https://twobithistory.org/feed.xml +[7]: https://twitter.com/TwoBitHistory/status/1112492084383092738?ref_src=twsrc%5Etfw From 71c8ac078a8214d32ef8c94d7a35fec4d5b76d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sat, 24 Aug 2019 08:37:44 +0800 Subject: [PATCH 639/951] Translated --- ...ustomize Xfce and Give it a Modern Look.md | 146 ------------------ ...ustomize Xfce and Give it a Modern Look.md | 145 +++++++++++++++++ 2 files changed, 145 insertions(+), 146 deletions(-) delete mode 100644 sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md create mode 100644 translated/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md diff --git a/sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md b/sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md deleted file mode 100644 index bd91604a7f..0000000000 --- a/sources/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md +++ /dev/null @@ -1,146 +0,0 @@ -Translating by robsean -4 Ways to Customize Xfce and Give it a Modern Look -====== -**Brief: Xfce is a great lightweight desktop environment with one drawback. It looks sort of old. But you don’t have to stick with the default looks. Let’s see various ways you can customize Xfce to give it a modern and beautiful look.** - -![Customize Xfce desktop envirnment][1] - -To start with, Xfce is one of the most [popular desktop environments][2]. Being a lightweight DE, you can run Xfce on very low resource and it still works great. This is one of the reasons why many [lightweight Linux distributions][3] use Xfce by default. - -Some people prefer it even on a high-end device stating its simplicity, easy of use and non-resource hungry nature as the main reasons. - -[Xfce][4] is in itself minimal and provides just what you need. The one thing that bothers is its look and feel which feel old. However, you can easily customize Xfce to look modern and beautiful without reaching the limit where a Unity/GNOME session eats up system resources. - -### 4 ways to Customize Xfce desktop - -Let’s see some of the ways by which we can improve the look and feel of your Xfce desktop environment. - -The default Xfce desktop environment looks something like this : - -![Xfce default screen][5] - -As you can see, the default Xfce desktop is kinda boring. We will use some themes, icon packs and change the default dock to make it look fresh and a bit revealing. - -#### 1. Change themes in Xfce - -The first thing we will do is pick up a theme from [xfce-look.org][6]. My favorite Xfce theme is [XFCE-D-PRO][7]. - -You can download the theme from [here][8] and extract it somewhere. - -You can copy this extracted file to **.theme** folder in your home directory. If the folder is not present by default, you can create one and the same goes for icons which needs a **.icons** folder in the home directory. - -Open **Settings > Appearance > Style** to select the theme, log out and login to see the change. Adwaita-dark from default is also a nice one. - -![Appearance Xfce][9] - -You can use any [good GTK theme][10] on Xfce. - -#### 2. Change icons in Xfce - -Xfce-look.org also provides icon themes which you can download, extract and put it in your home directory under **.icons** directory. Once you have added the icon theme in the .icons directory, go to **Settings > Appearance > Icons** to select that icon theme. - -![Moka icon theme][11] - -I have installed [Moka icon set][12] that looks awesome. - -![Moka theme][13] - -You can also refer to our list of [awesome icon themes][14]. - -##### **Optional: Installing themes through Synaptic** - -If you want to avoid the manual search and copying of the files, install Synaptic Manager in your system. You can look for some best themes over web and icon sets, and using synaptic manager you can search and install it. -``` -sudo apt-get install synaptic - -``` - -**Searching and installing theme/icons through Synaptic** - -Open synaptic and click on **Search**. Enter your desired theme, and it will display the list of matching items. Mark all the additional required changes and click on **Apply**. This will download the theme and then install it. - -![Arc Theme][15] - -Once done, you can open the **Appearance** option to select the desired theme. - -In my opinion, this is not the best way to install themes in Xfce. - -#### 3. Change wallpapers in Xfce - -Again, the default Xfce wallpaper is not bad at all. But you can change the wallpaper to something that matches with your icons and themes. - -To change wallpapers in Xfce, right click on the desktop and click on Desktop Settings. You can change the desktop background from your custom collection or the defaults one given. - -Right click on the desktop and click on **Desktop Settings**. Choose **Background** from the folder option, and choose any one of the default backgrounds or a custom one. - -![Changing desktop wallpapers][16] - -#### 4. Change the dock in Xfce - -The default dock is nice and pretty much does what it is for. But again, it looks a bit boring. - -![Docky][17] - -However, if you want your dock to be better and with a little more customization options, you can install another dock. - -Plank is one of the simplest and lightweight docks and is highly configurable. - -To install Plank use the command below: - -`sudo apt-get install plank` - -If Plank is not available in the default repository, you can install it from this PPA. -``` -sudo add-apt-repository ppa:ricotz/docky -sudo apt-get update -sudo apt-get install plank - -``` - -Before you use Plank, you should remove the default dock by right-clicking in it and under Panel Settings, clicking on delete. - -Once done, go to **Accessory > Plank** to launch Plank dock. - -![Plank][18] - -Plank picks up icons from the one you are using. So if you change the icon themes, you’ll see the change is reflected in the dock also. - -### Wrapping Up - -XFCE is a lightweight, fast and highly customizable. If you are limited on system resource, it serves good and you can easily customize it to look better. Here’s how my screen looks after applying these steps. - -![XFCE desktop][19] - -This is just with half an hour of effort. You can make it look much better with different themes/icons customization. Feel free to share your customized XFCE desktop screen in the comments and the combination of themes and icons you are using. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/customize-xfce/ - -作者:[Ambarish Kumar][a] -选题:[lujun9972](https://github.com/lujun9972) -译者:[译者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/ambarish/ -[1]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/xfce-customization.jpeg -[2]:https://itsfoss.com/best-linux-desktop-environments/ -[3]:https://itsfoss.com/lightweight-linux-beginners/ -[4]:https://xfce.org/ -[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/06/1-1-800x410.jpg -[6]:http://xfce-look.org -[7]:https://www.xfce-look.org/p/1207818/XFCE-D-PRO -[8]:https://www.xfce-look.org/p/1207818/startdownload?file_id=1523730502&file_name=XFCE-D-PRO-1.6.tar.xz&file_type=application/x-xz&file_size=105328&url=https%3A%2F%2Fdl.opendesktop.org%2Fapi%2Ffiles%2Fdownloadfile%2Fid%2F1523730502%2Fs%2F6019b2b57a1452471eac6403ae1522da%2Ft%2F1529360682%2Fu%2F%2FXFCE-D-PRO-1.6.tar.xz -[9]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/4.jpg -[10]:https://itsfoss.com/best-gtk-themes/ -[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/6.jpg -[12]:https://snwh.org/moka -[13]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/11-800x547.jpg -[14]:https://itsfoss.com/best-icon-themes-ubuntu-16-04/ -[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/5-800x531.jpg -[16]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/7-800x546.jpg -[17]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/8.jpg -[18]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/9.jpg -[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/10-800x447.jpg diff --git a/translated/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md b/translated/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md new file mode 100644 index 0000000000..a16d7200be --- /dev/null +++ b/translated/tech/20180727 4 Ways to Customize Xfce and Give it a Modern Look.md @@ -0,0 +1,145 @@ +4 种方式来自定义 Xfce 来给它一个现代化外观 +====== +**简介: Xfce 是一个非常轻量的桌面环境,它有一个缺点。它看起来有点老旧。但是你没有必要坚持默认外观。让我们看看你可以自定义 Xfce 的各种各样的方法,来给让一个现代化的和漂亮的外观。** + +![Customize Xfce desktop envirnment][1] + +首先,Xfce 是最[受欢迎的桌面环境][2]之一。作为一个轻量级桌面环境,你可以在非常低的资源上运行 Xfce ,并且,它仍然很好工作。这是为什么很多[轻量级 Linux 发行版][3]默认使用 Xfce 的原因之一。 + +一些人甚至喜欢在高端设备上使用它,说明它的简单性、易用性和非资源匮乏性是主要原因。 + +[Xfce][4] 是自身很小,并只提供你需要的东西。令人烦恼的事是觉得它的外观和感觉很老了。然而,你可以简单地自定义 Xfce 来看起来现代化和漂亮,而不达到 Unity/GNOME 会话占用系统资源的极限。 + +### 4 种方式来自定义 Xfce 桌面 + +让我们看看一些方法,我们可以通过这些方法改善你的 Xfce 桌面环境的外观和感觉。 + +默认 Xfce 桌面环境看起来有些像这样: + +![Xfce default screen][5] + +如您所见,默认 Xfce 桌面有点没有趣味性。我们将使用主题,图标包以及更改默认 dock 来使它看起来新鲜和有一个惊艳。 + +#### 1. 在 Xfce 中更改主题 + +我们将做的第一件事是从 [xfce-look.org][6] 中找到一款主题。我最喜欢的 Xfce 主题是 [XFCE-D-PRO][7]。 + +你可以从[这里][8]下载主题,并提取到某处。 + +你可以复制提取出的这些主题文件到你 home 目录中的 **.theme** 文件夹。如果文件夹默认不存在,你可以创建一个 ,同样的道理,图标需要一个在 home 目录中的 **.icons** 文件夹。 + +打开 **设置 > 外观 > 样式** 来选择主题,注销并重新登录以查看更改。默认的 Adwaita-dark 也是极好的一个。 + +![Appearance Xfce][9] + +你可以在 Xfce 上使用一些[好的 GTK 主题][10]。 + +#### 2. 在 Xfce 中更改图标 + +Xfce-look.org 也提供你可以下载的图标主题,提取并放置图标到你的 home 目录中 **.icons** 目录。在你添加图标主题到 .icons 目录中后,转到 **设置 > 外观 > 图标** 来选择这个图标主题。 + +![Moka icon theme][11] + +我已经安装 [Moka 图标集][12] ,它看起来令人惊艳。 + +![Moka theme][13] + +你也可以参考我们[令人惊艳的图标主题][14]列表。 + +##### **可选: 通过 Synaptic 安装主题** + +如果你想避免手工搜索和复制文件,在你的系统中安装 Synaptic 软件包管理器。你可以通过网络和图标集来查找最佳的主题,使用 synaptic 软件包管理器,你可以搜索和安装主题。 +``` +sudo apt-get install synaptic + +``` + +**通过 Synaptic 搜索和安装主题/图标** + +打开 synaptic ,并在**搜索**上单击。输入你期望的主题,接下来,它将显示匹配主题的列表。标记使用附加依赖的更改,并在**应用**上单击。这些操作将下载主题和安装主题。 + +![Arc Theme][15] + +在安装后,你可以打开**外观**选项来选择期望的主题。 + +在我看来,这不是在 Xfce 中安装主题的最佳方法。 + +#### 3. 在 Xfce 中更改桌面背景 + +在强调一次,默认 Xfce 桌面背景也不错。但是你可以把桌面背景更改成与你的图标和主题相匹配的东西。 + +为在 Xfce 中更改桌面背景,在桌面上右击,并单击桌面设置。你可以从你自定义收藏品中或默认收藏品中给定一个来更改桌面背景。 + +在桌面上右击,并单击**桌面设置**。从文件夹选择中选择**背景**,并选择任意一个默认背景或自定义背景。 + +![Changing desktop wallpapers][16] + +#### 4. 在 Xfce 中更改 dock + +默认 dock 是极好的,为此它做的非常多。但是,再强调一次,它看来有点没有趣味性。 + +![Docky][17] + +不过,如果你想你的 dock 变得更好,并带有更多一点的自定义选项,你可以安装另一个 dock 。 + +Plank 是最简单和轻量以及高度可配置中一个。 + +为安装 Plank ,使用下面的命令: + +`sudo apt-get install plank` + +如果 Plank 在默认存储库中不可获得,你可以从这个 PPA 中安装它。 +``` +sudo add-apt-repository ppa:ricotz/docky +sudo apt-get update +sudo apt-get install plank + +``` + +在你使用 Plank 前,你应该通过右键单击移除默认的 dockby,并在面板设置下,单击删除。 + +在完成后,转到 **附件 > Plank** 来启动 Plank dock 。 + +![Plank][18] + +Plank 从你正在使用的图标中选取一个图标。因此,如果你更改图标主题,你也将在 dock 中看到相关的更改。 + +### 总结 + +XFCE 是一个轻量级,快速和高度可自定义的桌面环境。如果你的系统资源有限,它服务很好,并且你可以简单地自定义它来看起来更好。这是在应用这些步骤后,我的屏幕的外观。 + +![XFCE desktop][19] + +这只是半个小时的努力,你可以使用不同的主题/图标自定义使它看起来更好。可以随意在评论区分享你自定义的 XFCE 桌面屏幕,以及你正在使用的主题和图标组合。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/customize-xfce/ + +作者:[Ambarish Kumar][a] +选题:[lujun9972](https://github.com/lujun9972) +译者:[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/ambarish/ +[1]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/xfce-customization.jpeg +[2]:https://itsfoss.com/best-linux-desktop-environments/ +[3]:https://itsfoss.com/lightweight-linux-beginners/ +[4]:https://xfce.org/ +[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/06/1-1-800x410.jpg +[6]:http://xfce-look.org +[7]:https://www.xfce-look.org/p/1207818/XFCE-D-PRO +[8]:https://www.xfce-look.org/p/1207818/startdownload?file_id=1523730502&file_name=XFCE-D-PRO-1.6.tar.xz&file_type=application/x-xz&file_size=105328&url=https%3A%2F%2Fdl.opendesktop.org%2Fapi%2Ffiles%2Fdownloadfile%2Fid%2F1523730502%2Fs%2F6019b2b57a1452471eac6403ae1522da%2Ft%2F1529360682%2Fu%2F%2FXFCE-D-PRO-1.6.tar.xz +[9]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/4.jpg +[10]:https://itsfoss.com/best-gtk-themes/ +[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/6.jpg +[12]:https://snwh.org/moka +[13]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/11-800x547.jpg +[14]:https://itsfoss.com/best-icon-themes-ubuntu-16-04/ +[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/5-800x531.jpg +[16]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/7-800x546.jpg +[17]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/8.jpg +[18]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/9.jpg +[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/10-800x447.jpg From fcad314c8436c07c37cccb61ec7be31deb87cd9f Mon Sep 17 00:00:00 2001 From: WWWN Date: Sat, 24 Aug 2019 12:16:12 +0800 Subject: [PATCH 640/951] Update 20190823 How to Delete Lines from a File Using the sed Command.md --- ...823 How to Delete Lines from a File Using the sed Command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md b/sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md index 83028917fd..4cec658e7d 100644 --- a/sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md +++ b/sources/tech/20190823 How to Delete Lines from a File Using the sed Command.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (hello-wn) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b4067805497f8626e2ff5e55f1faa3d6d3bf3202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sat, 24 Aug 2019 12:58:10 +0800 Subject: [PATCH 641/951] Translating (#15145) --- ...Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md b/sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md index d37a9fb301..cd5e3dac06 100644 --- a/sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md +++ b/sources/tech/20190810 How to Upgrade Linux Mint 19.1 (Tessa) to Linux Mint 19.2 (Tina).md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f4d78a6f1158494184c61ce682f36e45a93c992f Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 24 Aug 2019 16:00:44 +0800 Subject: [PATCH 642/951] translate done: 20180116 Command Line Heroes- Season 1- OS Wars_2.md --- ...ommand Line Heroes- Season 1- OS Wars_2.md | 162 ------------------ ...ommand Line Heroes- Season 1- OS Wars_2.md | 162 ++++++++++++++++++ 2 files changed, 162 insertions(+), 162 deletions(-) delete mode 100644 sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md create mode 100644 translated/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md diff --git a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md b/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md deleted file mode 100644 index fe598d2f3f..0000000000 --- a/sources/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (lujun9972) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Command Line Heroes: Season 1: OS Wars) -[#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux) -[#]: author: (redhat https://www.redhat.com) - -代码英雄: 第一季: 操作系统大战(第二部分 Linux 崛起) -====== -Saron Yitbarek: 这玩意开着的吗? 让我们进一段史诗般的星球大战的开幕吧, 开始了. - -配音: [00:00:30] 第二集:Linux®的崛起。微软帝国控制着90%的桌面用户。操作系统的全面标准化似乎是板上钉钉的事了。然而,互联网的出现将战争的焦点从桌面转向了企业,在该领域,所有商业组织都争相构建自己的服务器。与此同时,一个不太可能的英雄出现在开源反叛组织中。固执,戴着眼镜的Linus Torvalds免费发布了他的Linux系统。微软打了个趔趄-并且开始重组。 - -Saron Yitbarek: [00:01:00] 哦,我们书呆子就是喜欢那样。上一次我们讲到哪了?苹果和微软互相攻伐,试图在一场争夺桌面用户的战争中占据主导地位。在第一集的结尾,我们看到微软获得了大部分的市场份额。很快,由于互联网的兴起以及随之而来的开发者大军,整个市场都经历了一场地震。互联网将战场从在家庭和办公室中的个人电脑用户转移到拥有数百台服务器的大型商业客户中。 - -[00:01:30] 这意味着巨量资源的迁移。突然间,所有相关企业不仅被迫为服务器空间和网站建设付费,而且还必须集成软件来进行资源跟踪和数据库监控等工作。你需要很多开发人员来帮助你。至少那时候大家都是这么做的。 - -在操作系统之战的第二部分,我们将看到优先级的巨大转变,以及像Linus Torvalds和Richard Stallman这样的开源叛逆者是如何成功地在微软和整个软件行业的核心地带引起恐惧的。 - -[00:02:00] 我是 Saron Yitbarek,您现在收听的是代码英雄,一款红帽公司原创的播客节目. 每一集,我们都会给您带来“从码开始”改变技术的人的故事. - -[00:02:30] 好。假设你是1991年的微软。你自我感觉良好,对吧?满怀信心。确定全球主导的地位感觉不错。你已经掌握了与其他企业合作的艺术,但是仍然将大部分开发人员、程序员和系统管理员排除在联盟之外,而他们才是真正的步兵。这是出现了个叫Linus Torvalds的芬兰极客。他和他的开源程序员团队正在开始发布Linux,其操作系统内核是由他们一起编写出来的。 - -[00:03:00] 坦白地说,如果你是微软公司,你并不会太在意Linux,甚至是一般意义上的开源运动,但是最终,Linux的规模变得如此之大,以至于微软不可能不注意到。Linux第一个版本出现在1991年,当时大概有10000行代码。十年后,变成了300万行代码。如果你想知道,今天则是2000万行代码。 - -[00:03:30] 让我们停留在90年代初一会儿。那是Linux还没有成为我们现在所知道的庞然大物。只是这个奇怪的病毒式的操作系统正在这个星球上蔓延,全世界的极客和黑客都爱上了它。那时候我还太年轻,但依然希望加入他们。在那个时候,发现Linux就如同进入了一个秘密社会一样。程序员与朋友分享Linux CD集,就像其他人分享地下音乐混音带一样。 - -Developer Tristram Oaten [00:03:40] 讲讲了你16岁时第一次接触Linux的故事吧。 - -Tristram Oaten: [00:04:00] 我和我的家人去了Red Sea上的Hurghada潜水度假。那是一个美丽的地方,强烈推荐。第一天,我喝了自来水。也许,我妈妈跟我说过不要这么做。我整个星期都病得很厉害,没有离开旅馆房间。当时我只带了一台新安装了Slackware Linux的笔记本电脑,我听说过这玩意并且正在尝试使用它。这台笔记本上没有额外的应用程序,只有8张cd。出于必要,整个星期我所做的就是去了解这个外星一般的系统。我阅读手册,摆弄着终端。我记得当时我甚至我不知道一个点(表示当前目录)和两个点(表示前一个目录)之间的区别。 - -[00:04:30] 我一点头绪都没有。犯过很多错误,但慢慢地,在这种强迫的孤独中,我突破了障碍,开始理解并明白命令行到底是怎么回事。假期结束时,我没有看过金字塔、尼罗河等任何埃及遗址,但我解锁了现代世界的一个奇迹。我解锁了Linux,接下来的事大家都知道了。 - -Saron Yitbarek: 你可以从很多人那里听到关于这个故事的不同说法。访问Linux命令行是一种革命性的体验。 - -David Cantrell: 它给了我源代码. 我当时的感觉是, "太神奇了." - -Saron Yitbarek: 我们正在参加一个名为Flock to Fedora的2017年Linux开发者大会。 - -David Cantrell: ... 非常有吸引力。我觉得我对这个系统有了更多的控制力,它越来越吸引我。我想,从那时起,1995年我第一次编译Linux内核时,我就迷上了它。 - -Saron Yitbarek: 开发者 David Cantrell 与 Joe Brockmire. - -Joe Brockmeier: 我寻遍了便宜软件最终找到一套四张CD的 Slackware Linux. 它看起来来非常令人兴奋而且很有趣,所以我把它带回家,安装在第二台电脑上,开始摆弄它,并为两件事情感到兴奋。一个是,我运行的不是Windows,另一个我Linux的开源特性。 - -Saron Yitbarek: [00:06:00] 某种程度上来说,对命令行的访问总是存在的。在开源真正开始流行还要早几十年前,人们(至少在开发人员中是这样)总是希望能够做到完全控制。让我们回到操作系统大战之前的那个时代,在苹果和微软他们的GUI而战之前。那时也有代码英雄。保罗·琼斯(Paul Jones)教授(在线图书馆ibiblio.org负责人)在那个古老的时代,就是一名开发人员。 - -Paul Jones: [00:07:00] 从本质上讲,互联网在那个时候比较少是客户端-服务器架构的,而是更多是点对点架构的。讲真,当我们说,某种VAX到VAX,某科学工作站,科学工作站。这并不意味着没有客户端与服务端的关系以及没有应用程序,但这的确意味着,最初的设计是思考如何实现点对点,它与IBM一直在做的东西相对立. IBM给你的只有哑终端,这种终端只能让你管理用户界面,却无法让你像真正的终端一样为所欲为。 - -Saron Yitbarek: 图形用户界面在普通用户中普及的同时,在工程师和开发人员中总是存在和一股相反的力量。早在20世纪70年代和80年代的Linux出现之前,这股力量就存在于EMAX和GNU中。有了斯托尔曼的自由软件基金会后,总有某些人想要使用命令行,但上世纪90年代的Linux的交付方式是独一无二的。 - -[00:07:30] Linux和其他开源软件的早期爱好者是都是先驱。我正站在他们的肩膀上。我们都是。 - -您现在收听的是代码英雄, 一款由红帽公司原创的播客. 这是操作系统大战的第二部分: Linux 崛起. - -Steven Vaughan-Nichols: 1998年的时候, 情况发生了变化. - -Saron Yitbarek: Steven Vaughan-Nichols 是zdnet.com的特约编辑,他已经写了几十年关于技术商业方面的文章了。他将向我们讲述Linux是如何慢慢变得越来越流行,直到自愿贡献者的数量远远超过了在Windows上工作的微软开发人员的数量的。不过,Linux从来没有真正关注过微软的台式机客户,这也许就是微软最开始时忽略了Linux及其开发者的原因。Linux真正大放光彩的地方是在服务器机房。当企业开始线上业务时,每个企业都需要一个独特的编程解决方案来满足其需求。 - -[00:08:30] WindowsNT于1993年问世,当时它已经在与其他的服务器操作系统展开竞争了,但是许多开发人员都在想,“既然我可以通过Apache构建出基于Linux的廉价系统,那我为什么要购买AIX设备或大型Windows设备呢?”关键点在于,Linux代码已经开始渗透到几乎所有在线的东西中。 - -Steven Vaughan-Nichols: [00:09:00] 令微软感到惊讶的是,它开始意识到,Linux实际上已经开始有一些商业应用,不是在桌面环境,而是在商业服务器上。因此,他们发起了一场运动,我们称之为FUD-恐惧、不确定和怀疑(fear,uncertainty和double).他们说,“哦,Linux这玩意,真的没有那么好。它不太可靠。你一点都不能相信它”。 - -Saron Yitbarek: [00:09:30] 这种软宣传式的攻击持续了一段时间。微软也不是唯一一个对Linux感到紧张的公司。这其实是整个行业在对抗这个奇怪新人的挑战。例如,任何与UNIX有利害关系的人都可能将Linux视为篡夺者。有一个案例很著名,那就是SCO组织(它发行过一种版本的UNIX)在过去10多年里发起一系列的诉讼,试图阻止Linux的传播。SCO最终失败而且破产了。与此同时,微软一直在寻找机会。他们势在必行。只不过目前还不清楚具体要怎么做。 - -Steven Vaughan-Nichols: [00:10:30] 让微软真正担心的是,第二年,在2000年的时候,IBM宣布,他们将于2001年投资10亿美元在Linux上。现在,IBM已经不再涉足个人电脑业务。他们还没有走出去,但他们正朝着这个方向前进,他们将Linux视为服务器和大型计算机的未来,在这一点上,剧透警告,IBM是正确的。Linux将主宰服务器世界。 - -Saron Yitbarek: 这已经不再仅仅是一群黑客喜欢命令行的Jedi式的控制了。金钱的投入对Linux助力极大。Linux国际的执行董事John "Mad Dog" Hall有一个故事可以解释为什么会这样。我们通过电话与他取得了联系。 - -John Hall: [00:11:30] 我的一个朋友名叫Dirk Holden[00:10:56],他是德国德意志银行的一名系统管理员,他也参与了个人电脑上早期X Windows系统的图形项目中的工作。有一天我去银行拜访他,我说:“Dirk,你银行里有3000台服务器,用的都是Linux。为什么不用Microsoft NT呢?”他看着我说:“是的,我有3000台服务器,如果使用微软的Windows NT系统,我需要2999名系统管理员。”他继续说道:“而使用Linux,我只需要四个。”这真是完美的答案。 - -Saron Yitbarek: [00:12:00] 程序员们着迷的这些东西恰好对大公司也极具吸引力。但由于FUD的作用,一些企业对此持谨慎态度。他们听到开源,就想:"开源。这看起来不太可靠,很混乱,充满了BUG".但正如那位银行经理所指出的,金钱听过一种有趣的方式,说服人们克服困境。甚至那些需要网站的小公司也加入了Linux阵营。与一些昂贵的专有选择相比,使用一个廉价的Linux系统在成本上是无法比拟的。如果您是一家雇佣专业人员来构建网站的商店,那么您很定想让他们使用Linux。 - -[00:12:30] 让我们快进几年. Linux运行每个人的网站上。Linux已经征服了服务器世界,然后智能手机也随之诞生。当然,苹果和他们的iPhone占据了相当大的市场份额,而且微软也希望能进入这个市场,但令人惊讶的是,Linux也在那,已经做好准备了,迫不及待要大展拳脚。 - -作家兼记者 James Allworth. - -James Allworth: [00:13:00] 当然还有容纳第二个竞争者的空间,那本可以是微软,但是实际上却是Android,而Andrid基本上是基于Linux的. 众所周知,Android被谷歌所收购,现在运行在世界上大部分的智能手机上,谷歌在Linux的基础上创建了Android。Linux使他们能够以零成本从一个非常复杂的操作系统开始。他们成功地实现了这一目标,最终将微软挡在了下一代设备之外,至少从操作系统的角度来看是这样。 - -Saron Yitbarek: [00:13:30] 天崩地裂了,很大程度上,微软有被埋没的风险。John Gossman是微软Azure团队的首席架构师。他还记得当时困扰公司的困惑。 - -John Gossman: [00:14:00] 像许多公司一样,微软也非常担心知识产权污染。他们认为,如果允许开发人员使用开源代码,那么很可能只是复制并粘贴一些代码到某些产品中,就会让某种病毒式的许可证生效从而引发未知的风险…,我认为,这跟公司文化有关,很多公司,包括微软,都对开源开发的意义和商业模式之间的分歧感到困惑。有一种观点认为,开源意味着你所有的软件都是免费的,人们永远不会付钱。 - -Saron Yitbarek: [00:14:30] 任何投资于旧的、专有软件模型的人都会觉得这里发生的一切对他们构成了威胁。当你威胁到像微软这样的大公司时,是的,他们一定会做出反应。他们推动所有这些FUD(fear,uncertainty,doubt)-恐惧,不确定性和怀疑是有道理的。当时,商业运作的方式基本上就是相互竞争。不过,如果他们是其他公司的话(If they'd been any other company,看不懂什么意思),他们可能还会怀恨在心,抱着旧有的想法,但到了2013年,一切都变了。 - -[00:15:00] 微软的云计算服务Azure上线了,令人震惊的是,它从第一天开始就提供了Linux虚拟机。Steve Ballmer,这位把Linux称为癌症的首席执行官,已经离开了,代替他的是一位新的有远见的首席执行官Satya Nadella. - -John Gossman: Satya 有不同的看法. 他属于另一个世代. 比Paul , Bill 和 Steve 更年轻的世代 , 他对开源有不同的看法. - -Saron Yitbarek: John Gossman, 再说一次, 来自于 微软的Azure 团队. - -John Gossman: [00:16:00] 大约四年前,处于实际需要,我们在Azure中添加了Linux支持。如果访问任何一家企业客户,你都会发现他们并没有试图决定是使用Windows还是使用Linux、使用.net还是使用Java TM。他们在很久以前就做出了决定——大约15年前才有这样的一些争论。现在,我见过的每一家公司都混合了Linux和Java、Windows和.net、SQL Server、Oracle和MySQL——基于专有源代码的产品和开放源代码的产品。 - -如果你正在运维着一个云,允许这些公司在云上运行他们的业务,那么你就不能简单地告诉他们,“你可以使用这个软件,但你不能使用那个软件。” - -Saron Yitbarek: [00:16:30] 这正是 Satya Nadella 采纳的哲学思想. 2014年秋季,他站在舞台上,希望传递一个重要信息。微软爱Linux。他接着说,Azure 20%的业务量已经是Linux了,微软将始终对Linux发行版提供一流的支持。没有哪怕一丝对开源的宿怨。 - -为了说明这一点,在他们的背后有一个巨大的标志,上面写着:“Microsoft hearts Linux”。哇哇哇。对我们中的一些人来说,这种转变有点令人震惊,但实际上,无需如此震惊。下面是Steven Levy,一名科技记者兼作家。 - -Steven Levy: [00:17:30] 当你在踢足球的时候,如果草坪变滑了,那么你也许会换一种不同的鞋子。他们当初就是这么做的。他们不能否认现实而且他们之间也有有聪明人,所以他们必须意识到,这就是世界的运行方式,不管他们早些时候说了什么,即使他们对之前的言论感到尴尬,但是让他们之前关于开源多么可怕的言论影响到现在明智的决策那才真的是疯了。 - -Saron Yitbarek: [00:18:00] 微软低下了它高傲的头. 你可能还记得苹果公司, 经过多年的孤立无援, 最终转向与微软构建合作伙伴关系. 现在轮到微软进行180度转变了. 经过多年的与开源方法的战斗后,他们正在重塑自己。要么改变,要么死亡. Steven Vaughan-Nichols. - -Steven Vaughan-Nichols: [00:18:30] 即使是像微软这样规模的公司也无法与成千上万的开源开发者竞争,这些开发者开发这包括Linux在内的其他大项目。很长时间以来他们都不愿意这么做。前微软首席执行官史蒂夫·鲍尔默(SteveBallmer)对Linux深恶痛绝。由于它的GPL许可证,让Linux称为一种癌症,但一旦鲍尔默被扫地出门,新的微软领导层说,“这就好像试图命令潮流不要过来,但潮水依然会不断涌进来。我们应该与Linux合作,而不是与之对抗。” - -Saron Tiebreak: [00:19:00] 真的,在线技术历史上最大的胜利之一就是微软能够做出这样的转变,当他们最终决定这么做的时候。当然,当微软出现在开源的桌子上时,老的、铁杆Linux支持者是相当怀疑的。他们不确定自己是否能接受这些家伙,但正如沃恩-尼科尔斯所指出的,今天的微软根本不是你父母的微软。事实上, 互联网技术历史上最大的胜利之一就是让微软最终做出如此转变. 当然,当微软出现在开源桌上时,老一代的、铁杆Linux支持者是相当怀疑的。他们不确定自己是否能接受这些家伙,但正如Vaughan-Nichols 所指出的,今天的微软已经不是你父母那一代时的微软了。 - -Steven Vaughan-Nichols : [00:19:30] 2017年的微软既不是史蒂夫•鲍尔默(Steve Ballmer)的微软,也不是比尔•盖茨(Bill Gates)的微软。这是一家完全不同的公司,有着完全不同的方法,而且,开源软件一旦被放出,就无法被收回。开源已经吞噬了整个技术世界。从未听说过Linux的人可能对它并不了解,但是每次他们访问Facebook,他们都在运行Linux。每次执行谷歌搜索时,你都在运行Linux。 - -[00:20:00] 每次你用Android手机,你都在运行Linux。它确实无处不在,微软无法阻止它,我认为以为微软可以以某种方式接管它的想法,太天真了。 - -Saron Yitbarek: [00:20:30] 开源支持者可能一直担心微软会像混入羊群中的狼一样,但事实是,开源软件的本质保护了它无法被完全控制。没有一家公司能够拥有Linux并以某种特定的方式控制它。Greg Kroah-Hartman是Linux基金会的一名成员。 - -Greg Kroah-Hartman: 每个公司和个人都以自私的方式为Linux做出贡献。他们之所以这样做是因为他们想要解决他们所面临的问题,可能是硬件无法工作,或者是他们想要添加一个新功能来做其他事情,又或者想在他们的产品中使用它。这很棒,因为他们会把代码贡献回去,此后每个人都会从中受益,这样每个人都可以用到这份代码。正是因为这种自私,所有的公司,所有的人,所有的人都能从中受益。 - -Saron Yitbarek: [00:21:30] Microsoft has realized that in the coming cloud wars, fighting Linux would be like going to war with, well, a cloud. Linux and open source aren't the enemy, they're the atmosphere. Today, Microsoft has joined the Linux Foundation as a platinum member. They became the number one contributor to open source on GitHub. In September, 2017, they even joined the Open Source Initiative. These days, Microsoft releases a lot of its code under open licenses. Microsoft's John Gossman describes what happened when they open sourced .net. At first, they didn't really think they'd get much back. - -John Gossman: [00:22:00] We didn't count on contributions from the community, and yet, three years in, over 50 per cent of the contributions to the .net framework libraries, now, are coming from outside of Microsoft. This includes big pieces of code. Samsung has contributed ARM support to .net. Intel and ARM and a couple other chip people have contributed code generation specific for their processors to the .net framework, as well as a surprising number of fixes, performance improvements , and stuff — from just individual contributors to the community. - -Saron Yitbarek: Up until a few years ago, the Microsoft we have today, this open Microsoft, would have been unthinkable. - -[00:23:00] I'm Saron Yitbarek, and this is Command Line Heroes. Okay, we've seen titanic battles for the love of millions of desktop users. We've seen open source software creep up behind the proprietary titans, and nab huge market share. We've seen fleets of command line heroes transform the programming landscape into the one handed down to people like me and you. Today, big business is absorbing open source software, and through it all, everybody is still borrowing from everybody. - -[00:23:30] In the tech wild west, it's always been that way. Apple gets inspired by Xerox, Microsoft gets inspired by Apple, Linux gets inspired by UNIX. Evolve, borrow, constantly grow. In David and Goliath terms, open source software is no longer a David, but, you know what? It's not even Goliath, either. Open source has transcended. It's become the battlefield that others fight on. As the open source approach becomes inevitable, new wars, wars that are fought in the cloud, wars that are fought on the open source battlefield, are ramping up. - -Here's author Steven Levy. - -Steven Levy: [00:24:00] Basically, right now, we have four or five companies, if you count Microsoft, that in various ways are fighting to be the platform for all we do, for artificial intelligence, say. You see wars between intelligent assistants, and guess what? Apple has an intelligent assistant, Siri. Microsoft has one, Cortana. Google has the Google Assistant. Samsung has an intelligent assistant. Amazon has one, Alexa. We see these battles shifting to different areas, there. Maybe, you could say, the hottest one is would be, whose AI platform is going to control all the stuff in our lives there, and those five companies are all competing for that. - -Saron Yitbarek: If you're looking for another rebel that's going to sneak up behind Facebook or Google or Amazon and blindside them the way Linux blindsided Microsoft, you might be looking a long time, because as author James Allworth points out, being a true rebel is only getting harder and harder. - -James Allworth: [00:25:30] Scale's always been an advantage but the nature of scale advantages are almost ... Whereas, I think previously they were more linear in nature, now it's more exponential in nature, and so, once you start to get out in front with something like this , it becomes harder and harder for a new player to come in and catch up. I think this is true of the internet era in general, whether it's scale like that or the importance and advantages that data bestow on an organization in terms of its ability to compete. Once you get out in front, you attract more customers, and then that gives you more data and that enables you to do an even better job, and then, why on earth would you want to go with the number two player, because they're so far behind? I think it's going to be no different in cloud. - -Saron Yitbarek: [00:26:00] This story began with singular heroes like Steve Jobs and Bill Gates, but the progress of technology has taken on a crowdsourced, organic feel. I think it's telling that our open source hero, Linus Torvalds, didn't even have a real plan when he first invented the Linux kernel. He was a brilliant , young developer for sure, but he was also like a single drop of water at the very front of a tidal wave. The revolution was inevitable. It's been estimated that for a proprietary company to create a Linux distribution in their old - fashioned , proprietary way, it would cost them well over $ 10 billion. That points to the power of open source. - -[00:26:30] In the end, it's not something that a proprietary model is going to compete with. Successful companies have to remain open. That's the big, ultimate lesson in all this. Something else to keep in mind: W hen we're wired together, our capacity to grow and build on what we've already accomplished becomes limitless. As big as these companies get, we don't have to sit around waiting for them to give us something better. Think about the new developer who learns to code for the sheer joy of creating, the mom who decides that if nobody's going to build what she needs, then she'll build it herself. - -Wherever tomorrow's great programmers come from, they're always going to have the capacity to build the next big thing, so long as there's access to the command line. - -[00:27:30] That's it for our two - part tale on the OS wars that shaped our digital lives. The struggle for dominance moved from the desktop to the server room, and ultimately into the cloud. Old enemies became unlikely allies, and a crowdsourced future left everything open . Listen, I know, there are a hundred other heroes we didn't have space for in this history trip, so drop us a line. Share your story. Redhat.com/commandlineheroes. I'm listening. - -We're spending the rest of the season learning what today's heroes are creating, and what battles they're going through to bring their creations to life. Come back for more tales — from the epic front lines of programming. We drop a new episode every two weeks. In a couple weeks' time, we bring you episode three: the Agile Revolution. - -[00:28:00] Command Line Heroes is an original podcast from Red Hat. To get new episodes delivered automatically for free, make sure to subscribe to the show. Just search for “ Command Line Heroes ” in Apple p odcast s , Spotify, Google Play, and pretty much everywhere else you can find podcasts. Then, hit “ subscribe ” so you will be the first to know when new episodes are available. - -I'm Saron Yitbarek. Thanks for listening. Keep on coding. - --------------------------------------------------------------------------------- - -via: https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux - -作者:[redhat][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.redhat.com -[b]: https://github.com/lujun9972 diff --git a/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md new file mode 100644 index 0000000000..040a2d2836 --- /dev/null +++ b/translated/talk/20180116 Command Line Heroes- Season 1- OS Wars_2.md @@ -0,0 +1,162 @@ +[#]: collector: (lujun9972) +[#]: translator: (lujun9972) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Command Line Heroes: Season 1: OS Wars) +[#]: via: (https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux) +[#]: author: (redhat https://www.redhat.com) + +代码英雄:第一季:操作系统大战(第二部分 Linux 崛起) +====== +Saron Yitbarek: 这玩意开着的吗?让我们进一段史诗般的星球大战的开幕吧,开始了。 + +配音:[00:00:30] 第二集 :Linux® 的崛起。微软帝国控制着 90% 的桌面用户。操作系统的全面标准化似乎是板上钉钉的事了。然而,互联网的出现将战争的焦点从桌面转向了企业,在该领域,所有商业组织都争相构建自己的服务器。与此同时,一个不太可能的英雄出现在开源反叛组织中。固执,戴着眼镜的 Linus Torvalds 免费发布了他的 Linux 系统。微软打了个趔趄-并且开始重组。 + +Saron Yitbarek: [00:01:00] 哦,我们书呆子就是喜欢那样。上一次我们讲到哪了?苹果和微软互相攻伐,试图在一场争夺桌面用户的战争中占据主导地位。在第一集的结尾,我们看到微软获得了大部分的市场份额。很快,由于互联网的兴起以及随之而来的开发者大军,整个市场都经历了一场地震。互联网将战场从在家庭和办公室中的个人电脑用户转移到拥有数百台服务器的大型商业客户中。 + +[00:01:30] 这意味着巨量资源的迁移。突然间,所有相关企业不仅被迫为服务器空间和网站建设付费,而且还必须集成软件来进行资源跟踪和数据库监控等工作。你需要很多开发人员来帮助你。至少那时候大家都是这么做的。 + +在操作系统之战的第二部分,我们将看到优先级的巨大转变,以及像 Linus Torvalds 和 Richard Stallman 这样的开源叛逆者是如何成功地在微软和整个软件行业的核心地带引起恐惧的。 + +[00:02:00] 我是 Saron Yitbarek,您现在收听的是代码英雄,一款红帽公司原创的播客节目。每一集,我们都会给您带来“从码开始”改变技术的人的故事。 + +[00:02:30] 好。假设你是 1991 年的微软。你自我感觉良好,对吧?满怀信心。确定全球主导的地位感觉不错。你已经掌握了与其他企业合作的艺术,但是仍然将大部分开发人员、程序员和系统管理员排除在联盟之外,而他们才是真正的步兵。这是出现了个叫 Linus Torvalds 的芬兰极客。他和他的开源程序员团队正在开始发布 Linux,其操作系统内核是由他们一起编写出来的。 + +[00:03:00] 坦白地说,如果你是微软公司,你并不会太在意 Linux,甚至是一般意义上的开源运动,但是最终,Linux 的规模变得如此之大,以至于微软不可能不注意到。Linux 第一个版本出现在 1991 年,当时大概有 10000 行代码。十年后,变成了 300 万行代码。如果你想知道,今天则是 2000 万行代码。 + +[00:03:30] 让我们停留在 90 年代初一会儿。那是 Linux 还没有成为我们现在所知道的庞然大物。只是这个奇怪的病毒式的操作系统正在这个星球上蔓延,全世界的极客和黑客都爱上了它。那时候我还太年轻,但依然希望加入他们。在那个时候,发现 Linux 就如同进入了一个秘密社会一样。程序员与朋友分享 Linux CD 集,就像其他人分享地下音乐混音带一样。 + +Developer Tristram Oaten [00:03:40] 讲讲了你 16 岁时第一次接触 Linux 的故事吧。 + +Tristram Oaten: [00:04:00] 我和我的家人去了 Red Sea 上的 Hurghada 潜水度假。那是一个美丽的地方,强烈推荐。第一天,我喝了自来水。也许,我妈妈跟我说过不要这么做。我整个星期都病得很厉害,没有离开旅馆房间。当时我只带了一台新安装了 Slackware Linux 的笔记本电脑,我听说过这玩意并且正在尝试使用它。这台笔记本上没有额外的应用程序,只有 8 张 cd。出于必要,整个星期我所做的就是去了解这个外星一般的系统。我阅读手册,摆弄着终端。我记得当时我甚至我不知道一个点(表示当前目录)和两个点(表示前一个目录)之间的区别。 + +[00:04:30] 我一点头绪都没有。犯过很多错误,但慢慢地,在这种强迫的孤独中,我突破了障碍,开始理解并明白命令行到底是怎么回事。假期结束时,我没有看过金字塔、尼罗河等任何埃及遗址,但我解锁了现代世界的一个奇迹。我解锁了 Linux,接下来的事大家都知道了。 + +Saron Yitbarek: 你可以从很多人那里听到关于这个故事的不同说法。访问 Linux 命令行是一种革命性的体验。 + +David Cantrell: 它给了我源代码。我当时的感觉是,"太神奇了。" + +Saron Yitbarek: 我们正在参加一个名为 Flock to Fedora 的 2017 年 Linux 开发者大会。 + +David Cantrell: .。. 非常有吸引力。我觉得我对这个系统有了更多的控制力,它越来越吸引我。我想,从那时起,1995 年我第一次编译 Linux 内核时,我就迷上了它。 + +Saron Yitbarek: 开发者 David Cantrell 与 Joe Brockmire。 + +Joe Brockmeier: 我寻遍了便宜软件最终找到一套四张 CD 的 Slackware Linux。它看起来来非常令人兴奋而且很有趣,所以我把它带回家,安装在第二台电脑上,开始摆弄它,并为两件事情感到兴奋。一个是,我运行的不是 Windows,另一个我 Linux 的开源特性。 + +Saron Yitbarek: [00:06:00] 某种程度上来说,对命令行的访问总是存在的。在开源真正开始流行还要早几十年前,人们(至少在开发人员中是这样)总是希望能够做到完全控制。让我们回到操作系统大战之前的那个时代,在苹果和微软他们的 GUI 而战之前。那时也有代码英雄。保罗·琼斯 (Paul Jones) 教授(在线图书馆 ibiblio.org 负责人)在那个古老的时代,就是一名开发人员。 + +Paul Jones: [00:07:00] 从本质上讲,互联网在那个时候比较少是客户端-服务器架构的,而是更多是点对点架构的。讲真,当我们说,某种 VAX 到 VAX,某科学工作站,科学工作站。这并不意味着没有客户端与服务端的关系以及没有应用程序,但这的确意味着,最初的设计是思考如何实现点对点,它与 IBM 一直在做的东西相对立。IBM 给你的只有哑终端,这种终端只能让你管理用户界面,却无法让你像真正的终端一样为所欲为。 + +Saron Yitbarek: 图形用户界面在普通用户中普及的同时,在工程师和开发人员中总是存在和一股相反的力量。早在 20 世纪 70 年代和 80 年代的 Linux 出现之前,这股力量就存在于 EMAX 和 GNU 中。有了斯托尔曼的自由软件基金会后,总有某些人想要使用命令行,但上世纪 90 年代的 Linux 的交付方式是独一无二的。 + +[00:07:30] Linux 和其他开源软件的早期爱好者是都是先驱。我正站在他们的肩膀上。我们都是。 + +您现在收听的是代码英雄,一款由红帽公司原创的播客。这是操作系统大战的第二部分:Linux 崛起。 + +Steven Vaughan-Nichols: 1998 年的时候,情况发生了变化。 + +Saron Yitbarek: Steven Vaughan-Nichols 是 zdnet.com 的特约编辑,他已经写了几十年关于技术商业方面的文章了。他将向我们讲述 Linux 是如何慢慢变得越来越流行,直到自愿贡献者的数量远远超过了在 Windows 上工作的微软开发人员的数量的。不过,Linux 从来没有真正关注过微软的台式机客户,这也许就是微软最开始时忽略了 Linux 及其开发者的原因。Linux 真正大放光彩的地方是在服务器机房。当企业开始线上业务时,每个企业都需要一个独特的编程解决方案来满足其需求。 + +[00:08:30] WindowsNT 于 1993 年问世,当时它已经在与其他的服务器操作系统展开竞争了,但是许多开发人员都在想,“既然我可以通过 Apache 构建出基于 Linux 的廉价系统,那我为什么要购买 AIX 设备或大型 Windows 设备呢?”关键点在于,Linux 代码已经开始渗透到几乎所有在线的东西中。 + +Steven Vaughan-Nichols: [00:09:00] 令微软感到惊讶的是,它开始意识到,Linux 实际上已经开始有一些商业应用,不是在桌面环境,而是在商业服务器上。因此,他们发起了一场运动,我们称之为 FUD- 恐惧、不确定和怀疑 (fear,uncertainty 和 double)。他们说,“哦,Linux 这玩意,真的没有那么好。它不太可靠。你一点都不能相信它”。 + +Saron Yitbarek: [00:09:30] 这种软宣传式的攻击持续了一段时间。微软也不是唯一一个对 Linux 感到紧张的公司。这其实是整个行业在对抗这个奇怪新人的挑战。例如,任何与 UNIX 有利害关系的人都可能将 Linux 视为篡夺者。有一个案例很著名,那就是 SCO 组织(它发行过一种版本的 UNIX) 在过去 10 多年里发起一系列的诉讼,试图阻止 Linux 的传播。SCO 最终失败而且破产了。与此同时,微软一直在寻找机会。他们势在必行。只不过目前还不清楚具体要怎么做。 + +Steven Vaughan-Nichols: [00:10:30] 让微软真正担心的是,第二年,在 2000 年的时候,IBM 宣布,他们将于 2001 年投资 10 亿美元在 Linux 上。现在,IBM 已经不再涉足个人电脑业务。他们还没有走出去,但他们正朝着这个方向前进,他们将 Linux 视为服务器和大型计算机的未来,在这一点上,剧透警告,IBM 是正确的。Linux 将主宰服务器世界。 + +Saron Yitbarek: 这已经不再仅仅是一群黑客喜欢命令行的 Jedi 式的控制了。金钱的投入对 Linux 助力极大。Linux 国际的执行董事 John "Mad Dog" Hall 有一个故事可以解释为什么会这样。我们通过电话与他取得了联系。 + +John Hall: [00:11:30] 我的一个朋友名叫 Dirk Holden[00:10:56],他是德国德意志银行的一名系统管理员,他也参与了个人电脑上早期 X Windows 系统的图形项目中的工作。有一天我去银行拜访他,我说 :“Dirk,你银行里有 3000 台服务器,用的都是 Linux。为什么不用 Microsoft NT 呢?”他看着我说:“是的,我有 3000 台服务器,如果使用微软的 Windows NT 系统,我需要 2999 名系统管理员。”他继续说道:“而使用 Linux,我只需要四个。”这真是完美的答案。 + +Saron Yitbarek: [00:12:00] 程序员们着迷的这些东西恰好对大公司也极具吸引力。但由于 FUD 的作用,一些企业对此持谨慎态度。他们听到开源,就想:"开源。这看起来不太可靠,很混乱,充满了 BUG"。但正如那位银行经理所指出的,金钱听过一种有趣的方式,说服人们克服困境。甚至那些需要网站的小公司也加入了 Linux 阵营。与一些昂贵的专有选择相比,使用一个廉价的 Linux 系统在成本上是无法比拟的。如果您是一家雇佣专业人员来构建网站的商店,那么您很定想让他们使用 Linux。 + +[00:12:30] 让我们快进几年。Linux 运行每个人的网站上。Linux 已经征服了服务器世界,然后智能手机也随之诞生。当然,苹果和他们的 iPhone 占据了相当大的市场份额,而且微软也希望能进入这个市场,但令人惊讶的是,Linux 也在那,已经做好准备了,迫不及待要大展拳脚。 + +作家兼记者 James Allworth。 + +James Allworth: [00:13:00] 当然还有容纳第二个竞争者的空间,那本可以是微软,但是实际上却是 Android,而 Andrid 基本上是基于 Linux 的。众所周知,Android 被谷歌所收购,现在运行在世界上大部分的智能手机上,谷歌在 Linux 的基础上创建了 Android。Linux 使他们能够以零成本从一个非常复杂的操作系统开始。他们成功地实现了这一目标,最终将微软挡在了下一代设备之外,至少从操作系统的角度来看是这样。 + +Saron Yitbarek: [00:13:30] 天崩地裂了,很大程度上,微软有被埋没的风险。John Gossman 是微软 Azure 团队的首席架构师。他还记得当时困扰公司的困惑。 + +John Gossman: [00:14:00] 像许多公司一样,微软也非常担心知识产权污染。他们认为,如果允许开发人员使用开源代码,那么很可能只是复制并粘贴一些代码到某些产品中,就会让某种病毒式的许可证生效从而引发未知的风险…,我认为,这跟公司文化有关,很多公司,包括微软,都对开源开发的意义和商业模式之间的分歧感到困惑。有一种观点认为,开源意味着你所有的软件都是免费的,人们永远不会付钱。 + +Saron Yitbarek: [00:14:30] 任何投资于旧的、专有软件模型的人都会觉得这里发生的一切对他们构成了威胁。当你威胁到像微软这样的大公司时,是的,他们一定会做出反应。他们推动所有这些 FUD(fear,uncertainty,doubt)- 恐惧,不确定性和怀疑是有道理的。当时,商业运作的方式基本上就是相互竞争。不过,如果他们是其他公司的话 (If they'd been any other company,看不懂什么意思),他们可能还会怀恨在心,抱着旧有的想法,但到了 2013 年,一切都变了。 + +[00:15:00] 微软的云计算服务 Azure 上线了,令人震惊的是,它从第一天开始就提供了 Linux 虚拟机。Steve Ballmer,这位把 Linux 称为癌症的首席执行官,已经离开了,代替他的是一位新的有远见的首席执行官 Satya Nadella。 + +John Gossman: Satya 有不同的看法。他属于另一个世代。比 Paul,Bill 和 Steve 更年轻的世代,他对开源有不同的看法。 + +Saron Yitbarek: John Gossman,再说一次,来自于 微软的 Azure 团队。 + +John Gossman: [00:16:00] 大约四年前,处于实际需要,我们在 Azure 中添加了 Linux 支持。如果访问任何一家企业客户,你都会发现他们并没有试图决定是使用 Windows 还是使用 Linux、 使用 .net 还是使用 Java TM。他们在很久以前就做出了决定——大约 15 年前才有这样的一些争论。现在,我见过的每一家公司都混合了 Linux 和 Java、Windows 和 .net、SQL Server、Oracle 和 MySQL—— 基于专有源代码的产品和开放源代码的产品。 + +如果你正在运维着一个云,允许这些公司在云上运行他们的业务,那么你就不能简单地告诉他们,“你可以使用这个软件,但你不能使用那个软件。” + +Saron Yitbarek: [00:16:30] 这正是 Satya Nadella 采纳的哲学思想。2014 年秋季,他站在舞台上,希望传递一个重要信息。微软爱 Linux。他接着说,Azure 20% 的业务量已经是 Linux 了,微软将始终对 Linux 发行版提供一流的支持。没有哪怕一丝对开源的宿怨。 + +为了说明这一点,在他们的背后有一个巨大的标志,上面写着 :“Microsoft hearts Linux”。哇哇哇。对我们中的一些人来说,这种转变有点令人震惊,但实际上,无需如此震惊。下面是 Steven Levy,一名科技记者兼作家。 + +Steven Levy: [00:17:30] 当你在踢足球的时候,如果草坪变滑了,那么你也许会换一种不同的鞋子。他们当初就是这么做的。他们不能否认现实而且他们之间也有有聪明人,所以他们必须意识到,这就是世界的运行方式,不管他们早些时候说了什么,即使他们对之前的言论感到尴尬,但是让他们之前关于开源多么可怕的言论影响到现在明智的决策那才真的是疯了。 + +Saron Yitbarek: [00:18:00] 微软低下了它高傲的头。你可能还记得苹果公司,经过多年的孤立无援,最终转向与微软构建合作伙伴关系。现在轮到微软进行 180 度转变了。经过多年的与开源方法的战斗后,他们正在重塑自己。要么改变,要么死亡。Steven Vaughan-Nichols。 + +Steven Vaughan-Nichols: [00:18:30] 即使是像微软这样规模的公司也无法与成千上万的开源开发者竞争,这些开发者开发这包括 Linux 在内的其他大项目。很长时间以来他们都不愿意这么做。前微软首席执行官史蒂夫·鲍尔默 (SteveBallmer) 对 Linux 深恶痛绝。由于它的 GPL 许可证,让 Linux 称为一种癌症,但一旦鲍尔默被扫地出门,新的微软领导层说,“这就好像试图命令潮流不要过来,但潮水依然会不断涌进来。我们应该与 Linux 合作,而不是与之对抗。” + +Saron Tiebreak: [00:19:00] 真的,在线技术历史上最大的胜利之一就是微软能够做出这样的转变,当他们最终决定这么做的时候。当然,当微软出现在开源的桌子上时,老的、铁杆 Linux 支持者是相当怀疑的。他们不确定自己是否能接受这些家伙,但正如沃恩-尼科尔斯所指出的,今天的微软根本不是你父母的微软。事实上,互联网技术历史上最大的胜利之一就是让微软最终做出如此转变。当然,当微软出现在开源桌上时,老一代的、铁杆 Linux 支持者是相当怀疑的。他们不确定自己是否能接受这些家伙,但正如 Vaughan-Nichols 所指出的,今天的微软已经不是你父母那一代时的微软了。 + +Steven Vaughan-Nichols : [00:19:30] 2017 年的微软既不是史蒂夫•鲍尔默 (Steve Ballmer) 的微软,也不是比尔•盖茨 (Bill Gates) 的微软。这是一家完全不同的公司,有着完全不同的方法,而且,开源软件一旦被放出,就无法被收回。开源已经吞噬了整个技术世界。从未听说过 Linux 的人可能对它并不了解,但是每次他们访问 Facebook,他们都在运行 Linux。每次执行谷歌搜索时,你都在运行 Linux。 + +[00:20:00] 每次你用 Android 手机,你都在运行 Linux。它确实无处不在,微软无法阻止它,我认为以为微软可以以某种方式接管它的想法,太天真了。 + +Saron Yitbarek: [00:20:30] 开源支持者可能一直担心微软会像混入羊群中的狼一样,但事实是,开源软件的本质保护了它无法被完全控制。没有一家公司能够拥有 Linux 并以某种特定的方式控制它。Greg Kroah-Hartman 是 Linux 基金会的一名成员。 + +Greg Kroah-Hartman: 每个公司和个人都以自私的方式为 Linux 做出贡献。他们之所以这样做是因为他们想要解决他们所面临的问题,可能是硬件无法工作,或者是他们想要添加一个新功能来做其他事情,又或者想在他们的产品中使用它。这很棒,因为他们会把代码贡献回去,此后每个人都会从中受益,这样每个人都可以用到这份代码。正是因为这种自私,所有的公司,所有的人,所有的人都能从中受益。 + +Saron Yitbarek: [00:21:30] 微软已经意识到,在即将到来的云战争中,与 Linux 作战就像与空气作战一样。Linux 和开源不是敌人,它们是一种氛围。今天,微软以白金会员的身份加入了 Linux 基金会。他们成为 GitHub 开源项目的头号贡献者。2017 年 9 月,他们甚至加入了 Open Source Initiative 组织。现在,微软在开放许可下发布了很多代码。微软的 John Gossman 描述了他们开源 .net 时所发生的事情。起初,他们并不认为自己能得到什么回报。 + +John Gossman: [00:22:00] 我们本没有指望来自社区的贡献,然而,三年后,超过 50% 的对 .net 框架库的贡献来自于微软之外。这包括大量的代码。三星为 .net 提供了 ARM 支持。Intel 和 ARM 以及其他一些芯片厂商已经为 .net 框架贡献了特定于他们处理器的代码生成,以及数量惊人的修复、性能改进等等——既有单个贡献者也有社区。 + +Saron Yitbarek: 直到几年前,我们今天拥有的这个微软,这个开放的微软,还是不可想象的。 + +[00:23:00] 我是 Saron Yitbarek,这里是代码英雄。好吧,我们已经看到了为了赢得数百万桌面用户的爱而战的激烈场面。我们已经看到开源软件在私有巨头的背后悄然崛起,并攫取了巨大的市场份额。我们已经看到了一批批的代码英雄将编程领域变成了我你现在看到的这个样子。今天,大企业正在吸收开源软件,通过这一切,每个人都从他人那里受益。 + +[00:23:30] 在狂野的西方科技界,一贯如此。苹果受到施乐的启发,微软受到苹果的启发,Linux 受到 UNIX 的启发。进化,借鉴,不断成长。如果比喻成大卫和歌利亚(西方经典的以弱胜强战争中的两个主角)的话,开源软件不再是大卫,但是,你知道吗?它也不是歌利亚。开源已经超越了传统。它已经成为其他人战斗的战场。随着开源变得不可避免,新的战争,那些在云计算中进行的战争,那些在开源战场上进行的战争,都在增加。 + +这是 Steven Levy,他是一名作者。 + +Steven Levy: [00:24:00] 基本上,到目前为止,包括微软在内,我们有四到五家公司,正以各种方式努力把自己打造成为我们的工作平台,比如人工智能领域。你能看到智能助手之间的战争,你猜怎么着?苹果有一个智能助手,叫 Siri。微软有一个,叫 Cortana。谷歌有谷歌助手。三星也有一个智能助手。亚马逊也有一个,叫 Alexa。我们看到这些战斗遍布各地。也许,你可以说,最热门的人工智能平台将控制我们生活中所有的东西,而这五家公司就是在为此而争斗。 + +Saron Yitbarek: 现在很难再找到另一个反叛者,它就像 Linux 奇袭微软那样,偷偷潜入 Facebook、 谷歌或亚马逊,攻其不备。因为正如作家 James Allworth 所指出的,成为一个真正的反叛者者只会变得越来越难。 + +James Allworth: [00:25:30] 规模一直以来都是一种优势,但规模优势本质上……怎么说呢,我认为以前它们在本质上是线性的,现在它们在本质上是指数型的了,所以,一旦你开始以某种方法走在前面,另一个新玩家要想赶上来就变得越来越难了。我认为在互联网时代这大体来说来说是正确的,无论是因为规模,还是数据赋予组织的重要性和优势,就其竞争能力而言。一旦你走在前面,你就会吸引更多的客户,这就给了你更多的数据,让你能做得更好,这之后,客户还有什么理由选择排名第二的公司呢,难道是因为因为他们落后了这么远么?我认为在云的时代这个逻辑也不会有什么不同。 + +Saron Yitbarek: [00:26:00] 这个故事始于史蒂夫•乔布斯 (Steve Jobs) 和比尔•盖茨 (Bill Gates) 这样的非凡的英雄,但科技的进步已经呈现出一种众包、有机的感觉。我认为据说我们的开源英雄 Linus Torvalds 在第一次发明 Linux 内核时甚至没有一个真正的计划。他无疑是一位才华横溢的年轻开发者,但他也像潮汐前的一滴水一样。变革是不可避免的。据估计,对于一家私有专利公司来说,用他们老式的、专有的方式创建一个 Linux 发行版将花费他们超过 100 亿美元。这说明了开源的力量。 + +[00:26:30] 最后,这并不是一个专利模型所能与之竞争的东西。成功的公司必须保持开放。这是最大、最终极的教训。还有一点要记住:当我们连接在一起的时候,我们在已有基础上成长和建设的能力是无限的。不管这些公司有多大,我们都不必坐等他们给我们更好的东西。想想那些为了纯粹的创造乐趣而学习编码的新开发者,那些自己动手丰衣足食的人。 + +未来的优秀程序员无管来自何方,只要能够访问代码,他们就能构建下一个大项目。 + +[00:27:30] 以上就是我们关于操作系统战争的两个故事。这场战争塑造了我们的数字生活。争夺主导地位的斗争从桌面转移到了服务器室,最终进入了云计算领域。过去的敌人难以置信地变成了盟友,众包的未来让一切都变得开放。听着,我知道,在这段历史之旅中,还有很多英雄我们没有提到,所以给我们写信吧。分享你的故事。Redhat.com/commandlineheroes。我恭候佳音。 + +在本季剩下的时间里,我们将学习今天的英雄们在创造什么,以及他们要经历什么样的战斗才能将他们的创造变为现实。让我们从艰苦卓绝的编程一线回来看看更多的传奇故事吧。我们每两周放一集新的博客。几周后,我们将为您带来第三集:敏捷革命。 + +[00:28:00] 命令行英雄是一款红帽公司原创的播客。要想免费自动获得新一集的代码英雄,请订阅我们的节目。只要在苹果播客 、Spotify、 谷歌 Play,或其他应用中搜索“代码英雄”。然后点击“订阅”。这样你就会第一个知道什么时候有新剧集了。 + +我是 Saron Yitbarek。感谢收听。继续编码。 + +-------------------------------------------------------------------------------- + +via: https://www.redhat.com/en/command-line-heroes/season-1/os-wars-part-2-rise-of-linux + +作者:[redhat][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.redhat.com +[b]: https://github.com/lujun9972 From 77a15e6dd8a76d313959217291bcdc2081b05f01 Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 24 Aug 2019 18:01:08 +0800 Subject: [PATCH 643/951] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190729=20I=20Us?= =?UTF-8?q?ed=20The=20Web=20For=20A=20Day=20On=20A=2050=20MB=20Budget=20?= =?UTF-8?q?=E2=80=94=20Smashing=20Magazine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md --- ...y On A 50 MB Budget - Smashing Magazine.md | 538 ++++++++++++++++++ 1 file changed, 538 insertions(+) create mode 100644 sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md diff --git a/sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md b/sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md new file mode 100644 index 0000000000..b0a7f4a7e0 --- /dev/null +++ b/sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md @@ -0,0 +1,538 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (I Used The Web For A Day On A 50 MB Budget — Smashing Magazine) +[#]: via: (https://www.smashingmagazine.com/2019/07/web-on-50mb-budget/) +[#]: author: (Chris Ashton https://www.smashingmagazine.com/author/chrisbashton) + +I Used The Web For A Day On A 50 MB Budget +====== + +Data can be prohibitively expensive, especially in developing countries. Chris Ashton puts himself in the shoes of someone on a tight data budget and offers practical tips for reducing our websites’ data footprint. + +This article is part of a series in which I attempt to use the web under various constraints, representing a given demographic of user. I hope to raise the profile of difficulties faced by real people, which are avoidable if we design and develop in a way that is sympathetic to their needs. + +Last time, I [navigated the web for a day using Internet Explorer 8][7]. This time, I browsed the web for a day on a 50 MB budget. + +### Why 50 MB? + +Many of us are lucky enough to be on mobile plans which allow several gigabytes of data transfer per month. Failing that, we are usually able to connect to home or public WiFi networks that are on fast broadband connections and have effectively unlimited data. + +But there are parts of the world where mobile data is prohibitively expensive, and where there is little or no broadband infrastructure. + +> People often buy data packages of just tens of megabytes at a time, making a gigabyte a relatively large and therefore expensive amount of data to buy. +> — Dan Howdle, consumer telecoms analyst at Cable.co.uk + +Just how expensive are we talking? + +#### The Cost Of Mobile Data + +A 2018 [study by cable.co.uk][8] found that Zimbabwe was the most expensive country in the world for mobile data, where 1 GB cost an average of $75.20, ranging from $12.50 to $138.46. The enormous range in price is due to smaller amounts of data being very expensive, getting proportionally cheaper the bigger the data plan you commit to. You can read the [study methodology][9] for more information. + +Zimbabwe is by no means a one-off. Equatorial Guinea, Saint Helena and the Falkland Islands are next in line, with 1 GB of data costing $65.83, $55.47 and $47.39 respectively. These countries generally have a combination of poor technical infrastructure and low adoption, meaning data is both costly to deliver and doesn’t have the economy of scale to drive costs down. + +Data is expensive in parts of Europe too. A gigabyte of data in Greece will set you back $32.71; in Switzerland, $20.22. For comparison, the same amount of data costs $6.66 in the UK, or $12.37 in the USA. On the other end of the scale, India is the cheapest place in the world for data, at an average cost of $0.26. Kyrgyzstan, Kazakhstan and Ukraine follow at $0.27, $0.49 and $0.51 per GB respectively. + +The speed of mobile networks, too, varies considerably between countries. Perhaps surprisingly, [users experience faster speeds over a mobile network than WiFi][10] in at least 30 countries worldwide, including Australia and France. South Korea has the [fastest mobile download speed][11], averaging 52.4 Mbps, but Iraq has the slowest, averaging 1.6 Mbps download and 0.7 Mbps upload. The USA ranks 40th in the world for mobile download speeds, at around 34 Mbps, and is [at risk of falling further behind][12] as the world moves towards 5G. + +As for mobile network connection type, 84.7% of user connections in the UK are on 4G, compared to 93% in the USA, and 97.5% in South Korea. This compares with less than 50% in Uzbekistan and less than 60% in Algeria, Ecuador, Nepal and Iraq. + +#### The Cost Of Broadband Data + +Meanwhile, a [study of the cost of broadband in 2018][13] shows that a broadband connection in Niger costs $263 ‘per megabit per month’. This metric is a little difficult to comprehend, so here’s an example: if the average cost of broadband packages in a country is $22, and the average download speed offered by the packages is 10 Mbps, then the cost ‘per megabit per month’ would be $2.20. + +It’s an interesting metric, and one that acknowledges that broadband speed is as important a factor as the data cap. A cost of $263 suggests a combination of extremely slow and extremely expensive broadband. For reference, the metric is $1.19 in the UK and $1.26 in the USA. + +What’s perhaps easier to comprehend is the average cost of a broadband package. Note that this study was looking for the cheapest broadband packages on offer, ignoring whether or not these packages had a data cap, so provides a useful ballpark figure rather than the cost of data per se. + +On package cost alone, Mauritania has the most expensive broadband in the world, at an average of $768.16 (a range of $307.26 to $1,368.72). This enormous cost includes building physical lines to the property, since few already exist in Mauritania. At 0.7 Mbps, Mauritania also has one of the slowest broadband networks in the world. + +[Taiwan has the fastest broadband in the world][14], at a mean speed of 85 Mbps. Yemen has the slowest, at 0.38 Mbps. But even countries with good established broadband infrastructure have so-called ‘not-spots’. The United Kingdom is ranked 34th out of 207 countries for broadband speed, but in July 2019 there was [still a school in the UK without broadband][15]. + +The average cost of a broadband package in the UK is $39.58, and in the USA is $67.69. The cheapest average in the world is Ukraine’s, at just $5, although the cheapest broadband deal of them all was found in Kyrgystan ($1.27 — against the country average of $108.22). + +Zimbabwe was the most costly country for mobile data, and the statistics aren’t much better for its broadband, with an average cost of $128.71 and a ‘per megabit per month’ cost of $6.89. + +#### Absolute Cost vs Cost In Real Terms + +All of the costs outlined so far are the absolute costs in USD, based on the exchange rates at the time of the study. These costs have [not been accounted for cost of living][16], meaning that for many countries the cost is actually far higher in real terms. + +I’m going to limit my browsing today to 50 MB, which in Zimbabwe would cost around $3.67 on a mobile data tariff. That may not sound like much, but teachers in Zimbabwe were striking this year because their [salaries had fallen to just $2.50 a day][17]. + +For comparison, $3.67 is around half the [$7.25 minimum wage in the USA][18]. As a Zimbabwean, I’d have to work for around a day and a half to earn the money to buy this 50MB data, compared to just half an hour in the USA. It’s not easy to compare cost of living between countries, but on wages alone the $3.67 cost of 50 MB of data in Zimbabwe would feel like $52 to an American on minimum wage. + +### Setting Up The Experiment + +I launched Chrome and opened the dev tools, where I throttled the network to a slow 3G connection. I wanted to simulate a slow connection like those experienced by users in Uzbekistan, to see what kind of experience websites would give me. I also throttled my CPU to simulate being on a lower end device. + +[![][19]][20]I opted to throttle my network to Slow 3G and my CPU to 6x slowdown. ([Large preview][20]) + +I installed [ModHeader][21] and set the [‘Save-Data’ header][22] to let websites know I want to minimise my data usage. This is also the header set by Chrome for Android’s ‘Lite mode’, which I’ll cover in more detail later. + +I downloaded [TripMode][23]; an application for Mac which gives you control over which apps on your Mac can access the internet. Any other application’s internet access is automatically blocked. + +You can enable/disable individual apps from connecting to the internet with TripMode. I enabled Chrome. ([Large preview][24]) + +How far do I predict my 50 MB budget will take me? With the [average weight of a web page being almost 1.7 MB][25], that suggests I’ve got around 29 pages in my budget, although probably a few more than that if I’m able to stay on the same sites and leverage browser caching. + +Throughout the experiment I will suggest performance tips to speed up the [first contentful paint][26] and perceived loading time of the page. Some of these tips may not affect the amount of data transferred directly, but do generally involve deferring the download of less important resources, which on slow connections may mean the resources are never downloaded and data is saved. + +### The Experiment + +Without any further ado, I loaded google.com, using 402 KB of my budget and spending $0.03 (around 1% of my Zimbabwe budget). + +[![402 KB transferred, 1.1 MB resources, 24 requests][27]][28]402 KB transferred, 1.1 MB resources, 24 requests. ([Large preview][28]) + +All in all, not a bad page size, but I wondered where those 24 network requests were coming from and whether or not the page could be made any lighter. + +#### Google Homepage — DOM + +[![][29]][30]Chrome devtools screenshot of the DOM, where I’ve expanded one inline `style` tag. ([Large preview][30]) + +Looking at the page markup, there are no external stylesheets — all of the CSS is inline. + +##### Performance Tip #1: Inline Critical CSS + +This is good for performance as it saves the browser having to make an additional network request in order to fetch an external stylesheet, so the styles can be parsed and applied immediately for the first contentful paint. There’s a trade-off to be made here, as external stylesheets can be cached but inline ones cannot (unless you [get clever with JavaScript][31]). + +The general advice is for your [critical styles][32] (anything [above-the-fold][33]) to be inline, and for the rest of your styling to be external and loaded asynchronously. Asynchronous loading of CSS can be achieved in [one remarkably clever line of HTML][34]: + +``` + +``` + +The devtools show a prettified version of the DOM. If you want to see what was actually downloaded to the browser, switch to the Sources tab and find the document. + +[![A wall of minified code.][35]][36]Switching to Sources and finding the index shows the ‘raw’ HTML that was delivered to the browser. What a mess! ([Large preview][36]) + +You can see there is a LOT of inline JavaScript here. It’s worth noting that it has been uglified rather than merely minified. + +##### Performance Tip #2: Minify And Uglify Your Assets + +Minification removes unnecessary spaces and characters, but uglification actually ‘mangles’ the code to be shorter. The tell-tale sign is that the code contains short, machine-generated variable names rather than untouched source code. This is good as it means the script is smaller and quicker to download. + +Even so, inline scripts look to be roughly 120 KB of the 210 KB page resource (about half the 60 KB gzipped size). In addition, there are five external JavaScript files amounting to 291 KB of the 402 KB downloaded: + +[![Network tab of DevTools showing the external javascript files][37]][38]Five external JavaScript files in the Network tab of the devtools. ([Large preview][38]) + +This means that JavaScript accounts for about 80 percent of the overall page weight. + +This isn’t useless JavaScript; Google has to have some in order to display suggestions as you type. But I suspect a lot of it is tracking code and advertising setup. + +For comparison, I disabled JavaScript and reloaded the page: + +[![DevTools showing only 5 network requests][39]][40]The disabled JS version of Google search was only 102 KB and had just 5 network requests. ([Large preview][40]) + +The JS-disabled version of Google search is just 102 KB, as opposed to 402 KB. Although Google can’t provide autosuggestions under these conditions, the site is still functional, and I’ve just cut my data usage down to a quarter of what it was. If I really did have to limit my data usage in the long term, one of the first things I’d do is disable JavaScript. [It’s not as bad as it sounds][41]. + +##### Performance Tip #3: Less Is More + +Inlining, uglifying and minifying assets is all well and good, but the best performance comes from not sending down the assets in the first place. + + * Before adding any new features, do you have a [performance budget][42] in place? + * Before adding JavaScript to your site, can your feature be accomplished using plain HTML? (For example, [HTML5 form validation][43]). + * Before pulling a large JavaScript or CSS library into your application, use something like [bundlephobia.com][44] to measure how big it is. Is the convenience worth the weight? Can you accomplish the same thing using vanilla code at a much smaller data size? + + + +#### Analysing The Resource Info + +There’s a lot to unpack here, so let’s get cracking. I’ve only got 50 MB to play with, so I’m going to milk every bit of this page load. Settle in for a short Chrome Devtools tutorial. + +402 KB transferred, but 1.1 MB of resources: what does that actually mean? + +It means 402 KB of content was actually downloaded, but in its compressed form (using a compression algorithm such as [gzip or brotli][45]). The browser then had to do some work to unpack it into something meaningful. The total size of the unpacked data is 1.1 MB. + +This unpacking isn’t free — [there are a few milliseconds of overhead in decompressing the resources][46]. But that’s a negligible overhead compared to sending 1.1MB down the wire. + +##### Performance Tip #4: Compress Text-based Assets + +As a general rule, always compress your assets, using something like gzip. But don’t use compression on your images and other binary files — you should optimize these in advance at source. Compression could actually end up [making them bigger][47]. + +And, if you can, [avoid compressing files that are 1500 bytes or smaller][47]. The smallest TCP packet size is 1500 bytes, so by compressing to, say, 800 bytes, you save nothing, as it’s still transmitted in the same byte packet. Again, the cost is negligible, but wastes some compression CPU time on the server and decompression CPU time on the client. + +Now back to the Network tab in Chrome: let’s dig into those priorities. Notice that resources have priority “Highest” to “Lowest” — these are the browser’s best guess as to what are the more important resources to download. The higher the priority, the sooner the browser will try to download the asset. + +##### Performance Tip #5: Give Resource Hints To The Browser + +The browser will guess at what the highest priority assets are, but you can [provide a resource hint][48] using the `` tag, instructing the browser to download the asset as soon as possible. It’s a good idea to preload fonts, logos and anything else that appears above the fold. + +Let’s talk about caching. I’m going to hold ALT and right-click to change my column headers to unlock some more juicy information. We’re going to check out Cache-Control. + +There are lots of interesting fields tucked away behind ALT. ([Large preview][49]) + +Cache-Control denotes whether or not a resource can be cached, how long it can be cached for, and what rules it should follow around [revalidating][50]. Setting proper cache values is crucial to keeping the data cost of repeat visits down. + +##### Performance Tip #6: Set cache-control Headers On All Cacheable Assets + +Note that the cache-control value begins with a directive of `public` or `private`, followed by an expiration value (e.g. `max-age=31536000`). What does the directive mean, and why the oddly specific `max-age` value? + +[![Screenshot of Google network tab with cache-control column visible][51]][52]A mixture of max-age values and public/private. ([Large preview][52]) + +The value `31536000` is the number of seconds there are in a year, and is the theoretical maximum value allowed by the cache-control specification. It is common to see this value applied to all static assets and effectively means “this resource isn’t going to change”. In practice, [no browser is going to cache for an entire year][53], but it will cache the asset for as long as makes sense. + +To explain the public/private directive, we must explain the two main caches that exist off the server. First, there is the traditional browser cache, where the resource is stored on the user’s machine (the ‘client’). And then there is the CDN cache, which sits between the client and the server; resources are cached at the CDN level to prevent the CDN from requesting the resource from the origin server over and over again. + +A `Cache-Control` directive of `public` allows the resource to be cached in both the client and the CDN. A value of `private` means only the client can cache it; the CDN is not supposed to. This latter value is typically used for pages or assets that exist behind authentication, where it is fine to be cached on the client but we wouldn’t want to leak private information by caching it in the CDN and delivering it to other users. + +[![Screenshot of Google logo cache-control setting: private, max-age=31536000][54]][55]A mixture of max-age values and public/private. ([Large preview][55]) + +One thing that got my attention was that the Google logo has a cache control of “private”. Other images on the page do have a public cache, and I don’t know why the logo would be treated any differently. If you have any ideas, let me know in the comments! + +I refreshed the page and most of the resources were served from cache, apart from the page itself, which as you’ve seen already is `private, max-age=0`, meaning it cannot be cached. This is normal for dynamic web pages where it is important that the user always gets the very latest page when they refresh. + +It was at this point I accidentally clicked on an ‘Explanation’ URL in the devtools, which took me to the [network analysis reference][56], costing me about 5 MB of my budget. Oops. + +### Google Dev Docs + +4.2 MB of this new 5 MB page was down to images; specifically SVGs. The weightiest of these was 186 KB, which isn’t particularly big — there were just so many of them, and they all downloaded at once. + +This is a loooong page. All the images downloaded on page load. ([Large preview][57]) + +That 5 MB page load was 10% of my budget for today. So far I’ve used 5.5 MB, including the no-JavaScript reload of the Google homepage, and spent $0.40. I didn’t even mean to open this page. + +What would have been a better user experience here? + +##### Performance Tip #7: Lazy-load Your Images + +Ordinarily, if I accidentally clicked on a link, I would hit the back button in my browser. I’d have received no benefit whatsoever from downloading those images — what a waste of 4.2 MB! + +Apart from video, where you generally know what you’re getting yourself into, images are by far the biggest culprit to data usage on the web. A [study of the world’s top 500 websites][58] found that images take up to 53% of the average page weight. “This means they have a big impact on page-loading times and subsequently overall performance”. + +Instead of downloading all of the images on page load, it is good practice to lazy-load the images so that only users who are engaged with the page pay the cost of downloading them. Users who choose not to scroll below the fold therefore don’t waste any unnecessary bandwidth downloading images they’ll never see. + +There’s a great [css-tricks.com guide to rolling out lazy-loading for images][59] which offers a good balance between those on good connections, those on poor connections, and those with JavaScript disabled. + +If this page had implemented lazy loading as per the guide above, each of the 38 SVGs would have been represented by a 1 KB placeholder image by default, and only loaded into view on scroll. + +##### Performance Tip #8: Use The Right Format For Your Images + +I thought that Google had missed a trick by not using [WebP][60], which is an image format that is 26% smaller in size compared to PNGs (with no loss in quality) and 25-34% smaller in size compared to JPEGs (and of a comparable quality). I thought I’d have a go at converting SVG to WebP. + +Converting to WebP did bring one of the SVGs down from 186 KB to just 65 KB, but actually, looking at the images side by side, the WebP came out grainy: + +[![Comparison of the two images][61]][62]The SVG (left) is noticeably crisper than the WebP (right). ([Large preview][62]) + +I then tried converting one of the PNGs to WebP, which is supposed to be lossless and should come out smaller. However, the WebP output was *heavier* (127 KB, from 109 KB)! + +[![Comparison of the two images][63]][64]The PNG (left) is a similar quality to the WebP (right) but is smaller at 109 KB compared to 127 KB. ([Large preview][64]) + +This surprised me. WebP isn’t necessarily the silver bullet we think it is, and even Google have neglected to use it on this page. + +So my advice would be: where possible, experiment with different image formats on a per-image basis. The format that keeps the best quality for the smallest size may not be the one you expect. + +Now back to the DOM. I came across this: + +Notice the `async` keyword on the Google analytics script? + +[![Screenshot of performance analysis output of devtools][65]][66]Google analytics has ‘low’ priority. ([Large preview][66]) + +Despite being one of the first things in the head of the document, this was given a low priority, as we’ve explicitly opted out of being a blocking request by using the `async` keyword. + +A blocking request is one that stops the rendering of the page. A `