Merge pull request #1 from LCTT/master

Update from LCTT
This commit is contained in:
CN-QUAN 2022-01-07 23:46:01 +08:00 committed by GitHub
commit 21666827e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1704 additions and 377 deletions

View File

@ -3,38 +3,40 @@
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14152-1.html"
2021 年开源软件改变商业的 5 种方式
2021 年总结:开源软件改变商业的 5 种方式
======
这组文章展示了企业如何与开源软件连接。
![A confusing business organization chart][1]
开源软件不仅仅是创造专有软件的替代品。在商业方面,开源已经成为一个“力量的倍增器”来改变组织的经营方式。同时,更多的公司开始采用更多的开源方法,甚至在管理团队和流程方面。
> 这组文章展示了企业如何与开源软件连接。
![](https://img.linux.net.cn/data/attachment/album/202201/06/100657stkkjn9froz4kkqk.jpg)
开源软件不仅仅创造了专有软件的替代品。在商业方面,开源已经成为一个“力量的倍增器”来改变组织的经营方式。同时,越来越多的公司开始采用更多的开源方法,甚至在管理团队和流程方面。
在过去的一年里,我们发表了许多优秀的文章,展示了企业如何与开源软件相联系。以下是一些阅读量最大的文章:
## [开源给你带来竞争优势的 4 种方式][2]
### 《开源给你带来竞争优势的 4 种方式》
为了在当今快节奏的世界中取得成功,企业必须对数字解决方案进行明智的投资,使他们能够更快地行动并提高运营的灵活性。这正是越来越多的各种规模和各种行业的组织拥抱开源解决方案的原因。根据麦肯锡的一份报告,开源的采用是表现优异的组织的最大差异化因素。[Jason Blais][3] 写了采用开源技术可以帮助组织推动竞争优势和体验更好的业务成果的四个原因。
为了在当今快节奏的世界中取得成功,企业必须对数字解决方案进行明智的投资,使他们能够更快地行动并提高运营的灵活性。这正是越来越多的各种规模和各种行业的组织拥抱开源解决方案的原因。根据麦肯锡的一份报告,开源的采用是表现优异的组织的最大差异化因素。[Jason Blais][3] 写了采用开源技术可以帮助组织推动竞争优势和体验更好的业务成果的 [四个原因][2]
## [为什么 Crate.io 回归其纯粹的开源根源][4]
### 《为什么 Crate.io 回归其纯粹的开源根源》
开源技术提供企业级的可扩展性、性能、安全性和可靠性。信任就在那里而且是当之无愧的。但除了顽固的开源信徒之外较少被人称道的是日常社区贡献的内部运作在原子级别建立了这些宏观利益。对于那些提供开源技术的人来说社区不断的用户驱动的测试和加固将这些技术锻造成强大和成熟的解决方案。Crate.io 的联合创始人 [Bernd Dorn][5] 写道,该组织从“开放核心”转变为采用 Apache 2.0 许可的纯开源。
开源技术提供企业级的可扩展性、性能、安全性和可靠性。信任就在那里而且是当之无愧的。但除了顽固的开源信徒之外较少被人称道的是日常社区贡献的内部运作在原子级别建立了这些宏观利益。对于那些提供开源技术的人来说社区不断的用户驱动的测试和加固将这些技术锻造成强大和成熟的解决方案。Crate.io 的联合创始人 [Bernd Dorn][5] 写道,该组织从“开放核心” [转变][4] 为采用 Apache 2.0 许可的纯开源。
## [为什么非营利组织选择开源软件][6]
### 《为什么非营利组织选择开源软件》
随着科技和数据安全意识的提高,开源软件比以往任何时候都更成为各阶层组织的首选。非营利组织在财务方面尤其脆弱,同时又要处理重要的社会和环境问题。[Michael Korotaev][7] 以 Nextcloud 和 ONLYOFFICE为 例,写了关于在非营利组织中采用开源协作技术的文章。
随着科技和数据安全意识的提高,开源软件比以往任何时候都更成为各阶层组织的首选。非营利组织在财务方面尤其脆弱,同时又要处理重要的社会和环境问题。[Michael Korotaev][7] 以 Nextcloud 和 ONLYOFFICE为 例,写了关于在非营利组织中 [采用开源协作技术][6] 的文章。
## [管理开源产品路线图][8]
### 《管理开源产品路线图》
客户,以及与他们交谈的销售和营销团队,都喜欢一个路线图。它让他们了解什么是现实的,什么是不现实的。路线图也是一个产品的核心。[Scott McCarty][9] 写了关于管理开源产品路线图的文章,以及为什么专有产品的路线图与建立在开源供应链上的产品没有什么不同。产品经理与客户交谈,对他们的需求进行排序,制定路线图,然后找出如何通过建设、购买和合作来提供能力。
客户,以及与他们交谈的销售和营销团队,都喜欢一个路线图。它让他们了解什么是现实的,什么是不现实的。路线图也是一个产品的核心。[Scott McCarty][9] 写了关于 [管理开源产品路线图][8] 的文章,以及为什么专有产品的路线图与建立在开源供应链上的产品没有什么不同。产品经理与客户交谈,对他们的需求进行排序,制定路线图,然后找出如何通过建设、购买和合作来提供能力。
## [将开源产品推向市场][10]
### 《将开源产品推向市场》
产品营销和计划中的信息传递的作用对于一个成功的发布至关重要。Scott McCarty 继续他关于开源供应链中的产品管理的系列文章,讨论了开源和产品营销的交叉点。
产品营销和计划中的信息传递的作用对于一个成功的发布至关重要。Scott McCarty 继续他关于开源供应链中的产品管理的系列文章,讨论了 [开源和产品营销的交叉点][10]
--------------------------------------------------------------------------------
@ -43,7 +45,7 @@ via: https://opensource.com/article/21/12/open-source-software-business
作者:[Jim Hall][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/) 荣誉推出

View File

@ -3,45 +3,46 @@
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14156-1.html"
2022 年经营小企业的开源工具
2021 总结:经营小型企业的开源工具
======
这些文章显示了开源作为工具、平台或集成点在商业中的力量。
![Tools illustration][1]
> 这些文章显示了开源作为工具、平台或集成点在商业中的力量。
今年Opensource.com 刊登了几篇关注商业中的开源的好文章。这些文章展示了开源作为工具、平台或集成点在商业中的力量。让我们回顾一下 2021 年的一些顶级开源商业故事。
![](https://img.linux.net.cn/data/attachment/album/202201/07/122339ulofkl3j89o94f3l.jpg)
### [我最喜欢的开源项目管理工具][2]
今年,我们刊登了几篇关注商业中的开源的好文章。这些文章展示了开源作为工具、平台或集成点在商业中的力量。让我们回顾一下 2021 年的一些顶级开源商业故事。
如果你在办公环境中管理过项目,你很可能使用微软 Project 来跟踪任务和分配。然而,开源社区已经创造了许多跟踪项目的选项。对于你的项目管理需求,[Frank Bergmann][3] 写了关于使用 Redmine、project-open、ProjectLibre、GanttProject、TaskJuggler 和 ProjeQtOr。
### 《我最喜欢的开源项目管理工具》
### [使用 Apache Superset 进行开源商业智能报告][4]
如果你在办公环境中管理过项目,你很可能使用微软 Project 来跟踪任务和分配。然而,开源社区已经创造了许多跟踪项目的选项。对于你的 [项目管理需求][2][Frank Bergmann][3] 写了关于使用 Redmine、project-open、ProjectLibre、GanttProject、TaskJuggler 和 ProjeQtOr。
通过商业智能你可以通过对数据进行分类、安排结果和显示上下文信息来更好地了解你的信息。对于任何想要做出“数据驱动”决策的组织来说商业智能BI是一项关键技术。[Maxime Beauchemin][5] 文章讨论了 Apache Superset以及它如何成熟地成为一个领先的开源 BI 解决方案。
### 《使用 Apache Superset 进行开源商业智能报告》
### [6 个用于餐馆和零售商的 WordPress 插件][6]
通过商业智能你可以通过对数据进行分类、安排结果和显示上下文信息来更好地了解你的信息。对于任何想要做出“数据驱动”决策的组织来说商业智能BI是一项关键技术。[Maxime Beauchemin][5] 的文章讨论了 [Apache Superset][4],以及它如何成熟地成为一个领先的开源 BI 解决方案。
这场大流行可能是永久性地改变了许多人喜欢做生意的方式。餐馆和其他当地的零售机构不能再像以前那样依赖上门交易了。网上订购食品和其他物品已经成为一种常态和期望。当大流行结束后,消费者不太可能背弃电子商务的便利。[Don Watkins][7] 写了六个开源插件,帮助你创建一个 WordPress 网站,满足你的客户对网上购物、路边取货和送货的偏好。它还可以建立你的品牌和你的客户群。
### 《6 个用于餐馆和零售商的 WordPress 插件》
### [试试 Chatwoot一个开源的客户关系平台][8]
这场大流行病可能永久性地改变了许多人喜欢做生意的方式。餐馆和其他当地的零售机构不能再像以前那样依赖上门交易了。网上订购食品和其他物品已经成为一种常态和期望。当大流行结束后,消费者不太可能背弃电子商务的便利。[Don Watkins][7] 写了 [六个开源插件][6],帮助你创建一个 WordPress 网站,满足你的客户对网上购物、路边取货和送货的偏好。它还可以建立你的品牌和你的客户群。
在任何有面向客户的业务中保持与客户的互动是至关重要的。我们最后一次接触这个客户是什么时候或者他们最后一次接触我们是什么时候我们的组织中谁做了回应什么服务水平协议制约着这种关系这些和其他问题最好在客户关系管理系统CRM中进行管理。[Nitish Tiwari][9] 介绍了 Chatwoot一个用 Ruby 和 Vue.js 构建的开源客户关系平台。Chatwoot 是从零开始写的,目的是让客户关系团队建立端到端的票据管理和支持平台。本文将介绍 Chatwoot 的架构、安装和主要功能。
### 《试试 Chatwoot一个开源的客户关系平台》
### [试试 Dolibarr一个开源的客户关系管理平台][10]
在任何有面向客户的业务中保持与客户的互动是至关重要的。我们最后一次接触这个客户是什么时候或者他们最后一次接触我们是什么时候我们的组织中谁做了回应什么服务水平协议制约着这种关系这些和其他问题最好在客户关系管理系统CRM中进行管理。[Nitish Tiwari][9] 介绍了 [Chatwoot][8],一个用 Ruby 和 Vue.js 构建的开源客户关系平台。Chatwoot 是从零开始写的,目的是让客户关系团队建立端到端的票据管理和支持平台。本文将介绍 Chatwoot 的架构、安装和主要功能。
无论你是经营零售店、餐厅、酒吧、超市、健身房还是其他业务,你都需要一个可靠的方式来与你的客户保持联系。毕竟,他们是客户,因为他们喜欢你做的事情,如果他们与你分享了他们的联系信息,他们想听到更多关于你所提供的东西。[Pradeep Vijayakumar][11] 介绍了 Dolibarr 项目一个开源的企业资源规划ERP和客户关系管理CRM软件。Dolibarr 提供了一整套 ERP 功能包括销售点POS、发票、存货和库存管理、销售订单、采购订单和人力资源管理。
### 《试试 Dolibarr一个开源的客户关系管理平台》
### [微软 Exchange 的一个开源替代品][12]
无论你是经营零售店、餐厅、酒吧、超市、健身房还是其他业务,你都需要一个可靠的方式来与你的客户保持联系。毕竟,他们是客户,因为他们喜欢你做的事情,如果他们与你分享了他们的联系信息,他们想听到更多关于你所提供的东西。[Pradeep Vijayakumar][11] 介绍了 [Dolibarr][10] 项目一个开源的企业资源规划ERP和客户关系管理CRM软件。Dolibarr 提供了一整套 ERP 功能包括销售点POS、发票、存货和库存管理、销售订单、采购订单和人力资源管理。
多年来,微软 Exchange 作为群件环境的一个平台几乎是不可避免的。然而,在 2020 年末,一个奥地利的开源软件开发商推出了 grommunio一个群件服务器和客户端其外观和感觉为 Exchange 和 Outlook 用户所熟悉。[Markus Feilner][13] 写了关于 grommunio 如何在企业中取代 Exchange成为群件的一个强大而功能齐全的选择。
### 《微软 Exchange 的一个开源替代品》
### [用这个开源工具简化发票的指南][14]
多年来,微软 Exchange 作为群件环境的必然选择。然而,在 2020 年末,一个奥地利的开源软件开发商推出了 [grommunio][12],它是一个群件服务器和客户端,其外观和感觉为 Exchange 和 Outlook 用户所熟悉。[Markus Feilner][13] 写了关于 grommunio 如何在企业中取代 Exchange成为群件的一个强大而功能齐全的选择。
许多 IT 项目在开发过程中会延迟、超出预算,并出现巨大的变化。这些问题使开具发票成为 IT 领域最费力的活动之一。Frank Bergmann 写了一篇关于开源项目如何简化开票过程的文章。如果你决定成为自雇人士或成立一个创业公司Frank 的文章也可以作为处理财务工作的指南。
### 《用这个开源工具简化发票的指南》
许多 IT 项目在开发过程中会延迟、超出预算,并出现巨大的变化。这些问题使开具发票成为 IT 领域最费力的活动之一。Frank Bergmann 写了一篇关于开源项目如何 [简化开票过程][14] 的文章。如果你决定成为自雇人士或成立一个创业公司Frank 的文章也可以作为处理财务工作的指南。
### 开源是好生意
@ -54,7 +55,7 @@ via: https://opensource.com/article/21/12/open-source-business-tools
作者:[Jim Hall][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/) 荣誉推出

View File

@ -0,0 +1,81 @@
[#]: subject: "Intel is Gearing Up to Give a Superpower to Linux that Windows Users Dont Have"
[#]: via: "https://news.itsfoss.com/intel-linux-kernel/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14153-1.html"
英特尔正准备为 Linux 提供 Windows 用户所没有的 “超能力”
======
> 英特尔计划在 Linux 内核 5.17 中引入一个特殊的变化,可以在不重启系统的情况下更新系统固件。
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/intel-linux.png?w=1200&ssl=1)
去年发现的几个安全漏洞,使得系统管理员很难在不停机的情况下迅速修补系统。
如果能做出一些改进,在不重启系统的情况下更新一些关键组件以提高安全/性能呢?
英特尔旨在通过其新的 PFRUT<ruby>平台固件运行时更新和遥测<rt>Platform Firmware Runtime Update and Telemetry</rt></ruby>)驱动程序来实现这一目标。
### 英特尔计划在 Linux 内核 5.17 中提供 PFRUT
虽然 Linux 内核 5.16 将在本周晚些时候发布,不过英特尔的目标是将这一新的功能合并到即将发布的 Linux 内核 5.17 稳定版。
但是,它究竟是什么?
有了 PFRUT 驱动,特定组件(或系统固件)可以在系统运行时进行更新,而不需要重新启动。
最初,英特尔倾向于将其称为“无缝更新”解决方案。然而,随着最近被添加到 Linux 电源管理的 linux-next 分支中的 Linux 内核提交,他们可能会继续使用一个厂商中立的名字,即 `pfrut_driver`
顺便说一句linux-next 分支代表着这些变化将进入下一个 Linux 内核稳定版5.17)。
在技术上,这个 [提交][1] 对该变化的解释如下:
> 用户应该提供 EFI 封包,并通过将该封包写入设备的特殊文件以将其传递给驱动程序。驱动程序在特定的 <ruby>ACPI 平台固件运行时更新<rt> ACPI Platform Firmware Runtime Update</rt></ruby>设备INTC1080的 ACPI _DSM 方法的帮助下,将封包传输到平台固件,而实际的固件更新是由平台固件中的低级管理模式代码进行的。
就像人们通常期望的那样,这应该可以消除停机时间,可以对解决任何安全和性能改进的固件进行基本更新。而且,系统固件更新可以很容易地直接通过操作系统(这里是 Linux进行。
正如其中一个 [详细说明其工作原理的 PDF 文件][2] 中强调的那样,驱动程序的遥测部分是为了 “从 MM 中检索日志信息,以进行监控并找出问题的根本原因”。
请注意,这只有在 Linux 系统和英特尔芯片上才能实现。
考虑到当你需要修补系统固件以抵御安全问题时,等待系统上的任务完成不是一种理想状况,这种能力的增加应该是非常方便的。
### 这是为 Linux 桌面或服务器准备的吗?
该改进主要是为服务器专用硬件量身定做的。
英特尔的官方文件指出这是为具有高服务水平协议SLA的系统准备的这种 SLA 需要尽量减少重启。
然而,这对拥有企业级系统的特定桌面用户群应该也是有用的。
虽然这可能不是桌面 Linux 发行版必不可少的东西,但它可能是改善用户体验的一个令人兴奋的开始。特别是对于热衷于保持系统固件更新而不严重干扰其工作的用户。
这也应该可以引入更多类型的更新的可能性,当涉及到 BIOS 或 UEFI 时,可以由操作系统而不是主板处理。
这不仅限于为你的桌面配置服务器级别的硬件的 Linux 桌面用户。
虽然目前只限于 Linux 系统,但这也应该很快可以用于 Windows 和其他操作系统。
你对英特尔推出的这一变化有何看法?你认为这是对系统固件更新处理方式的一个重大改进吗?
欢迎在下面的评论中分享你的想法。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/intel-linux-kernel/
作者:[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://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=0db89fa243e5edc5de38c88b369e4c3755c5fb74
[2]: https://uefi.org/sites/default/files/resources/Intel_MM_OS_Interface_Spec_Rev100.pdf

View File

@ -0,0 +1,136 @@
[#]: subject: "Linux Mint 20.3 “Una” Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager"
[#]: via: "https://news.itsfoss.com/linux-mint-20-3-una-release/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14155-1.html"
Linux Mint 20.3 “Una” 发布
======
> Linux Mint 20.3 “Una” 有一些细微的视觉变化,弥补了现代外观,以及新的应用改进。
![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-1.png?w=1200&ssl=1)
代号为 “Una” 的 Linux Mint 20.3 终于来了。官方公告应该很快就会跟进,但它现在已经可以下载了!
虽然 [Linux Mint 20.2][1] 有一些令人印象深刻的改进,但 Linux Mint 20.3 看起来也是一个不错的版本。
在这里,我会重点指出 Linux Mint 20.3 的关键变化。
### Linux Mint 20.3 的新变化
![][2]
在这个版本中Linux Mint 20.3 包含了最新的 Cinnamon 5.2,一些细微的视觉变化,以及其他各种改进。
请注意,在 Xfce 和 MATE 版中的变化是一样的(不包括桌面环境的具体改进)。
#### Cinnamon 5.2 桌面环境
在 Cinnamon 5 中,增加了一些调整和管理桌面环境所消耗资源的功能。
这一次,升级的重点是几个新功能。日历小程序增强了功能,当你点击系统时间/日期图标时,可以直接从系统托盘上显示事件。
如果你使用 GNOME 日历或在线账户(如 Google 日历),这些事件应该是同步的。
![][4]
除此以外,你还会发现 Nemo 文件管理器的改进和窗口动画的细微变化。
还有一些必要的错误修复和总体上的小改进。
#### 新的背景
新的版本、新的壁纸总是令人耳目一新。而且Mint 20.3 也不会让你失望。
![][5]
你会得到一个精心策划的美妙的壁纸集,你可以选择使用。
#### 视觉主题刷新及深色模式
![][6]
在 Linux Mint 20.3 中,主题已经进行了改造,对重点颜色轻微进行了重新处理(使其更时尚一些),并从一些小部件中删除了它。
与窗口的圆角一起,这构成了一个更干净和现代的外观。
总的来说包括新的图标Linux Mint 20.3 带来了一个新的主题包。
如果你想要同样的外观,同时保持其他的优点,你可以简单地从仓库安装传统主题包并应用它。
![][7]
一旦你安装了传统主题包,就可以在选择中找到它了。
![][8]
不仅如此,你可以注意到,我更喜欢用深色模式的截图来写文章,因为 Linux Mint 20.3 终于把更多的注意力放在深色模式上!
一些默认的应用程序,如 Hypnotix、Gnome 终端、Celluloid都是在启用深色模式的情况下启动的。如果你愿意你可以永久地禁用它们。
### 新的 Thingy 应用程序
当 ClemLinux Mint 的首席开发者)暗示会有一个新的惊喜应用时,我们 [很快就在 Linux Mint 20.3 里发现了它][9]。
在稳定版更新之前,测试版就已经确认了它。
![][10]
新的 Thingy 应用程序也被称为 “Library”它实际上是 Linux Mint 默认的文档管理器。你可以下载电子书和其他 PDF 文件Library 应用应该会自动从下载目录中检测到它。
#### 应用程序的改进
![][11]
一些默认的应用程序,如 Hypnotix IPTV 播放器和便签现在可以分别让你搜索频道或便签。
### 其他改进
其他一些改进有助于提高性能,更好地节省电力,以及更多。
考虑到它是基于 Ubuntu 20.04.3 的,带有 Linux 内核 5.4 LTS。
![][12]
你可以在官方公告帖子中找到更多关于这些变化的信息。
### 下载 Linux Mint 20.3
你可以从官方主页上下载 ISO。他们还没有更新下载页面但你可以从他们的 [Torrent 下载页面][13] 找到最新的 ISO。
如果你想要直接的下载链接,你可以看一下 [全球镜像][14] 来获得所有的 Linux Mint 版本。
- [Linux Mint 20.3][15]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/linux-mint-20-3-una-release/
作者:[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://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/linux-mint-20-2-release/
[2]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3.png?w=1394&ssl=1
[3]: https://i0.wp.com/i.ytimg.com/vi/tT45WSef8zQ/hqdefault.jpg?w=780&ssl=1
[4]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-cinnamon-calendar.png?w=651&ssl=1
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-backgrounds.png?w=927&ssl=1
[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-file-manager.png?w=946&ssl=1
[7]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-legacy-theme.png?w=684&ssl=1
[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-legacy-options.png?w=1313&ssl=1
[9]: https://news.itsfoss.com/linux-mint-20-3-release-thingy/
[10]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-thingy.png?w=769&ssl=1
[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-app-improvements.png?w=878&ssl=1
[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3-neofetch.png?w=1004&ssl=1
[13]: https://linuxmint.com/torrents/
[14]: https://mirrors.edge.kernel.org/linuxmint/stable/20.3/
[15]: https://linuxmint.com/download.php

View File

@ -1,78 +0,0 @@
[#]: subject: "Intel is Gearing Up to Give a Superpower to Linux that Windows Users Dont Have"
[#]: via: "https://news.itsfoss.com/intel-linux-kernel/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Intel is Gearing Up to Give a Superpower to Linux that Windows Users Dont Have
======
Last year, several security vulnerabilities were discovered, making it difficult for system administrators to patch the systems without downtime quickly.
What if some improvements can be made to update some critical components for security/performance improvements without rebooting a system?
Intel aims to achieve that with its new PFRUT (Platform Firmware Runtime Update and Telemetry) driver.
### Intel Plans to Make PFRUT Available With Linux Kernel 5.17
While Linux Kernel 5.16 is due later this weekend, Intel aims to merge this new addition with the upcoming Linux Kernel 5.17 stable release.
But, what exactly is it?
With PFRUT driver, specific components (or the system firmware) can be updated while the system is running without needing to reboot.
Initially, Intel preferred to call it a “Seamless Update” solution. However, with the recent commit for Linux Kernel added to the Linux power managements “linux-next” branch, they might be sticking to a vendor-neutral name, **pfrut_driver**.
If you are curious, the “linux-next” branch means that those changes will make their way to the next Linux Kernel 5.17 stable release.
In technical terms, the [commit][1] explains the change as follows:
> The user is expected to provide the EFI capsule, and pass it to the driver by writing the capsule to a device special file. The capsule is transferred by the driver to the platform firmware with the help of an ACPI _DSM method under the special ACPI Platform Firmware Runtime Update device (INTC1080), and the actual firmware update is carried out by the low-level Management Mode code in the platform firmware
This should eliminate any downtime, as one would typically expect with an essential update to firmware addressing any security and performance improvements. And, system firmware updates can be easily applied directly through the operating system (Linux, here).
The telemetry part of the driver exists to “_retrieve log messages from MM for monitoring
and the root cause of issues_,” as highlighted in one of the [PDFs detailing how this works][2].
Note that this is only possible with a Linux system and an Intel chip on board.
The addition of this ability should come in incredibly handy, considering it is not ideal to wait for a task to complete when you need to patch the system firmware to defend against a security issue.
### Is This for Linux Desktop or Server?
Primarily, the improvement is tailored to benefit server-specific hardware.
The official Intel documentation states it is meant for systems with high service level agreements (SLAs) requiring a minimal number of reboots.
However, this should be useful for a specific group of desktop users with enterprise-grade systems.
While this may not be something essential for desktop Linux distros, it could be an exciting start to something that improves the user experience. Specifically for users keen to keep their system firmware updated without severe interruptions to their active work.
This should also introduce the possibility of more types of updates that can be handled by the operating system instead of the motherboard when it comes to BIOS or UEFI.
Not just limited to the support for Linux desktop users, one would need to have server-grade hardware configured for your desktop.
This is limited to Linux systems, but this should also be possible for Windows and other operating systems soon.
_What do you think about this change introduced by Intel? Do you think it is a significant improvement to how system firmware updates are being handled?_
Feel free to share your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/intel-linux-kernel/
作者:[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://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=0db89fa243e5edc5de38c88b369e4c3755c5fb74
[2]: https://uefi.org/sites/default/files/resources/Intel_MM_OS_Interface_Spec_Rev100.pdf

View File

@ -0,0 +1,281 @@
[#]: subject: "Bash Shell Scripting for beginners (Part 2)"
[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/"
[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/"
[#]: collector: "lujun9972"
[#]: translator: "unigeorge"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Bash Shell Scripting for beginners (Part 2)
======
![][1]
Photo by [N Bandaru][2] on [Unsplash][3]
Welcome to part 2 of Bash Shell Scripting at a beginner level. This article will dive into some more unique aspects of bash scripting. It will continue to use familiar commands, with an explain of anything new, and cover standard output standard input, standard error, the “pipe”, and data redirection.
### Adding comments #
As your scripts get more complicated and functional you will need to add comments to remember what you were doing. If you share your scripts with others, comments will help them understand the thought process and what you intended for your script to do. From the last article recall there were mathematical equations. Some comments have been added in the new version. Notice that in the _learnToScript.sh_ file (reproduced below) the comments are the lines with the hash sign before them. When the script runs these lines do not appear.
```
#!/bin/bash
#Let's pick up from our last article. We
#learned how to use mathematical equations
#in bash scripting.
echo $((5+3))
echo $((5-3))
echo $((5*3))
echo $((5/3))
```
```
[zexcon ~]$ ./learnToScript.sh
8
2
15
1
```
### Pipe Operator |
We will use another tool called _grep_ to introduce the pipe operator.
> Grep searches one or more input files for lines containing a match to a specified pattern. By default, Grep outputs the matching lines.
>
> <https://www.gnu.org/software/grep/>
Paul W. Frields article in the Fedora Magazine provides a good background on _grep_.
> [Command line quick tips: Searching with grep][4]
You will find the pipe key above the Enter key. Enter it by pressing Shift + \\. (English Keyboard)
Now that you are all freshened up on grep, look at an example of the use of the pipe command. At the command line type in _ls -l | grep_ _learn_
```
[zexcon ~]$ ls -l | grep learn
-rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh
```
Normally the _ls -l_ command would provide a list of the files on your screen. Here the full results of the _ls_ _-l_ command are piped into the grep command which searches for the string _learn_. Think of the pipe command like a filter. A command is run, in this case _ls -l_, and the results are limited to the files inside your directory. These results are sent via the pipe command to _grep_ which searches for the work _learn_ and only that line appears.
Look at one more example to try and nail this home. The _less_ command will allow you to see the results of a command that would extend beyond one screen size. Here is a quick description from the man pages for the _less_ command.
> Less  is a program similar to more(1), but which allows backward movement in the file as well as
> forward movement.  Also, less does not have to read the entire input file  before  starting,  so
> with  large input files it starts up faster than text editors like vi(1).  Less uses termcap (or
> terminfo on some systems), so it can run on a variety of terminals.  There is even limited  sup
> port  for hardcopy terminals.  (On a hardcopy terminal, lines which should be printed at the top
> of the screen are prefixed with a caret.)
>
> Fedora 34 Manual(man) Pages
So lets see what it looks like utilizing the pipe and the _less_ command
```
[zexcon ~]$ ls -l /etc | less
```
```
total 1504
drwxr-xr-x. 1 root root 126 Jul 7 17:46 abrt
-rw-r--r--. 1 root root 18 Jul 7 16:04 adjtime
-rw-r--r--. 1 root root 1529 Jun 23 2020 aliases
drwxr-xr-x. 1 root root 70 Jul 7 17:47 alsa
drwxr-xr-x. 1 root root 14 Apr 23 05:58 cron.d
drwxr-xr-x. 1 root root 0 Jan 25 2021 cron.daily
:
:
```
The results have been trimmed, here, for readability. Use the arrow keys on the keyboard to scroll up or down. Unlike the command line, where you might miss the top of the results if they scroll off screen, you can control the display. To get out of the _less_ screen tap the _q_ key.
### Standard Output (stdout), &gt;, &gt;&gt;, 1&gt;, and 1&gt;&gt;
The output of a command preceding the &gt; or &gt;&gt; is sent to a file whose name follows. Keep in mind that &gt; and 1&gt; have the same results since the 1 stands for stdout (the standard output). Stdout is assumed if it does not appear. The &gt;&gt; and 1&gt;&gt; will append the data to the end of the file. In each case (&gt; or &gt;&gt;) the file is created if it does not exist.
As an example, say you want to watch the ping command output to see if it dropped a packet. Rather than sit and watch the console, redirect the output to a file. You can come back later and see if packets were dropped. Here is a test of the redirect using _&gt;_.
```
[zexcon ~]$ ls -l ~ > learnToScriptOutput
```
This takes the normal results you see in the terminal (recall ~ is your home directory) and redirects it to the _learnToScriptOutput_ file. Did you notice that _learnToScriptOutput_ was never created but now the file exists? Kind of cool.
```
total 128
drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop
drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents
drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads
-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput
-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput
-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError
-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh
drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos
```
### Standard Error (stderr), 2&gt;, and 2&gt;&gt;
The error output of a command preceding the &gt; or &gt;&gt; is sent to a file whose name follows. Keep in mind that 2&gt; and 2&gt;&gt; have the same result but the 2&gt;&gt; will append the data to the end of the file. So what is the purpose of these? What if you only want to catch an error. Then the 2&gt; or 2&gt;&gt; is here to help. The 2 indicates the output that would normally go to stderr (standard error). Now put this into practice by listing a non-existent file.
```
[zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError
```
This takes the error results and redirects it to the _learnToScriptOutputError_ file.
```
ls: cannot access '/etc/invalidTest': No such file or directory
```
### All Output &amp;&gt;, &amp;&gt;&gt; and |&amp;
If you are thinking, I dont want to write both standard output (stdout) and standard error (stderr) to different files. You are in luck. In Bash 5 the preferred way to redirect both stdout and stderr to the same file is to use &amp;&gt; or, as you might guess, &amp;&gt;&gt; to append to a file.
```
[zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput
[zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput
```
After running these commands, the output of both appear in the same file without identifying error or a standard output.
```
total 128
drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop
drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents
drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads
-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput
-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput
-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError
-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh
drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos
ls: cannot access '/etc/invalidTest': No such file or directory
```
If you are working directly from the command line and looking to pipe all results to another command, you can use |&amp; for this purpose.
```
[zexcon ~]$ ls -l |& grep learn
-rw-rw-r--. 1 zexcon zexcon 1197 Oct 18 09:46 learnToScriptAllOutput
-rw-rw-r--. 1 zexcon zexcon 343 Oct 14 10:47 learnToScriptError
-rw-rw-r--. 1 zexcon zexcon 0 Oct 14 11:11 learnToScriptOut
-rw-rw-r--. 1 zexcon zexcon 348 Oct 14 10:27 learnToScriptOutError
-rwxr-x---. 1 zexcon zexcon 328 Oct 18 09:46 learnToScript.sh
[zexcon ~]$
```
### Standard Input (stdin)
You have used standard input (stdin) numerous times throughout articles 1 and 2 since your keyboard uses standard input every time you type a key. To give a bit of a change to the usual “its your keyboard”, lets use the _read_ command in a script. The _read_ command, used in the script below, does what it sounds like, reads standard input.
```
#!/bin/bash
#Here we are asking a question to prompt the user for standard input. i.e.keyboard
echo 'Please enter your name.'
#Here we are reading the standard input and assigning it to the variable name with the read command.
read name
#We are now going back to standard output, by using echo and printing your name to the command line.
echo "With standard input you have told me your name is: $name"
```
This example prompts for input via standard output, for information it obtains from standard input(keyboard), storing it in a variable called _name_ using _read_ and displays the value in _name_ via standard output.
```
[zexcon@fedora ~]$ ./learnToScript.sh
Please enter your name.
zexcon
With standard input you have told me your name is: zexcon
[zexcon@fedora ~]$
```
### Into the script…
Now put what has been learned in a script to see how it can be used. The following is a new version of the previous learnToScript.sh file. There are a few added lines. It uses the append options for standard output, standard error and both into one file. It will write the standard output into learnToScriptStandardOutput, standard error into learnToScriptStandardError and both output and error into learnToScriptAllOutput
```
#!/bin/bash
#As we know this article is about scripting. So let's
#use what we learned in a script.
#Let's get some information from the user and add it to our scripts with stanard input and read
echo "What is your name? "
read name
#Here standard output directed to append a file to learnToScirptStandardOutput
echo "$name, this will take standard output with append >> and redirect to learnToScriptStandardOutput." 1>> learnToScriptStandardOutput
#Here we are taking the standard error and appending it to learnToScriptStandardError but to see this we need to #create an error.
eco "Standard error with append >> redirect to learnToScriptStandardError." 2>> learnToScriptStandardError
#Here we are going to create an error and a standard output and see they go to the same place.
echo "Standard output with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput
eco "Standard error with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput
```
This example creates three files in the same directory. The command _echo_ is intentionally typed incorrectly to generate an error. If you check out all three files, you will see one message in learnToScriptStandardOutput, one in learnToScriptStandardError and two in learnToScriptAllOutput. Also notice the script prompts for a name which it writes to the learnToScriptStandardOutput.
# Conclusion
At this point it should start to be clear that anything you can do on the command line you can also do in a script. When writing a script that others might use, documentation is extremely important. Continuing the dive into scripting, the standard output will make more sense as you will be the one generating them. Inside a script you can use the same things used from the command line. The next article will get into functions, loops and things that will continue to build on this foundation.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/
作者:[Matthew Darnell][a]
选题:[lujun9972][b]
译者:[unigeorge](https://github.com/unigeorge)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/zexcon/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2021/10/bash_shell_scripting_pt2-816x345.jpg
[2]: https://unsplash.com/@nbandana?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/shell-scripting?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://fedoramagazine.org/command-line-quick-tips-searching-with-grep/

View File

@ -0,0 +1,245 @@
[#]: subject: "Bash Shell Scripting for beginners (Part 3)"
[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-3"
[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Bash Shell Scripting for beginners (Part 3)
======
![][1]
Welcome to part 3 of Bash Shell Scripting at a beginner level. This final article will look at a few more items that will get you primed for your continued personal development. It will touch on functions, using comparisons with _if/elif_ statements, and will wrap up with looking into the _while_ loop.
### Functions
Lets start out with a basic concept that might seem difficult but is really simple, the function. Think of this as a simple way to put a part of a script that is used over and over into one reusable group. Anything you have done in article 1 or 2 can be put into a function. So lets put a function into our learnToScript.sh file. Let me point out a few things. You will need a name for your function, the opening and closing parentheses, and curly brackets to enclose the commands that are included in your function.
```
#!/bin/bash
#A function to return an echo statement.
helloFunc() {
echo "Hello from a function."
}
#invoke the first function helloFunc()
helloFunc
```
Below you will see the output.
```
[zexcon@fedora ~]$ ./learnToScript.sh
Hello from a function.
[zexcon@fedora ~]$
```
Functions are a good way to reuse a group of commands but they can be even more useful if you can make them operate on different data each time they are used. This requires that you provide data, referred to as arguments, to the function each time you call it.
To provide arguments, you simply add them after the function name when you invoke it. To use the data you provide, you use the positional references in the function commands. They will be named $1, $2, $3, and so on, depending on the number of arguments your function will need.
Lets modify the last example to help understand this better.
```
#!/bin/bash
#A function to return an echo statement.
helloFunc() {
echo "Hello from a function."
echo $1
echo $2
echo "You gave me $# arguments"
}
#invoke the function helloFunc()
helloFunc "How is the weather?" Fine
```
The output is shown below.
```
Hello from a function.
How is the weather?
Fine
You gave me 2 arguments
```
What is happening in the output is _helloFunc()_ did an echo on each line. First it does an echo of “Hello from a function”, then it moves to echo the value of variable $1, this is the result of what you passed to helloFunc with “How is the weather?”. It will then move onto variable $2 and echo its value that is the second item you passed “Fine”. The function will finish by returning the echo “You gave me $# arguments”. Notice that the first argument was a single string enclosed in double quotes, “How is the weather?” . The second one, “Fine”, had no spaces so the quotes where not needed.
In addition to using $1, $2, etc. you can determine the number of arguments being passed to the function by using the variable $#. This means that you can create a function which accepts a variable number of arguments.
There are many good references on line for more details on bash functions. [Here is one to get you started][2].
I hope you can see how functions can provide great flexibility in your bash scripts.
### Numeric comparisons []
If you want to do a numerical comparison you will need to use one of the following operators between square brackets [] .
-eq (is equal)
-ge (equal or greater than)
-gt (greater than)
-le (less than or equal)
-lt (less than)
-ne (not equal)
So for example if you wanted to see if 12 is equal to or less than 25 it would you like [ 12 -le 25 ]. The 12 and 25, of course, can be variables. For example, [$twelve -le $twentyfive].
### if and elif Statement
So lets use our numerical comparison to introduce the _if_ statement. An _if_ statement in Bash will start with _if_ and end with _fi_. You start with the _if_ followed by the check you are wanting to do. In this case the check will be is variable _numberOne_ equal to 1. If _numberOne_ is equal to 1 it will execute the _then_ statement, otherwise it will execute the _else_ statement.
```
#!/bin/bash
numberTwelve=12
if [ $numberTwelve -eq 12 ]
then
echo "numberTwelve is equal to 12"
elif [ $numberTwelve -gt 12 ]
then
echo "numberTwelve variable is greater than 12"
else
echo "neither of the statemens matched"
fi
```
The output for that follows:
```
[zexcon@fedora ~]$ ./learnToScript.sh
numberTwelve variable is equal to 12
```
What you are seeing is the first line in the _if_ statement checking to see if the variables value is really equal to 12. If it is the statement stops and echos “numberTwelve is equal to 12” and execution of your script will continue after the _fi._ If the variable was greater then 12 it would have executed the _elif_ statement and again continued execution after the _fi_. When you use an _if_ or _if/elif_ statement it works from the top down. When the first statement is a match it stops and executes that command and continues after the _fi_.
### String comparisons [[]]
So that was numeric comparisons. What about comparing strings? Uses the double square brackets [[]] and the following operators equal or not equal.
= (equal)
!= (not equal)
Keep in mind strings have several other comparisons that we will not discuss but dig in and read about them and how they work.
```
#!/bin/bash
#variable with a string
stringItem="Hello"
#This will match since it is looking for an exact match with $stringItem
if [[ $stringItem = "Hello" ]]
then
echo "The string is an exact match."
else
echo "The strings do not match exactly."
fi
#This will utilize the then statement since it is not looking for a case sensitive match
if [[ $stringItem = "hello" ]]
then
echo "The string does match but is not case sensitive."
else
echo "The string does not match because of the capitalized H."
fi
```
You will get the following three lines.
```
[zexcon@fedora ~]$ ./learnToScript.sh
The string is an exact match.
The string does not match because of the capitalized H.
[zexcon@fedora ~]$
```
### While Loop
Lets take a look at a loop before wrapping up the series. An example of the _while_ loop is “while 1 is less then 10 add one to the value” you continue doing this until it is no longer true. Below you will see the variable _number_ set to 1. On the next line we have the _while_ statement that does a check to see if _number_ is less then or equal to 10. The commands contained between _do_ and _done_ are executed since the _while_ comparison is true. so we _echo_ some text and add one to the value of _number_. We continue until the _while_ statement is no longer true and it breaks out of the loop and echos “We have completed the while loop since $number is greater than 10.”
```
#!/bin/bash
number=1
while [ $number -le 10 ]
do
echo "We checked the current number is $number so we will increment once"
((number=number+1))
done
echo "We have completed the while loop since $number is greater than 10."
```
The result of the _while_ loop is the following.
```
[zexcon@fedora ~]$ ./learnToScript.sh
We checked the current number is 1 so we will increment once
We checked the current number is 2 so we will increment once
We checked the current number is 3 so we will increment once
We checked the current number is 4 so we will increment once
We checked the current number is 5 so we will increment once
We checked the current number is 6 so we will increment once
We checked the current number is 7 so we will increment once
We checked the current number is 8 so we will increment once
We checked the current number is 9 so we will increment once
We checked the current number is 10 so we will increment once
We have completed the while loop since 11 is greater than 10.
[zexcon@fedora ~]$
```
As you can see the amount of scripting needed to make this happen is much less then if you continued to check each number with an _if_ statement. This is the great part of loops and the _while_ loop is only the first of many options that do things differently to meet your personal needs.
### Conclusion
What is next? As the article pointed out its Bash Shell Scripting for Beginners. Hopefully I sparked an interest or life long love for scripting. I recommend you check out others scripts and look up what you dont know or understand. Remember that as each article presented more ways of doing math, comparing strings, outputting and imputing data they can also be done in functions, loops or numerous other ways. If you practice the basics discussed you will have a blast combining them with all the other options you are still going to learn. Go out and have fun and Ill see you around the Fedora Linux world.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-3
作者:[Matthew Darnell][a]
选题:[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/zexcon/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2021/11/bash_shell_scripting_pt3-816x345.jpg
[2]: https://opensource.com/article/20/6/bash-functions

View File

@ -1,59 +0,0 @@
[#]: subject: "15 ways to advance your Kubernetes journey in 2022"
[#]: via: "https://opensource.com/article/21/12/learn-kubernetes-2022"
[#]: author: "Moshe Zadka https://opensource.com/users/moshez"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
15 ways to advance your Kubernetes journey in 2022
======
Whether you are experimenting with Kubernetes in your homelab or want to
become a Kubernetes maintainer, there is a resource for you on
Opensource.com
![Ship captain sailing the Kubernetes seas][1]
2021 has been an exciting year for Kubernetes, and these articles prove it. From fun interfaces to homelabs to development environments, check out my favorite articles from 2021, K8s style.
If you are interested in the fundamentals, this article [about containers on Linux][2] clarifies how Linux containers work from the inside out. Are you more interested in having some fun? Install minikube and start managing it using [the DOOM video game as an interface][3]. An alternative to DOOM is [kubectl][4], a more traditional Kubernetes control CLI.
Even if you only run Kubernetes on your [Linux homelab][5], you can use tools like [Terraform and Helm][6] to automate day-to-day operations. This creates an opportunity to [get better at Terraform][7].
One of the few things that are certain in life is that computers will fail in weird and interesting ways. [Monitor your Kubernetes cluster with Prometheus and Grafana][8] to see how it fails. Monitor the applications running inside it with [distributed tracing using Grafana Tempo][9]. Monitor how strong your monitoring is by introducing [Chaos Mesh][10] to cause intentional chaos in Kubernetes.
If you are developing applications that run on Kubernetes, [Quarkus can help you develop and test][11]. Developers using Java [can use containers to run][12] the applications on Kubernetes. Tools like [Tackle-DiVA][13] help port the applications to containers.
Like all successful open source projects, part of the value of Kubernetes is a powerful [ecosystem][14]. For example, consider the [KubeEdge project][15], which helps move computing and data closer to the end-user. After using Kubernetes for a while, you might even want to [become a Kubernetes maintainer][16].
With so many interesting Kubernetes topics to choose from, it may be difficult to get through them all. Still, for sysadmins and developers alike, great Kubernetes resources are a must. Give these selections a read.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/12/learn-kubernetes-2022
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas)
[2]: https://opensource.com/article/21/8/container-linux-technology
[3]: https://opensource.com/article/21/6/kube-doom
[4]: https://opensource.com/article/21/7/kubectl
[5]: https://opensource.com/article/21/6/kubernetes-linux-homelab
[6]: https://opensource.com/article/21/8/terraform-deploy-helm
[7]: https://opensource.com/article/21/8/terraform-tips
[8]: https://opensource.com/article/21/6/chaos-grafana-prometheus
[9]: https://opensource.com/article/21/2/tempo-distributed-tracing
[10]: https://opensource.com/article/21/6/chaos-mesh-kubernetes
[11]: https://opensource.com/article/21/7/developer-productivity-linux
[12]: https://opensource.com/article/21/5/what-serverless-java
[13]: https://opensource.com/article/21/6/tackle-diva-kubernetes
[14]: https://opensource.com/article/21/6/kubernetes-ebook
[15]: https://opensource.com/article/21/1/kubeedge
[16]: https://opensource.com/article/21/2/kubernetes-maintainer

View File

@ -1,116 +0,0 @@
[#]: subject: "Using GNOME Screenshot Tool in Linux Like a Pro"
[#]: via: "https://itsfoss.com/using-gnome-screenshot-tool/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Using GNOME Screenshot Tool in Linux Like a Pro
======
There are [several screenshot tools available for Linux][1]. I prefer [using Flameshot for screenshots][2] and Shutter for editing the existing screenshots.
But Flameshot doesnt work with 4K screens, unfortunately. And hence I had to resort back to the default GNOME screenshot tool which works perfectly on my Dell XPS with Ultra HD screen.
![GNOME screenshot tool][3]
This forced move made me realize that the [GNOME screenshot][4] is not a bad utility if you know how to use it properly.
From that, I meant using it with the keyboard shortcuts because that saves a lot of time.
Let me show how to use the GNOME Screenshot application like an expert with all those handy keyboard shortcuts.
I presume that you have not changed the default keyboard shortcuts for screenshot here.
### Take screenshot of entire screen(s): Use Prt Scr key
This is the simplest of the action. Locate the Prt Sc or Prt Scr or Prt Scn key on your keyboard and press it. It will take the screenshot of the entire screen and save it to the Pictures folder under your home directory.
![Screenshot of entire screen saved as PNG file][5]
In some distributions (or versions), you may get the options to whether you want to save the screenshot or not but mostly, it will save the screenshot automatically.
Another thing to note here is that if you have multiple screens attached to the system, it takes screenshot of all the screens together. This means, you get an ultra wide image.
But what if you want to take the screenshot of only a certain application, not the entire screen?
### Take screenshot of an application windows: Use Alt+Prt Scr key
To take the screenshot of a running graphical application, heres what you need to do:
Click on the running application so that it in focus. Now, press and hold the Alt key and press Prt Scr key.
It will take the screenshot of the application window and save to the Pictures directory.
![Screenshot of an application window in GNOME][6]
The screenshots thus taken also has a shadow effect applied to them which looks good.
This is good but what if you want to take the screenshot of only a particular area, not the entire screen? There is a trick for that as well.
### Take screenshot of selected area of the screen: Use Shift+Prt Scr key
Press the Shift key and hold it. Now press the Prt Scr key. Youll see a selector appear on the screen. Move around the mouse to the desired region and start dragging the cursor. It will highlight the region and take a screenshot as soon as you release the mouse.
![Taking screenshot of an area in GNOME][7]
### Copy the screenshots to clipboard instead of saving them
This is very useful when you are chatting someone and have to share a screenshot with the other person.
![Screenshot copied to the clipboard can be used in various applications][8]
Taking the screenshot first and then attach the saved screenshot file to the messaging tool is unnecessary. Instead, you could just copy the screenshot to the clipboard and then use the Ctrl+V shortcut to paste the image (from the clipboard) into the messaging tool.
This way, your system wont have unnecessary screenshots and you also save a few mouse clicks.
To save the screenshots to your clipboard so that you can paste them in a messaging tool, drawing tool or a document, you have to use the Ctrl key together with the other screenshots shortcuts you saw in previous sections.
* Ctrl+Prt Scr: Copies the screenshot of the entire screen(s) to the clipboard
* Ctrl+Alt+Prt Scr: Copies the screenshot of the application windows to the clipboard
* Ctrl+Shift+Prt Scr: Copies the screenshot of the selected region to the clipboard
I must add that [using a tool like Flameshot][2] is even better in such case because it allows you to annotate the screenshots before saving them to clipboard. This way, you can easily highlight the important part of your screen.
### Add delay to screenshot to take screenshots of dropdown menu
So far everything is good. You just press a couple of keys and take the screenshots as you like.
The problem comes when you have to take the screenshot of a dropdown menu or right click context action etc. As soon as you press the screenshot keys, the intended item may disappear.
To handle the situation, you can take the screenshot of the region or entire screen but with a delay.
![Taking screenshot with delay][9]
In the GNOME Screenshot tool, you get the option to add this delay. Say, you add 6 seconds of delay. You hit the take screenshot button and get 6 seconds to do/show what you intend here. After 6 seconds, it automatically takes the screenshot.
### Any tricks up your sleeve?
Thats all the tips I had on GNOME Screenshot tool. If you havent used it extensively, you should find it helpful. If you are already a pro, perhaps you know something that can be added to this article? Share it with the rest of us in the comment section, please.
--------------------------------------------------------------------------------
via: https://itsfoss.com/using-gnome-screenshot-tool/
作者:[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/take-screenshot-linux/
[2]: https://itsfoss.com/flameshot/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-screenshot-tool.jpg?resize=800%2C413&ssl=1
[4]: https://apps.gnome.org/app/org.gnome.Screenshot/
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/screenshot-of-entire-screen-gnome.jpg?resize=800%2C532&ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/screenshot-of-an-application-windows-gnome.png?resize=800%2C437&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/take-screenshot-of-region-gnome.webp?resize=800%2C430&ssl=1
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/saving-screenshot-to-clipboard-and-using-it.webp?resize=800%2C476&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/taking-screenshot-with-delay-gnome.webp?resize=800%2C428&ssl=1

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/1/learn-programming"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -0,0 +1,57 @@
[#]: subject: "5 ways to learn the C programming language in 2022"
[#]: via: "https://opensource.com/article/22/1/c-programming"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
5 ways to learn the C programming language in 2022
======
With only a little knowledge of C, you can do a lot.
![Person drinking a hot drink at the computer][1]
I am proficient in several programming languages, but my favorite has to be C. Developed in the 1970s as a systems programming language, C remains one of the most popular programming languages in 2021. If you'd like to explore several features of the C programming language, start with these popular articles from the last year:
[Short option parsing using getopt in C][2]
You can make your program much more flexible if it responds to the user every time it runs. Let your user tell your program what files to use or how to do things differently. And for that, you need to read the command line. This article shows you how to read the command line directly using `argv` and use short command-line options using `getopt`.
[Position text on your screen in Linux with ncurses][3]
Most Linux utilities just scroll text from the bottom of the screen. But what if you wanted to position text on the screen, such as for a game or a data display? That's where `ncurses` comes in.
[Get started programming with DOS conio][4]
C isn't just for Linux. You can find C on many operating systems, including DOS. The standard way for many C programmers to control console input and output was with the `conio` library. Learn how to use `conio` to update the console from DOS programs, including text color and text windows.
[Write a chess game using bit-fields and masks][5]
The standard way to associate information in a C program is by using a structure that combines two or more related fields. For example, you might use a structure to track chess pieces on a board. But there's a more straightforward way to track the same information while using less data and memory. Using binary bit-fields and masks, you can store a single value to identify the pieces and color in each square.
[5 common bugs in C programming and how to fix them][6]
Even the best programmers can create programming bugs. Depending on what your program does, these bugs could introduce security vulnerabilities, cause the program to crash, or create unexpected behavior. But with a little extra code, you can avoid the most common and most serious C programming bugs. Here are five bugs that can break your application and how you can avoid them.
With only a little knowledge of C, you can do a lot. Explore new ways to add features to your next C programming project.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/c-programming
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
[2]: https://opensource.com/article/21/8/short-option-parsing-c
[3]: https://opensource.com/article/21/8/ncurses-linux
[4]: https://opensource.com/article/21/9/programming-dos-conio
[5]: https://opensource.com/article/21/8/binary-bit-fields-masks
[6]: https://opensource.com/article/21/10/programming-bugs

View File

@ -0,0 +1,175 @@
[#]: subject: "Create bookmarks for your PDF with pdftk"
[#]: via: "https://opensource.com/article/22/1/pdf-metadata-pdftk"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Create bookmarks for your PDF with pdftk
======
Providing bookmarks to your users is helpful and takes advantage of the
technology available.
![Business woman on laptop sitting in front of window][1]
In [introducing pdftk-java][2], I explained how I use the `pdftk-java` command to make quick, often scripted, modifications to PDF files.
However, one of the things `pdftk-java` is most useful for is when I've downloaded a big PDF file, sometimes with hundreds of pages of reference text, and discovered that the PDF creator didn't include a table of contents. I don't mean a printed table of contents in the front matter of the book; I mean the table of contents you get down the side of your PDF reader, which the PDF format officially calls "bookmarks."
![Screenshot of a sidebar table of contents next to a PDF][3]
(Seth Kenlon, [CC BY-SA 4.0][4])
Without bookmarks, finding the chapter you need to reference is cumbersome and involves either lots of scrolling or frustrating searches for words you think you remember seeing in the general area.
Another minor annoyance of many PDF files is the lack of metadata, such as a proper title and author in the PDF properties. If you've ever opened up a PDF and seen something generic like "Microsoft Word - 04_Classics_Revisited.docx" in the window title bar, you know this issue.
I don't have to deal with this problem anymore because I have `pdftk-java`, which lets me create my own bookmarks.
### Install pdftk-java on Linux
As its name suggests, pdftk-java is written in Java, so it works on all major operating systems as long as you have Java installed.
Linux and macOS users can install Linux from [AdoptOpenJDK.net][5].
Windows users can install [Red Hat's Windows build of OpenJDK][6].
To install pdftk-java on Linux:
1. Download the [pdftk-all.jar release][7] from its Gitlab repository and save it to `~/.local/bin/` or [some other location in your path][8].
2. Open `~/.bashrc` in your favorite text editor and add this line to it: `alias pdftk='java -jar $HOME/.local/bin/pdftk-all.jar'`
3. Load your new Bash settings: `source ~/.bashrc`
### Data dump
The first step in correcting the metadata of a PDF is to extract the data file that the PDF currently contains.
There's probably not much to the data file (that's the problem!), but it gives you a good starting place.
```
$ pdftk mybigfile.pdf \
data_dump \
output bookmarks.txt
```
This produces a file called `bookmarks.txt`, and it contains all the metadata assigned to the input file (in this example, `mybigfile.pdf`), plus a lot of bloat.
### Editing metadata
To edit the metadata of the PDF, open your `bookmarks.txt` file in your favorite text editor, such as [Atom][9] or [Gedit][10].
The format is mostly intuitive, and the data contained within it is predictably neglected:
```
InfoBegin
InfoKey: Creator
InfoValue: Word
InfoBegin
InfoKey: ModDate
InfoValue: D:20151221203353Z00&amp;apos;00&amp;apos;
InfoBegin
InfoKey: CreationDate
InfoValue: D:20151221203353Z00&amp;apos;00&amp;apos;
InfoBegin
InfoKey: Producer
InfoValue: Mac OS X 10.10.4 Quartz PDFContext
InfoBegin
InfoKey: Title
InfoValue: Microsoft Word - 04_UA_Classics_Revisited.docx
PdfID0: f049e63eaf3b4061ddad16b455ca780f
PdfID1: f049e63eaf3b4061ddad16b455ca780f
NumberOfPages: 42
PageMediaBegin
PageMediaNumber: 1
PageMediaRotation: 0
PageMediaRect: 0 0 612 792
PageMediaDimensions: 612 792
[...]
```
You can edit InfoValue fields to contain data that makes sense for the PDF you're repairing. For instance, instead of setting the Creator key to the value Word, you could set it to the actual author's name or the publishing house releasing the PDF file. Rather than giving the document the default export string of the application that produced it, give it the book's actual title.
There's also some cleanup work you can do. Everything below the `NumberOfPages` line is also unnecessary, so remove those lines.
### Adding bookmarks
PDF bookmarks follow this format:
```
BookmarkBegin
BookmarkTitle: My first bookmark
BookmarkLevel: 1
BookmarkPageNumber: 2
```
* `BookmarkBegin` indicates that you're creating a new bookmark.
* `BookmarkTitle` contains the text that's visible in the PDF viewer.
* `BookmarkLevel` sets the inheritance level of this bookmark. If you set a BookmarkLevel to 2, it appears within a disclosure triangle of the previous bookmark. If you set a BookmarkLevel to 3, it appears within a disclosure triangle of the previous bookmark, as long as the previous bookmark is set to 2. This setting gives you the ability to bookmark, for example, a chapter title as well as section headings within that chapter.
* `BookmarkPageNumber` determines what PDF page the user is taken to when they click the bookmark.
Create bookmarks for each section of the book that you think is important, then save the file.
### Updating bookmark info
Now that you have your metadata and bookmarks set, you can apply them to your PDF—actually, youll apply them to a new PDF that contains the same content as the old PDF:
```
$ pdftk mybigfile.pdf \
update_info bookmarks.txt \
output mynewfile.pdf
```
This produces a file called `mynewfile.pdf`, containing all of your metadata and bookmarks.
### Professional publishing
The difference between a PDF with generic metadata and no bookmarks and a PDF with personalized metadata values and useful bookmarks probably isn't going to make or break a sale.
However, paying attention to the small details like metadata shows that you value quality assurance, and providing bookmarks to your users is helpful and takes advantage of the technology available.
Use `pdftk-java` to make this process easy, and your users will thank you.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/pdf-metadata-pdftk
作者:[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/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
[2]: https://opensource.com/article/21/12/edit-pdf-linux-pdftk
[3]: https://opensource.com/sites/default/files/uploads/pdtfk_update.jpeg (table of contents)
[4]: https://creativecommons.org/licenses/by-sa/4.0/
[5]: https://adoptopenjdk.net/releases.html
[6]: https://developers.redhat.com/products/openjdk/download
[7]: https://gitlab.com/pdftk-java/pdftk/-/jobs/1527259628/artifacts/raw/build/libs/pdftk-all.jar
[8]: https://opensource.com/article/17/6/set-path-linux
[9]: https://opensource.com/article/20/12/atom
[10]: https://opensource.com/article/20/12/gedit

View File

@ -0,0 +1,208 @@
[#]: subject: "Why might you run your own DNS server?"
[#]: via: "https://jvns.ca/blog/2022/01/05/why-might-you-run-your-own-dns-server-/"
[#]: author: "Julia Evans https://jvns.ca/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why might you run your own DNS server?
======
One of the things that makes DNS difficult to understand is that its **decentralized**. There are thousands (maybe hundreds of thousands? I dont know!) of authoritative nameservers, and at least [10 million resolvers][1]. And theyre running lots of different software! All these different servers running software means that theres a lot of inconsistency in how DNS works, which can cause all kinds of frustrating problems.
But instead of talking about the problems, Im interested in figuring out why is it a good thing that DNS is decentralized?
### why is it good that DNS is decentralized?
One reason is **scalability** the decentralized design of DNS makes it easier to scale and more resilient to failures. I find it really amazing that DNS is still scaling well even though its almost 40 years old. This is very important but its not what this post is about.
Instead, I want to talk about how the fact that its decentralized means that you can have **control** of how your DNS works. You can add more servers to the giant complicated mess of DNS servers! Servers that you control!
Yesterday I [asked on Twitter][2] why you might want to run your own DNS servers, and I got a lot of great answers that I wanted to summarize here.
### you can run 2 types of DNS servers
There are 2 main types of DNS servers you can run:
1. if you own a domain, you can run an **authoritative nameserver** for that domain
2. if you have a computer (or a company with lots of computers), you can run a **resolver** thats resolves DNS for those computers
### DNS isnt a static database
Ive seen the “phone book” metaphor for DNS a lot, where domain names are like names and IP addresses are like phone numbers.
This is an okay mental model to start with. But the “phone book” mental model might make you think that if you make a DNS query for `google.com`, youll always get the same result. And thats not true at all!
Which record you get in reply to a DNS query can depend on:
* where you are in the world (maybe youll get an IP address of a server thats physically closer to you!)
* if youre on a corporate network (where you might be able to resolve internal domain names)
* whether the domain name is considered “bad” by your DNS resolver (it might be blocked!)
* the previous DNS query (maybe the DNS resolver is doing DNS-based load balancing to give you a different IP address every time)
* whether youre using an airport wifi captive portal (airport wifi will resolve DNS records differently before you log in, itll send you a special IP to redirect you)
* literally anything
A lot of the reasons you might want to control your own server are related to the fact that DNS isnt a static database there are a lot of choices you might want to make about how DNS queries are handled (either for your domain or for your organization).
### reasons to run an authoritative nameserver
These reasons arent in any particular order.
For some of these you dont necessarily have to run your own authoritative nameserver, you can just choose an authoritative nameserver service that has the features you want.
To be clear: there are lots of reasons **not** to run your own authoritative nameserver I dont run my own, and Im not trying to convince you that you should. It takes time to maintain, your service might not be as reliable, etc.
**reason: security**
[this tweet phrased it well][3]:
> [Theres a] risk of an attacker gaining DNS change access through your vendors customer support people, who only want to be helpful. Or getting locked out from your DNS (perhaps because of the lack of that). In-house may be easier to audit and verify the contents.
**reason: you like running bind/nsd**
One reason several people mentioned was “Im used to writing zone files and running `bind` or `nsd`, its easier for me to just do that”.
If you like the interface of bind/nsd but dont want to operate your own server, a couple of people mentioned that you can also get the advantages of bind by running a “hidden primary” server which stores the records, but serve all of the actual DNS queries from a “secondary” server. Here are some pages I found about configuring secondary DNS from from [NS1][4] and [cloudflare][5] and [Dyn][6] as an example.
I dont really know what the best authoritative DNS server to run is. I think Ive only used nsd at work.
**reason: you can use new record types**
Some newer DNS record types arent supported by all DNS services, but if you run your own you can support any record types you want.
**reason: user interface**
You might not like the user interface (or API, or lack of API) of the DNS service youre using. This is pretty related to the “you like running BIND” reason maybe you like the zone file interface!
**reason: you can fix problems yourself**
There are some obvious pros and cons to being able to fix problems yourself when they arise (pro: you can fix the problem, con: you have to fix the problem).
**reason: do something weird and custom**
You can write a DNS server that does anything you want, it doesnt have to just return a static set of records.
A few examples:
* Replit has a blog post about [why they wrote their own authoritative DNS server to handle routing][7]
* [nip.io][8] maps 10.0.0.1.nip.io to 10.0.0.1
* I wrote a custom DNS server for [mess with dns][9]
**reason: to save money**
Authoritative nameservers seem to generally charge per million DNS queries. As an example, at a quick glance it looks like Route 53 charges about $0.50 per million queries and [NS1][10] charges about $8 per million queries.
I dont have the best sense for how many queries a large websites authoritative DNS server can expect to actually need to resolve (what kinds of sites get 1 billion DNS queries to their authoritative DNS server? Probably a lot, but I dont have experience with that.). But a few people in the replies mentioned cost as a reason.
**reason: you can change your registrar**
If you use a separate authoritative nameserver for your domain instead of your registrars nameserver, then when you move to a different registrar all you hvae to do to get your DNS back up is to set your authoritative DNS server to the right value. You dont need to migrate all your DNS records, which is a huge pain!
You dont need to run your own nameserver to do this.
**reason: geo DNS**
You might want to return different IP addresses for your domain depending on where the client is, to give them a server thats close to them.
This is a service lots of authoritative nameserver services offer, you dont need to write your own to do this.
**reason: avoid denial of service attacks targeted at someone else**
Many authoritative DNS servers are shared. This means that if someone attacks the DNS server for `google.com` or something and you happen to be using the same authoritative DNS server, you could be affected even though the attack wasnt aimed at you. For example, this [DDoS attack on Dyn][11] in 2016.
**reason: keep all of your configuration in one place**
One person mentioned that they like to keep all of their configuration (DNS records, lets encrypt, nginx, etc) in the same place on one server.
**wild reason: use DNS as a VPN**
Apparently [iodine][12] is an authoritative DNS server that lets you tunnel your traffic over DNS, if youre on a network that only allows you to contact the outside world as a VPN.
### reasons to run a resolver
**reason: privacy**
If someone can see all your DNS lookups, they have a complete list of all the domains you (or everyone from your organization) is visiting! You might prefer to keep that private.
**reason: block malicious sites**
If you run your own resolver, you can refuse to resolve DNS queries (by just not returning any results) for domains that you consider “bad”.
A few examples of resolvers that you can run yourself (or just use):
* [Pi-Hole][13] blocks advertisers
* [Quad9][14] blocks domains that do malware/phishing/spyware. Cloudflare seems to have a [similar service][15]
* I imagine theres also corporate security software that blocks DNS queries for domains that host malware
* DNS isnt a static database. Its very dynamic, and answers often depend in real time on the IP address a query came from, current load on content servers etc. Thats hard to do in real time unless you delegate serving those records to the entity making those decisions.
* DNS delegating control makes access control very simple. Everything under a zone cut is controlled by the person who controls the delegated server, so responsibility for a hostname is implicit in the DNS delegation.
**reason: get dynamic proxying in nginx**
Heres a cool story from [this tweet][16]:
> I wrote a DNS server into an app and then set it as nginxs resolver so that I could get dynamic backend proxying without needing nginx to run lua. Nginx sends DNS query to app, app queries redis and responds accordingly. It worked pretty great for what I was doing.
**reason: avoid malicious resolvers**
Some ISPs run DNS resolvers that do bad things like nonexistent domains to an IP they control that shows you ads or a weird search page that they control.
Using either a resolver you control or a different resolver that you trust can help you avoid that.
**reason: resolve internal domains**
You might have an internal network with domains (like `blah.corp.yourcompany.com`) that arent on the public internet. Running your own resolver for machines in the internal network makes it possible to access those domains.
You can do the same thing on a home network, either to access local-only services or to just get local addresses for services that are on the public internet.
**reason: avoid your DNS queries being MITMd**
One person [said][17]:
> I run a resolver on my LAN router that uses DNS over HTTPS for its upstream, so IoT and other devices that dont support DoH or DoT dont spray plaintext DNS outside
### thats all for now
It feels important to me to explore the “why” of DNS, because its such a complicated messy system and I think most people find it hard to get motivated to learn about complex topics if they dont understand why all this complexity is useful.
Thanks to Marie and Kamal for discussing this post, and to everyone on Twitter who provided reasons
--------------------------------------------------------------------------------
via: https://jvns.ca/blog/2022/01/05/why-might-you-run-your-own-dns-server-/
作者:[Julia Evans][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://jvns.ca/
[b]: https://github.com/lujun9972
[1]: https://www.icann.org/en/blogs/details/ten-million-dns-resolvers-on-the-internet-22-3-2012-en
[2]: https://twitter.com/b0rk/status/1478490484406468614
[3]: https://twitter.com/thatcks/status/1478503078680838153
[4]: https://help.ns1.com/hc/en-us/articles/360017508173-Configuring-NS1-as-a-secondary-provider-a-k-a-Creating-secondary-zones-
[5]: https://blog.cloudflare.com/secondary-dns-a-faster-more-resilient-way-to-serve-your-dns-records/
[6]: https://help.dyn.com/standard-dns/dyn-secondary-dns-information/
[7]: https://blog.replit.com/dns
[8]: https://nip.io
[9]: https://jvns.ca/blog/2021/12/15/mess-with-dns/
[10]: https://ns1.com/plans
[11]: https://en.wikipedia.org/wiki/DDoS_attack_on_Dyn
[12]: https://github.com/yarrick/iodine
[13]: https://pi-hole.net/
[14]: https://www.quad9.net/
[15]: https://developers.cloudflare.com/1.1.1.1/1.1.1.1-for-families
[16]: https://twitter.com/jordanorelli/status/1478795241876504577
[17]: https://twitter.com/passcod/status/1478806468539269120

View File

@ -0,0 +1,78 @@
[#]: subject: "Must-have open source cheat sheets for 2022"
[#]: via: "https://opensource.com/article/22/1/open-source-cheat-sheets"
[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Must-have open source cheat sheets for 2022
======
Keep these handy cheat sheets at your side while you learn the Linux
command line or practice a new programming language.
![Brain on a computer screen][1]
You can't remember every command or shortcut you need to use. We are all human. Usually, I keep notes on separate bits of paper and in notebooks. This has led to some serious dysfunction on my desk. There is some five years' worth of clutter in scribbled bits everywhere. 2021's cheat sheets will bring that clutter down a notch. From JavaScript to Linux, there's something in this list for you.
### How to write your first JavaScript code
This [article][2] is for those first-timers out there who want to try learning a new language this year. [Seth Kenlon][3] covers installing JavaScript and getting started making a simple HTML page. While Seth explains that JavaScript isn't only for websites, all major web browsers do have a JavaScript engine to run your code. Throughout this walkthrough, Seth covers syntax, variables, and functions to get you started on your way to creating a new app. Finally, Seth covers the ability to go cross-platform with JavaScript before sharing the [cheat sheet][4]. 
### Linux Package management
In [Chris Hermansen's][5] [article][6], we get a brief preview for using `apt` before he shares his [cheat sheet][7]. Many people use Debian-based Linux daily at home and in the office. In this starter article, we get a sneak peek at what we can use `apt` for, starting with using `apt` to find software within the packaging system and also look into those packages' metadata with another command. Next, Chris covers if a package includes a file or package dependencies required during the install. Finally, Chris covers how to remove packages with the `apt` command. This thorough cheat sheet can give you more than your day-to-day package management with Linux. If `apt` isn't for you, you can check out the `dnf` [cheat sheet][8].
### Get started programming with DOS conio
Are you looking to get into DOS next year? If so, you're ready to create exciting new applications and [Jim Hall][9] has a [cheat sheet][10] for you. While defining `conio` in this [article][11], Jim covers how to make your very own colorful text-based user interface before sharing the cheat sheet. Jim explains that you can do so much more with your apps that are more interactive and exciting. Now that you have this cheat sheet, you can create your own app using DOS `conio`.
### Learn SQLite3
Work with this common database? Here's how you can be a power user with this [cheat sheet][12]. In this [hands-on tutorial][13], [Klaatu][14] starts with installing and interacting with SQLite3, then creates a database with a table before sharing the cheat sheet. Klaatu also explains data types and the date timestamp function in a nice simple paragraph. Klaatu adds more detailed functions to this tutorial, including viewing tables, altering tables, and so much more. If you want to go forth and be powerful with your SQLite3 database or just want to learn how to use it, this cheat sheet is for you.
### More Linux cheat sheets
While I've only scratched the surface with these cheat sheets, I would like to mention some honorable mentions that include cheat sheets for Linux by [Seth Kenlon][3]:
* Seth's powerful use of [grep][15] is useful for every occasion.
* The [find][16] command cheat sheet is especially helpful for when I don't want to spend a ton of time wandering around directories.
* The [wget][17] cheat sheet is handy for those times you really need something from the internet.
### Start 2022 with a look back on 2021
2021 was a stellar year for cheat sheets, many of which were about Linux, but others have taken it so far as to start you off with a brand new language. I urge you to print out these cheat sheets and start learning something new in 2022. We welcome authors of all experience levels, so tell us how you learned your new skills by [sending us an article or cheat sheet idea][18].
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/open-source-cheat-sheets
作者:[Jessica Cherry][a]
选题:[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/cherrybomb
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brain_computer_solve_fix_tool.png?itok=okq8joti (Brain on a computer screen)
[2]: https://opensource.com/article/21/7/javascript-cheat-sheet
[3]: https://opensource.com/users/seth
[4]: https://opensource.com/downloads/javascript-cheat-sheet
[5]: https://opensource.com/users/clhermansen
[6]: https://opensource.com/article/21/6/apt-linux
[7]: https://opensource.com/downloads/apt-cheat-sheet
[8]: https://opensource.com/downloads/dnf-cheat-sheet
[9]: https://opensource.com/users/jim-hall
[10]: https://opensource.com/downloads/dos-conio-cheat-sheet
[11]: https://opensource.com/article/21/9/programming-dos-conio
[12]: https://opensource.com/downloads/sqlite-cheat-sheet
[13]: https://opensource.com/article/21/2/sqlite3-cheat-sheet
[14]: https://opensource.com/users/klaatu
[15]: https://opensource.com/downloads/grep-cheat-sheet
[16]: https://opensource.com/downloads/linux-find-cheat-sheet
[17]: https://opensource.com/downloads/linux-wget-cheat-sheet
[18]: https://opensource.com/how-submit-article

View File

@ -0,0 +1,225 @@
[#]: subject: "Send desktop notifications and reminders from Linux terminal"
[#]: via: "https://opensource.com/article/22/1/linux-desktop-notifications"
[#]: author: "Tomasz Waraksa https://opensource.com/users/tomasz"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Send desktop notifications and reminders from Linux terminal
======
This Linux tutorial demonstrates how to use script commands to send
yourself desktop notifications and reminders.
![Person using a laptop][1]
Sometimes it's useful to get visual feedback from a script. For example, when a script or cron job completes, a long-running build fails, or there is an urgent problem during script execution. Desktop applications can do this with popup notifications, but it can be done from a script too! You can use script commands to send yourself desktop notifications and reminders.
![Example notification][2]
(Tomasz Waraksa, CC BY-SA 4.0)
The below code has been written and tested on Linux. It can also be done on macOS with a bit of effort. See the last section for some [hints and tips][3].
### Sending notifications from the Linux terminal
To send notifications from the Linux terminal, use the [`notify-send`][4] command. Run `which ``notify-send` to see if it's present on your system. If not, install it with your package manager of choice.
On Fedora, type:
```
`$ sudo dnf install notify-send`
```
On Debian-based distributions, type:
```
`$ sudo apt install notify-send`
```
A few examples of simple notifications:
```
$ notify-send "Dinner ready!"
$ notify-send "Tip of the Day" "How about a nap?"
```
You can customize the notification with options such as urgency level, custom icon, etc. Find out more with `man notify-send`. You can use a small set of HTML tags in the notification body to give your messages a nice touch. On top of that, URLs are rendered as clickable. For example:
```
$ notify-send -u critical \
  "Build failed!" \
  "There were &lt;b&gt;123&lt;/b&gt; errors. Click here to see the results: <http://buildserver/latest>"
```
![Build fail notification][5]
(Tomasz Waraksa, CC BY-SA 4.0)
Sent notifications are picked up by the desktop environment and displayed just like any other notification. They will have the same consistent look, feel, and behavior.
### Combine notify-send with at
Cron is commonly used to schedule commands at regular intervals. The `at` command schedules the single execution of a command at a specified time. If you run it like this, it starts in interactive mode, where you can enter commands to execute at a given time:
```
`$ at 12:00`
```
This isn't useful for scripts. Luckily, `at` accepts parameters from standard input so that we can use it this way:
```
$ echo "npm run build" | at now + 1 minute
$ echo "backup-db" | at 13:00
```
There are many ways of specifying time. From absolute time, such as `10:00` through relative time, such as `now + 2 hours`, to special times such as `noon` or `midnight`. We can combine it with `notify-send` to show ourselves reminders at some time in the future. For example:
```
`$ echo "notify-send 'Stop it and go home now?' 'Enough work for today.' -u critical" | at now`
```
![Stop for the day notification][6]
(Tomasz Waraksa, CC BY-SA 4.0)
### The remind command
Now, build a custom Bash command for sending yourself reminders. How about something as simple and human-friendly as:
```
$ remind "I'm still here" now
$ remind "Time to wake up!" in 5 minutes
$ remind "Dinner" in 1 hour
$ remind "Take a break" at noon
$ remind "It's Friday pints time!" at 17:00
```
This is better than Alexa! How to get this goodness?
See the code below. It defines a shell function called **remind**, which supports the above syntax. The actual work is done in the last two lines. The rest is responsible for help, parameter validation, etc., which roughly matches the proportion of useful code vs. necessary white-noise in any large application.
Save the code somewhere, for example, in the `~/bin/remind` file, and source the function in your `.bashrc` profile so that it's loaded when you log in:
```
`$ source ~/bin/remind`
```
Reload the terminal, then type remind to see the syntax. Enjoy!
```
#!/usr/bin/env bash
function remind () {
  local COUNT="$#"
  local COMMAND="$1"
  local MESSAGE="$1"
  local OP="$2"
  shift 2
  local WHEN="$@"
  # Display help if no parameters or help command
  if [[ $COUNT -eq 0 || "$COMMAND" == "help" || "$COMMAND" == "--help" || "$COMMAND" == "-h" ]]; then
    echo "COMMAND"
    echo "    remind &lt;message&gt; &lt;time&gt;"
    echo "    remind &lt;command&gt;"
    echo
    echo "DESCRIPTION"
    echo "    Displays notification at specified time"
    echo
    echo "EXAMPLES"
    echo '    remind "Hi there" now'
    echo '    remind "Time to wake up" in 5 minutes'
    echo '    remind "Dinner" in 1 hour'
    echo '    remind "Take a break" at noon'
    echo '    remind "Are you ready?" at 13:00'
    echo '    remind list'
    echo '    remind clear'
    echo '    remind help'
    echo
    return
  fi
  # Check presence of AT command
  if ! which at &gt;/dev/null; then
    echo "remind: AT utility is required but not installed on your system. Install it with your package manager of choice, for example 'sudo apt install at'."
    return
  fi
  # Run commands: list, clear
  if [[ $COUNT -eq 1 ]]; then
    if [[ "$COMMAND" == "list" ]]; then
      at -l
    elif [[ "$COMMAND" == "clear" ]]; then
      at -r $(atq | cut -f1)
    else
      echo "remind: unknown command $COMMAND. Type 'remind' without any parameters to see syntax."
    fi
    return
  fi
  # Determine time of notification
  if [[ "$OP" == "in" ]]; then
    local TIME="now + $WHEN"
  elif [[ "$OP" == "at" ]]; then
    local TIME="$WHEN"
  elif [[ "$OP" == "now" ]]; then
    local TIME="now"
  else
    echo "remind: invalid time operator $OP"
    return
  fi
  # Schedule the notification
  echo "notify-send '$MESSAGE' 'Reminder' -u critical" | at $TIME 2&gt;/dev/null
  echo "Notification scheduled at $TIME"
}
```
### Easy notifications
With these few simple open source commands, you can integrate your own scripts, applications, and tasks with your desktop. Try it out!
* * *
_This article has been adapted with the author's permission from the original article, found [here][7]._
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/1/linux-desktop-notifications
作者:[Tomasz Waraksa][a]
选题:[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/tomasz
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
[2]: https://opensource.com/sites/default/files/buyeggs.png (Example notification)
[3]: https://opensource.com/article/22/1/linux-desktop-notifications/#script-notifications-on-macOS
[4]: https://manpages.ubuntu.com/manpages/xenial/man1/notify-send.1.html
[5]: https://opensource.com/sites/default/files/buildfail.png (Build fail notification)
[6]: https://opensource.com/sites/default/files/stop-it.png (Stop for the day notification)
[7]: https://letsdebug.it/post/30-linux-desktop-notifications/

View File

@ -1,83 +0,0 @@
[#]: subject: "Folder or Directory? Heres Why Folders are Called Directories in Linux"
[#]: via: "https://itsfoss.com/folder-directory-linux/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
文件夹还是目录?这里是为什么文件夹在 Linux 中被称为目录的原因
======
如果你开始使用 Windows 的电脑,你很可能会使用文件夹这个术语。
但当你切换到 Linux 时,你会发现文件夹通常被称为目录。
可能使一些新的 Linux 用户感到困惑。你应该叫它文件夹还是目录?甚至有区别吗?
事情是这样的。如果你愿意,你可以叫它文件夹,如果你喜欢,也可以叫它目录。这不会有什么区别。
但是如果你想知道为什么文件夹在Linux中被称为目录这里有一些解释。
### 为什么文件夹在 Linux 中被称为目录?
在我解释之前,让我们回顾一下文件夹和目录在现实世界中的用途。
文件夹(信封)可以在里面保存几个文件(或其他东西)。目录可以用来维护项目的索引,这样你就可以找到哪个项目位于哪里。
![Illustration of folder and directory][1]
现在,让我们回到目录。这个词甚至在 Linux 存在之前就已经存在了。它来自 UNIX 时代。Linux 继承了 UNIX 的很多东西,这只是其中的一个。
现在让我告诉你一些可能让你吃惊的事情。目录并不是真的把文件放在里面。_**目录是一个“特殊的文件”,它知道文件的存储位置(通过[inode][2])。**_
这就说明了为什么它被称为目录。目录保存项目的索引而不一定是项目本身。Linux 和 UNIX 中的目录并不保存它里面的文件。它们只是有关于文件位置的信息。
如果你想了解更多关于它的信息,我关于[硬链接][3]的文章应该可以帮助你。
那么,为什么它被称为文件夹呢?对我来说,这来自于视角。当你在一个图形环境中时,你会将事物可视化。在这里,文件可以像页面一样被可视化,这些文件页面被存储在一个信封(文件夹)中。
当操作系统开始使用图形元素时,我认为一些术语也相应地发生了变化,目录-文件夹就是其中之一。
### 你应该叫它文件夹还是目录?
这完全取决于你。你可以在你方便的时候使用这两个术语。
然而,如果你正在学习 Linux 命令行或经常使用它,使用目录这个术语可能会有一点帮助。
有一些 Linux 命令,如 mkdir、rmdir 等。术语 “dir” 给出了一个提示,即这些命令与目录有关。
同样,许多 Linux 命令和 bash 脚本会使用选项 `-d` 表示目录,`-f` 表示文件。
至终端中的文件属性也会通过在目录前面加上字母 `d` 来区分文件和文件夹(目录)。
拿这个例子来说,我有一个名为 “some” 的文件和一个名为 “something” 的文件夹/目录。请注意各种 Linux 命令是如何用 “dir” 或 “d” 来区分文件和目录的。
![Example showing the difference between files and directories operations][4]
所有这些让我觉得,在使用 Linux 命令时,使用“目录”这个术语会有好处。你的潜意识会更容易将 “dir” 和 “d” 与目录联系起来。
再说一次,如果你想叫它文件夹或目录,这完全取决于你。人们会明白你指的是什么。
我刚刚对目录一词的历史渊源做了一些分析,这应该会给你一些提示,为什么人们说“在 Linux/UNIX 中,所有东西都是一个文件”。
我已经结束了我的闲聊,我邀请你对此发表评论。 如果你发现任何技术错误,请告诉我。
--------------------------------------------------------------------------------
via: https://itsfoss.com/folder-directory-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://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/folder-directory.png?resize=800%2C450&ssl=1
[2]: https://linuxhandbook.com/inode-linux/
[3]: https://linuxhandbook.com/hard-link/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/file-directory-commands-difference.png?resize=800%2C378&ssl=1

View File

@ -0,0 +1,58 @@
[#]: subject: "15 ways to advance your Kubernetes journey in 2022"
[#]: via: "https://opensource.com/article/21/12/learn-kubernetes-2022"
[#]: author: "Moshe Zadka https://opensource.com/users/moshez"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 2022 年推进你的 Kubernetes 之旅的 15 种方法
======
无论你是在家庭实验室里试验 Kubernetes还是想成为一个成为 Kubernetes 的维护者Opensource.com 上都有适合你的资源。
![Ship captain sailing the Kubernetes seas][1]
2021 年对于 Kubernetes 来说是令人兴奋的一年,这些文章证明了这一点。从有趣的界面到家庭实验室再到开发环境,看看我在 2021 年最喜欢的 K8s 文章。
如果你对基本原理感兴趣,这篇[关于 Linux 上的容器][2]从内到外阐明了 Linux 容器的工作原理。你是否想获取一些乐趣?安装 minikube 并开始使用 [DOOM 游戏作为界面][3]来管理它。DOOM 的另一个选择是 [kubectl][4],一个更传统的 Kubernetes 控制 CLI。
即使你只在你的 [Linux homelab][5] 上运行 Kubernetes你也可以使用 [Terraform 和 Helm][6] 等工具来自动化日常操作。这创造了一个[更好地掌握 Terraform][7]的机会。
生活中可以确定的几件事之一是,计算机会以奇怪而有趣的方式出错。[用 Prometheus 和 Grafana 监控你的 Kubernetes 集群][8],看看它是如何出错的。[使用 Grafana Tempo 的分布式跟踪][9]来监控里面运行的应用。通过引入 [Chaos Mesh][10] 在 Kubernetes 中造成有意的混乱,来监控你监控的性能。
如果你正在开发在 Kubernetes 上运行的应用,[Quarkus 可以帮助你开发和测试][11]。使用 Java 的开发者[可以使用容器在 Kubernetes 上运行][12]应用。像 [Tackle-DiVA][13] 这样的工具有助于将应用移植到容器中。
像所有成功的开源项目一样Kubernetes 的部分价值是一个强大的[生态系统][14]。例如,考虑到 [KubeEdge 项目][15],它有助于将计算和数据更接近终端用户。在使用 Kubernetes 一段时间后,你甚至可能想[成为 Kubernetes 维护者][16]。
有这么多有趣的 Kubernetes 主题可供选择,可能很难将它们全部看完。不过,对于系统管理员和开发人员来说,优秀的 Kubernetes 资源是必须的。请阅读这些精选的内容。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/12/learn-kubernetes-2022
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas)
[2]: https://opensource.com/article/21/8/container-linux-technology
[3]: https://opensource.com/article/21/6/kube-doom
[4]: https://opensource.com/article/21/7/kubectl
[5]: https://opensource.com/article/21/6/kubernetes-linux-homelab
[6]: https://opensource.com/article/21/8/terraform-deploy-helm
[7]: https://opensource.com/article/21/8/terraform-tips
[8]: https://opensource.com/article/21/6/chaos-grafana-prometheus
[9]: https://opensource.com/article/21/2/tempo-distributed-tracing
[10]: https://opensource.com/article/21/6/chaos-mesh-kubernetes
[11]: https://opensource.com/article/21/7/developer-productivity-linux
[12]: https://opensource.com/article/21/5/what-serverless-java
[13]: https://opensource.com/article/21/6/tackle-diva-kubernetes
[14]: https://opensource.com/article/21/6/kubernetes-ebook
[15]: https://opensource.com/article/21/1/kubeedge
[16]: https://opensource.com/article/21/2/kubernetes-maintainer

View File

@ -0,0 +1,116 @@
[#]: subject: "Using GNOME Screenshot Tool in Linux Like a Pro"
[#]: via: "https://itsfoss.com/using-gnome-screenshot-tool/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 Linux 中像专业人士一样使用 GNOME 截图工具
======
有[几个可用于 Linux 的截图工具][1]。我更喜欢[使用 Flameshot 进行截图][2]和 Shutter 来编辑现有的截图。
但不幸的是Flameshot 不能在 4K 屏幕上工作。因此,我不得不使用默认的 GNOME 截图工具,它在我的带有超高清屏幕的戴尔 XPS 上工作得非常好。
![GNOME screenshot tool][3]
这一“被迫之举”让我意识到,如果你知道如何正确使用,[GNOME 截图][4]并不是一个糟糕的工具。
由此,我指的是用键盘快捷键来使用它,因为这样可以节省大量的时间。
让我展示一下如何像专家一样用那些方便的键盘快捷键来使用 GNOME 截图应用。
我假定你没有改变这里的默认的截图的键盘快捷键。
### 对整个屏幕进行截图:使用 Prt Scr 键
这是最简单的操作。在你的键盘上找到 Prt Sc 或 Prt Scr 或 Prt Scn 键并按下它。它将对整个屏幕进行截图,并将其保存在你的主目录下的图片文件夹中。
![Screenshot of entire screen saved as PNG file][5]
在某些发行版(或版本)中,你可能会看到是否要保存截图的选项,但大多数情况下,它会自动保存屏幕截图。
这里需要注意的另一件事是,如果你有多个屏幕连接到系统上,它会把所有的屏幕一起截图。这意味着,你会得到一个超宽的图像。
但是,如果你只想对某个应用进行截图,而不是对整个屏幕进行截图呢?
### 给一个应用程序的窗口截图:使用 Alt+Prt Scr 键
要给正在运行的图形应用截图,你需要这样做:
点击正在运行的应用,使其成为焦点。现在,按住 Alt 键并按 Prt Scr 键。
它将获得应用窗口的截图,并保存到图片目录中。
![Screenshot of an application window in GNOME][6]
这样获取的截图也有一个阴影效果,看起来很不错。
这很好,但如果你只想给某个特定区域截图,而不是整个屏幕呢?这也有一个技巧。
### 对屏幕的选定区域进行截图:使用 Shift+Prt Scr 键
按住 Shift 键。然后按 Prt Scr 键。你会看到屏幕上出现一个选框。将鼠标移动到所需的区域,开始拖动光标。它将高亮显示该区域,并在你释放鼠标后立即进行截图。
![Taking screenshot of an area in GNOME][7]
### 复制截图到剪贴板而不是保存它们
当你在和别人聊天时,要和对方分享屏幕截图时,这非常有用。
![Screenshot copied to the clipboard can be used in various applications][8]
首先截图,然后将保存的截图文件附在聊天工具中是不必要的。相反,你可以直接将截图复制到剪贴板,然后使用 Ctrl+V 快捷键将图像(从剪贴板)粘贴到聊天工具。
这样,你的系统就不会有不必要的截图,你也可以节省一些鼠标点击次数。
要把截图保存到剪贴板,以便你能把它们粘贴到聊天工具、绘图工具或文档中,你必须把 Ctrl 键和你在前面几节中看到的其他截图快捷键一起使用。
* Ctrl+Prt Scr将整个屏幕的截图复制到剪贴板上。
* Ctrl+Alt+Prt Scr将应用窗口的截图复制到剪贴板上。
* Ctrl+Shift+Prt Scr将选定区域的截图复制到剪贴板上
我必须补充一点,在这种情况下,[使用像 Flameshot 这样的工具][2]甚至更好,因为它允许你在将截图保存到剪贴板之前对其进行注释。这样,你可以很容易地高亮屏幕的重要部分。
### 在截图中添加延迟,以便对下拉菜单进行截图
到目前为止,一切都很好。你只需按下几个键,就可以随心所欲地进行截图了。
问题是,当你要对下拉菜单或右键动作等进行截图时。当你按下屏幕截图键时,想要的项目可能会消失。
为了处理这种情况,你可以对该区域或整个屏幕进行截图,但要有一个延迟。
![Taking screenshot with delay][9]
在 GNOME 屏幕截图工具中,你可以选择添加这个延迟。例如,你添加了 6 秒的延迟。你点击截图按钮,有 6 秒时间来做/显示你想做的事情。6 秒后,它就会自动截图了。
### 你有什么技巧吗?
这就是我对 GNOME 截图工具的所有提示。如果你还没有广泛地使用它,你应该会发现它很有帮助。如果你已经是一个专家,也许你知道一些可以添加到本文中的东西?请在评论区与我们其他人分享吧。
--------------------------------------------------------------------------------
via: https://itsfoss.com/using-gnome-screenshot-tool/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/take-screenshot-linux/
[2]: https://itsfoss.com/flameshot/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-screenshot-tool.jpg?resize=800%2C413&ssl=1
[4]: https://apps.gnome.org/app/org.gnome.Screenshot/
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/screenshot-of-entire-screen-gnome.jpg?resize=800%2C532&ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/screenshot-of-an-application-windows-gnome.png?resize=800%2C437&ssl=1
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/take-screenshot-of-region-gnome.webp?resize=800%2C430&ssl=1
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/saving-screenshot-to-clipboard-and-using-it.webp?resize=800%2C476&ssl=1
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/taking-screenshot-with-delay-gnome.webp?resize=800%2C428&ssl=1